From 483f167ad09eda3dcf7c7d2a725ff0050faf8b1b Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期一, 28 七月 2025 14:58:50 +0800 Subject: [PATCH] 1 --- src/views/system/user/index.vue | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 96a17da..5251692 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -1457,6 +1457,7 @@ hospList: [], activeNames: ["1"], treeId: [], + selectedDeptId: null, // 閬僵灞� loading: true, // 閫変腑鏁扮粍 @@ -1610,6 +1611,7 @@ // 鏍规嵁鍚嶇О绛涢�夐儴闂ㄦ爲 deptName(val) { console.log(val); + this.$refs.tree.filter(val); }, treeId(newVal, oldVal) { if (newVal) { @@ -1710,6 +1712,7 @@ // 鑺傜偣鍗曞嚮浜嬩欢 handleNodeClick(data) { this.queryParams.deptId = data.id; + this.selectedDeptId = data.id; this.handleQuery(); }, handlePackage() { @@ -1744,10 +1747,11 @@ cancel() { this.open = false; this.reset(); - this.$tab.refreshPage(); + // this.$tab.refreshPage(); }, handleClose() { - this.$tab.refreshPage(); + this.cancel(); + // this.$tab.refreshPage(); }, // 琛ㄥ崟閲嶇疆 reset() { @@ -1825,6 +1829,9 @@ this.sendhospName(); } }); + if (this.selectedDeptId) { + this.form.deptId = this.selectedDeptId; + } // getUser().then((response) => { // this.postOptions = response.posts; // this.roleOptions = response.roles; @@ -1840,7 +1847,7 @@ getDeptListByDictHospId(data).then((res) => { console.log(res, 123456); this.DepartmentList = res.data; - this.form.deptId = String(this.form.deptId); + // this.form.deptId = String(this.form.deptId); }); }, @@ -1871,6 +1878,10 @@ this.getlistHosp(); this.reset(); this.form = row; + this.form = { + ...row, + deptId: row.deptId != null ? String(row.deptId) : null, // 馃憟 纭繚涓哄瓧绗︿覆 + }; if (this.form.hospId) { this.sendhospName(); } -- Gitblit v1.8.0