权限重构
This commit is contained in:
@ -3,9 +3,9 @@ import { AxiosPromise } from 'axios';
|
||||
import { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
// 获取路由
|
||||
export function getRouters(): AxiosPromise<RouteRecordRaw[]> {
|
||||
export function getRouters(id: string): AxiosPromise<RouteRecordRaw[]> {
|
||||
return request({
|
||||
url: '/system/menu/getRouters',
|
||||
url: '/system/menu/getRouters/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -186,3 +186,14 @@ export const uploadProjectFile = (data: any) => {
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 切换项目
|
||||
* @param id
|
||||
*/
|
||||
export const changeProject = (id: string | number) => {
|
||||
return request({
|
||||
url: '/project/project/changeProject/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
@ -68,3 +68,11 @@ export const delMenu = (menuId: string | number) => {
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
// 获取所有路由
|
||||
export const getAllRouters = () => {
|
||||
return request({
|
||||
url: '/system/menu/getAllRouters',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
@ -75,3 +75,11 @@ export function getRoleList(deptId?: number | string): AxiosPromise<any[]> {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 获取部门下的项目列表
|
||||
export function getProjectByDeptId(deptId?: number | string): AxiosPromise<any[]> {
|
||||
return request({
|
||||
url: '/system/dept/projectIdList/' + deptId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -60,19 +60,20 @@ export interface UserForm {
|
||||
nickName?: string;
|
||||
password: string;
|
||||
phonenumber?: string;
|
||||
projectRoles?: any[];
|
||||
email?: string;
|
||||
sex?: string;
|
||||
status: string;
|
||||
remark?: string;
|
||||
postIds: string[];
|
||||
roleIds: string[];
|
||||
filePath?: string;
|
||||
}
|
||||
|
||||
export interface UserInfoVO {
|
||||
user: UserVO;
|
||||
roles: RoleVO[];
|
||||
roleIds: string[];
|
||||
|
||||
projectRoles: any[];
|
||||
posts: PostVO[];
|
||||
postIds: string[];
|
||||
roleGroup: string;
|
||||
|
Reference in New Issue
Block a user