From 4e6c841dd09baff7fafb0e21fec36ee7faf61588 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期一, 09 九月 2024 15:01:41 +0800
Subject: [PATCH] 测试完成
---
src/views/system/user/index.vue | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 6f1d6d2..7322ae1 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -307,8 +307,9 @@
<el-col :span="12">
<el-form-item label="褰掑睘閮ㄩ棬" prop="deptId">
<treeselect
- v-model="form.deptId"
+ v-model="form.depts"
:options="deptOptions"
+ :multiple="true"
:show-count="true"
placeholder="璇烽�夋嫨褰掑睘閮ㄩ棬"
/>
@@ -536,6 +537,7 @@
initPassword: undefined,
// 鏃ユ湡鑼冨洿
dateRange: [],
+ deptIds: [],
// 宀椾綅閫夐」
postOptions: [],
// 瑙掕壊閫夐」
@@ -735,20 +737,24 @@
/** 鏂板鎸夐挳鎿嶄綔 */
handleAdd() {
this.reset();
- getUser().then((response) => {
- this.postOptions = response.posts;
- this.roleOptions = response.roles;
- this.open = true;
+ this.open = true;
this.title = "娣诲姞鐢ㄦ埛";
this.form.password = this.initPassword;
- });
+ this.form.depts = [];
+ // getUser().then((response) => {
+ // this.postOptions = response.posts;
+ // this.roleOptions = response.roles;
+
+ // });
},
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
this.reset();
+ this.deptIds = [];
const userId = row.userId || this.ids;
getUser(userId).then((response) => {
this.form = response.data;
+
this.postOptions = response.posts;
this.roleOptions = response.roles;
this.$set(this.form, "postIds", response.postIds);
--
Gitblit v1.9.3