feat commit

入驻企业权限控制,入驻企业的企业管理功能,用户管理功能
pull/2/head
玉安君 2024-03-28 22:27:31 +08:00
parent 208d7f4cab
commit ba012ebdf7
3 changed files with 15 additions and 6 deletions

View File

@ -127,7 +127,7 @@ export function updateAuthRole(data) {
}
// 查询部门下拉树结构
export function deptTreeSelect() {
export function deptTreeSelect(data) {
return request({
url: '/system/user/deptTree',
method: 'get'

View File

@ -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是否是一个非空数组

View File

@ -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) {