From e3136072a0403d29a3a61d24abd0274edbcff02f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E4=B8=BD=E5=90=9B?= <664953382@qq.com> Date: Wed, 9 Feb 2022 14:59:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=89=80=E5=B1=9E=E9=A2=86?= =?UTF-8?q?=E5=9F=9F=E6=B7=BB=E5=8A=A0=E5=87=BA=E7=8E=B0undefined=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/FieldOptions/index.vue | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/views/components/FieldOptions/index.vue b/src/views/components/FieldOptions/index.vue index b73e978..e3d414f 100644 --- a/src/views/components/FieldOptions/index.vue +++ b/src/views/components/FieldOptions/index.vue @@ -53,7 +53,7 @@ v-for="item in levelIII" :key="item.id" :label="item.name" - :value="item.id" + :value="item" > @@ -124,7 +124,24 @@ export default { _value.push(item.value); } newVal.industrys = _key; - this.industrysTags = _value; + + let keyObj = []; + for (let i = 0; i < _key.length; i++) { + keyObj.push([]); + let array = _key[i].split("-"); + for (let j = 0; j < array.length; j++) { + keyObj[i].push({ + id: array[j], + }); + } + } + for (let i = 0; i < _value.length; i++) { + let array = _value[i].split(">"); + for (let j = 0; j < array.length; j++) { + keyObj[i][j]["name"] = array[j]; + } + } + this.industrysTags = keyObj; }, }, methods: {