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
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
82 additions
and
7 deletions
+82
-7
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
+61
-3
UpdateTaskModal.jsx
...iew/Manage/DatasourceManage/Component/UpdateTaskModal.jsx
+11
-3
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() {
return
yield
call
(
pds
.
getOwners
)
}
export
function
*
getDepartments
()
{
return
yield
call
(
pds
.
getDepartments
)
}
export
function
*
saveOwner
(
payload
)
{
return
yield
call
(
pds
.
saveOwner
,
payload
)
}
...
...
src/service/pds.js
View file @
1f6444a7
...
...
@@ -108,6 +108,10 @@ export function getOwners() {
return
GetJSON
(
"/informationmanagement/userData/findAll"
)
}
export
function
getDepartments
()
{
return
GetJSON
(
"/informationmanagement/userData/getAllDepartment"
)
}
export
function
saveOwner
(
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';
import
IndexCode
from
'./IndexCode'
;
import
{
CancelSvg
,
EditSvg
,
SaveSvg
,
FullScreenSvg
,
CancelFullScreenSvg
}
from
'./AssetSvg'
;
import
SelectUser
from
'../../Model/Component/SelectUsers'
;
const
AssetAction
=
(
props
)
=>
{
const
{
id
,
dirId
,
action
,
terms
,
onChange
,
readOnly
=
false
,
form
,
onMetadataChange
,
onElementsChange
}
=
props
;
...
...
@@ -31,15 +32,20 @@ const AssetAction = (props) => {
const
[
selectTag
,
setSelectTag
]
=
useState
({});
const
[
systems
,
setSystems
]
=
useState
([]);
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
);
useEffect
(()
=>
{
if
(
action
===
'add'
)
{
getSystems
();
getUsers
();
getDepartments
();
if
(
action
===
'add'
)
{
getElements
();
}
else
{
getSystems
();
setCurrentAction
(
'detail'
);
if
((
id
||
''
)
!==
''
)
{
getAssetPaths
();
...
...
@@ -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
=
()
=>
{
dispatch
({
type
:
'assetmanage.getResourceRelations'
,
...
...
@@ -419,6 +453,30 @@ const AssetAction = (props) => {
)
}
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==='否'}
>
{
departments?.map((department, index) => {
return <Select.Option key={index} value={department}>
{department}
</Select.Option>
})
}
</Select>
}
if (element.selectMode==='单选') {
return (
<Select
...
...
@@ -625,7 +683,7 @@ const AssetAction = (props) => {
});
return (
<Form {...formItemLayout} form={form}>
<Form {...formItemLayout} form={form}
labelWrap
>
{
(sameAttributeElements||[]).map((element, _index) => {
return (
...
...
src/view/Manage/DatasourceManage/Component/UpdateTaskModal.jsx
View file @
1f6444a7
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'
;
...
...
@@ -255,7 +255,9 @@ const UpdateTaskModal = (props) => {
return
<></>;
})
}
<
Divider
>
过滤信息
</
Divider
>
<
Divider
>
{
(
taskSettings
?.
target
?.
type
===
'AtlasTarget'
||
taskSettings
?.
target
?.
type
===
'SapbwTarget'
)?
'代理配置'
:
'过滤信息'
}
</
Divider
>
<
Form
{
...
formItemLayout
}
form=
{
form
}
>
{
taskSettings
&&
(
taskSettings
.
targetConfParameters
||
[]).
map
((
param
,
index
)
=>
{
...
...
@@ -269,7 +271,13 @@ const UpdateTaskModal = (props) => {
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
>
)
...
...
src/view/Manage/Model/Component/SelectUsers.jsx
View file @
1f6444a7
...
...
@@ -6,7 +6,7 @@ const {Option} = Select
const
SelectUser
:
React
.
FC
=
(
props
)
=>
{
const
{
value
,
onChange
,
users
,
type
,}
=
props
const
{
value
,
onChange
,
users
,
type
,
loading
}
=
props
const
[
searchValue
,
setSearchValue
]
=
useState
(
undefined
)
...
...
@@ -35,6 +35,7 @@ const SelectUser:React.FC=(props)=>{
showSearch
value=
{
value
}
onChange=
{
change
}
loading=
{
loading
}
allowClear
filterOption=
{
false
}
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