|
@@ -55,6 +55,7 @@ export default { |
|
@@ -55,6 +55,7 @@ export default { |
55
|
const {proxy} = Vue.getCurrentInstance();
|
55
|
const {proxy} = Vue.getCurrentInstance();
|
56
|
let data=Vue.ref([]);
|
56
|
let data=Vue.ref([]);
|
57
|
let change=(val)=>{
|
57
|
let change=(val)=>{
|
|
|
58
|
+ //change事件传个父组件的值
|
58
|
emit("changeSelect",val)
|
59
|
emit("changeSelect",val)
|
59
|
}
|
60
|
}
|
60
|
//获取菜单类型
|
61
|
//获取菜单类型
|
|
@@ -83,34 +84,33 @@ export default { |
|
@@ -83,34 +84,33 @@ export default { |
83
|
|
84
|
|
84
|
const load = (node, resolve) => {
|
85
|
const load = (node, resolve) => {
|
85
|
if (node.isLeaf) return resolve([])
|
86
|
if (node.isLeaf) return resolve([])
|
86
|
-
|
|
|
87
|
- setTimeout(() => {
|
|
|
88
|
-
|
|
|
89
|
- proxy.$http.get(`/api-user/users/getAll`, {}, function (res) {
|
|
|
90
|
- let arr=[];
|
|
|
91
|
- if(res && res.data){
|
|
|
92
|
- arr= res.data;
|
87
|
+ if(node.data.type && node.data.type=='org'){
|
|
|
88
|
+ // setTimeout(() => {
|
|
|
89
|
+ if(node.data.type && node.data.type=='org') {
|
|
|
90
|
+ let param = {
|
|
|
91
|
+ page: 1,
|
|
|
92
|
+ limit: 99999,
|
|
|
93
|
+ orgId: node.data.value
|
|
|
94
|
+ }
|
|
|
95
|
+ proxy.$http.get(`/api-user/users`, param, function (res) {
|
|
|
96
|
+ let arr = [];
|
|
|
97
|
+ if (res && res.data) {
|
|
|
98
|
+ arr = res.data;
|
93
|
}
|
99
|
}
|
94
|
- if(arr.length>0){
|
|
|
95
|
- arr.map(item=>{
|
|
|
96
|
- item.name=item.nickName;
|
|
|
97
|
- item.type='user'
|
100
|
+ if (arr.length > 0) {
|
|
|
101
|
+ arr.map(item => {
|
|
|
102
|
+ item.name = item.nickname;
|
|
|
103
|
+ item.type = 'user';
|
|
|
104
|
+ item.value=item.username;
|
98
|
})
|
105
|
})
|
99
|
}
|
106
|
}
|
100
|
resolve(arr)
|
107
|
resolve(arr)
|
101
|
})
|
108
|
})
|
102
|
- /*resolve([
|
|
|
103
|
- {
|
|
|
104
|
- value: ++id,
|
|
|
105
|
- label: `lazy load node${id}`,
|
|
|
106
|
- },
|
|
|
107
|
- {
|
|
|
108
|
- value: ++id,
|
|
|
109
|
- label: `lazy load node${id}`,
|
|
|
110
|
- isLeaf: true,
|
|
|
111
|
- },
|
|
|
112
|
- ])*/
|
|
|
113
|
- }, 400)
|
109
|
+ }
|
|
|
110
|
+ // }, 100)
|
|
|
111
|
+ }else{
|
|
|
112
|
+ resolve([])
|
|
|
113
|
+ }
|
114
|
}
|
114
|
}
|
115
|
// 监听编辑状态
|
115
|
// 监听编辑状态
|
116
|
Vue.watch(() => props.value, (newValue, oldVlaue) => {
|
116
|
Vue.watch(() => props.value, (newValue, oldVlaue) => {
|