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
5e9dfeb9
Commit
5e9dfeb9
authored
Nov 08, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务管理
parent
fe454c2f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
14 deletions
+20
-14
App.js
src/App.js
+4
-4
pds.js
src/service/pds.js
+2
-2
ModelTree.jsx
src/view/Manage/Model/Component/ModelTree.jsx
+5
-2
index.jsx
src/view/Manage/Model/index.jsx
+9
-6
No files found.
src/App.js
View file @
5e9dfeb9
...
...
@@ -124,7 +124,7 @@ export class App extends React.Component {
);
}
if
(
message
===
'showDataService'
)
{
if
(
message
===
'showDataService'
||
message
===
'showDataServiceManage'
)
{
return
(
<
AppContext
.
Provider
value
=
{{
env
:
hostParams
?.
env
,
...
...
@@ -135,7 +135,7 @@ export class App extends React.Component {
setGlobalState
,
onGlobalStateChange
}}
>
<
DataService
/>
<
DataService
isOnlyEnding
=
{
message
===
'showDataServiceManage'
}
/
>
<
/AppContext.Provider
>
);
}
...
...
@@ -156,8 +156,8 @@ export class App extends React.Component {
return
(
<
AppContext
.
Provider
value
=
{{
env
:
hostParams
?.
env
,
user
:
hostParams
?.
user
,
env
:
hostParams
?.
env
,
user
:
hostParams
?.
user
,
setGlobalState
,
onGlobalStateChange
}}
>
...
...
src/service/pds.js
View file @
5e9dfeb9
...
...
@@ -4,8 +4,8 @@ export function refreshCatalog() {
return
GetJSON
(
"/pdataservice/pdsCURD/refreshDataServiceCatalog"
)
}
export
function
loadStateCatalog
()
{
return
GetJSON
(
"/pdataservice/pdsCURD/loadDataServiceStateCatalog"
)
export
function
loadStateCatalog
(
payload
)
{
return
GetJSON
(
"/pdataservice/pdsCURD/loadDataServiceStateCatalog"
,
payload
)
}
export
function
saveCatalog
(
payload
)
{
...
...
src/view/Manage/Model/Component/ModelTree.jsx
View file @
5e9dfeb9
...
...
@@ -34,7 +34,7 @@ const ModelTree = (props) => {
id
:
MENU_ID
,
});
const
{
onSelect
,
onViewChange
,
refrence
=
''
,
importStockModel
,
keyword
}
=
props
;
const
{
onSelect
,
onViewChange
,
refrence
=
''
,
importStockModel
,
keyword
,
isOnlyEnding
=
false
}
=
props
;
const
{
user
,
env
}
=
useContext
(
AppContext
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
...
...
@@ -220,6 +220,9 @@ const ModelTree = (props) => {
setLoading(true);
dispatch({
type: 'pds.loadStateCatalog',
payload: {
isOnlyEnding
},
callback: data => {
setLoading(false);
let _treeData = data?.subCatalogs||[];
...
...
@@ -514,7 +517,7 @@ const ModelTree = (props) => {
</
Dropdown
>
{
(
viewSelectedKey
===
'dir'
&&
getDataModelerRole
(
user
)
===
DataModelerRoleAdmin
)
&&
(
(
viewSelectedKey
===
'dir'
&&
getDataModelerRole
(
user
)
===
DataModelerRoleAdmin
&&
!
isOnlyEnding
)
&&
(
<
Tooltip
title=
"新增目录"
className=
'ml-6'
>
<
PlusOutlined
className=
'default'
onClick=
{
add
}
style=
{
{
fontSize
:
16
,
cursor
:
'pointer'
}
}
/>
</
Tooltip
>
...
...
src/view/Manage/Model/index.jsx
View file @
5e9dfeb9
...
...
@@ -29,8 +29,8 @@ const InputDebounce = DebounceInput(300)(Input);
class
Model
extends
React
.
Component
{
constructor
()
{
super
();
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
importModalVisible
:
false
,
importStockWordDrawerVisible
:
false
,
...
...
@@ -50,7 +50,7 @@ class Model extends React.Component {
hints
:
[],
loadingStates
:
false
,
modelStates
:
[],
currentModelState
:
''
,
currentModelState
:
props
.
isOnlyEnding
?
'4_0'
:
''
,
currentView
:
''
,
exportDDLModalReference
:
'exportDDL'
,
currentModel
:
{},
...
...
@@ -83,10 +83,13 @@ class Model extends React.Component {
this
.
setState
({
loadingStates
:
true
},
()
=>
{
dispatch
({
type
:
'pds.loadStateCatalog'
,
payload
:
{
isOnlyEnding
:
this
.
props
.
isOnlyEnding
},
callback
:
data
=>
{
this
.
setState
({
loadingStates
:
false
,
modelStates
:
[{
name
:
'all'
,
id
:
''
,
cnName
:
'所有状态'
},
...(
data
?.
subCatalogs
||
[])]
modelStates
:
this
.
props
.
isOnlyEnding
?
data
?.
subCatalogs
||
[]
:
[{
name
:
'all'
,
id
:
''
,
cnName
:
'所有状态'
},
...(
data
?.
subCatalogs
||
[])]
});
},
error
:
()
=>
{
...
...
@@ -466,7 +469,7 @@ class Model extends React.Component {
}
render() {
const { app } = 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 classes = classNames('data-model', {
...
...
@@ -509,7 +512,7 @@ class Model extends React.Component {
>
<Space>
{
currentView==='dir' && (getDataModelerRole(app?.user)!==DataModelerRoleReader) && <React.Fragment>
currentView==='dir' && (getDataModelerRole(app?.user)!==DataModelerRoleReader) &&
!isOnlyEnding &&
<React.Fragment>
<Space>
<Button onClick={() => {
app?.editServer?.({ dirId: catalogId })
...
...
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