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)
},[])
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
})()}
/>
</Form.Item>
</Form>

Loading…
Cancel
Save