This commit is contained in:
2025-08-28 10:07:35 +08:00
15 changed files with 292 additions and 88 deletions

View File

@ -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'
});
}

View File

@ -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'
});
};

View File

@ -68,3 +68,11 @@ export const delMenu = (menuId: string | number) => {
method: 'delete'
});
};
// 获取所有路由
export const getAllRouters = () => {
return request({
url: '/system/menu/getAllRouters',
method: 'get'
});
};

View File

@ -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'
});
}

View File

@ -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;