From 94bd55fc95f6e66c14c207fee0e5848de449e029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=96=87=E5=8D=8E?= Date: Mon, 20 Oct 2025 20:19:46 +0800 Subject: [PATCH] aa --- src/views/subsystem/scene/index.vue | 31 ++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/src/views/subsystem/scene/index.vue b/src/views/subsystem/scene/index.vue index 8637a8b..639c196 100644 --- a/src/views/subsystem/scene/index.vue +++ b/src/views/subsystem/scene/index.vue @@ -36,6 +36,7 @@ 统计分析 + 支援保障仿真效果统计表
{ this.childWindow && this.childWindow.close() return true // 必须设置 returnValue 才能显示确认框 @@ -327,6 +329,26 @@ export default { }) }, methods: { + downloadExcel1() { + this.$axios({ + method: 'get', + url: '/scenario/battleConsume/statistic/downloadExcel1', + responseType: 'blob' + }).then(res => { + const blob = new Blob([res.data], { + type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' + }) + const link = document.createElement('a') + link.href = URL.createObjectURL(blob) + link.download = '支援保障仿真效果统计表.xlsx' + link.click() + URL.revokeObjectURL(link.href) + this.loading = false + }).catch(() => { + this.loading = false + this.$message.error('下载失败') + }) + }, getWeathers(){ this.$http({ url: `/baseData/weatherResource/list`, @@ -513,20 +535,15 @@ export default { }, handleOpenStatisticPage() { - if (this.roomInfo.status === 3) { this.childWindow = window.open( - `/roomStatistics?roomId=${this.roomId}&scenarioId=${this.scenarioId}`, + `/?roomId=${this.roomId}&scenarioId=${this.scenarioId}`, 'roomStatistics', 'height=' + window.screen.height + ',width=600,' + ',top=0,left=0,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no' ) - } else if (this.roomInfo.status === 0) { - this.$message.error('请完成推演后再进行操作!') - } else { - this.$message.error('推演进行中,请在推演结束后再进行操作!') - } + }, }, }