From 96fc96dfaf2e4c4799f19f1e01a79d8409990a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Tue, 5 Mar 2024 17:42:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8C=85=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=92=8C=E7=94=A8=E6=88=B7=E6=B7=BB=E5=8A=A0=E7=A7=91=E5=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/index.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index f1f4dd3..4abcd06 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -1063,8 +1063,10 @@ export default { this.$refs.multipleTabledep.toggleRowSelection(selection.pop()); // 设置选择项 } this.nowSelectDatadep = selection; - this.formlistdep.departmentId = selection[0].departmentId; - console.log(this.formlistdep, " this.formlistdep"); + if(selection.length>0){ + this.formlistdep.departmentId = selection[0].departmentId; + + } }, // // 科室右边选中事件 handleSelectionChangenrightdep(selection) { @@ -1087,6 +1089,7 @@ export default { }, // 机构左边选中事件 handleSelectionChangenleft(selection) { + console.log(selection,'55555555') this.$nextTick(() => { if (selection.length > 1) { this.$refs.multipleTable.clearSelection(); // 清空所有选择 @@ -1095,7 +1098,9 @@ export default { }); this.nowSelectData = selection; - this.formlist.agencyId = selection[0].agencyId; + if(selection.length>0){ + this.formlist.agencyId = selection[0].agencyId; + } },