From cda6f66bbbced0d566f707789f104ba930fc68a1 Mon Sep 17 00:00:00 2001 From: 15036302109 Date: Mon, 22 Jul 2024 15:43:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1=E5=88=86?= =?UTF-8?q?=E6=9E=90=E8=A1=8C=E6=94=BF=E5=8C=BA=E5=9F=9F=E5=92=8C=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5=E9=83=A8=E9=97=A8=E7=BB=9F=E8=AE=A1=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/ehs/ehsExamples/index.vue | 22 +++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) 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();