From efba12cb145f4a9eceb35e47c4334c5614cba0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Fri, 29 Jul 2022 14:23:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=BC=E5=84=BF=E5=9B=AD=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/kindergartenInfo/index.vue | 38 ++++++++++++--------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/src/views/system/kindergartenInfo/index.vue b/src/views/system/kindergartenInfo/index.vue index bf55bc0..ff0836d 100644 --- a/src/views/system/kindergartenInfo/index.vue +++ b/src/views/system/kindergartenInfo/index.vue @@ -26,11 +26,13 @@ - + placeholder="请选择幼儿园类型" + v-model="queryParams.kindergartenType" + style="width: 208px" + /> @@ -269,12 +271,14 @@ export default { type: "", types: [ { - value: "", + id: "", label: "公办", + children: [], }, { - value: "", + id: "", label: "私有", + children: [], }, ], type2: "", @@ -322,14 +326,16 @@ export default { this.getList(); }, methods: { - handleChange(value) { - console.log(value); - value.forEach((e) => { - this.queryParams.kindergartenType = e; - }); - console.log(this.queryParams); + normalizer(node) { + if (node.children && !node.children.length) { + delete node.children; + } + return { + kindergartenType: node.id, + label: node.label, + children: node.children, + }; }, - normalizer(node) {}, normalizer2(node) { if (node.children && !node.children.length) { delete node.children; @@ -358,10 +364,10 @@ export default { tKindergartenInfo(this.kindergartenType).then((res) => { this.type = res.data[0].dictValue; this.type2 = res.data[1].dictValue; - this.types[0].value = res.data[0].dictValue; - this.types[1].value = res.data[1].dictValue; + this.types[0].id = res.data[0].dictValue; + this.types[1].id = res.data[1].dictValue; - console.log(this.type, this.type2, this.types); + console.log(this.types); }); }, // 取消按钮