From 34403da99c0a1927b667f430ee7e12e52fd7bd9c Mon Sep 17 00:00:00 2001 From: wenlele Date: Fri, 19 Jan 2024 10:53:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E6=97=B6=E9=97=B4=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=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 | 16 ++++++++-------- .../service/containers/automaticReport.jsx | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/web/client/src/sections/service/components/automatic-Modal.jsx b/web/client/src/sections/service/components/automatic-Modal.jsx index a6a61c9..e666797 100644 --- a/web/client/src/sections/service/components/automatic-Modal.jsx +++ b/web/client/src/sections/service/components/automatic-Modal.jsx @@ -72,7 +72,7 @@ const AutomaticModal = ({ actions, dispatch, apiRoot, qiniuUrl, visible, eidtDat framer: v.framer, //制定者 auditor: v.auditor, //审核者 ratifier: v.ratifier, //批准者 - coverTime: v.coverTime && moment(v.coverTime).format('YYYY-MM-DD'), + coverTime: v.coverTime && moment(v.coverTime), structId: v.structId, //结构物id structList: [] } @@ -92,8 +92,8 @@ const AutomaticModal = ({ actions, dispatch, apiRoot, qiniuUrl, visible, eidtDat if (key?.slice(structNameIndex) == 'conclusion') structData.conclusion = v[key] //开始结束时间 if (key?.slice(structNameIndex) == 'reportTime') { - structData.reportStartTime = v[key] && v[key][0] && moment(v[key][0]).format('YYYY-MM-DD HH:mm:ss') - structData.reportEndTime = v[key] && v[key][1] && moment(v[key][1]).format('YYYY-MM-DD HH:mm:ss') + structData.reportStartTime = v[key] && v[key][0] && moment(v[key][0]) + structData.reportEndTime = v[key] && v[key][1] && moment(v[key][1]) } //包含的监测因素 structData.factors = [] @@ -121,8 +121,8 @@ const AutomaticModal = ({ actions, dispatch, apiRoot, qiniuUrl, visible, eidtDat if (key?.slice(index) == 'sensorNames') factorData.sensorNames = factorChech[p]?.find(p => p.id == d)?.sensor?.filter(f => v[key]?.includes(f.id))?.map(c => ({ id: c.id, name: c.name })) || [] //开始结束时间 if (key?.slice(index) == 'startEndTime') { - factorData.startTime = v[key] && v[key][0] && moment(v[key][0]).format('YYYY-MM-DD HH:mm:ss') - factorData.endTime = v[key] && v[key][1] && moment(v[key][1]).format('YYYY-MM-DD HH:mm:ss') + factorData.startTime = v[key] && v[key][0] && moment(v[key][0]) + factorData.endTime = v[key] && v[key][1] && moment(v[key][1]) } //关联温度的测点 if (key?.slice(index) == 'tempName1') { @@ -141,11 +141,11 @@ const AutomaticModal = ({ actions, dispatch, apiRoot, qiniuUrl, visible, eidtDat }) } //数据初始时间 - if (key?.slice(index) == 'initialTime') factorData.initialTime = v[key] && moment(v[key]).format('YYYY-MM-DD HH:mm:ss') + if (key?.slice(index) == 'initialTime') factorData.initialTime = v[key] && moment(v[key]) //关联开始结束时间 if (key?.slice(index) == 'releTime') { - factorData.releStartTime = v[key] && v[key][0] && moment(v[key][0]).format('YYYY-MM-DD HH:mm:ss') - factorData.releEndTime = v[key] && v[key][1] && moment(v[key][1]).format('YYYY-MM-DD HH:mm:ss') + factorData.releStartTime = v[key] && v[key][0] && moment(v[key][0]) + factorData.releEndTime = v[key] && v[key][1] && moment(v[key][1]) } } } diff --git a/web/client/src/sections/service/containers/automaticReport.jsx b/web/client/src/sections/service/containers/automaticReport.jsx index 11663e9..107c045 100644 --- a/web/client/src/sections/service/containers/automaticReport.jsx +++ b/web/client/src/sections/service/containers/automaticReport.jsx @@ -137,7 +137,7 @@ const AutomaticReport = ({ dispatch, actions, user, clientHeight, loading, gener // row?.factors?.forEach(d => { // d.codeName = dataList[d.codeName] // }) - + // console.log(1212, row); dispatch(service.postGenerateReport({ ...row, structId: "" })).then((res) => { if (res.success) { setQuery({ limit: 10, page: 0 })