数据统计分析行政区域和上报部门统计报表导出

main
15036302109 2 months ago
parent eaa7fc6fce
commit cda6f66bbb

@ -14,7 +14,13 @@
</el-date-picker>
<!-- 查询按钮 -->
<el-button type="primary" @click="queryData"></el-button>
<!--导出-->
<el-button
type="warning"
plain
icon="el-icon-download"
@click="handleExport"
>导出表格数据</el-button>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="行政区域统计" name="tj1">
@ -281,6 +287,20 @@ export default {
const month = (now.getMonth() + 1).toString().padStart(2, '0'); // 0+1
return `${year}-${month}`;
},
//
handleExport() {
let targetTime = this.queryParams.targetTime || this.getDefaultTargetTime();
if(this.activeName == 'tj1') {
this.download('/ehs/indexStatistics/getHiddenDangerSituationList/export', {
...this.queryParams
}, `行政区域统计_${new Date().getTime()}.xlsx`)
}
if(this.activeName == 'tj2') {
this.download('/ehs/indexStatistics/getHiddenDangerSituationByEnterpriseNameList/export', {
...this.queryParams
}, `上报部门统计_${new Date().getTime()}.xlsx`)
}
},
showHD(row) {
console.log(row);
let targetTime = this.queryParams.targetTime || this.getDefaultTargetTime();

Loading…
Cancel
Save