|
|
|
@ -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();
|
|
|
|
|