diff --git a/ruoyi-ui/src/views/ehs/ehsExamples/index.vue b/ruoyi-ui/src/views/ehs/ehsExamples/index.vue index 13edf91..7c1bda0 100644 --- a/ruoyi-ui/src/views/ehs/ehsExamples/index.vue +++ b/ruoyi-ui/src/views/ehs/ehsExamples/index.vue @@ -14,7 +14,13 @@ 查询 - + + 导出表格数据 @@ -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();