From c2d3848973ea99d9f7758f628aa49985977e3891 Mon Sep 17 00:00:00 2001 From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com> Date: 星期五, 01 三月 2024 14:35:15 +0800 Subject: [PATCH] qxtj --- src/views/hosp/project/index.vue | 22 ++++++++++++++++------ 1 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/views/hosp/project/index.vue b/src/views/hosp/project/index.vue index 97b3f50..c296482 100644 --- a/src/views/hosp/project/index.vue +++ b/src/views/hosp/project/index.vue @@ -488,6 +488,7 @@ xmmc: null, pym: null, }, + treeDate: {}, queryParam: { page: 1, pageSize: 10, @@ -498,7 +499,7 @@ proParentId: "", deptId: "", needReport: "Y", - proStatus:"0", + proStatus: "0", proName: "", proPrice: "", sfxmId: "", @@ -620,6 +621,7 @@ handleAdd(row) { // this.reset(); this.loading = true; + this.proParent = false this.form.proPrice = 0.0; this.form.proName = ""; this.form.proId = null; @@ -632,11 +634,20 @@ project.children = this.handleTree(response.data.list, "proId"); this.key = response.data.key; this.projectOptions.push(project); - console.log(this.projectOptions) - if (row) { + if (row.proId) { this.form.proParentId = row.proId; this.open = true; - } else { + } else if(this.treeDate.id){ + this.form.proParentId = this.treeDate.id + this.projectOptions.forEach(item => { + item.children.forEach(item1 => { + if(this.form.proParentId == item1.proId){ + this.form.deptId = item1.deptId + } + }) + }) + this.open = true; + }else{ this.open = true; } } @@ -689,7 +700,6 @@ }, obtain(vals) { - if (this.projectOptions) { this.selectList = vals; } @@ -797,6 +807,7 @@ }, // 鑺傜偣鍗曞嚮浜嬩欢 handleNodeClick(date) { + this.treeDate = date if (date.qf == "0") { this.xiugais = true; } else { @@ -1023,7 +1034,6 @@ handleUpdate1() { this.open = true; this.form = this.xiugaiList; - // console.log( this.form ) this.proParent = true // if(){ // this.proParent = true -- Gitblit v1.8.0