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
1f6444a7
Commit
1f6444a7
authored
Apr 04, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
72dbb3b3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
12 deletions
+87
-12
pds.js
src/model/pds.js
+4
-0
pds.js
src/service/pds.js
+4
-0
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+65
-7
UpdateTaskModal.jsx
...iew/Manage/DatasourceManage/Component/UpdateTaskModal.jsx
+12
-4
SelectUsers.jsx
src/view/Manage/Model/Component/SelectUsers.jsx
+2
-1
No files found.
src/model/pds.js
View file @
1f6444a7
...
@@ -109,6 +109,10 @@ export function* getOwners() {
...
@@ -109,6 +109,10 @@ export function* getOwners() {
return
yield
call
(
pds
.
getOwners
)
return
yield
call
(
pds
.
getOwners
)
}
}
export
function
*
getDepartments
()
{
return
yield
call
(
pds
.
getDepartments
)
}
export
function
*
saveOwner
(
payload
)
{
export
function
*
saveOwner
(
payload
)
{
return
yield
call
(
pds
.
saveOwner
,
payload
)
return
yield
call
(
pds
.
saveOwner
,
payload
)
}
}
...
...
src/service/pds.js
View file @
1f6444a7
...
@@ -108,6 +108,10 @@ export function getOwners() {
...
@@ -108,6 +108,10 @@ export function getOwners() {
return
GetJSON
(
"/informationmanagement/userData/findAll"
)
return
GetJSON
(
"/informationmanagement/userData/findAll"
)
}
}
export
function
getDepartments
()
{
return
GetJSON
(
"/informationmanagement/userData/getAllDepartment"
)
}
export
function
saveOwner
(
payload
)
{
export
function
saveOwner
(
payload
)
{
return
GetJSON
(
"/informationmanagement/userData/getUserDataAndInsert"
,
payload
);
return
GetJSON
(
"/informationmanagement/userData/getUserDataAndInsert"
,
payload
);
}
}
...
...
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
1f6444a7
...
@@ -13,6 +13,7 @@ import { AnchorId, AnchorDirId } from '../../../../util/constant';
...
@@ -13,6 +13,7 @@ import { AnchorId, AnchorDirId } from '../../../../util/constant';
import
IndexCode
from
'./IndexCode'
;
import
IndexCode
from
'./IndexCode'
;
import
{
CancelSvg
,
EditSvg
,
SaveSvg
,
FullScreenSvg
,
CancelFullScreenSvg
}
from
'./AssetSvg'
;
import
{
CancelSvg
,
EditSvg
,
SaveSvg
,
FullScreenSvg
,
CancelFullScreenSvg
}
from
'./AssetSvg'
;
import
SelectUser
from
'../../Model/Component/SelectUsers'
;
const
AssetAction
=
(
props
)
=>
{
const
AssetAction
=
(
props
)
=>
{
const
{
id
,
dirId
,
action
,
terms
,
onChange
,
readOnly
=
false
,
form
,
onMetadataChange
,
onElementsChange
}
=
props
;
const
{
id
,
dirId
,
action
,
terms
,
onChange
,
readOnly
=
false
,
form
,
onMetadataChange
,
onElementsChange
}
=
props
;
...
@@ -31,15 +32,20 @@ const AssetAction = (props) => {
...
@@ -31,15 +32,20 @@ const AssetAction = (props) => {
const
[
selectTag
,
setSelectTag
]
=
useState
({});
const
[
selectTag
,
setSelectTag
]
=
useState
({});
const
[
systems
,
setSystems
]
=
useState
([]);
const
[
systems
,
setSystems
]
=
useState
([]);
const
[
loadingSystems
,
setLoadingSystems
]
=
useState
(
false
);
const
[
loadingSystems
,
setLoadingSystems
]
=
useState
(
false
);
const
[
users
,
setUsers
]
=
useState
([]);
const
[
loadingUsers
,
setLoadingUsers
]
=
useState
(
false
);
const
[
departments
,
setDepartments
]
=
useState
([]);
const
[
loadingDepartments
,
setLoadingDepartments
]
=
useState
(
false
);
const
app
=
useContext
(
AppContext
);
const
app
=
useContext
(
AppContext
);
useEffect
(()
=>
{
useEffect
(()
=>
{
getSystems
();
getUsers
();
getDepartments
();
if
(
action
===
'add'
)
{
if
(
action
===
'add'
)
{
getSystems
();
getElements
();
getElements
();
}
else
{
}
else
{
getSystems
();
setCurrentAction
(
'detail'
);
setCurrentAction
(
'detail'
);
if
((
id
||
''
)
!==
''
)
{
if
((
id
||
''
)
!==
''
)
{
getAssetPaths
();
getAssetPaths
();
...
@@ -89,6 +95,34 @@ const AssetAction = (props) => {
...
@@ -89,6 +95,34 @@ const AssetAction = (props) => {
});
});
}
}
const
getUsers
=
()
=>
{
setLoadingUsers
(
true
);
dispatch
({
type
:
'pds.getOwners'
,
callback
:
(
data
)
=>
{
setLoadingUsers
(
false
);
setUsers
(
data
);
},
error
:
()
=>
{
setLoadingUsers
(
false
);
}
})
}
const
getDepartments
=
()
=>
{
setLoadingDepartments
(
true
);
dispatch
({
type
:
'pds.getDepartments'
,
callback
:
(
data
)
=>
{
setLoadingDepartments
(
false
);
setDepartments
(
data
);
},
error
:
()
=>
{
setLoadingDepartments
(
false
);
}
})
}
const
getResourceRelations
=
()
=>
{
const
getResourceRelations
=
()
=>
{
dispatch
({
dispatch
({
type
:
'assetmanage.getResourceRelations'
,
type
:
'assetmanage.getResourceRelations'
,
...
@@ -407,16 +441,40 @@ const AssetAction = (props) => {
...
@@ -407,16 +441,40 @@ const AssetAction = (props) => {
allowClear
allowClear
loading={loadingSystems}
loading={loadingSystems}
disabled={element.manualMaintain==='否'}
disabled={element.manualMaintain==='否'}
>
{
systems?.map((system, index) => {
return <Select.Option key={index} value={system.scopeName}>
{system.scopeName}
</Select.Option>
})
}
</Select>
)
}
if (element.name==='数据关键用户' || element.name==='业务部门负责人' || element.name==='it责任人') {
return <SelectUser
type='edit'
loading={loadingUsers}
users={users}
/>
}
if (element.name==='业务责任部门' || element.name==='it责任部门') {
return <Select
allowClear
loading={loadingDepartments}
disabled={element.manualMaintain==='否'}
>
>
{
{
systems?.map((system
, index) => {
departments?.map((department
, index) => {
return <Select.Option key={index} value={
system.scopeName
}>
return <Select.Option key={index} value={
department
}>
{
system.scopeName
}
{
department
}
</Select.Option>
</Select.Option>
})
})
}
}
</Select>
</Select>
)
}
}
if (element.selectMode==='单选') {
if (element.selectMode==='单选') {
...
@@ -625,7 +683,7 @@ const AssetAction = (props) => {
...
@@ -625,7 +683,7 @@ const AssetAction = (props) => {
});
});
return (
return (
<Form {...formItemLayout} form={form}>
<Form {...formItemLayout} form={form}
labelWrap
>
{
{
(sameAttributeElements||[]).map((element, _index) => {
(sameAttributeElements||[]).map((element, _index) => {
return (
return (
...
...
src/view/Manage/DatasourceManage/Component/UpdateTaskModal.jsx
View file @
1f6444a7
import
React
,
{
useEffect
,
useMemo
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useMemo
,
useState
}
from
'react'
;
import
{
Modal
,
Checkbox
,
Row
,
Col
,
Divider
,
Input
,
Typography
,
Form
,
Switch
}
from
'antd'
;
import
{
Modal
,
Checkbox
,
Row
,
Col
,
Divider
,
Input
,
Typography
,
Form
,
Switch
,
Select
}
from
'antd'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
dispatch
}
from
'../../../../model'
;
...
@@ -255,7 +255,9 @@ const UpdateTaskModal = (props) => {
...
@@ -255,7 +255,9 @@ const UpdateTaskModal = (props) => {
return
<></>;
return
<></>;
})
})
}
}
<
Divider
>
过滤信息
</
Divider
>
<
Divider
>
{
(
taskSettings
?.
target
?.
type
===
'AtlasTarget'
||
taskSettings
?.
target
?.
type
===
'SapbwTarget'
)?
'代理配置'
:
'过滤信息'
}
</
Divider
>
<
Form
{
...
formItemLayout
}
form=
{
form
}
>
<
Form
{
...
formItemLayout
}
form=
{
form
}
>
{
{
taskSettings
&&
(
taskSettings
.
targetConfParameters
||
[]).
map
((
param
,
index
)
=>
{
taskSettings
&&
(
taskSettings
.
targetConfParameters
||
[]).
map
((
param
,
index
)
=>
{
...
@@ -268,8 +270,14 @@ const UpdateTaskModal = (props) => {
...
@@ -268,8 +270,14 @@ const UpdateTaskModal = (props) => {
key=
{
index
}
key=
{
index
}
rules=
{
[{
required
:
param
.
required
,
message
:
'必填项'
}]
}
rules=
{
[{
required
:
param
.
required
,
message
:
'必填项'
}]
}
>
>
{
{
(
param
.
show
?
<
Input
placeholder=
{
param
.
explain
||
''
}
/>
:
<
Input
.
Password
placeholder=
{
param
.
explain
||
''
}
visibilityToggle=
{
false
}
/>
)
(
param
.
selectMode
===
'singleSelect'
)
?
<
Select
>
{
(
param
.
selectItem
||
[]).
map
((
item
,
index
)
=>
{
return
<
Select
.
Option
key=
{
index
}
value=
{
item
||
''
}
>
{
item
||
''
}
</
Select
.
Option
>
})
}
</
Select
>
:
(
param
.
show
?
<
Input
placeholder=
{
param
.
explain
||
''
}
/>
:
<
Input
.
Password
placeholder=
{
param
.
explain
||
''
}
visibilityToggle=
{
false
}
/>
)
}
}
</
Form
.
Item
>
</
Form
.
Item
>
)
)
...
...
src/view/Manage/Model/Component/SelectUsers.jsx
View file @
1f6444a7
...
@@ -6,7 +6,7 @@ const {Option} = Select
...
@@ -6,7 +6,7 @@ const {Option} = Select
const
SelectUser
:
React
.
FC
=
(
props
)
=>
{
const
SelectUser
:
React
.
FC
=
(
props
)
=>
{
const
{
value
,
onChange
,
users
,
type
,}
=
props
const
{
value
,
onChange
,
users
,
type
,
loading
}
=
props
const
[
searchValue
,
setSearchValue
]
=
useState
(
undefined
)
const
[
searchValue
,
setSearchValue
]
=
useState
(
undefined
)
...
@@ -35,6 +35,7 @@ const SelectUser:React.FC=(props)=>{
...
@@ -35,6 +35,7 @@ const SelectUser:React.FC=(props)=>{
showSearch
showSearch
value=
{
value
}
value=
{
value
}
onChange=
{
change
}
onChange=
{
change
}
loading=
{
loading
}
allowClear
allowClear
filterOption=
{
false
}
filterOption=
{
false
}
onSearch=
{
debounceFetcher
}
onSearch=
{
debounceFetcher
}
...
...
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