Commit c8e1f138 by zhaochengxiang

去掉不要的功能

parent f0ef1c60
...@@ -32,9 +32,9 @@ const actions = [ ...@@ -32,9 +32,9 @@ const actions = [
{ title: '历史版本', key: 'history' }, { title: '历史版本', key: 'history' },
{ title: '授权', key: 'admit' }, { title: '授权', key: 'admit' },
{ title: '申请', key: 'startFlow' }, { title: '申请', key: 'startFlow' },
{ title: '下载Tableau tds', key: 'downloadTds' }, // { title: '下载Tableau tds', key: 'downloadTds' },
{ title: '跳转至电子表格', key: 'smart' }, // { title: '跳转至电子表格', key: 'smart' },
{ title: '更换管理', key: 'exchangeOwner' }, { title: '更换管理', key: 'exchangeOwner' },
] ]
const ModelNameColumn = (props) => { const ModelNameColumn = (props) => {
...@@ -194,6 +194,7 @@ const ModelTable = (props) => { ...@@ -194,6 +194,7 @@ const ModelTable = (props) => {
if (record.odata) { if (record.odata) {
authActionTitles.push('URI复制'); authActionTitles.push('URI复制');
} }
authActionTitles.push('样本数据'); authActionTitles.push('样本数据');
authActionTitles.push('历史版本'); authActionTitles.push('历史版本');
...@@ -205,17 +206,17 @@ const ModelTable = (props) => { ...@@ -205,17 +206,17 @@ const ModelTable = (props) => {
authActionTitles.push('申请'); authActionTitles.push('申请');
} }
if (getDataModelerRole(user)!==DataModelerRoleReader && view!=='grant' && !isOnlyEnding && record.supportODataDisable) { if (getDataModelerRole(user)!==DataModelerRoleReader && view!=='grant' && record.supportChangeOwn) {
authActionTitles.push('下载Tableau tds'); authActionTitles.push('更换管理');
} }
if (getDataModelerRole(user)!==DataModelerRoleReader && view!=='grant' && record.supportSmartBIWebSpreadSheet) { // if (getDataModelerRole(user)!==DataModelerRoleReader && view!=='grant' && !isOnlyEnding && record.supportODataDisable) {
authActionTitles.push('跳转至电子表格'); // authActionTitles.push('下载Tableau tds');
} // }
if (getDataModelerRole(user)!==DataModelerRoleReader && view!=='grant' && record.supportChangeOwn) { // if (getDataModelerRole(user)!==DataModelerRoleReader && view!=='grant' && record.supportSmartBIWebSpreadSheet) {
authActionTitles.push('更换管理人'); // authActionTitles.push('跳转至电子表格');
} // }
const authActions = actions.filter(item => authActionTitles.indexOf(item.title) !== -1); const authActions = actions.filter(item => authActionTitles.indexOf(item.title) !== -1);
...@@ -234,7 +235,11 @@ const ModelTable = (props) => { ...@@ -234,7 +235,11 @@ const ModelTable = (props) => {
{ {
showActions.map((item, index) => { showActions.map((item, index) => {
return ( return (
<a key={index} onClick={() => {handleItemClick(item.key, record)}} >{item.title}</a> <div key={index} style={{ width: 50 }}>
<a
onClick={() => {handleItemClick(item.key, record)}}
>{item.title}</a>
</div>
) )
}) })
} }
...@@ -258,7 +263,7 @@ const ModelTable = (props) => { ...@@ -258,7 +263,7 @@ const ModelTable = (props) => {
} }
placement="bottomLeft" placement="bottomLeft"
> >
<UnorderedListOutlined className='default' style={{ fontSize:16,cursor:'pointer' }} /> <UnorderedListOutlined className='default' style={{ fontSize:16,cursor:'pointer', marginLeft: 5 }} />
</Dropdown> </Dropdown>
} }
</Space> </Space>
...@@ -455,15 +460,28 @@ const ModelTable = (props) => { ...@@ -455,15 +460,28 @@ const ModelTable = (props) => {
} }
} }
const detailItem = (record) => {
// onItemAction && onItemAction(record, 'detail', getDataModelerRole(user)===DataModelerRoleReader);
app.openDetail?.({ service: record })
// setServiceDetailParams({ visible: true, id: record.id })
}
const columns = useMemo(() => { const columns = useMemo(() => {
let newCols = []; let newCols = [];
attrs?.forEach(item => { attrs?.forEach(item => {
newCols.push({ let col = {
title: item.name, title: item.name,
dataIndex: item.key, dataIndex: item.key,
ellipsis: true, ellipsis: true,
width: 120, width: 120,
}) };
newCols.push(col);
if (item.key === 'name') {
col.render = (text, record, index) => {
return (<ModelNameColumn text={text} record={record} detailItem={detailItem} />);
}
}
}); });
if (!modelId) { if (!modelId) {
...@@ -478,7 +496,7 @@ const ModelTable = (props) => { ...@@ -478,7 +496,7 @@ const ModelTable = (props) => {
} }
return newCols; return newCols;
}, [visibleColNames, attrs, indexCol, actionCol, modelId]) }, [visibleColNames, attrs, indexCol, actionCol, modelId, detailItem])
const modelEventChange = (e) => { const modelEventChange = (e) => {
if (e.key === 'modelChange') { if (e.key === 'modelChange') {
...@@ -536,12 +554,6 @@ const ModelTable = (props) => { ...@@ -536,12 +554,6 @@ const ModelTable = (props) => {
app.editServer?.({ dirId: catalogId, service: record }) app.editServer?.({ dirId: catalogId, service: record })
} }
const detailItem = (record) => {
// onItemAction && onItemAction(record, 'detail', getDataModelerRole(user)===DataModelerRoleReader);
app.openDetail?.({ service: record })
// setServiceDetailParams({ visible: true, id: record.id })
}
const deployAction = (record) => { const deployAction = (record) => {
onAutoCreateTable && onAutoCreateTable(record); onAutoCreateTable && onAutoCreateTable(record);
} }
...@@ -914,7 +926,7 @@ const ModelTable = (props) => { ...@@ -914,7 +926,7 @@ const ModelTable = (props) => {
} }
{ {
getDataModelerRole(user)!==DataModelerRoleReader && view!=='grant' && currentItem?.supportChangeOwn && <RcItem id="exchangeOwner" onClick={handleItemClick}> getDataModelerRole(user)!==DataModelerRoleReader && view!=='grant' && currentItem?.supportChangeOwn && <RcItem id="exchangeOwner" onClick={handleItemClick}>
更换管理 更换管理
</RcItem> </RcItem>
} */} } */}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment