From 84b2a05e3ceeb72c6774246909f362abc516d3e3 Mon Sep 17 00:00:00 2001 From: Teo <2642673902@qq.com> Date: Mon, 22 Sep 2025 17:50:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=AE=A1=E7=90=86=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=83=A8=E9=97=A8=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/menu/index.ts | 5 +- src/api/system/role/index.ts | 5 +- src/api/system/role/types.ts | 1 + src/api/system/user/index.ts | 5 +- src/plugins/download.ts | 2 + src/views/system/role/index.vue | 260 ++++++++++++++++++++------------ 6 files changed, 177 insertions(+), 101 deletions(-) diff --git a/src/api/system/menu/index.ts b/src/api/system/menu/index.ts index 81461fd..409fc32 100644 --- a/src/api/system/menu/index.ts +++ b/src/api/system/menu/index.ts @@ -20,10 +20,11 @@ export const getMenu = (menuId: string | number): AxiosPromise => { }; // 查询菜单下拉树结构 -export const treeselect = (): AxiosPromise => { +export const treeselect = (params?: any): AxiosPromise => { return request({ url: '/system/menu/treeselect', - method: 'get' + method: 'get', + params }); }; diff --git a/src/api/system/role/index.ts b/src/api/system/role/index.ts index fb0fcab..6727852 100644 --- a/src/api/system/role/index.ts +++ b/src/api/system/role/index.ts @@ -147,10 +147,11 @@ export const authUserSelectAll = (data: any) => { }); }; // 根据角色ID查询部门树结构 -export const deptTreeSelect = (roleId: string | number): AxiosPromise => { +export const deptTreeSelect = (roleId: string | number, params?) => { return request({ url: '/system/role/deptTree/' + roleId, - method: 'get' + method: 'get', + params }); }; diff --git a/src/api/system/role/types.ts b/src/api/system/role/types.ts index 7dbb6ff..ff52f7e 100644 --- a/src/api/system/role/types.ts +++ b/src/api/system/role/types.ts @@ -39,6 +39,7 @@ export interface RoleQuery extends PageQuery { export interface RoleForm { roleName: string; + deptId: string | undefined; roleKey: string; roleSort: number; status: string; diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index a61ad14..7766fc3 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -202,10 +202,11 @@ export const listUserByDeptId = (deptId: string | number): AxiosPromise => { +export const deptTreeSelect = (data?: { isShow: string }): AxiosPromise => { return request({ url: '/system/user/deptTree', - method: 'get' + method: 'get', + params: data }); }; diff --git a/src/plugins/download.ts b/src/plugins/download.ts index ef66b3a..798e340 100644 --- a/src/plugins/download.ts +++ b/src/plugins/download.ts @@ -42,6 +42,8 @@ export default { responseType: 'blob', headers: globalHeaders() }); + console.log('🚀 ~ zip ~ res:', res); + const isBlob = blobValidate(res.data); if (isBlob) { const blob = new Blob([res.data], { type: 'application/zip' }); diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index c6d83b4..f3dfce4 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -15,92 +15,113 @@ - - - - - 搜索 + 搜索 重置 - - - - - - - - - - - -