Commit c8e1f138 by zhaochengxiang

去掉不要的功能

parent f0ef1c60
......@@ -32,9 +32,9 @@ const actions = [
{ title: '历史版本', key: 'history' },
{ title: '授权', key: 'admit' },
{ title: '申请', key: 'startFlow' },
{ title: '下载Tableau tds', key: 'downloadTds' },
{ title: '跳转至电子表格', key: 'smart' },
{ title: '更换管理', key: 'exchangeOwner' },
// { title: '下载Tableau tds', key: 'downloadTds' },
// { title: '跳转至电子表格', key: 'smart' },
{ title: '更换管理', key: 'exchangeOwner' },
]
const ModelNameColumn = (props) => {
......@@ -194,6 +194,7 @@ const ModelTable = (props) => {
if (record.odata) {
authActionTitles.push('URI复制');
}
authActionTitles.push('样本数据');
authActionTitles.push('历史版本');
......@@ -205,17 +206,17 @@ const ModelTable = (props) => {
authActionTitles.push('申请');
}
if (getDataModelerRole(user)!==DataModelerRoleReader && view!=='grant' && !isOnlyEnding && record.supportODataDisable) {
authActionTitles.push('下载Tableau tds');
if (getDataModelerRole(user)!==DataModelerRoleReader && view!=='grant' && record.supportChangeOwn) {
authActionTitles.push('更换管理');
}
if (getDataModelerRole(user)!==DataModelerRoleReader && view!=='grant' && record.supportSmartBIWebSpreadSheet) {
authActionTitles.push('跳转至电子表格');
}
// if (getDataModelerRole(user)!==DataModelerRoleReader && view!=='grant' && !isOnlyEnding && record.supportODataDisable) {
// authActionTitles.push('下载Tableau tds');
// }
if (getDataModelerRole(user)!==DataModelerRoleReader && view!=='grant' && record.supportChangeOwn) {
authActionTitles.push('更换管理人');
}
// if (getDataModelerRole(user)!==DataModelerRoleReader && view!=='grant' && record.supportSmartBIWebSpreadSheet) {
// authActionTitles.push('跳转至电子表格');
// }
const authActions = actions.filter(item => authActionTitles.indexOf(item.title) !== -1);
......@@ -234,7 +235,11 @@ const ModelTable = (props) => {
{
showActions.map((item, index) => {
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) => {
}
placement="bottomLeft"
>
<UnorderedListOutlined className='default' style={{ fontSize:16,cursor:'pointer' }} />
<UnorderedListOutlined className='default' style={{ fontSize:16,cursor:'pointer', marginLeft: 5 }} />
</Dropdown>
}
</Space>
......@@ -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(() => {
let newCols = [];
attrs?.forEach(item => {
newCols.push({
let col = {
title: item.name,
dataIndex: item.key,
ellipsis: true,
width: 120,
})
};
newCols.push(col);
if (item.key === 'name') {
col.render = (text, record, index) => {
return (<ModelNameColumn text={text} record={record} detailItem={detailItem} />);
}
}
});
if (!modelId) {
......@@ -478,7 +496,7 @@ const ModelTable = (props) => {
}
return newCols;
}, [visibleColNames, attrs, indexCol, actionCol, modelId])
}, [visibleColNames, attrs, indexCol, actionCol, modelId, detailItem])
const modelEventChange = (e) => {
if (e.key === 'modelChange') {
......@@ -536,12 +554,6 @@ const ModelTable = (props) => {
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) => {
onAutoCreateTable && onAutoCreateTable(record);
}
......@@ -914,7 +926,7 @@ const ModelTable = (props) => {
}
{
getDataModelerRole(user)!==DataModelerRoleReader && view!=='grant' && currentItem?.supportChangeOwn && <RcItem id="exchangeOwner" onClick={handleItemClick}>
更换管理
更换管理
</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