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
5f903da3
Commit
5f903da3
authored
Jun 15, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
可见列设置
parent
6d8b2443
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
119 additions
and
177 deletions
+119
-177
pds.js
src/model/pds.js
+9
-0
pds.js
src/service/pds.js
+9
-0
ColSettingModal.jsx
src/view/Manage/Model/Component/ColSettingModal.jsx
+14
-15
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+74
-152
index.jsx
src/view/Manage/Model/index.jsx
+13
-10
No files found.
src/model/pds.js
View file @
5f903da3
...
...
@@ -119,4 +119,12 @@ export function* saveOwner(payload) {
export
function
*
changeOwner
(
payload
)
{
return
yield
call
(
pds
.
changeOwner
,
payload
)
}
export
function
*
saveCols
(
payload
)
{
return
yield
call
(
pds
.
saveCols
,
payload
);
}
export
function
*
getCols
(
payload
)
{
return
yield
call
(
pds
.
getCols
,
payload
);
}
\ No newline at end of file
src/service/pds.js
View file @
5f903da3
...
...
@@ -118,4 +118,12 @@ export function saveOwner(payload) {
export
function
changeOwner
(
payload
)
{
return
PostJSON
(
"/pdataservice/pdsCURD/changeOwnerOfDataService"
,
payload
)
}
export
function
saveCols
(
payload
)
{
return
PostJSON
(
"/pdataservice/pdsModel/saveVisibleTitle"
,
payload
);
}
export
function
getCols
(
payload
)
{
return
GetJSON
(
"/pdataservice/pdsModel/getVisibleTitle"
,
payload
);
}
\ No newline at end of file
src/view/Manage/Model/Component/ColSettingModal.jsx
View file @
5f903da3
...
...
@@ -4,13 +4,14 @@ import { Modal, Button, Switch, Row, Col, Checkbox, Typography } from 'antd';
import
{
dispatch
}
from
'../../../../model'
;
const
cols
=
[
{
title
:
'
模型名称'
,
require
:
true
},
{
title
:
'
服务名称'
},
{
title
:
'中文名称'
},
{
title
:
'路径'
},
{
title
:
'状态'
},
{
title
:
'创建人'
},
{
title
:
'管理人'
},
{
title
:
'是否启动OData'
},
{
title
:
'版本号'
},
{
title
:
'
模型
描述'
},
{
title
:
'
服务
描述'
},
];
const
ColSettingModal
=
(
props
)
=>
{
...
...
@@ -20,22 +21,19 @@ const ColSettingModal = (props) => {
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
(
false
);
useEffect
(()
=>
{
if
(
visible
)
{
getPreference
();
}
//eslint-disable-next-line react-hooks/exhaustive-deps
},
[
visible
]);
const
getPreference
=
()
=>
{
dispatch
({
type
:
'datamodel.getPreference'
,
type
:
'pds.getCols'
,
payload
:
{
modelName
:
'DataServiceCol'
},
callback
:
data
=>
{
if
((
data
.
cols
||
''
)
===
''
)
{
onCheckAllChange
(
true
);
}
else
{
setCheckedKeys
(
data
.
cols
.
split
(
','
));
}
setCheckedKeys
(
data
?.
map
(
item
=>
item
.
titleCnName
));
}
})
}
...
...
@@ -76,11 +74,12 @@ const ColSettingModal = (props) => {
const
onModalOk
=
()
=>
{
setConfirmLoading
(
true
);
dispatch
({
type
:
'
datamodel.savePreference
'
,
type
:
'
pds.saveCols
'
,
payload
:
{
data
:
{
cols
:
checkedKeys
.
join
(
','
)
}
params
:
{
modelName
:
'DataServiceCol'
},
data
:
checkedKeys
?.
map
(
item
=>
{
return
{
titleCnName
:
item
}
})
},
callback
:
()
=>
{
setConfirmLoading
(
false
);
...
...
src/view/Manage/Model/Component/ModelTable.jsx
View file @
5f903da3
This diff is collapsed.
Click to expand it.
src/view/Manage/Model/index.jsx
View file @
5f903da3
...
...
@@ -74,7 +74,7 @@ class Model extends React.Component {
componentDidMount
()
{
this
.
getModelStates
();
//
this.getPreference();
this
.
getPreference
();
window
?.
addEventListener
(
"storage"
,
this
.
modelEventChange
);
}
...
...
@@ -111,14 +111,12 @@ class Model extends React.Component {
getPreference
=
()
=>
{
dispatch
({
type
:
'datamodel.getPreference'
,
type
:
'pds.getCols'
,
payload
:
{
modelName
:
'DataServiceCol'
},
callback
:
data
=>
{
this
.
setState
();
if
((
data
.
cols
||
''
)
===
''
)
{
this
.
setState
({
visibleColNames
:
[]});
}
else
{
this
.
setState
({
visibleColNames
:
data
.
cols
.
split
(
','
)});
}
this
.
setState
({
visibleColNames
:
data
?.
map
(
item
=>
item
.
titleCnName
)});
}
})
}
...
...
@@ -679,9 +677,9 @@ class Model extends React.Component {
<Button onClick={this.onBatchDeleteBtnClick} disabled={(selectModelerIds||[]).length===0}>删除</Button>
</Tooltip>
</Space> */}
{/*
<Space>
<Space>
<Button onClick={this.onVisibleColSettingClick}>可见列设置</Button>
</Space>
*/}
</Space>
</React.Fragment>
}
{
...
...
@@ -795,6 +793,11 @@ class Model extends React.Component {
ids={selectModelerIds}
onCancel={this.onOfflineCancel}
/>
<ColSettingModal
visible={colSettingModalVisible}
onCancel={this.onColSettingModalCancel}
/>
</div>
);
}
...
...
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