From 20e75d78cc6c27baa380de6ac61777569c335bb8 Mon Sep 17 00:00:00 2001 From: gaoyuanwei <2826352639@qq.com> Date: Tue, 26 Jul 2022 11:36:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A1=AB=E5=86=99=E6=97=B6=E7=BA=A2=E5=AD=97?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/PutOnTheShelf.vue | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/front/src/views/capacityOnTheShelf/components/PutOnTheShelf.vue b/front/src/views/capacityOnTheShelf/components/PutOnTheShelf.vue index 0e8cc563..bb8c58a2 100644 --- a/front/src/views/capacityOnTheShelf/components/PutOnTheShelf.vue +++ b/front/src/views/capacityOnTheShelf/components/PutOnTheShelf.vue @@ -231,7 +231,7 @@ v-if="item.type == 'input' && item.name.indexOf('名称') == -1" v-model:value="item.note1" :placeholder="'请输入' + item.name" - @change="changeIiem(name, data.note1)" + @change="changeIiem(item.name, item.note1)" />
{ - console.log('点击=========》', item, itemson) + // console.log('点击=========》', item, itemson) // console.log(item, itemson) if (item.note2.indexOf(itemson.dictLabel) === -1) { item.note2.push(itemson.dictLabel) } else { item.note2.splice(item.note2.indexOf(itemson.dictLabel), 1) } + // 多选判断是否为空 + if ( + item.note2.length !== 0 && + changeField.value.indexOf('应用领域') == -1 + ) { + changeField.value.push('应用领域') + console.log('点击=========》1', changeField.value, item.note2) + } else if (item.note2.length == 0) { + if (changeField.value.indexOf('应用领域') > -1) { + changeField.value.splice(changeField.value.indexOf('应用领域'), 1) + console.log('点击=========》2', changeField.value, item.note2) + } + } mybus.emit('chageDataFrom', { attrType: item.name, attrValue: item.note2.join(';'),