Browse Source

feat:fix bugs

master
zhaobing’ 11 months ago
parent
commit
6750ba5833
  1. 4
      web/client/src/sections/patrolManage/components/addReportRulesModal.js
  2. 3
      web/client/src/sections/patrolManage/containers/patrolReport.js

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

@ -83,8 +83,8 @@ const AddReportRulesModal = props => {
type: values.type, type: values.type,
system:values.system, system:values.system,
structure: Array.isArray(values.structure) ? [...values.structure] : [values.structure], structure: Array.isArray(values.structure) ? [...values.structure] : [values.structure],
endTime: moment(values.timeRange[1]).format('YYYY-MM-DD HH:mm:ss'), endTime: moment(values.timeRange[1]).startOf('day').format('YYYY-MM-DD HH:mm:ss'),
startTime: moment(values.timeRange[0]).format('YYYY-MM-DD HH:mm:ss'), startTime: moment(values.timeRange[0]).endOf('day').format('YYYY-MM-DD HH:mm:ss'),
reportpic: values?.pic[0]?.name ? values?.pic.map(u => u.storageUrl) : modalData?.reportpic, reportpic: values?.pic[0]?.name ? values?.pic.map(u => u.storageUrl) : modalData?.reportpic,
} }
dispatch(patrolManage.postReport(params)).then(res => { dispatch(patrolManage.postReport(params)).then(res => {

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

@ -153,7 +153,8 @@ function patrolReport(props) {
<Button type="link" onClick={() => { <Button type="link" onClick={() => {
window.open(`https://view.officeapps.live.com/op/view.aspx?src=${qnDomain}/${record?.excelPath}`) window.open(`https://view.officeapps.live.com/op/view.aspx?src=${qnDomain}/${record?.excelPath}`)
}}>预览</Button> }}>预览</Button>
<Button type="link" onClick={() => { window.open(qnDomain + '/' + record?.excelPath) }}>下载</Button> {/* onClick={() => { window.open() }} */}
<a href={qnDomain + '/' + record?.excelPath}>下载</a>
</> </>
}, },
}]; }];

Loading…
Cancel
Save