From 6877c7e2c3340d12f931dd3b7dd421abe4704124 Mon Sep 17 00:00:00 2001 From: gaoyuanwei <2826352639@qq.com> Date: Thu, 14 Jul 2022 14:01:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0-=E4=B8=8A=E6=9E=B6-=E4=BF=AE?= =?UTF-8?q?=E6=94=B9573bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/src/views/modules/ability/bsabilityai.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/back/src/views/modules/ability/bsabilityai.vue b/back/src/views/modules/ability/bsabilityai.vue index 3ba32a4c..439b09bc 100644 --- a/back/src/views/modules/ability/bsabilityai.vue +++ b/back/src/views/modules/ability/bsabilityai.vue @@ -518,6 +518,13 @@ export default { } }) console.log('编辑===============>', this.submitFrom) + console.log(this.submitFrom.infoList, '===============abc') + // 去重 + const newArr = this.submitFrom.infoList.filter((element, index, self) => { + return self.findIndex(x => x.attrType === element.attrType) === index + }) + this.submitFrom.infoList = newArr + console.log(this.submitFrom.infoList, '====================================wpwpwp') this.$http .put('/resource/update', this.submitFrom) .then(({ data: res }) => { @@ -545,13 +552,6 @@ export default { }, // 新修改 UpdateData (item) { - console.log(item.infoList, '====================================wpwpwp') - // 去重 - const newArr = item.infoList.filter((element, index, self) => { - return self.findIndex(x => x.attrType === element.attrType) === index - }) - item.infoList = newArr - console.log(item.infoList, '====================================wpwpwp') this.$http.get('/category/getCategoryTree').then(res => { this.insertList = res.data.data.filter(item => item.name === '组件服务一')[0] this.radio = item.infoList.filter(val => val.attrType === '组件类型')[0].attrValue