From e7076d20270ca3d5bb72433e093e17f6a11feca5 Mon Sep 17 00:00:00 2001 From: liujiangyong Date: Tue, 8 Aug 2023 17:13:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E6=8C=87=E6=B4=BE=EF=BC=8C?= =?UTF-8?q?=E5=8F=AF=E6=8C=87=E6=B4=BE=E5=85=A8=E9=83=A8=E8=81=94=E7=B3=BB?= =?UTF-8?q?=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/feedback/nominateModalcopy.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/web/client/src/sections/fillion/components/feedback/nominateModalcopy.js b/web/client/src/sections/fillion/components/feedback/nominateModalcopy.js index bd563d2b..0af1d4d7 100644 --- a/web/client/src/sections/fillion/components/feedback/nominateModalcopy.js +++ b/web/client/src/sections/fillion/components/feedback/nominateModalcopy.js @@ -13,7 +13,7 @@ const { TextArea } = Input; const NominateModal = (props) => { const { queryData, recordId, visible, user, onCancel, depMessage, loading, depUser, clientHeight, depData, onVisibleChange, dispatch } = props const [depId, setDepId] = useState(0) - const [depUsers, setDepUsers] = useState() + const [depUsers, setDepUsers] = useState([]) // const [value, setValue] = useState(undefined); const [selectedUserId, setSelectedUserId] = useState(null); const [form] = Form.useForm(); @@ -24,15 +24,11 @@ const NominateModal = (props) => { // 根据选择的部门ID获取对应的用户数据 //setDepUsers([]) const res = await dispatch(getDepUser(value)) - const copy = res.payload.data.filter(user => { - if (user.isAdmin) { - return user - } - }) - let processedUsers = copy.map((item) => { + let processedUsers = res.payload.data?.map((item) => { return { label: item.name, value: item.id, + phone: item.phone } }) setDepUsers(processedUsers) @@ -48,6 +44,9 @@ const NominateModal = (props) => { onCancel() setDepUsers([]) form.resetFields() + // const phone = depUsers.find(u => u.value == values.nameId)?.phone; + // console.log(phone, 'phone') + // dispatch(pushAppointSMS({ phone, info: 'info...' })) } }) })