diff --git a/data/magic-api/api/后台/用户管理/保存.ms b/data/magic-api/api/后台/用户管理/保存.ms
index b7c75e3..a6aa481 100644
--- a/data/magic-api/api/后台/用户管理/保存.ms
+++ b/data/magic-api/api/后台/用户管理/保存.ms
@@ -5,7 +5,7 @@
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
"name" : "保存",
"createTime" : null,
- "updateTime" : 1641261914841,
+ "updateTime" : 1642085497821,
"lock" : "0",
"method" : "POST",
"path" : "/save",
@@ -31,7 +31,8 @@ var user = {
username,
password: password,
phone,
- isLogin
+ isLogin,
+ officeId
}
if(id){
SqlCache.delete(`permissions:${id}`)
diff --git a/data/magic-api/api/后台/用户管理/列表.ms b/data/magic-api/api/后台/用户管理/列表.ms
index 6ac1e4d..69aad84 100644
--- a/data/magic-api/api/后台/用户管理/列表.ms
+++ b/data/magic-api/api/后台/用户管理/列表.ms
@@ -5,7 +5,7 @@
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
"name" : "列表",
"createTime" : null,
- "updateTime" : 1634738477796,
+ "updateTime" : 1642086792944,
"lock" : "0",
"method" : "GET",
"path" : "/list",
@@ -28,9 +28,11 @@ return db.page("""
su.name,
su.is_login,
su.phone,
- su.create_date
+ su.create_date,
+ su.office_id
from sys_user su
where su.is_del = 0
+ ?{officeId, and su.office_id = #{officeId}}
?{username, and su.username like concat('%',#{username},'%')}
?{name, and su.name like concat('%',#{name},'%')}
?{isLogin, and su.is_login = #{isLogin}}
diff --git a/magic-boot-ui/src/scripts/treeTable.js b/magic-boot-ui/src/scripts/treeTable.js
index 3223eda..a6a2768 100644
--- a/magic-boot-ui/src/scripts/treeTable.js
+++ b/magic-boot-ui/src/scripts/treeTable.js
@@ -50,6 +50,17 @@ treeTable.genTree = (children) => {
return treeData
}
+treeTable.deleteEmptyChildren = (children) => {
+ for(var i in children){
+ var chi = children[i]
+ if(chi.children && chi.children.length == 0){
+ delete chi.children
+ }else{
+ treeTable.deleteEmptyChildren(chi.children)
+ }
+ }
+}
+
treeTable.recursionSearch = (fields, data, text) => {
var searchData = []
for(var i in data){
diff --git a/magic-boot-ui/src/views/system/user/user-form.vue b/magic-boot-ui/src/views/system/user/user-form.vue
index 4f904a3..5caadaa 100644
--- a/magic-boot-ui/src/views/system/user/user-form.vue
+++ b/magic-boot-ui/src/views/system/user/user-form.vue
@@ -12,6 +12,9 @@
+
+
+