diff --git a/.env.development b/.env.development index 2524c8a..93d45ad 100644 --- a/.env.development +++ b/.env.development @@ -6,7 +6,7 @@ VITE_APP_ENV = 'development' # 开发环境 # 李陈杰 209 -# VITE_APP_BASE_API = 'http://192.168.110.209:8899' +VITE_APP_BASE_API = 'http://192.168.110.209:8899' # 曾涛 # VITE_APP_BASE_API = 'http://192.168.110.180:8899' # 罗成 diff --git a/src/App.vue b/src/App.vue index c641c7d..a0780e4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -19,3 +19,11 @@ onMounted(() => { }); }); + diff --git a/src/api/menu.ts b/src/api/menu.ts index a3ae80e..fc1d542 100644 --- a/src/api/menu.ts +++ b/src/api/menu.ts @@ -3,9 +3,9 @@ import { AxiosPromise } from 'axios'; import { RouteRecordRaw } from 'vue-router'; // 获取路由 -export function getRouters(): AxiosPromise { +export function getRouters(id: string): AxiosPromise { return request({ - url: '/system/menu/getRouters', + url: '/system/menu/getRouters/' + id, method: 'get' }); } diff --git a/src/api/project/project/index.ts b/src/api/project/project/index.ts index 5b76894..04d5b65 100644 --- a/src/api/project/project/index.ts +++ b/src/api/project/project/index.ts @@ -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' + }); +}; diff --git a/src/api/system/menu/index.ts b/src/api/system/menu/index.ts index 7a0cf74..15cf1b5 100644 --- a/src/api/system/menu/index.ts +++ b/src/api/system/menu/index.ts @@ -68,3 +68,11 @@ export const delMenu = (menuId: string | number) => { method: 'delete' }); }; + +// 获取所有路由 +export const getAllRouters = () => { + return request({ + url: '/system/menu/getAllRouters', + method: 'get' + }); +}; diff --git a/src/api/system/post/index.ts b/src/api/system/post/index.ts index a910be8..54a64b2 100644 --- a/src/api/system/post/index.ts +++ b/src/api/system/post/index.ts @@ -75,3 +75,11 @@ export function getRoleList(deptId?: number | string): AxiosPromise { } }); } + +// 获取部门下的项目列表 +export function getProjectByDeptId(deptId?: number | string): AxiosPromise { + return request({ + url: '/system/dept/projectIdList/' + deptId, + method: 'get' + }); +} diff --git a/src/api/system/user/types.ts b/src/api/system/user/types.ts index 4bdca11..88461ad 100644 --- a/src/api/system/user/types.ts +++ b/src/api/system/user/types.ts @@ -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; diff --git a/src/components/ProjectSelector/index.vue b/src/components/ProjectSelector/index.vue index 5ba301d..5884a27 100644 --- a/src/components/ProjectSelector/index.vue +++ b/src/components/ProjectSelector/index.vue @@ -1,5 +1,5 @@