From 9b788f6f74acc6a365350f450419b6ad73f1cc2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Mon, 22 Aug 2022 12:56:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/area/index.vue | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/views/system/area/index.vue b/src/views/system/area/index.vue index ac0f28c..6adfa2c 100644 --- a/src/views/system/area/index.vue +++ b/src/views/system/area/index.vue @@ -119,9 +119,9 @@ icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:area:remove']" - v-if="scope.row.id != 1" >删除 + @@ -129,7 +129,11 @@ - + + @@ -252,6 +263,7 @@ export default { // e.code = Number(e.code); // }); this.areaList = this.handleTree(response.data); + console.log(this.areaList); this.loading = false; }); }, @@ -319,6 +331,9 @@ export default { this.form2.code = this.form.code; this.form2.sort = this.form.sort; this.form2.parentId = this.form.parentId; + if (this.areaList.length == 0) { + this.form.parentId = 0; + } this.$refs["form"].validate((valid) => { if (valid) { if (this.form.id != null) {