aa
This commit is contained in:
parent
1cdeb42c17
commit
94bd55fc95
|
|
@ -36,6 +36,7 @@
|
||||||
<a-menu :selectedKeys="[]" mode="horizontal" theme="dark">
|
<a-menu :selectedKeys="[]" mode="horizontal" theme="dark">
|
||||||
<a-menu-item @click="handleOpenStatisticPage()"> 统计分析 </a-menu-item>
|
<a-menu-item @click="handleOpenStatisticPage()"> 统计分析 </a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
|
<el-button type="primary" @click="downloadExcel1" >支援保障仿真效果统计表</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
ref="scene-cesium-container"
|
ref="scene-cesium-container"
|
||||||
|
|
@ -312,6 +313,7 @@ export default {
|
||||||
this.scenarioName = this.$route.params.scenarioName
|
this.scenarioName = this.$route.params.scenarioName
|
||||||
this.getBlbzTreeData()
|
this.getBlbzTreeData()
|
||||||
this.getWeathers()
|
this.getWeathers()
|
||||||
|
|
||||||
window.addEventListener('beforeunload', (e) => {
|
window.addEventListener('beforeunload', (e) => {
|
||||||
this.childWindow && this.childWindow.close()
|
this.childWindow && this.childWindow.close()
|
||||||
return true // 必须设置 returnValue 才能显示确认框
|
return true // 必须设置 returnValue 才能显示确认框
|
||||||
|
|
@ -327,6 +329,26 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
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(){
|
getWeathers(){
|
||||||
this.$http({
|
this.$http({
|
||||||
url: `/baseData/weatherResource/list`,
|
url: `/baseData/weatherResource/list`,
|
||||||
|
|
@ -513,20 +535,15 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
handleOpenStatisticPage() {
|
handleOpenStatisticPage() {
|
||||||
if (this.roomInfo.status === 3) {
|
|
||||||
this.childWindow = window.open(
|
this.childWindow = window.open(
|
||||||
`/roomStatistics?roomId=${this.roomId}&scenarioId=${this.scenarioId}`,
|
`/?roomId=${this.roomId}&scenarioId=${this.scenarioId}`,
|
||||||
'roomStatistics',
|
'roomStatistics',
|
||||||
'height=' +
|
'height=' +
|
||||||
window.screen.height +
|
window.screen.height +
|
||||||
',width=600,' +
|
',width=600,' +
|
||||||
',top=0,left=0,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no'
|
',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('推演进行中,请在推演结束后再进行操作!')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user