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 || ""} />