From 64448358b95f486b988a2dd7dcbdb1dc60d14f37 Mon Sep 17 00:00:00 2001 From: wenlele Date: Fri, 27 Oct 2023 16:30:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E8=81=94=E6=B8=A9=E5=BA=A6=E7=9A=84?= =?UTF-8?q?=E6=B5=8B=E7=82=B9=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/components/automatic-Modal.jsx | 43 +++++++++++-------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/web/client/src/sections/service/components/automatic-Modal.jsx b/web/client/src/sections/service/components/automatic-Modal.jsx index 9a35ac7..36a2313 100644 --- a/web/client/src/sections/service/components/automatic-Modal.jsx +++ b/web/client/src/sections/service/components/automatic-Modal.jsx @@ -29,7 +29,7 @@ const AutomaticModal = ({ actions, dispatch, apiRoot, qiniuUrl, visible, eidtDat let Factor = data?.find(s => s.strucId == eidtData?.structId)?.factor || [] setFactorList(Factor) setFactorChech(Factor?.filter(s => eidtData?.factors?.map(s => s.codeName)?.includes(s.proto))) - setActiveKey(eidtData?.factors?.map(s => s.codeName) || []) + // setActiveKey(eidtData?.factors?.map(s => s.codeName) || []) } }, []) @@ -52,7 +52,7 @@ const AutomaticModal = ({ actions, dispatch, apiRoot, qiniuUrl, visible, eidtDat cancelText="取消" visible={visible} onOk={() => { - + form.current.validate().then((v) => { let data = { id: eidtData?.id, @@ -218,7 +218,7 @@ const AutomaticModal = ({ actions, dispatch, apiRoot, qiniuUrl, visible, eidtDat rules={[{ required: true, message: "请选择监测因素" }]} disabled={structId ? false : true} onChange={v => { setFactorChech(factorList?.filter(s => v.includes(s.proto))) - setActiveKey(v) + // setActiveKey(v) }} > {factorList?.map((item) => { return @@ -227,7 +227,8 @@ const AutomaticModal = ({ actions, dispatch, apiRoot, qiniuUrl, visible, eidtDat {factorChech?.length > 0 ? { // setActiveKey(v) }} @@ -242,7 +243,7 @@ const AutomaticModal = ({ actions, dispatch, apiRoot, qiniuUrl, visible, eidtDat /> c.codeName == s.proto)?.pointPicPath && [{ url: `/_file-server/${eidtData?.factors?.find(c => c.codeName == s.proto)?.pointPicPath?.slice(qiniuUrl.length + 1)}`, name: eidtData?.factors?.find(c => c.codeName == s.proto)?.pointPicPath?.split('/')?.pop(), status: 'success', preview: ['png', 'jpg', 'jpeg'].includes(eidtData?.factors?.find(c => c.codeName == s.proto)?.pointPicPath?.split('.')?.pop()?.replace('.', '')) }] || null} - rules={[{ required: true, message: "请删上传布点图片" }]} + rules={[{ required: true, message: "请上传布点图片" }]} action={`${apiRoot}/attachments/p`} accept={'.png, .jpg, .jpeg'} limit={1} maxSize={5120} @@ -276,23 +277,27 @@ const AutomaticModal = ({ actions, dispatch, apiRoot, qiniuUrl, visible, eidtDat initValue={eidtData?.factors?.find(c => c.codeName == s.proto)?.initialTime && moment(eidtData?.factors?.find(c => c.codeName == s.proto)?.initialTime).format('YYYY-MM-DD HH:mm:ss')} /> } + { + ['4009', '3001', '4004', '4001', '4007'].includes(s.proto) && <> + c.codeName == s.proto)?.tempName?.find(c => c.index == 1)?.id || ""} + > + {s.sensor?.map((item) => { + return - c.codeName == s.proto)?.tempName?.find(c => c.index == 1)?.id || ""} - > - {s.sensor?.map((item) => { - return + })} + + c.codeName == s.proto)?.tempName?.find(c => c.index == 2)?.id || ""} + > + {factorList?.find(d => d.proto == 1004 || d.proto == 1002)?.sensor?.map((item) => { + return - })} - - c.codeName == s.proto)?.tempName?.find(c => c.index == 2)?.id || ""} - > - {factorList?.find(d => s.proto == 1004)?.sensor?.map((item) => { - return + })} + + + } - })} - {/* c.codeName == s.proto)?.glStaName || ""} />