Browse Source

feat:fix bugs

master
zhaobing’ 11 months ago
parent
commit
49a0a93380
  1. 25
      web/client/src/sections/patrolManage/components/addReportRulesModal.js
  2. 3
      web/client/src/sections/patrolManage/containers/patrolReport.js

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

@ -63,6 +63,7 @@ const AddReportRulesModal = props => {
name: modalData?.name,
type: modalData?.type,
system:modalData?.system,
pic: modalData?.reportpic?.map(item=>{return {storageUrl:item,url:item}}),
timeRange: modalData?.startTime ? [moment(modalData?.startTime), moment(modalData?.endTime)] : [],
})
}, [visible])
@ -243,22 +244,24 @@ const AddReportRulesModal = props => {
<Uploads
listType='picture-card'
uploadType='project'
maxFilesNum={15}
maxFileSize={10}
isQiniu={true}
// disabled={true}
fileTypes={['png', 'jpg']}
// fileList={pic}
defaultValue={(() => {
let nextV = []
for (let s of modalData?.reportpic || []) {
if (s) {
nextV.push({
storageUrl: s,
})
}
}
return nextV
})()}
// defaultValue={(() => {
// let nextV = []
// for (let s of modalData?.reportpic || []) {
// if (s) {
// nextV.push({
// url: s,
// storageUrl: s,
// })
// }
// }
// return nextV
// })()}
/>
</Form.Item>
</Form>

3
web/client/src/sections/patrolManage/containers/patrolReport.js

@ -87,6 +87,8 @@ function patrolReport(props) {
dispatch(patrolManage.postGenerateReport(data)).then(res => {
if(res.success){
setLoading(false)
tableRef.current.reload();
}
})
}
@ -241,6 +243,7 @@ function patrolReport(props) {
]
const onChange = (key) => {
};
const cancelHandle = () => {
setModalVis(false)

Loading…
Cancel
Save