diff --git a/web/client/src/sections/patrolManage/components/addReportRulesModal.js b/web/client/src/sections/patrolManage/components/addReportRulesModal.js index 6924512..db6abd1 100644 --- a/web/client/src/sections/patrolManage/components/addReportRulesModal.js +++ b/web/client/src/sections/patrolManage/components/addReportRulesModal.js @@ -49,6 +49,7 @@ const AddReportRulesModal = props => { }) setStructlist(list) },[]) + useEffect(() => { // setPic(modalData?.reportpic) form.setFieldsValue({ @@ -63,7 +64,7 @@ const AddReportRulesModal = props => { name: modalData?.name, type: modalData?.type, system:modalData?.system, - pic: modalData?.reportpic?.map(item=>{return {storageUrl:item,url:item}}), + pic: modalData?.reportpic?.map(item=>{return {storageUrl:item}}), timeRange: modalData?.startTime ? [moment(modalData?.startTime), moment(modalData?.endTime)] : [], }) }, [visible]) @@ -249,19 +250,19 @@ const AddReportRulesModal = props => { isQiniu={true} // disabled={true} fileTypes={['png', 'jpg']} - // fileList={pic} - // defaultValue={(() => { - // let nextV = [] - // for (let s of modalData?.reportpic || []) { - // if (s) { - // nextV.push({ - // url: s, - // storageUrl: s, - // }) - // } - // } - // return nextV - // })()} + fileList={modalData?.reportpic} + defaultValue={(() => { + let nextV = [] + for (let s of modalData?.reportpic || []) { + if (s) { + nextV.push({ + url: s, + storageUrl: s, + }) + } + } + return nextV + })()} />