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
41a38336
Commit
41a38336
authored
Jan 09, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产数据源系统
parent
6337d61d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
4 deletions
+57
-4
App.js
src/App.js
+4
-1
assetmanage.js
src/model/assetmanage.js
+6
-1
dataassetmanager.js
src/service/dataassetmanager.js
+5
-0
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+42
-2
No files found.
src/App.js
View file @
41a38336
...
...
@@ -137,7 +137,10 @@ export class App extends React.Component {
setGlobalState
,
onGlobalStateChange
}}
>
<
DataService
isOnlyEnding
=
{
message
===
'showDataServiceManage'
}
/
>
<
DataService
isOnlyEnding
=
{
message
===
'showDataServiceManage'
}
{...
this
.
props
}
/
>
<
/AppContext.Provider
>
);
}
...
...
src/model/assetmanage.js
View file @
41a38336
...
...
@@ -255,5 +255,9 @@ export function* subs(payload) {
}
export
function
*
startFlow
(
payload
)
{
return
yield
call
(
service
.
startFlow
,
payload
)
return
yield
call
(
service
.
startFlow
,
payload
);
}
export
function
*
getSystems
(
payload
)
{
return
yield
call
(
service
.
getSystems
,
payload
);
}
\ No newline at end of file
src/service/dataassetmanager.js
View file @
41a38336
...
...
@@ -262,4 +262,8 @@ export function subs(payload) {
export
function
startFlow
(
payload
)
{
return
Post
(
"/dataassetmanager/flowApi/startDataAssetFlow"
,
payload
);
}
export
function
getSystems
(
payload
)
{
return
GetJSON
(
`/authservice/domains/
${
payload
.
env
}
/systems`
);
}
\ No newline at end of file
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
41a38336
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
,
useContext
}
from
'react'
;
import
{
Form
,
Spin
,
Input
,
Descriptions
,
Space
,
Button
,
Tooltip
,
Select
}
from
'antd'
;
import
{
DownOutlined
,
UpOutlined
}
from
'@ant-design/icons'
;
...
...
@@ -29,9 +29,14 @@ const AssetAction = (props) => {
const
{
assets
,
attributes
,
attributesFoldMap
}
=
assetParams
;
const
[
assetTagModalVisible
,
setAssetTagModalVisible
]
=
useState
(
false
);
const
[
selectTag
,
setSelectTag
]
=
useState
({});
const
[
systems
,
setSystems
]
=
useState
([]);
const
[
loadingSystems
,
setLoadingSystems
]
=
useState
(
false
);
const
app
=
useContext
(
AppContext
);
useEffect
(()
=>
{
if
(
action
===
'add'
)
{
getSystems
();
getElements
();
}
else
{
setCurrentAction
(
'detail'
);
...
...
@@ -66,6 +71,23 @@ const AssetAction = (props) => {
});
}
const
getSystems
=
()
=>
{
setLoadingSystems
(
true
);
dispatch
({
type
:
'assetmanage.getSystems'
,
payload
:
{
env
:
app
?.
env
?.
domainId
,
},
callback
:
data
=>
{
setLoadingSystems
(
false
);
setSystems
(
data
||
[])
},
error
:
()
=>
{
setLoadingSystems
(
false
);
}
});
}
const
getResourceRelations
=
()
=>
{
dispatch
({
type
:
'assetmanage.getResourceRelations'
,
...
...
@@ -376,7 +398,25 @@ const AssetAction = (props) => {
};
const elementComponent = (element) => {
if (element.name==='资产项') return <MetadataInfo />
if (element.name==='资产项') return <MetadataInfo />;
if (element.name === '数据源系统') {
return (
<Select
allowClear
loading={loadingSystems}
disabled={element.manualMaintain==='否'}
>
{
systems?.map((system, index) => {
return <Select.Option key={index} value={system.scopeName}>
{system.scopeName}
</Select.Option>
})
}
</Select>
)
}
if (element.selectMode==='单选') {
return (
...
...
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