From b59bd89e43396f7d4c1f43bd9a678f064e6418d5 Mon Sep 17 00:00:00 2001 From: Teo <2642673902@qq.com> Date: Thu, 28 Aug 2025 03:35:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=83=E9=99=90=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- src/App.vue | 8 ++ src/api/menu.ts | 4 +- src/api/project/project/index.ts | 11 ++ src/api/system/menu/index.ts | 8 ++ src/api/system/post/index.ts | 8 ++ src/api/system/user/types.ts | 5 +- src/components/ProjectSelector/index.vue | 67 ++++++++- src/permission.ts | 6 +- src/router/index.ts | 21 ++- src/store/modules/permission.ts | 3 +- src/store/modules/user.ts | 84 ++++++++---- src/views/login.vue | 2 + src/views/progress/progressCategory/index.vue | 24 ++-- src/views/system/user/index.vue | 127 +++++++++++++----- 15 files changed, 293 insertions(+), 89 deletions(-) diff --git a/.env.development b/.env.development index 4c056ae..500d6b0 100644 --- a/.env.development +++ b/.env.development @@ -6,9 +6,9 @@ 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' +# VITE_APP_BASE_API = 'http://192.168.110.180:8899' # 罗成 # VITE_APP_BASE_API = 'http://192.168.110.213: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 @@