From 57b2750129079bd5cb7c4c3ef5117bc25cfaea9d 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 09:50:37 +0800 Subject: [PATCH] zzqyxg --- .env.development | 2 +- src/views/system/info/index.vue | 60 +++++++++++++++++---------------- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/.env.development b/.env.development index 6a5988e..e352278 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ VUE_APP_TITLE = 幼儿园体质检测管理系统 ENV = 'development' # 若依管理系统/开发环境 -VUE_APP_BASE_API = 'http://192.168.16.64:8080' +VUE_APP_BASE_API = 'http://192.168.16.62:8080' #'/dev-api' # 路由懒加载 diff --git a/src/views/system/info/index.vue b/src/views/system/info/index.vue index 29c6c44..e43334d 100644 --- a/src/views/system/info/index.vue +++ b/src/views/system/info/index.vue @@ -8,12 +8,12 @@ v-show="showSearch" label-width="68px" > - + @@ -184,8 +184,17 @@ --> + + + + - + - - - - @@ -250,8 +250,8 @@ export default { showSearch: true, // 区域管理表格数据 List: [], + List2: [], areaList: [], - areaList2: [], // 是否展开,默认全部展开 isExpandAll: true, // 重新渲染表格状态 @@ -268,6 +268,7 @@ export default { organizeAddress: "", phone: "", contacts: "", + id: undefined, }, // 表单参数 form: { @@ -325,7 +326,7 @@ export default { delete node.children; } return { - parentId: node.id, + id: node.id, label: node.organizeName, children: node.children, }; @@ -355,7 +356,6 @@ export default { /** 查询区域管理列表 */ getList() { listArea(this.queryParams).then((response) => { - this.areaList2 = this.handleTree(response.data); this.areaList = this.handleTree(response.data); console.log(this.areaList); }); @@ -363,16 +363,8 @@ export default { console.log(this.queryParams); list(this.queryParams).then((response) => { this.List = this.handleTree(response.data); - console.log(this.List); + this.List2 = this.List; this.loading = false; - this.queryParams = { - parentId: undefined, - areaId: undefined, - organizeName: "", - organizeAddress: "", - phone: "", - contacts: "", - }; }); }, // 取消按钮 @@ -395,11 +387,23 @@ export default { }, /** 搜索按钮操作 */ handleQuery() { - this.getList(); + list(this.queryParams).then((response) => { + this.List = this.handleTree(response.data); + this.loading = false; + }); }, /** 重置按钮操作 */ resetQuery() { this.resetForm("queryForm"); + this.queryParams = { + parentId: undefined, + areaId: undefined, + organizeName: "", + organizeAddress: "", + phone: "", + contacts: "", + id: undefined, + }; this.handleQuery(); }, // 多选框选中数据 @@ -427,7 +431,6 @@ export default { }); this.reset(); listArea(this.queryParams).then((response) => { - this.areaList2 = this.handleTree(response.data); this.areaList = this.handleTree(response.data); console.log(this.areaList); }); @@ -502,6 +505,5 @@ export default { }; \ No newline at end of file