From 854002335cbce613e0b62fbc9a034ba82976a155 Mon Sep 17 00:00:00 2001 From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com> Date: 星期三, 13 十二月 2023 17:52:55 +0800 Subject: [PATCH] qxtj --- src/views/hosp/project/index.vue | 28 +++++++++++++++++++--------- 1 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/views/hosp/project/index.vue b/src/views/hosp/project/index.vue index 9e59571..53b27e3 100644 --- a/src/views/hosp/project/index.vue +++ b/src/views/hosp/project/index.vue @@ -685,16 +685,26 @@ let data = { deptId: this.queryParams.deptId, }; + this.loading = true ProjectTree(data).then((response) => { - this.projectList = this.handleTree(response.data.list, "proId"); - this.ListId.push(this.projectList[0].proId) - this.key = response.data.key - // if (this.key == "Y") { - // this.key = response.data.key - // } else if (response.data.key == "N") { - // this.key = response.data.key - // } - this.loading = false; + if (response.code == 200) { + if (response.data.list.length >= 1) { + this.projectList = this.handleTree(response.data.list, "proId"); + this.ListId.push(this.projectList[0].proId) + this.key = response.data.key + } else { + this.projectList = [] + } + + + // if (this.key == "Y") { + // this.key = response.data.key + // } else if (response.data.key == "N") { + // this.key = response.data.key + // } + this.loading = false; + } + }); }, selectSingleRow({ row, rowIndex }) { -- Gitblit v1.8.0