From 0c0e01b9367e4d202c57841a25561cfd7ce0cf60 Mon Sep 17 00:00:00 2001 From: liujiangyong Date: Tue, 7 Mar 2023 09:02:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A1=E6=A3=80=E8=AE=A1=E5=88=92=E5=8F=AA?= =?UTF-8?q?=E8=83=BD=E9=80=89=E5=85=B3=E6=B3=A8=E7=BB=93=E6=9E=84=E7=89=A9?= =?UTF-8?q?=E7=9A=84=E5=B7=A1=E6=A3=80=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/sections/patrolManage/components/planModal.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web/client/src/sections/patrolManage/components/planModal.js b/web/client/src/sections/patrolManage/components/planModal.js index 8eaa551..d4a1168 100644 --- a/web/client/src/sections/patrolManage/components/planModal.js +++ b/web/client/src/sections/patrolManage/components/planModal.js @@ -33,7 +33,7 @@ const PlanModal = ({ visible, onCreate, onCancel, dispatch, userLoading, userLis useEffect(() => { if (userList.length) { - setUserOpt(userList.map(u => ({ label: u.name, value: u.id }))) + setUserOpt(userList?.filter(f => f.structure?.includes(curRecord?.project?.id))?.map(u => ({ label: u.name, value: u.id }))) } }, [userList]) @@ -104,13 +104,15 @@ const PlanModal = ({ visible, onCreate, onCancel, dispatch, userLoading, userLis { required: true, message: '请选择结构物' }, ]} > - { + dispatch(positionList({ projectId })).then(res => { if (res.success) { setPoints(res.payload.data?.rows) setPointOpt(res.payload.data?.rows[0]?.points?.map(p => ({ label: p.name, value: p.id }))) } }) + form.setFieldsValue({ userId: null }); + setUserOpt(userList?.filter(f => f.structure?.includes(projectId))?.map(u => ({ label: u.name, value: u.id }))) }} />