From d8e7544d3f3b916eb04160b4e613a02550dbf647 Mon Sep 17 00:00:00 2001 From: K <1175047471@qq.com> Date: Fri, 12 Apr 2024 09:43:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit c6577279b8b1c94c9737d32a9ca1ba3437c5979b Author: K <1175047471@qq.com> Date: Fri Apr 12 09:40:22 2024 +0800 chore: 取消 token 刷新 commit 349b8176f28e294fbde7dd8a4c50f064785fdf9d Author: K <1175047471@qq.com> Date: Thu Apr 11 21:20:39 2024 +0800 chore: cleanup commit 309887ade9b8a8bb4efd35f09983ddcd3afb76df Author: lipenghui Date: Thu Apr 11 21:15:02 2024 +0800 fix: 岗位查看 commit 0f4f83dd51c2ed454fc1ee3561f315bc7e35dc6a Author: lipenghui Date: Thu Apr 11 21:13:47 2024 +0800 feat: 租户管理 commit 04e5d8d685616a601fd1d3b82ab18c4442536de8 Author: K <1175047471@qq.com> Date: Thu Apr 11 21:09:50 2024 +0800 chore: fix useinfo 未更新 commit 75ed18056c878c445ede439f27a1df2af41498dd Author: K <1175047471@qq.com> Date: Thu Apr 11 20:58:47 2024 +0800 chore: 修改首页地址 commit ef93ffc03d6f06f21b996f873b2b36e625c58a89 Author: K <1175047471@qq.com> Date: Thu Apr 11 20:52:27 2024 +0800 feat: 个人中心 commit 476a436f8654b8cd72fefd2105df2ecca7d517f7 Author: K <1175047471@qq.com> Date: Thu Apr 11 19:53:41 2024 +0800 wip: 个人中心 commit e5704dc3ad9dea20af45457dedc72ba65eb9d732 Author: K <1175047471@qq.com> Date: Thu Apr 11 19:36:55 2024 +0800 feat: 用户管理 commit e22200135c29ddbb17cbaae2d857c46478a9d9f7 Author: lipenghui Date: Thu Apr 11 17:42:25 2024 +0800 fix: 部门删除接口将ids改为id commit bbf42e206fad8a91a23edbbd68a3e2ce2d5ed59f Author: lipenghui Date: Thu Apr 11 17:40:20 2024 +0800 feat: 角色管理; commit c7e7e89bfe9100641811823846d1a0f48cd5f584 Author: lipenghui Date: Thu Apr 11 14:11:35 2024 +0800 feat: 岗位管理 commit 355d77d3cfc286664bd78bffbaca2766597e11c1 Author: K <1175047471@qq.com> Date: Thu Apr 11 11:12:33 2024 +0800 chore: 调整行政区划操作按钮位置 commit 9f7927b94625f7b1ffe74a3b396849631cea5bea Author: K <1175047471@qq.com> Date: Thu Apr 11 10:45:24 2024 +0800 wip: 用户管理 commit 87b423b14f5bf795b4f99d120feac6a06f3ac332 Author: K <1175047471@qq.com> Date: Thu Apr 11 09:16:25 2024 +0800 feat: 菜单管理 - 新增子项 commit f2fa565d939802896539e1e07cdf1bd3bfa1bb0e Author: lipenghui Date: Wed Apr 10 21:12:04 2024 +0800 chore: 菜单路由处理动态参数 commit 3a2c15b69ecd8243f6ca9237b1ff19dbb6d374fe Author: lipenghui Date: Wed Apr 10 21:08:23 2024 +0800 Revert "chore: 菜单路由处理动态参数" This reverts commit 3018cb399cd58e8e80285b83fc53ff9bdbd10e14. commit 9724ddc926c5efedc8f72ced29d31d61995b12a5 Author: lipenghui Date: Wed Apr 10 21:05:52 2024 +0800 chore: 菜单路由处理动态参数 commit 5bca711522df26d884669edd50eb53ce35c7ebd5 Author: lipenghui Date: Wed Apr 10 20:40:12 2024 +0800 fix: 删掉测试路由 commit 753306a1e4b7fdf17ac6337ca029a6f411baec1c Author: lipenghui Date: Wed Apr 10 20:11:03 2024 +0800 feat: 业务字典 commit 0f551cf23dc20f2750b823ff49864cfa1c55910e Author: lipenghui Date: Wed Apr 10 18:29:17 2024 +0800 fix: 系统字典-字典配置修改 commit 040923dd0eb3eb3846ddcf17efee9aa9fb2ca2da Author: lipenghui Date: Wed Apr 10 18:23:51 2024 +0800 feat: 系统字典 commit 1dfe6a3b221863fa792b8fc7432707c5fe009da2 Author: K <1175047471@qq.com> Date: Wed Apr 10 21:06:30 2024 +0800 fix: 菜单类型显示错误 commit c16cbdf807d7b8d44e2b0ff1b1310109c24c2d5d Author: K <1175047471@qq.com> Date: Wed Apr 10 20:57:36 2024 +0800 fix: 菜单无法跳转 commit f95c62d7faac99aa0700f14d46291fa34eafa0e2 Author: K <1175047471@qq.com> Date: Wed Apr 10 20:26:34 2024 +0800 feat: ImportModal 增加提示 commit 1e0af86b01d54e5ee8b89a5b48c8f2fb5276386f Author: K <1175047471@qq.com> Date: Wed Apr 10 20:21:37 2024 +0800 fix: 批量删除错误 commit 47a807a76e6cb006fb12ef8bf8e6a065f9e293b8 Author: K <1175047471@qq.com> Date: Wed Apr 10 20:19:00 2024 +0800 fix: 批量删除错误 commit 82248511dcb058a6885e64472a47df10bd43218d Author: K <1175047471@qq.com> Date: Wed Apr 10 20:07:28 2024 +0800 chore: cleanup commit fae351c1d131151738e42f82fbd0e98dd21f79bd Author: K <1175047471@qq.com> Date: Wed Apr 10 20:06:58 2024 +0800 feat: 行政区划 commit 9d370465faff6adac276f96e099a42ea015c4e4a Author: K <1175047471@qq.com> Date: Wed Apr 10 11:18:16 2024 +0800 fix: 菜单 icon 不应该是必选项 commit 68734b32e416ff6db4fe0e2748148e6867cd236a Author: K <1175047471@qq.com> Date: Wed Apr 10 10:59:32 2024 +0800 feat: 参数管理 - 批量删除 commit ff3a985a70f97db5ff169b64b2bfe997ce60360d Author: K <1175047471@qq.com> Date: Wed Apr 10 10:51:09 2024 +0800 feat: 参数管理 commit 6b1ec43e7a598a0140452eaae47223302cb6b345 Author: K <1175047471@qq.com> Date: Wed Apr 10 10:24:59 2024 +0800 wip: 菜单管理 commit 19ad299806d14f780ab52fc6d890224b63796750 Author: K <1175047471@qq.com> Date: Tue Apr 9 18:31:16 2024 +0800 wip: 系统管理 commit 8a02a8a64b90206a109d14ebdfc082b0ba1fcbdc Author: K <1175047471@qq.com> Date: Tue Apr 9 18:03:13 2024 +0800 wip: 系统管理 --- .env.development | 2 +- .env.production | 2 +- src/api/base/user/index.ts | 22 +- src/api/base/user/types.ts | 1 + src/api/system/dept/index.ts | 10 +- src/api/system/dict/index.ts | 48 ++++ src/api/system/dict/types.ts | 36 +++ src/api/system/dictbiz/index.ts | 48 ++++ src/api/system/dictbiz/types.ts | 37 +++ src/api/system/menu/index.ts | 14 +- src/api/system/param/index.ts | 10 +- src/api/system/post/index.ts | 42 +++ src/api/system/post/types.ts | 21 ++ src/api/system/region/index.ts | 37 +++ src/api/system/region/types.ts | 15 + src/api/system/role/index.ts | 29 +- src/api/system/role/types.ts | 9 + src/api/system/tenant/index.ts | 23 +- src/api/system/tenant/types.ts | 13 +- src/api/system/user/index.ts | 29 +- src/api/system/user/types.ts | 1 + .../Form/src/components/FileUpload.vue | 22 +- src/components/ImportModal/index.ts | 1 + .../ImportModal/src/ImportModal.vue | 58 ++++ src/components/Tree/src/BasicTree.vue | 10 +- .../Tree/src/components/TreeHeader.vue | 1 + src/components/Tree/style/index.less | 2 +- src/enums/pageEnum.ts | 2 +- .../header/components/user-dropdown/index.vue | 13 +- src/layouts/default/header/index.vue | 34 +-- src/router/helper/routeHelper.ts | 2 +- src/router/routes/index.ts | 13 - src/router/routes/modules/dashboard.ts | 40 --- src/router/routes/modules/profile.ts | 28 ++ src/store/modules/permission.ts | 6 +- src/store/modules/user.ts | 10 +- src/types/axios.d.ts | 1 + src/utils/http/axios/Axios.ts | 96 +++---- src/utils/http/axios/index.ts | 9 +- src/views/base/login/Login.vue | 6 +- src/views/base/login/LoginForm.vue | 4 +- .../profile/components/UpdatePassword.vue | 75 +++++ .../base/profile/components/UserInfo.vue | 94 +++++++ src/views/base/profile/components/index.ts | 2 + src/views/base/profile/index.vue | 19 ++ src/views/system/dept/data.ts | 43 ++- src/views/system/dept/index.vue | 62 +++-- src/views/system/dict/DictFormModal.vue | 57 ++++ src/views/system/dict/data.ts | 126 +++++++++ src/views/system/dict/index.vue | 130 +++++++++ .../system/dict/setting/SettingFormModal.vue | 61 +++++ src/views/system/dict/setting/data.ts | 132 +++++++++ src/views/system/dict/setting/index.vue | 120 ++++++++ src/views/system/dictbiz/DictbizFormModal.vue | 57 ++++ src/views/system/dictbiz/data.ts | 133 +++++++++ src/views/system/dictbiz/index.vue | 130 +++++++++ .../dictbiz/setting/SettingFormModal.vue | 61 +++++ src/views/system/dictbiz/setting/data.ts | 139 ++++++++++ src/views/system/dictbiz/setting/index.vue | 120 ++++++++ src/views/system/menu/MenuFormModal.vue | 5 +- src/views/system/menu/{data.tsx => data.ts} | 124 +++++---- src/views/system/menu/index.vue | 74 +++-- src/views/system/param/data.ts | 12 + src/views/system/param/index.vue | 64 +++-- src/views/system/post/DedailModal.vue | 54 ++++ src/views/system/post/PostFormModal.vue | 57 ++++ src/views/system/post/data.ts | 121 ++++++++ src/views/system/post/index.vue | 142 ++++++++++ .../region/composables/useRegionActions.ts | 38 +++ .../region/composables/useRegionForm.ts | 126 +++++++++ .../region/composables/useRegionList.ts | 39 +++ src/views/system/region/index.vue | 165 +++++++++++ src/views/system/role/RoleMenuModal.vue | 37 ++- src/views/system/role/data.ts | 12 +- src/views/system/role/index.vue | 41 +-- src/views/system/tenant/AuthSettingModal.vue | 50 ++++ src/views/system/tenant/DedailModal.vue | 77 ++++++ src/views/system/tenant/data.ts | 84 +++--- src/views/system/tenant/index.vue | 44 ++- src/views/system/user/UserFormModal.vue | 21 +- src/views/system/user/components/DeptTree.vue | 19 ++ src/views/system/user/components/index.ts | 1 + .../system/user/composables/useUserActions.ts | 106 +++++++ src/views/system/user/data.ts | 259 +++++++++++------- src/views/system/user/index.vue | 160 +++++++---- 85 files changed, 3732 insertions(+), 568 deletions(-) create mode 100644 src/api/system/dict/index.ts create mode 100644 src/api/system/dict/types.ts create mode 100644 src/api/system/dictbiz/index.ts create mode 100644 src/api/system/dictbiz/types.ts create mode 100644 src/api/system/post/index.ts create mode 100644 src/api/system/post/types.ts create mode 100644 src/api/system/region/index.ts create mode 100644 src/api/system/region/types.ts create mode 100644 src/components/ImportModal/index.ts create mode 100644 src/components/ImportModal/src/ImportModal.vue delete mode 100644 src/router/routes/modules/dashboard.ts create mode 100644 src/router/routes/modules/profile.ts create mode 100644 src/views/base/profile/components/UpdatePassword.vue create mode 100644 src/views/base/profile/components/UserInfo.vue create mode 100644 src/views/base/profile/components/index.ts create mode 100644 src/views/base/profile/index.vue create mode 100644 src/views/system/dict/DictFormModal.vue create mode 100644 src/views/system/dict/data.ts create mode 100644 src/views/system/dict/index.vue create mode 100644 src/views/system/dict/setting/SettingFormModal.vue create mode 100644 src/views/system/dict/setting/data.ts create mode 100644 src/views/system/dict/setting/index.vue create mode 100644 src/views/system/dictbiz/DictbizFormModal.vue create mode 100644 src/views/system/dictbiz/data.ts create mode 100644 src/views/system/dictbiz/index.vue create mode 100644 src/views/system/dictbiz/setting/SettingFormModal.vue create mode 100644 src/views/system/dictbiz/setting/data.ts create mode 100644 src/views/system/dictbiz/setting/index.vue rename src/views/system/menu/{data.tsx => data.ts} (66%) create mode 100644 src/views/system/post/DedailModal.vue create mode 100644 src/views/system/post/PostFormModal.vue create mode 100644 src/views/system/post/data.ts create mode 100644 src/views/system/post/index.vue create mode 100644 src/views/system/region/composables/useRegionActions.ts create mode 100644 src/views/system/region/composables/useRegionForm.ts create mode 100644 src/views/system/region/composables/useRegionList.ts create mode 100644 src/views/system/region/index.vue create mode 100644 src/views/system/tenant/AuthSettingModal.vue create mode 100644 src/views/system/tenant/DedailModal.vue create mode 100644 src/views/system/user/components/DeptTree.vue create mode 100644 src/views/system/user/components/index.ts create mode 100644 src/views/system/user/composables/useUserActions.ts diff --git a/.env.development b/.env.development index cab40f25..7000f7d9 100644 --- a/.env.development +++ b/.env.development @@ -17,7 +17,7 @@ VITE_DROP_CONSOLE = false VITE_GLOB_API_URL = # 文件上传接口 可选 -VITE_GLOB_UPLOAD_URL = /upload +VITE_GLOB_UPLOAD_URL = /api/baymax-resource/oss/endpoint/put-file # 接口地址前缀,有些系统所有接口地址都有前缀,可以在这里统一加,方便切换 VITE_GLOB_API_URL_PREFIX = /api diff --git a/.env.production b/.env.production index 5f2a911b..e7943488 100644 --- a/.env.production +++ b/.env.production @@ -16,7 +16,7 @@ VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false VITE_GLOB_API_URL = # 文件上传地址 可以由nginx做转发或者直接写实际地址 -VITE_GLOB_UPLOAD_URL = /upload +VITE_GLOB_UPLOAD_URL = /baymax-resource/oss/endpoint/put-file # 接口地址前缀,有些系统所有接口地址都有前缀,可以在这里统一加,方便切换 VITE_GLOB_API_URL_PREFIX = diff --git a/src/api/base/user/index.ts b/src/api/base/user/index.ts index e68d18e0..bbbff28f 100644 --- a/src/api/base/user/index.ts +++ b/src/api/base/user/index.ts @@ -26,9 +26,7 @@ export function loginApi(params: LoginParams, mode: ErrorMessageMode = 'modal') export function getUserInfo() { return defHttp.get({ - url: '/system/permission/get-permission-info', - }, { - errorMessageMode: 'none', + url: '/baymax-system/user/info', }) } @@ -43,7 +41,9 @@ export interface __MenuItem { sort: number category: number action: number + isOpen: 1 | 2 children?: __MenuItem[] + visible: BooleanFlag } export function getUserRouters() { @@ -60,7 +60,7 @@ export function getUserButtons() { export function doLogout() { return defHttp.post({ - url: '/auth/logout', + url: '/baymax-auth/oauth/logout', }) } @@ -72,3 +72,17 @@ export function getLoginCaptcha() { withoutAuth: true, }) } + +export function updateUserInfo(data: Partial) { + return defHttp.post({ + url: '/baymax-system/user/update-info', + data, + }) +} + +export function updatePassword(params: { oldPassword: string, newPassword: string, newPassword1: string }) { + return defHttp.post({ + url: '/baymax-system/user/update-password', + params, + }, { joinParamsToUrl: true }) +} diff --git a/src/api/base/user/types.ts b/src/api/base/user/types.ts index a5edfdcd..bd683a87 100644 --- a/src/api/base/user/types.ts +++ b/src/api/base/user/types.ts @@ -29,4 +29,5 @@ export interface User { avatar?: string role_id: string role_name: string + phone: string } diff --git a/src/api/system/dept/index.ts b/src/api/system/dept/index.ts index 62a323f6..7acac04e 100644 --- a/src/api/system/dept/index.ts +++ b/src/api/system/dept/index.ts @@ -3,34 +3,34 @@ import { defHttp } from '@/utils/http/axios' export function lazyGetDeptList(params?: LazyGetDeptListParams) { return defHttp.get({ - url: '/system/dept/lazy-list', + url: '/baymax-system/dept/lazy-list', params, }) } export function createDept(data: Partial) { return defHttp.post({ - url: '/system/dept/save', + url: '/baymax-system/dept/submit', data, }) } export function updateDept(data: Partial) { return defHttp.post({ - url: '/system/dept/update', + url: '/baymax-system/dept/submit', data, }) } export function deleteDept(id: string) { return defHttp.post({ - url: `/system/dept/delete?id=${id}`, + url: `/baymax-system/dept/remove?id=${id}`, }) } export function getDeptTree(params?: { tenantId: string }) { return defHttp.get<{ id: string, title: string }[]>({ - url: '/system/dept/tree', + url: '/baymax-system/dept/tree', params, }) } diff --git a/src/api/system/dict/index.ts b/src/api/system/dict/index.ts new file mode 100644 index 00000000..693f44a6 --- /dev/null +++ b/src/api/system/dict/index.ts @@ -0,0 +1,48 @@ +import type { GetDictChildListParams, GetDictListParams, SystemDict, SystemDictChild, SystemDictTree } from './types' +import { defHttp } from '@/utils/http/axios' + +export function getDictList(params: GetDictListParams) { + return defHttp.get>({ + url: '/baymax-system/dict/parent-list', + params, + }) +} + +export function detailDict(id: string) { + return defHttp.get({ + url: `/baymax-system/dict/detail?id=${id}`, + }) +} + +export function createDict(data: Partial) { + return defHttp.post({ + url: '/baymax-system/dict/submit', + data, + }) +} + +export function updateDict(data: Partial) { + return defHttp.post({ + url: '/baymax-system/dict/submit', + data, + }) +} + +export function deleteDict(ids: string[]) { + return defHttp.post({ + url: `/baymax-system/dict/remove?ids=${ids}`, + }) +} + +export function dictTree(code: string) { + return defHttp.get({ + url: `/baymax-system/dict/tree?code=${code}`, + }) +} + +export function getDictChildList(params: GetDictChildListParams) { + return defHttp.get>({ + url: '/baymax-system/dict/child-list', + params, + }) +} diff --git a/src/api/system/dict/types.ts b/src/api/system/dict/types.ts new file mode 100644 index 00000000..db919f99 --- /dev/null +++ b/src/api/system/dict/types.ts @@ -0,0 +1,36 @@ +export interface GetDictListParams extends PageParam { +} + +export interface GetDictChildListParams extends PageParam { + parentId: string +} + +export interface SystemDict { + id: string + code: string + dictKey: string + dictValue: string + hasChildren: boolean + isDeleted: number + isSealed: number + parentId: string + parentName: string + remark: string + sort: number +} + +export interface SystemDictChild extends SystemDict { +} + +export interface SystemDictTree extends SystemDictTreeItem { + children: SystemDictTree[] +} + +export interface SystemDictTreeItem { + id: string + hasChildren: boolean + key: string + parentId: string + title: string + value: string +} diff --git a/src/api/system/dictbiz/index.ts b/src/api/system/dictbiz/index.ts new file mode 100644 index 00000000..59eaa921 --- /dev/null +++ b/src/api/system/dictbiz/index.ts @@ -0,0 +1,48 @@ +import type { GetDictbizChildListParams, GetDictbizListParams, SystemDictbiz, SystemDictbizChild, SystemDictbizTree } from './types' +import { defHttp } from '@/utils/http/axios' + +export function getDictbizList(params: GetDictbizListParams) { + return defHttp.get>({ + url: '/baymax-system/dict-biz/parent-list', + params, + }) +} + +export function detailDictbiz(id: string) { + return defHttp.get({ + url: `/baymax-system/dict-biz/detail?id=${id}`, + }) +} + +export function createDictbiz(data: Partial) { + return defHttp.post({ + url: '/baymax-system/dict-biz/submit', + data, + }) +} + +export function updateDictbiz(data: Partial) { + return defHttp.post({ + url: '/baymax-system/dict-biz/submit', + data, + }) +} + +export function deleteDictbiz(ids: string[]) { + return defHttp.post({ + url: `/baymax-system/dict-biz/remove?ids=${ids}`, + }) +} + +export function dictbizTree(code: string) { + return defHttp.get({ + url: `/baymax-system/dict-biz/tree?code=${code}`, + }) +} + +export function getDictbizChildList(params: GetDictbizChildListParams) { + return defHttp.get>({ + url: '/baymax-system/dict-biz/child-list', + params, + }) +} diff --git a/src/api/system/dictbiz/types.ts b/src/api/system/dictbiz/types.ts new file mode 100644 index 00000000..5e0c953b --- /dev/null +++ b/src/api/system/dictbiz/types.ts @@ -0,0 +1,37 @@ +export interface GetDictbizListParams extends PageParam { +} + +export interface GetDictbizChildListParams extends PageParam { + parentId: string +} + +export interface SystemDictbiz { + id: string + code: string + dictKey: string + dictValue: string + hasChildren: boolean + isDeleted: number + isSealed: number + parentId: string + parentName: string + remark: string + sort: number + tenantId: string +} + +export interface SystemDictbizChild extends SystemDictbiz { +} + +export interface SystemDictbizTree extends SystemDictbizTreeItem { + children: SystemDictbizTree[] +} + +export interface SystemDictbizTreeItem { + id: string + hasChildren: boolean + key: string + parentId: string + title: string + value: string +} diff --git a/src/api/system/menu/index.ts b/src/api/system/menu/index.ts index bfc13e2e..7bacf501 100644 --- a/src/api/system/menu/index.ts +++ b/src/api/system/menu/index.ts @@ -3,39 +3,39 @@ import { defHttp } from '@/utils/http/axios' export function getMenuListWithoutButtons() { return defHttp.get({ - url: '/system/menu/tree', + url: '/baymax-system/menu/tree', }) } export function getMenuList(params: GetMenuListParams) { return defHttp.get>({ - url: '/system/menu/list', + url: '/baymax-system/menu/list', params, }) } export function getMenu(id: string) { return defHttp.get({ - url: `/system/menu/get?id=${id}`, + url: `/baymax-system/menu/get?id=${id}`, }) } export function createMenu(data: Omit) { return defHttp.post({ - url: '/system/menu/save', + url: '/baymax-system/menu/submit', data, }) } export function updateMenu(data: Omit) { return defHttp.post({ - url: '/system/menu/update', + url: '/baymax-system/menu/submit', data, }) } -export function deleteMenu(id: string) { +export function deleteMenu(ids: string[]) { return defHttp.post({ - url: `/system/menu/delete?id=${id}`, + url: `/baymax-system/menu/remove?ids=${ids}`, }) } diff --git a/src/api/system/param/index.ts b/src/api/system/param/index.ts index 766a3b9b..e6e884d4 100644 --- a/src/api/system/param/index.ts +++ b/src/api/system/param/index.ts @@ -3,27 +3,27 @@ import { defHttp } from '@/utils/http/axios' export function getParamList(params: GetParamListParams) { return defHttp.get({ - url: '/param/page', + url: '/baymax-system/param/list', params, }) } export function createParam(data: Partial) { return defHttp.post({ - url: '/param/save', + url: '/baymax-system/param/submit', data, }) } export function updateParam(data: Partial) { return defHttp.post({ - url: '/param/update', + url: '/baymax-system/param/submit', data, }) } -export function deleteParam(id: string) { +export function deleteParam(ids: string[]) { return defHttp.post({ - url: `/param/remove?id=${id}`, + url: `/baymax-system/param/remove?ids=${ids}`, }) } diff --git a/src/api/system/post/index.ts b/src/api/system/post/index.ts new file mode 100644 index 00000000..8bcfebd4 --- /dev/null +++ b/src/api/system/post/index.ts @@ -0,0 +1,42 @@ +import type { GetPostListParams, SystemPost } from './types' +import { defHttp } from '@/utils/http/axios' + +export function getPostList(params: GetPostListParams) { + return defHttp.get>({ + url: '/baymax-system/post/list', + params, + }) +} + +export function detailPost(id: string) { + return defHttp.get({ + url: `/baymax-system/post/detail?id=${id}`, + }) +} + +export function createPost(data: Partial) { + return defHttp.post({ + url: '/baymax-system/post/submit', + data, + }) +} + +export function updatePost(data: Partial) { + return defHttp.post({ + url: '/baymax-system/post/submit', + data, + }) +} + +export function deletePost(ids: string[]) { + return defHttp.post({ + url: `/baymax-system/post/remove?ids=${ids}`, + }) +} + +export function getPostTree(params: { tenantId: string }) { + return defHttp.get({ + url: '/baymax-system/post/select', + params, + }) +} diff --git a/src/api/system/post/types.ts b/src/api/system/post/types.ts new file mode 100644 index 00000000..22ab7cf3 --- /dev/null +++ b/src/api/system/post/types.ts @@ -0,0 +1,21 @@ +export interface GetPostListParams extends PageParam { +} + +export interface SystemPost { + id: string + category: number + categoryName: string + createDept: string + createTime: string + createUser: string + isDeleted: number + postCode: string + postName: string + remark: string + sort: number + status: number + tenantId: string + tenantName?: string + updateTime: string + updateUser: string +} diff --git a/src/api/system/region/index.ts b/src/api/system/region/index.ts new file mode 100644 index 00000000..5aa33237 --- /dev/null +++ b/src/api/system/region/index.ts @@ -0,0 +1,37 @@ +import type { Region } from './types' +import { defHttp } from '@/utils/http/axios' + +export function lazyGetRegionList(parentCode?: string) { + return defHttp.get({ + url: '/baymax-system/region/lazy-tree', + params: { + parentCode, + }, + }) +} + +export function getRegionDetail(code: string) { + return defHttp.get({ + url: `baymax-system/region/detail?code=${code}`, + }) +} + +export function updateRegion(data: Partial) { + return defHttp.post({ + url: '/baymax-system/region/submit', + data, + }) +} + +export function deleteRegion(id: string) { + return defHttp.post({ + url: `/baymax-system/region/remove?id=${id}`, + }) +} + +export function exportRegion() { + return defHttp.get({ + url: '/baymax-system/region/export-region', + responseType: 'blob', + }) +} diff --git a/src/api/system/region/types.ts b/src/api/system/region/types.ts new file mode 100644 index 00000000..bf659f7f --- /dev/null +++ b/src/api/system/region/types.ts @@ -0,0 +1,15 @@ +export interface Region { + id: string + parentCode: string + subCode: string + code: string + name: string + sort: number + remark: string + parentId: string + title: string + value: string + hasChildren: boolean + parentName: string + regionLevel: number | string +} diff --git a/src/api/system/role/index.ts b/src/api/system/role/index.ts index e028ebd3..8fd1e99a 100644 --- a/src/api/system/role/index.ts +++ b/src/api/system/role/index.ts @@ -1,56 +1,55 @@ -import type { GetRoleListParams, MenuTreeNode, Role } from './types' +import type { GetRoleListParams, GrantParams, MenuTreeNode, Role } from './types' import { defHttp } from '@/utils/http/axios' -export function lazyGetRoleList(params: GetRoleListParams) { +export function getRoleList(params: GetRoleListParams) { return defHttp.get({ - url: '/system/role/lazy-list', + url: '/baymax-system/role/list', params, }) } export function createRole(data: Partial) { return defHttp.post({ - url: '/system/role/save', + url: '/baymax-system/role/submit', data, }) } export function updateRole(data: Partial) { return defHttp.post({ - url: '/system/role/update', + url: '/baymax-system/role/submit', data, }) } export function deleteRole(id: string) { return defHttp.post({ - url: `/system/role/delete?id=${id}`, + url: `/baymax-system/role/delete?id=${id}`, }) } export function getRoleTree(params?: { tenantId: string }) { return defHttp.get<{ id: string, title: string }[]>({ - url: '/system/role/tree', + url: '/baymax-system/role/tree', params, }) } export function getMenuTree() { - return defHttp.get({ - url: '/system/menu/grant-tree', + return defHttp.get<{ menu: MenuTreeNode[] }>({ + url: '/baymax-system/menu/grant-tree', }) } -export function getMenuIdsByRole(roleId: string) { - return defHttp.get({ - url: '/system/permission/list-role-menus', - params: { roleId }, +export function getRoleTreeKeys(roleIds: string) { + return defHttp.get<{ menu: string[] }>({ + url: `/baymax-system/menu/role-tree-keys?roleIds=${roleIds}`, }) } -export function assignMenuToRole(data: { roleId: string, menuIds: string[] }) { +export function updateGrant(data: GrantParams) { return defHttp.post({ - url: '/system/permission/assign-role-menu', + url: `/baymax-system/role/grant`, data, }) } diff --git a/src/api/system/role/types.ts b/src/api/system/role/types.ts index 1b4ddc38..1b5ff68d 100644 --- a/src/api/system/role/types.ts +++ b/src/api/system/role/types.ts @@ -25,5 +25,14 @@ export interface MenuTreeNode { id: string parentId: string title: string + hasChildren: boolean children?: MenuTreeNode[] } + +export interface GrantParams { + apiScopeIds: string[] + dataScopeIds: string[] + menuIds: string[] + roleIds: string[] + topMenuIds: string[] +} diff --git a/src/api/system/tenant/index.ts b/src/api/system/tenant/index.ts index 493dada2..470040e7 100644 --- a/src/api/system/tenant/index.ts +++ b/src/api/system/tenant/index.ts @@ -3,33 +3,46 @@ import { defHttp } from '@/utils/http/axios' export function getTenantList(params: GetTenantListParams) { return defHttp.get>({ - url: '/system/tenant/page', + url: '/baymax-system/tenant/list', params, }) } export function updateTenant(data: Tenant) { return defHttp.post({ - url: '/system/tenant/update', + url: '/baymax-system/tenant/submit', data, }) } export function createTenant(data: Tenant) { return defHttp.post({ - url: '/system/tenant/save', + url: '/baymax-system/tenant/submit', data, }) } +export function detailTenant(id: string) { + return defHttp.get({ + url: `/baymax-system/tenant/detail?id=${id}`, + }) +} + export function deleteTenant(id: string) { return defHttp.post({ - url: `/system/tenant/remove?id=${id}`, + url: `/baymax-system/tenant/remove?id=${id}`, + }) +} + +export function settingTenant(data: Partial) { + return defHttp.post({ + url: `/baymax-system/tenant/setting`, + data, }) } export function getAllTenants() { return defHttp.get({ - url: '/system/tenant/select', + url: '/baymax-system/tenant/select', }) } diff --git a/src/api/system/tenant/types.ts b/src/api/system/tenant/types.ts index 67f8c062..12db485f 100644 --- a/src/api/system/tenant/types.ts +++ b/src/api/system/tenant/types.ts @@ -1,11 +1,14 @@ export interface Tenant { id: string - tenantId?: string + tenantId: string tenantName: string - adminAccount: string - contactName: string - contactMobile: string - expireTime?: string + createUser: string + accountNumber: number + contactNumber: string + expireTime: string + domainUrl: string + linkman: string + address: string } export interface GetTenantListParams extends PageParam { diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index e5fb616c..68ff3284 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -3,27 +3,46 @@ import { defHttp } from '@/utils/http/axios' export function getUserList(params: GetUserListParams) { return defHttp.get>({ - url: '/system/user/page', + url: '/baymax-system/user/page', params, }) } export function createUser(data: Partial) { return defHttp.post({ - url: '/system/user/save', + url: '/baymax-system/user/save', data, }) } export function updateUser(data: Partial) { return defHttp.post({ - url: '/system/user/update', + url: '/baymax-system/user/update', data, }) } -export function deleteUser(id: string) { +export function deleteUser(ids: string[]) { return defHttp.post({ - url: `/system/user/delete?id=${id}`, + url: `/baymax-system/user/remove?ids=${ids}`, + }) +} + +export function resetPasswordByIds(ids: string[]) { + return defHttp.post({ + url: `/baymax-system/user/reset-password?userIds=${ids}`, + }) +} + +export function unlockUserByIds(ids: string[]) { + return defHttp.post({ + url: `/baymax-system/user/unlock?userIds=${ids}`, + }) +} + +export function exportUsers() { + return defHttp.get({ + url: '/baymax-system/user/export-user', + responseType: 'blob', }) } diff --git a/src/api/system/user/types.ts b/src/api/system/user/types.ts index 08f9bf92..93a1fc8e 100644 --- a/src/api/system/user/types.ts +++ b/src/api/system/user/types.ts @@ -20,4 +20,5 @@ export interface SystemUser { sex: 1 | 2 | 3 tenantId: string tenantName: string + userType: string } diff --git a/src/components/Form/src/components/FileUpload.vue b/src/components/Form/src/components/FileUpload.vue index d13469af..1423ce66 100644 --- a/src/components/Form/src/components/FileUpload.vue +++ b/src/components/Form/src/components/FileUpload.vue @@ -1,5 +1,6 @@ + + diff --git a/src/components/Tree/src/BasicTree.vue b/src/components/Tree/src/BasicTree.vue index 1cf193cb..0ccb9b4d 100644 --- a/src/components/Tree/src/BasicTree.vue +++ b/src/components/Tree/src/BasicTree.vue @@ -429,7 +429,7 @@ export default defineComponent({ {extendSlots(slots)} )} - + {extendSlots(slots, ['title'])} @@ -443,3 +443,11 @@ export default defineComponent({ }, }) + + diff --git a/src/components/Tree/src/components/TreeHeader.vue b/src/components/Tree/src/components/TreeHeader.vue index 4707b72f..7b410b26 100644 --- a/src/components/Tree/src/components/TreeHeader.vue +++ b/src/components/Tree/src/components/TreeHeader.vue @@ -177,5 +177,6 @@ watch( + diff --git a/src/components/Tree/style/index.less b/src/components/Tree/style/index.less index dcf443e8..1fd6b3bb 100644 --- a/src/components/Tree/style/index.less +++ b/src/components/Tree/style/index.less @@ -48,6 +48,6 @@ } &-header { - border-bottom: 1px solid var(--border-color); + // border-bottom: 1px solid var(--border-color); } } diff --git a/src/enums/pageEnum.ts b/src/enums/pageEnum.ts index 8e51e4cd..09d5fdd5 100644 --- a/src/enums/pageEnum.ts +++ b/src/enums/pageEnum.ts @@ -2,7 +2,7 @@ export enum PageEnum { // basic login path BASE_LOGIN = '/login', // basic home path - BASE_HOME = '/dashboard', + BASE_HOME = '/home', // error page path ERROR_PAGE = '/exception', // error log page path diff --git a/src/layouts/default/header/components/user-dropdown/index.vue b/src/layouts/default/header/components/user-dropdown/index.vue index ef7fb05d..34ed321a 100644 --- a/src/layouts/default/header/components/user-dropdown/index.vue +++ b/src/layouts/default/header/components/user-dropdown/index.vue @@ -1,10 +1,11 @@ @@ -27,7 +24,6 @@ const title = computed(() => globSetting?.title ?? '')
-
diff --git a/src/views/base/login/LoginForm.vue b/src/views/base/login/LoginForm.vue index 65e5c0fc..d3eba411 100644 --- a/src/views/base/login/LoginForm.vue +++ b/src/views/base/login/LoginForm.vue @@ -28,9 +28,9 @@ const formRef = ref() const loading = ref(false) const formData = reactive({ - tenantId: '345618', + tenantId: '000000', username: 'admin', - password: '&demo8&!', + password: '123456', captchaKey: '', captchaCode: '', }) diff --git a/src/views/base/profile/components/UpdatePassword.vue b/src/views/base/profile/components/UpdatePassword.vue new file mode 100644 index 00000000..9b4d4396 --- /dev/null +++ b/src/views/base/profile/components/UpdatePassword.vue @@ -0,0 +1,75 @@ + + + diff --git a/src/views/base/profile/components/UserInfo.vue b/src/views/base/profile/components/UserInfo.vue new file mode 100644 index 00000000..b0fda38c --- /dev/null +++ b/src/views/base/profile/components/UserInfo.vue @@ -0,0 +1,94 @@ + + + diff --git a/src/views/base/profile/components/index.ts b/src/views/base/profile/components/index.ts new file mode 100644 index 00000000..2730fff6 --- /dev/null +++ b/src/views/base/profile/components/index.ts @@ -0,0 +1,2 @@ +export { default as UserInfo } from './UserInfo.vue' +export { default as UpdatePassword } from './UpdatePassword.vue' diff --git a/src/views/base/profile/index.vue b/src/views/base/profile/index.vue new file mode 100644 index 00000000..66ffc748 --- /dev/null +++ b/src/views/base/profile/index.vue @@ -0,0 +1,19 @@ + + + diff --git a/src/views/system/dept/data.ts b/src/views/system/dept/data.ts index cd3a8f3b..0b818a64 100644 --- a/src/views/system/dept/data.ts +++ b/src/views/system/dept/data.ts @@ -1,10 +1,11 @@ +import { getSystemDictionary } from '@/api/base/common' import { lazyGetDeptList } from '@/api/system/dept' import { getAllTenants } from '@/api/system/tenant' import type { BasicColumn, FormSchema } from '@/components/Table' export const columns: BasicColumn[] = [ { - title: '部门名称', + title: '机构名称', dataIndex: 'deptName', width: 260, align: 'left', @@ -14,11 +15,21 @@ export const columns: BasicColumn[] = [ dataIndex: 'tenantName', width: 120, }, + { + title: '机构全称', + dataIndex: 'fullName', + width: 260, + }, + { + title: '机构类型', + dataIndex: 'deptCategoryName', + width: 260, + }, ] export const searchFormSchema: FormSchema[] = [ { - label: '部门名称', + label: '机构名称', field: 'deptName', component: 'Input', colProps: { span: 6 }, @@ -34,6 +45,12 @@ export const searchFormSchema: FormSchema[] = [ }, colProps: { span: 6 }, }, + { + label: '机构全称', + field: 'fullName', + component: 'Input', + colProps: { span: 6 }, + }, ] export const formSchema: FormSchema[] = [ @@ -70,11 +87,26 @@ export const formSchema: FormSchema[] = [ }, }, { - label: '部门名称', + label: '机构名称', field: 'deptName', required: true, component: 'Input', }, + { + label: '机构全称', + field: 'fullName', + required: true, + component: 'Input', + }, + { + label: '机构类型', + field: 'deptCategory', + required: true, + component: 'ApiSelect', + componentProps: { + api: () => getSystemDictionary('org_category'), + }, + }, { label: '显示顺序', field: 'sort', @@ -82,4 +114,9 @@ export const formSchema: FormSchema[] = [ defaultValue: 0, component: 'InputNumber', }, + { + label: '备注', + field: 'remark', + component: 'InputTextArea', + }, ] diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 2fbee31d..ea6ee954 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -1,4 +1,5 @@