From 038b5275ea445cc18d41ff0c39757c4c94ea180a Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Wed, 30 Oct 2024 14:24:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E6=80=81=E4=BA=8B=E4=BB=B6-=E6=B3=A2?= =?UTF-8?q?=E5=BD=A2=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../govern/device/control/tabs/event.vue | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/views/govern/device/control/tabs/event.vue b/src/views/govern/device/control/tabs/event.vue index d8e7092..759e982 100644 --- a/src/views/govern/device/control/tabs/event.vue +++ b/src/views/govern/device/control/tabs/event.vue @@ -19,6 +19,7 @@ import Table from '@/components/table/index.vue' import TableHeader from '@/components/table/header/index.vue' import waveFormAnalysis from './components/waveFormAnalysis.vue' import { ArrowLeft } from '@element-plus/icons-vue' +import { ElMessage } from 'element-plus' import { analyseWave } from '@/api/common' const tableParams: any = ref({}) const refheader = ref() @@ -81,7 +82,7 @@ const tableStore: any = new TableStore({ render: 'basicButton', disabled: row => { // && row.evtParamTm < 20 - return !row.wavePath + return !row.wavePath }, click: async row => { row.loading = true @@ -113,10 +114,28 @@ const tableStore: any = new TableStore({ icon: 'el-icon-DataLine', render: 'basicButton', disabled: row => { - return row.wavePath + return row.wavePath + } + }, + { + name: 'edit', + title: '波形下载', + type: 'primary', + icon: 'el-icon-Check', + render: 'basicButton', + disabled: row => { + // && row.evtParamTm < 20 + return !row.wavePath }, - - + click: row => { + row.loading = true + const url = window.location.origin + '/api/cs-harmonic-boot/event/getFileZip?eventId=' + row.id + window.open(url, '_self') + setTimeout(() => { + ElMessage.success('波形下载成功!') + row.loading = false + }, 1500) + } } ] } @@ -135,14 +154,12 @@ const isWaveCharts = ref(false) //获取请求参数 const getTableParams = (val: any) => { tableParams.value = val - console.log(tableParams.value, '暂态时间表格请求参数') isWaveCharts.value = false tableStore.index() } //返回 const handleBack = async () => { isWaveCharts.value = false - console.log(6666666, isWaveCharts.value) emit('activeTabsType', '') await tableStore.index() }