From de51ed0c79db7ad1096b2694cb8cea287ad99362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=8A=B2=E6=9D=BE?= Date: Fri, 13 Mar 2020 16:16:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=96=B0=E5=A2=9Echar?= =?UTF-8?q?t=E3=80=81asset=E5=90=8E=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.新增chart使用新panel保存后报错 2.asset没添加成功后vendor会重置的问题 --- .../src/components/charts/chart-list.vue | 2 +- .../components/common/rightBox/assetBox.vue | 191 +----------------- 2 files changed, 7 insertions(+), 186 deletions(-) diff --git a/nezha-fronted/src/components/charts/chart-list.vue b/nezha-fronted/src/components/charts/chart-list.vue index 3ab15b879..3589682d3 100644 --- a/nezha-fronted/src/components/charts/chart-list.vue +++ b/nezha-fronted/src/components/charts/chart-list.vue @@ -275,7 +275,7 @@ export default { // 设置时间-数据格式对 const dpsArr = Object.entries(queryItem.values);//[ ["0",[1577959830.781,"0"]], ["1",[1577959845.781,"0"]] ] // 判断是否有数据 - if (dpsArr.length > 0 && tagsArr.length > 0) { + if (dpsArr.length > 0 && tagsArr.length > 0 && this.$refs.editChart[index]) { tagsArr.forEach((tag, i) => { if (tag !== '__name__') { host += `${tag}="${queryItem.metric[tag]}",`; diff --git a/nezha-fronted/src/components/common/rightBox/assetBox.vue b/nezha-fronted/src/components/common/rightBox/assetBox.vue index 6605a0a60..8159a085b 100644 --- a/nezha-fronted/src/components/common/rightBox/assetBox.vue +++ b/nezha-fronted/src/components/common/rightBox/assetBox.vue @@ -90,72 +90,6 @@ - {{assetViewData.assetType}} @@ -173,112 +107,6 @@ >
-
{{assetViewData.vendor}} {{assetViewData.model}} @@ -311,16 +139,6 @@ :value="item.id" > {{ item.name }} - - - - - - - - - - @@ -900,17 +718,17 @@ type: '', value: '', code: '' - } + }; let idcData = { id: '', name: '', location: '', principal: '', tel: '' - } + }; + let tempModelId = this.assetData.modelId; if (data === 'asset') { if (this.assetData.modelId) { - console.info(this.assetData.modelId) this.assetData.modelId = this.assetData.modelId.join(',').split(',')[1]; } // let modelId = this.assetData.modelId.join(',').split(',')[1]; @@ -956,6 +774,7 @@ this.$emit('refreshData', 'true'); this.sendStateData('close'); } else { + this.assetData.modelId = tempModelId; this.$message.error(res.msg); } }); @@ -1003,11 +822,13 @@ this.$emit('refreshData', 'true'); this.sendStateData('close'); } else { + this.assetData.modelId = tempModelId; this.$message.error(res.msg); } }); } } else { + this.assetData.modelId = tempModelId; return false; } });