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
f50feb0c
Commit
f50feb0c
authored
Jan 09, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
是否启动OData
parent
4f8c9e47
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
5 deletions
+58
-5
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+6
-0
index.jsx
src/view/Manage/Model/index.jsx
+52
-5
No files found.
src/view/Manage/Model/Component/ModelTable.jsx
View file @
f50feb0c
...
@@ -236,6 +236,12 @@ const ModelTable = (props) => {
...
@@ -236,6 +236,12 @@ const ModelTable = (props) => {
sortDirections
:
[
'ascend'
,
'descend'
],
sortDirections
:
[
'ascend'
,
'descend'
],
},
},
{
{
title
:
'是否启动OData'
,
dataIndex
:
'supportODataDisable'
,
width
:
120
,
render
:
(
supportODataDisable
,
_
,
__
)
=>
supportODataDisable
?
'是'
:
'否'
},
{
title
:
'版本号'
,
title
:
'版本号'
,
dataIndex
:
'modifiedTs'
,
dataIndex
:
'modifiedTs'
,
width
:
170
,
width
:
170
,
...
...
src/view/Manage/Model/index.jsx
View file @
f50feb0c
...
@@ -53,6 +53,7 @@ class Model extends React.Component {
...
@@ -53,6 +53,7 @@ class Model extends React.Component {
loadingStates
:
false
,
loadingStates
:
false
,
modelStates
:
[],
modelStates
:
[],
currentModelState
:
props
.
isOnlyEnding
?
'4_0'
:
''
,
currentModelState
:
props
.
isOnlyEnding
?
'4_0'
:
''
,
currentODataState
:
'0'
,
currentView
:
''
,
currentView
:
''
,
exportDDLModalReference
:
'exportDDL'
,
exportDDLModalReference
:
'exportDDL'
,
currentModel
:
{},
currentModel
:
{},
...
@@ -130,6 +131,12 @@ class Model extends React.Component {
...
@@ -130,6 +131,12 @@ class Model extends React.Component {
})
})
}
}
onODataStateChange
=
(
value
)
=>
{
this
.
setState
({
currentODataState
:
value
,
offset
:
null
},
()
=>
{
this
.
onTableChange
();
})
}
onTreeSelect
=
(
key
,
offset
=
null
)
=>
{
onTreeSelect
=
(
key
,
offset
=
null
)
=>
{
this
.
setState
({
catalogId
:
key
,
keyword
:
''
,
offset
,
currentModelState
:
(
offset
!==
null
)?
''
:
this
.
state
.
currentModelState
},
()
=>
{
this
.
setState
({
catalogId
:
key
,
keyword
:
''
,
offset
,
currentModelState
:
(
offset
!==
null
)?
''
:
this
.
state
.
currentModelState
},
()
=>
{
...
@@ -142,7 +149,7 @@ class Model extends React.Component {
...
@@ -142,7 +149,7 @@ class Model extends React.Component {
}
}
onTableChange
=
()
=>
{
onTableChange
=
()
=>
{
const
{
currentView
,
catalogId
,
keyword
,
currentModelState
}
=
this
.
state
;
const
{
currentView
,
catalogId
,
keyword
,
currentModelState
,
currentODataState
}
=
this
.
state
;
this
.
setState
({
loadingTableData
:
true
},
()
=>
{
this
.
setState
({
loadingTableData
:
true
},
()
=>
{
if
(
keyword
===
''
)
{
if
(
keyword
===
''
)
{
...
@@ -162,7 +169,16 @@ class Model extends React.Component {
...
@@ -162,7 +169,16 @@ class Model extends React.Component {
type: 'pds.getServices',
type: 'pds.getServices',
payload: params,
payload: params,
callback: data => {
callback: data => {
this.setState({ loadingTableData: false, tableData: data.pdsdataServices||[], filterTableData: data.pdsdataServices||[] });
const filterData = data.pdsdataServices?.filter(service => {
if (currentODataState === '0') return true;
if (currentODataState === '1') return service.supportODataDisable;
if (currentODataState === '2') return !service.supportODataDisable;
return false;
})
this.setState({ loadingTableData: false, tableData: data.pdsdataServices||[], filterTableData: filterData });
},
},
error: () => {
error: () => {
this.setState({ loadingTableData: false });
this.setState({ loadingTableData: false });
...
@@ -177,7 +193,15 @@ class Model extends React.Component {
...
@@ -177,7 +193,15 @@ class Model extends React.Component {
isExcludeOtherOwner: !this.props.isOnlyEnding
isExcludeOtherOwner: !this.props.isOnlyEnding
},
},
callback: data => {
callback: data => {
this.setState({ loadingTableData: false, tableData: data.pdsdataServices||[], filterTableData: data.pdsdataServices||[] });
const filterData = data.pdsdataServices?.filter(service => {
if (currentODataState === '0') return true;
if (currentODataState === '1') return service.supportODataDisable;
if (currentODataState === '2') return !service.supportODataDisable;
return false;
})
this.setState({ loadingTableData: false, tableData: data.pdsdataServices||[], filterTableData: filterData });
},
},
error: () => {
error: () => {
this.setState({ loadingTableData: false });
this.setState({ loadingTableData: false });
...
@@ -200,7 +224,15 @@ class Model extends React.Component {
...
@@ -200,7 +224,15 @@ class Model extends React.Component {
type: 'pds.searchService',
type: 'pds.searchService',
payload: params,
payload: params,
callback: data => {
callback: data => {
this.setState({ loadingTableData: false, tableData: data||[], filterTableData: data||[] });
const filterData = data?.filter(service => {
if (currentODataState === '0') return true;
if (currentODataState === '1') return service.supportODataDisable;
if (currentODataState === '2') return !service.supportODataDisable;
return false;
})
this.setState({ loadingTableData: false, tableData: data||[], filterTableData: filterData });
},
},
error: () => {
error: () => {
this.setState({ loadingTableData: false });
this.setState({ loadingTableData: false });
...
@@ -526,7 +558,7 @@ class Model extends React.Component {
...
@@ -526,7 +558,7 @@ class Model extends React.Component {
render() {
render() {
const { app, isOnlyEnding } = this.props;
const { app, isOnlyEnding } = this.props;
const { importModalVisible, catalogId, loadingTableData, selectModelerIds, keyword, filterTableData, selectModelerNames, exportDDLModalVisible, exportOtherModalVisible, importStockWordDrawerVisible , loadingStates, modelStates, currentModelState, currentView, recatalogModalVisible, exportDDLModalReference, currentModel, offset, historyAndVersionDrawerVisible, modelerId, startFlowModalVisible, expandTree, showDeleteTip, colSettingModalVisible, visibleColNames } = this.state;
const { importModalVisible, catalogId, loadingTableData, selectModelerIds, keyword, filterTableData, selectModelerNames, exportDDLModalVisible, exportOtherModalVisible, importStockWordDrawerVisible , loadingStates, modelStates, currentModelState, currentView, recatalogModalVisible, exportDDLModalReference, currentModel, offset, historyAndVersionDrawerVisible, modelerId, startFlowModalVisible, expandTree, showDeleteTip, colSettingModalVisible, visibleColNames
, currentODataState
} = this.state;
const classes = classNames('data-model', {
const classes = classNames('data-model', {
'data-model-collapse': !expandTree
'data-model-collapse': !expandTree
...
@@ -633,6 +665,7 @@ class Model extends React.Component {
...
@@ -633,6 +665,7 @@ class Model extends React.Component {
<Space>
<Space>
{
{
(currentView==='dir'||keyword!=='') && <Space>
(currentView==='dir'||keyword!=='') && <Space>
<span>发布状态:</span>
<Select
<Select
style={{ width: 120 }}
style={{ width: 120 }}
onChange={(value) => {
onChange={(value) => {
...
@@ -652,6 +685,20 @@ class Model extends React.Component {
...
@@ -652,6 +685,20 @@ class Model extends React.Component {
</Space>
</Space>
}
}
<Space>
<Space>
<span>OData状态</span>
<Select
style={{ width: 120 }}
onChange={(value) => {
this.onODataStateChange(value);
}}
value={currentODataState}
>
<Option value='0'>所有状态</Option>
<Option value='1'>已启动</Option>
<Option value='2'>没有启动</Option>
</Select>
</Space>
<Space>
<InputDebounce
<InputDebounce
placeholder="通过服务名称全文搜索"
placeholder="通过服务名称全文搜索"
allowClear
allowClear
...
...
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