parent
208d7f4cab
commit
ba012ebdf7
|
@ -127,7 +127,7 @@ export function updateAuthRole(data) {
|
|||
}
|
||||
|
||||
// 查询部门下拉树结构
|
||||
export function deptTreeSelect() {
|
||||
export function deptTreeSelect(data) {
|
||||
return request({
|
||||
url: '/system/user/deptTree',
|
||||
method: 'get'
|
||||
|
|
|
@ -36,6 +36,7 @@ const user = {
|
|||
state.permissions = permissions
|
||||
},
|
||||
SET_COMPANY: (state, companySign) => {
|
||||
state.companySign = companySign
|
||||
Cookies.set('companySign', companySign)
|
||||
}
|
||||
},
|
||||
|
@ -65,7 +66,7 @@ const user = {
|
|||
GetInfo({commit, state}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getInfo().then(res => {
|
||||
debugger
|
||||
// debugger
|
||||
const user = res.data.user
|
||||
const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : user.avatar;
|
||||
if (res.data.roles && res.data.roles.length > 0) { // 验证返回的roles是否是一个非空数组
|
||||
|
|
|
@ -399,7 +399,7 @@ export default {
|
|||
// 弹出层标题
|
||||
title: "",
|
||||
// 部门树选项
|
||||
deptOptions: undefined,
|
||||
deptOptions: [],
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 部门名称
|
||||
|
@ -489,8 +489,7 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDeptTree();
|
||||
this.getDeptTree(1);
|
||||
this.getConfigKey("sys.user.initPassword").then(response => {
|
||||
this.initPassword = response.data.msg;
|
||||
});
|
||||
|
@ -507,10 +506,19 @@ export default {
|
|||
);
|
||||
},
|
||||
/** 查询部门下拉树结构 */
|
||||
getDeptTree() {
|
||||
getDeptTree(num) {
|
||||
// debugger
|
||||
deptTreeSelect().then(response => {
|
||||
this.deptOptions = response.data;
|
||||
if (1 === num){
|
||||
this.queryParams.deptId = response.data[0].id;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
// if (1 === num){
|
||||
// this.queryParams = this.deptOptions[0].id;
|
||||
// this.getList();
|
||||
// }
|
||||
},
|
||||
// 筛选节点
|
||||
filterNode(value, data) {
|
||||
|
|
Loading…
Reference in New Issue