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