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
1acdda1c
Commit
1acdda1c
authored
Jul 05, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
00be8817
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
11 deletions
+37
-11
ImportActionManage.jsx
src/view/Manage/Model/Component/ImportActionManage.jsx
+3
-2
auth-share.jsx
src/view/Manage/Model/Component/auth-share.jsx
+13
-3
auth-transfer.jsx
src/view/Manage/Model/Component/auth-transfer.jsx
+2
-1
start-flow.jsx
src/view/Manage/Model/Component/start-flow.jsx
+6
-2
update-branch.jsx
src/view/Manage/Model/Component/update-branch.jsx
+13
-3
No files found.
src/view/Manage/Model/Component/ImportActionManage.jsx
View file @
1acdda1c
import
React
from
'react'
import
{
Button
,
Form
,
Descriptions
,
Input
,
Row
,
Col
,
Space
,
Select
}
from
'antd'
import
{
Button
,
Form
,
Descriptions
,
Input
,
Row
,
Col
,
Space
,
Select
,
Spin
}
from
'antd'
import
{
DownOutlined
,
UpOutlined
}
from
'@ant-design/icons'
import
{
Subject
}
from
'rxjs'
import
{
useDebounceEffect
}
from
'ahooks'
...
...
@@ -187,7 +187,7 @@ const UsersItem = ({ value, onChange }) => {
}
return
(
<
Select
loading=
{
loading
}
allowClear
showSearch
<
Select
allowClear
showSearch
placeholder=
'请选择用户'
value=
{
value
?
`${value.dname}(${value.name})`
:
undefined
}
searchValue=
{
searchValue
}
...
...
@@ -198,6 +198,7 @@ const UsersItem = ({ value, onChange }) => {
setSearchValue
()
}
}
filterOption=
{
false
}
notFoundContent=
{
loading
?
<
Spin
size=
"small"
/>
:
null
}
options=
{
options
}
onChange=
{
(
val
)
=>
{
if
(
val
)
{
...
...
src/view/Manage/Model/Component/auth-share.jsx
View file @
1acdda1c
...
...
@@ -175,7 +175,7 @@ const UsersItem = ({ modelId, value, onChange, readonly = false }) => {
return
(
<>
{
readonly
?
<
span
>
{
value
?.
map
(
item
=>
`${item.dname}(${item.name})`
).
toString
()
}
</
span
>
:
<
Select
loading=
{
loading
}
mode=
'multiple'
allowClear
readonly
?
<
span
>
{
value
?.
map
(
item
=>
`${item.dname}(${item.name})`
).
toString
()
}
</
span
>
:
<
Select
mode=
'multiple'
allowClear
placeholder=
'请选择用户'
value=
{
(
value
??[]).
map
(
item
=>
`${item.dname}(${item.name})`
)
}
searchValue=
{
searchValue
}
...
...
@@ -186,12 +186,22 @@ const UsersItem = ({ modelId, value, onChange, readonly = false }) => {
setSearchValue
()
}
}
filterOption=
{
false
}
notFoundContent=
{
loading
?
<
Spin
size=
"small"
/>
:
null
}
options=
{
options
}
onChange=
{
(
val
)
=>
{
onChange
?.(
[
const
newValue
=
[
...(
value
??[]).
filter
(
item
=>
(
val
??[]).
indexOf
(
`${item.dname}(${item.name})`
)
!==
-
1
),
...(
options
??[]).
filter
(
item
=>
(
val
??[]).
indexOf
(
item
.
value
)
!==
-
1
)
])
];
const
uniqueValue
=
newValue
.
reduce
((
acc
,
current
)
=>
{
const
index
=
acc
.
findIndex
(
item
=>
`${item.dname}(${item.name})`
===
`${current.dname}(${current.name})`
)
if
(
index
===
-
1
)
{
acc
.
push
(
current
);
}
return
acc
;
},
[]);
onChange
?.(
uniqueValue
)
}
}
/>
}
...
...
src/view/Manage/Model/Component/auth-transfer.jsx
View file @
1acdda1c
...
...
@@ -173,7 +173,7 @@ const UsersItem = ({ modelId, value, onChange }) => {
}
return
(
<
Select
loading=
{
loading
}
showSearch
allowClear
<
Select
showSearch
allowClear
placeholder=
'请选择用户'
value=
{
value
?
`${value.dname}(${value.name})`
:
undefined
}
searchValue=
{
searchValue
}
...
...
@@ -184,6 +184,7 @@ const UsersItem = ({ modelId, value, onChange }) => {
setSearchValue
()
}
}
filterOption=
{
false
}
notFoundContent=
{
loading
?
<
Spin
size=
"small"
/>
:
null
}
options=
{
options
}
onChange=
{
(
val
)
=>
{
if
(
val
)
{
...
...
src/view/Manage/Model/Component/start-flow.jsx
View file @
1acdda1c
...
...
@@ -266,7 +266,7 @@ const RuleReviewItem = ({ value = {}, onChange }) => {
</
Radio
.
Group
>
{
ruleReviewSelected
&&
<
Col
span=
{
16
}
>
<
Select
showSearch
loading=
{
loading
}
allowClear
<
Select
showSearch
allowClear
placeholder=
'请选择规范评审人员'
searchValue=
{
searchValue
}
onSearch=
{
(
val
)
=>
{
...
...
@@ -276,6 +276,7 @@ const RuleReviewItem = ({ value = {}, onChange }) => {
setSearchValue
()
}
}
filterOption=
{
false
}
notFoundContent=
{
loading
?
<
Spin
size=
"small"
/>
:
null
}
options=
{
options
}
onChange=
{
(
val
)
=>
{
triggerChange
({
...
...
@@ -400,6 +401,8 @@ const DesignUsersItem = ({ value, onChange }) => {
useDebounceEffect
(()
=>
{
if
(
searchValue
)
{
getUsers
()
}
else
{
setOptions
()
}
},
[
searchValue
],
{
wait
:
300
})
...
...
@@ -427,7 +430,7 @@ const DesignUsersItem = ({ value, onChange }) => {
}
return
(
<
Select
showSearch
loading=
{
loading
}
allowClear
<
Select
showSearch
allowClear
placeholder=
'请选择设计评审人员'
value=
{
value
?.
map
(
item
=>
item
.
name
)
}
searchValue=
{
searchValue
}
...
...
@@ -438,6 +441,7 @@ const DesignUsersItem = ({ value, onChange }) => {
setSearchValue
()
}
}
filterOption=
{
false
}
notFoundContent=
{
loading
?
<
Spin
size=
"small"
/>
:
null
}
options=
{
options
}
onChange=
{
(
val
)
=>
{
onChange
?.(
...
...
src/view/Manage/Model/Component/update-branch.jsx
View file @
1acdda1c
...
...
@@ -292,7 +292,7 @@ const UsersItem = ({ value, onChange, readonly = false }) => {
return
(
<>
{
readonly
?
<
span
>
{
value
?.
map
(
item
=>
`${item.dname}(${item.name})`
).
toString
()
}
</
span
>
:
<
Select
loading=
{
loading
}
mode=
'multiple'
allowClear
readonly
?
<
span
>
{
value
?.
map
(
item
=>
`${item.dname}(${item.name})`
).
toString
()
}
</
span
>
:
<
Select
mode=
'multiple'
allowClear
placeholder=
'请选择用户'
value=
{
(
value
??[]).
map
(
item
=>
`${item.dname}(${item.name})`
)
}
searchValue=
{
searchValue
}
...
...
@@ -303,12 +303,22 @@ const UsersItem = ({ value, onChange, readonly = false }) => {
setSearchValue
()
}
}
filterOption=
{
false
}
notFoundContent=
{
loading
?
<
Spin
size=
"small"
/>
:
null
}
options=
{
options
}
onChange=
{
(
val
)
=>
{
onChange
?.(
[
const
newValue
=
[
...(
value
??[]).
filter
(
item
=>
(
val
??[]).
indexOf
(
`${item.dname}(${item.name})`
)
!==
-
1
),
...(
options
??[]).
filter
(
item
=>
(
val
??[]).
indexOf
(
item
.
value
)
!==
-
1
)
])
];
const
uniqueValue
=
newValue
.
reduce
((
acc
,
current
)
=>
{
const
index
=
acc
.
findIndex
(
item
=>
`${item.dname}(${item.name})`
===
`${current.dname}(${current.name})`
)
if
(
index
===
-
1
)
{
acc
.
push
(
current
);
}
return
acc
;
},
[]);
onChange
?.(
uniqueValue
)
}
}
/>
}
...
...
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