From 6c2fa52a9baef2c1bcae09ebebf5758e33ae9625 Mon Sep 17 00:00:00 2001 From: wangwenrui Date: Fri, 4 Sep 2020 15:18:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E6=90=AD=E5=BB=BA=E5=90=8E=EF=BC=8Casset?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=8E=82=E5=95=86/=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=90=8E=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原因记录:初始搭建后,model表id从1开始,sys_dict 创建的vendor的code也从1开始,导致前端组合数据后value重复,故无法渲染 --- nezha-fronted/src/components/common/rightBox/assetBox.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nezha-fronted/src/components/common/rightBox/assetBox.vue b/nezha-fronted/src/components/common/rightBox/assetBox.vue index 1c7142246..6cbaf62be 100644 --- a/nezha-fronted/src/components/common/rightBox/assetBox.vue +++ b/nezha-fronted/src/components/common/rightBox/assetBox.vue @@ -349,7 +349,7 @@ let obj = {}; obj.id = modelData[i].vendor.id; obj.code = modelData[i].vendor.code; - obj.value = modelData[i].vendor.code; + obj.value ='vendor-'+ modelData[i].vendor.code; obj.label = modelData[i].vendor.value; obj.children = []; resultData.push(obj); @@ -376,6 +376,7 @@ } } this.vendorAndModelOptionData = result; + console.log('model/vender',this.vendorAndModelOptionData) }); }, addTag() { @@ -465,6 +466,7 @@ }, 100) }, modelChange(modelId) { + console.log('model ',this.editAsset.modelId) let model = this.modelData.find((item, index)=>{ return modelId == item.id; });