...
|
...
|
@@ -55,6 +55,7 @@ export default { |
|
|
const {proxy} = Vue.getCurrentInstance();
|
|
|
let data=Vue.ref([]);
|
|
|
let change=(val)=>{
|
|
|
//change事件传个父组件的值
|
|
|
emit("changeSelect",val)
|
|
|
}
|
|
|
//获取菜单类型
|
...
|
...
|
@@ -83,34 +84,33 @@ export default { |
|
|
|
|
|
const load = (node, resolve) => {
|
|
|
if (node.isLeaf) return resolve([])
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
proxy.$http.get(`/api-user/users/getAll`, {}, function (res) {
|
|
|
let arr=[];
|
|
|
if(res && res.data){
|
|
|
arr= res.data;
|
|
|
if(node.data.type && node.data.type=='org'){
|
|
|
// setTimeout(() => {
|
|
|
if(node.data.type && node.data.type=='org') {
|
|
|
let param = {
|
|
|
page: 1,
|
|
|
limit: 99999,
|
|
|
orgId: node.data.value
|
|
|
}
|
|
|
proxy.$http.get(`/api-user/users`, param, function (res) {
|
|
|
let arr = [];
|
|
|
if (res && res.data) {
|
|
|
arr = res.data;
|
|
|
}
|
|
|
if(arr.length>0){
|
|
|
arr.map(item=>{
|
|
|
item.name=item.nickName;
|
|
|
item.type='user'
|
|
|
if (arr.length > 0) {
|
|
|
arr.map(item => {
|
|
|
item.name = item.nickname;
|
|
|
item.type = 'user';
|
|
|
item.value=item.username;
|
|
|
})
|
|
|
}
|
|
|
resolve(arr)
|
|
|
})
|
|
|
/*resolve([
|
|
|
{
|
|
|
value: ++id,
|
|
|
label: `lazy load node${id}`,
|
|
|
},
|
|
|
{
|
|
|
value: ++id,
|
|
|
label: `lazy load node${id}`,
|
|
|
isLeaf: true,
|
|
|
},
|
|
|
])*/
|
|
|
}, 400)
|
|
|
}
|
|
|
// }, 100)
|
|
|
}else{
|
|
|
resolve([])
|
|
|
}
|
|
|
}
|
|
|
// 监听编辑状态
|
|
|
Vue.watch(() => props.value, (newValue, oldVlaue) => {
|
...
|
...
|
|