Browse Source

feat:fix bug--月报时图片不回显

master
zhaobing’ 1 year ago
parent
commit
0a7b731a60
  1. 29
      web/client/src/sections/patrolManage/components/addReportRulesModal.js

29
web/client/src/sections/patrolManage/components/addReportRulesModal.js

@ -49,6 +49,7 @@ const AddReportRulesModal = props => {
}) })
setStructlist(list) setStructlist(list)
},[]) },[])
useEffect(() => { useEffect(() => {
// setPic(modalData?.reportpic) // setPic(modalData?.reportpic)
form.setFieldsValue({ form.setFieldsValue({
@ -63,7 +64,7 @@ const AddReportRulesModal = props => {
name: modalData?.name, name: modalData?.name,
type: modalData?.type, type: modalData?.type,
system:modalData?.system, 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)] : [], timeRange: modalData?.startTime ? [moment(modalData?.startTime), moment(modalData?.endTime)] : [],
}) })
}, [visible]) }, [visible])
@ -249,19 +250,19 @@ const AddReportRulesModal = props => {
isQiniu={true} isQiniu={true}
// disabled={true} // disabled={true}
fileTypes={['png', 'jpg']} fileTypes={['png', 'jpg']}
// fileList={pic} fileList={modalData?.reportpic}
// defaultValue={(() => { defaultValue={(() => {
// let nextV = [] let nextV = []
// for (let s of modalData?.reportpic || []) { for (let s of modalData?.reportpic || []) {
// if (s) { if (s) {
// nextV.push({ nextV.push({
// url: s, url: s,
// storageUrl: s, storageUrl: s,
// }) })
// } }
// } }
// return nextV return nextV
// })()} })()}
/> />
</Form.Item> </Form.Item>
</Form> </Form>

Loading…
Cancel
Save