From bad2bc143be3f8ddb93a1c9f984127b3ccf43e8f Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期一, 31 三月 2025 17:47:14 +0800 Subject: [PATCH] 11 --- src/views/hosp/project/index.vue | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/views/hosp/project/index.vue b/src/views/hosp/project/index.vue index 7afbbcb..92e9b30 100644 --- a/src/views/hosp/project/index.vue +++ b/src/views/hosp/project/index.vue @@ -685,11 +685,16 @@ project.children = this.handleTree(response.data.list, "proId"); this.key = response.data.key; this.projectOptions.push(project); + // this.open = true; if (row.proId) { this.form.proParentId = row.proId || 0; this.open = true; } else if (this.treeDate.id) { - this.form.proParentId = this.treeDate.id || 0; + if(this.treeDate.qf == "0"){ + this.form.proParentId = "0" + this.form.deptId =this.treeDate.id + }else{ + this.form.proParentId = this.treeDate.id; this.projectOptions.forEach((item) => { item.children.forEach((item1) => { if (this.form.proParentId == item1.proId) { @@ -697,8 +702,12 @@ } }); }); + } + + this.open = true; } else { + this.form.proParentId = "0" this.open = true; } } @@ -815,7 +824,9 @@ }); }, handleNodeClick(date) { + this.treeDate = date; + console.log(this.treeDate) this.xiugais = date.qf === "0"; let proId = date.id; getInfoByProId(proId).then((response) => { @@ -1059,7 +1070,7 @@ } else { this.form.consumablesList = null; } - if (!this.form.deptId || !this.form.proParentId) { + if (!this.form.deptId || this.form.proParentId == null) { this.$message.error("璇峰~鍐欑埗椤瑰悕绉版垨绉戝鍚嶇О"); this.open = true; } else { -- Gitblit v1.8.0