Commit 41cc8af9 by zhaochengxiang

设计评审人员单选

parent 1798e060
...@@ -441,7 +441,7 @@ const DesignUsersItem = ({ value, onChange }) => { ...@@ -441,7 +441,7 @@ const DesignUsersItem = ({ value, onChange }) => {
} }
return ( return (
<Select loading={loading} mode='multiple' allowClear <Select showSearch loading={loading} allowClear
placeholder='请选择设计评审人员' placeholder='请选择设计评审人员'
value={value?.map(item => item.userId)} value={value?.map(item => item.userId)}
searchValue={searchValue} searchValue={searchValue}
...@@ -456,7 +456,7 @@ const DesignUsersItem = ({ value, onChange }) => { ...@@ -456,7 +456,7 @@ const DesignUsersItem = ({ value, onChange }) => {
onChange={(val) => { onChange={(val) => {
onChange?.( onChange?.(
(users??[]) (users??[])
.filter(item => (val??[]).indexOf(item.id) !== -1) .filter(item => val===item.id)
.map(item => ({ userId: item.id, userName: item.name })) .map(item => ({ userId: item.id, userName: item.name }))
) )
}} }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment