diff --git a/ReadMe.md b/ReadMe.md index a7b8378..8e07fe7 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -253,10 +253,10 @@ docker compose up -d ## 📈 后续规划 -- [ ] 权限级别拖拽 -- [ ] 权限树型结构动态添加、更新、删除 +- [x] 权限级别拖拽 +- [x] 权限树型结构动态添加、更新、删除 - [ ] 用户设置持久化存储到数据库 -- [ ] 权限弹窗页面优化 +- [x] 权限弹窗页面优化 - [x] 后端文档注释完善 - [x] 系统监控后端返回403停止请求 - [x] 优化用户配置权限逻辑,配置后热更新逻辑等 diff --git a/src/api/v1/system/power.ts b/src/api/v1/system/power.ts index f12cc77..b6f14ce 100644 --- a/src/api/v1/system/power.ts +++ b/src/api/v1/system/power.ts @@ -43,9 +43,14 @@ export const getSystemApiInfoList = () => { return http.request>('get', 'permission/private/getSystemApiInfoList'); }; -/** 权限---更新权限 */ +/** 权限---批量修改权限父级 */ export const updatePermissionListByParentId = (data: any) => { - return http.request>('put', 'permission/update/permissionListByParentId', { data }); + return http.request>('patch', 'permission/update/permissionListByParentId', { data }); +}; + +/** 权限---批量更新权限 */ +export const updatePermissionBatch = (data: any) => { + return http.request>('patch', 'permission/update/permissionBatch', { data }); }; /** 角色和权限---根据角色id获取权限内容 */ diff --git a/src/store/system/power.ts b/src/store/system/power.ts index 5441adf..0665622 100644 --- a/src/store/system/power.ts +++ b/src/store/system/power.ts @@ -8,6 +8,7 @@ import { getSystemApiInfoList, importPermission, updatePermission, + updatePermissionBatch, updatePermissionListByParentId, } from '@/api/v1/system/power'; import { pageSizes } from '@/enums/baseConstant'; @@ -57,7 +58,6 @@ export const usePermissionStore = defineStore('PermissionStore', { const data = { ...this.pagination, ...this.form }; delete data.pageSizes; delete data.total; - delete data.background; // 获取权限列表 const result = await getPermissionPage(data); @@ -117,5 +117,11 @@ export const usePermissionStore = defineStore('PermissionStore', { const result = await updatePermissionListByParentId(data); return storeMessage(result); }, + + /* 批量更新权限 */ + async updatePermissionBatch(data: any) { + const result = await updatePermissionBatch(data); + return storeMessage(result); + }, }, }); diff --git a/src/views/account-settings/components/account-management.vue b/src/views/account-settings/components/account-management.vue index 0fc2291..963a17e 100644 --- a/src/views/account-settings/components/account-management.vue +++ b/src/views/account-settings/components/account-management.vue @@ -23,7 +23,6 @@ function onResetPassword() { addDialog({ title: `修改密码`, - width: '30%', draggable: true, closeOnClickModal: false, fullscreenIcon: true, diff --git a/src/views/configuration/email-template/index.vue b/src/views/configuration/email-template/index.vue index 48f389a..f325f89 100644 --- a/src/views/configuration/email-template/index.vue +++ b/src/views/configuration/email-template/index.vue @@ -97,8 +97,9 @@ onMounted(() => { +