From fdb97cca1f302db3fe07cc700130a085d991d682 Mon Sep 17 00:00:00 2001 From: lzhe <lzhe@example.com> Date: 星期三, 19 六月 2024 22:41:49 +0800 Subject: [PATCH] 1 --- src/views/mdc/processParam/index.vue | 30 +++++++++++++++++++----------- 1 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/views/mdc/processParam/index.vue b/src/views/mdc/processParam/index.vue index 1db46ad..1053491 100644 --- a/src/views/mdc/processParam/index.vue +++ b/src/views/mdc/processParam/index.vue @@ -198,14 +198,20 @@ }).then(res => { if (res.code === 200) { if (item.name !== 'DeviceStatus') { - this.tableData = res.data.records + this.tableData = res.data.records.map(v => { + return { + ...v, + } + }) + } else { + this.tableData = res.data.records.map(item => { + return { + ...item, + value: this.legend.find(v => v.code === item.value)?.name + } + }) } - this.tableData = res.data.records.map(item => { - return { - ...item, - value: this.legend.find(v => v.code === item.value)?.name - } - }) + this.drawer = true } }) @@ -269,8 +275,7 @@ tooltip: { position: ['50%', '50%'] }, - legend: [ - ], + legend: {}, title: { text: '', subtext: '', @@ -347,7 +352,7 @@ tooltip: { show: true, trigger: 'item', - // position: 'dom', + position: 'top', triggerOn: 'click', formatter: (value, ticket) => { // console.log('----------1111') @@ -357,7 +362,7 @@ // return current.format('HH:mm') // return value if (i == 0 || current === 0) return '' - return `${name}:寮�濮嬫椂闂�${moment(data.data[i - 1].time).format('HH:mm')}-${moment(item.time).format('HH:mm')}` + return `${name}:鏃舵${moment(data.data[i - 1].time).format('HH:mm')}-${moment(item.time).format('HH:mm')}` } }, } @@ -372,6 +377,9 @@ // return current.format('HH:mm') // } }, + legend: { + selectedMode: false + }, title: { text: '', subtext: '', -- Gitblit v1.9.3