From bab0c94093dcf1881f3adc4e51119a514d445f00 Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Thu, 28 Jul 2022 20:37:08 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/src/views/modules/ability/bsabilityai.vue | 6 +++--- back/src/views/modules/ability/bsabilityservice.vue | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/back/src/views/modules/ability/bsabilityai.vue b/back/src/views/modules/ability/bsabilityai.vue index 40b20ea3..9e3833ac 100644 --- a/back/src/views/modules/ability/bsabilityai.vue +++ b/back/src/views/modules/ability/bsabilityai.vue @@ -607,9 +607,7 @@ export default { this.submitFrom.infoList = this.submitFrom.infoList.filter( (item) => item.attrType !== obj.attrType ) - if (obj.attrValue) { - this.submitFrom.infoList.push(obj) - } + this.submitFrom.infoList.push(obj) }, changeAdd () { const arr = [] @@ -803,6 +801,8 @@ export default { } ) this.submitFrom.infoList = newArr + // 检验是否有空值 + this.submitFrom.infoList = this.submitFrom.infoList.filter(item => item.attrValue) this.$http .put('/resource/update', this.submitFrom) .then(({ data: res }) => { diff --git a/back/src/views/modules/ability/bsabilityservice.vue b/back/src/views/modules/ability/bsabilityservice.vue index ac5976c7..84874bc2 100644 --- a/back/src/views/modules/ability/bsabilityservice.vue +++ b/back/src/views/modules/ability/bsabilityservice.vue @@ -581,9 +581,7 @@ export default { }, changeInfoList (obj) { this.submitFrom.infoList = this.submitFrom.infoList.filter((item) => item.attrType !== obj.attrType) - if (obj.attrValue) { - this.submitFrom.infoList.push(obj) - } + this.submitFrom.infoList.push(obj) }, submitData () { const arr = [] @@ -711,6 +709,8 @@ export default { } }) console.log('编辑===============>', this.submitFrom) + // 检验是否有空值 + this.submitFrom.infoList = this.submitFrom.infoList.filter(item => item.attrValue) this.$http .put('/resource/update', this.submitFrom) .then(({ data: res }) => {