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, 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}}),
timeRange: modalData?.startTime ? [moment(modalData?.startTime), moment(modalData?.endTime)] : [], timeRange: modalData?.startTime ? [moment(modalData?.startTime), moment(modalData?.endTime)] : [],
}) })
}, [visible]) }, [visible])
@ -243,22 +244,24 @@ const AddReportRulesModal = props => {
<Uploads <Uploads
listType='picture-card' listType='picture-card'
uploadType='project' uploadType='project'
maxFilesNum={15}
maxFileSize={10} maxFileSize={10}
isQiniu={true} isQiniu={true}
// disabled={true} // disabled={true}
fileTypes={['png', 'jpg']} fileTypes={['png', 'jpg']}
// fileList={pic} // fileList={pic}
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({
storageUrl: s, // url: s,
}) // storageUrl: s,
} // })
} // }
return nextV // }
})()} // return nextV
// })()}
/> />
</Form.Item> </Form.Item>
</Form> </Form>

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

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

Loading…
Cancel
Save