|
@@ -13,8 +13,8 @@
|
|
|
v-model="searchForm.user"
|
|
|
:options="userList"
|
|
|
:props="{
|
|
|
- value: 'ItemId',
|
|
|
- label: 'ItemName',
|
|
|
+ value: 'NodeId',
|
|
|
+ label: 'NodeName',
|
|
|
children: 'Children',
|
|
|
emitPath: false
|
|
|
}"
|
|
@@ -466,10 +466,21 @@ export default {
|
|
|
/* 获取用户列表 */
|
|
|
async getUserList() {
|
|
|
|
|
|
- const res = await dataAuthInterface.userSearch();
|
|
|
+ const res = await departInterence.getSystemUser();
|
|
|
if (res.Ret !== 200) return
|
|
|
-
|
|
|
+
|
|
|
this.userList = res.Data || []
|
|
|
+ this.filterTreeEmpty(this.userList)
|
|
|
+ },
|
|
|
+
|
|
|
+ // 递归处理数组
|
|
|
+ filterTreeEmpty(arr) {
|
|
|
+ arr.length && arr.forEach(item => {
|
|
|
+ item.Children && item.Children.length && this.filterTreeEmpty(item.Children)
|
|
|
+ if (!item.Children || !item.Children.length) {
|
|
|
+ delete item.Children
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
/* 获取用户的资产数量 */
|