From 5b8edbf381547cb99e13d9c209bc4c9bc47eeffc Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期三, 28 九月 2022 19:31:52 +0800
Subject: [PATCH] 修复代码生成勾选属性无效问题
---
ruoyi-ui/src/views/system/user/index.vue | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue
index 4a031cb..a26a33f 100644
--- a/ruoyi-ui/src/views/system/user/index.vue
+++ b/ruoyi-ui/src/views/system/user/index.vue
@@ -21,6 +21,7 @@
:filter-node-method="filterNode"
ref="tree"
default-expand-all
+ highlight-current
@node-click="handleNodeClick"
/>
</div>
@@ -341,9 +342,8 @@
</template>
<script>
-import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus } from "@/api/system/user";
+import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
import { getToken } from "@/utils/auth";
-import { treeselect } from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -461,7 +461,7 @@
},
created() {
this.getList();
- this.getTreeselect();
+ this.getDeptTree();
this.getConfigKey("sys.user.initPassword").then(response => {
this.initPassword = response.msg;
});
@@ -478,8 +478,8 @@
);
},
/** 查询部门下拉树结构 */
- getTreeselect() {
- treeselect().then(response => {
+ getDeptTree() {
+ deptTreeSelect().then(response => {
this.deptOptions = response.data;
});
},
@@ -560,7 +560,6 @@
/** 新增按钮操作 */
handleAdd() {
this.reset();
- this.getTreeselect();
getUser().then(response => {
this.postOptions = response.posts;
this.roleOptions = response.roles;
@@ -572,7 +571,6 @@
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
- this.getTreeselect();
const userId = row.userId || this.ids;
getUser(userId).then(response => {
this.form = response.data;
--
Gitblit v1.9.2