修改表格多按钮判断

This commit is contained in:
GGJ
2024-10-31 14:36:09 +08:00
parent 8427a61f4e
commit 9217ae0ae1
4 changed files with 48 additions and 76 deletions

View File

@@ -83,16 +83,17 @@ const tableStore: any = new TableStore({
type: 'primary',
icon: 'el-icon-Check',
render: 'basicButton',
loading:'loading1',
disabled: row => {
// && row.evtParamTm < 20
return !row.wavePath
},
click: async row => {
row.loading = true
row.loading1 = true
await analyseWave(row.id)
.then(res => {
row.loading = false
row.loading1 = false
if (res != undefined) {
boxoList.value = row
boxoList.value.systemType = 'WX'
@@ -102,7 +103,7 @@ const tableStore: any = new TableStore({
}
})
.catch(() => {
row.loading = false
row.loading1 = false
})
isWaveCharts.value = true
nextTick(() => {
@@ -124,6 +125,7 @@ const tableStore: any = new TableStore({
name: 'edit',
title: '波形下载',
type: 'primary',
loading:'loading2',
icon: 'el-icon-Check',
render: 'basicButton',
disabled: row => {
@@ -131,12 +133,12 @@ const tableStore: any = new TableStore({
return !row.wavePath
},
click: row => {
row.loading = true
row.loading2 = 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
row.loading2 = false
}, 1500)
}
}