Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaochengxiang
szse
Commits
c8e1f138
Commit
c8e1f138
authored
Jun 16, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉不要的功能
parent
f0ef1c60
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
23 deletions
+35
-23
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+35
-23
No files found.
src/view/Manage/Model/Component/ModelTable.jsx
View file @
c8e1f138
...
...
@@ -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>
} */}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment