diff --git a/ReadMe.md b/ReadMe.md index 41157de..8e07fe7 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -32,21 +32,19 @@ - [运行项目](https://www.bilibili.com/video/BV1qodHYzErA/?spm_id_from=333.1387.homepage.video_card.click&vd_source=d42b5b664efb958be39eef8ee1196a7e) - [前端部署](https://www.bilibili.com/video/BV1BddHYgEPq/?spm_id_from=333.1387.homepage.video_card.click&vd_source=d42b5b664efb958be39eef8ee1196a7e) - [后端部署](https://www.bilibili.com/video/BV1BddHYgEFt/?spm_id_from=333.1387.homepage.video_card.click&vd_source=d42b5b664efb958be39eef8ee1196a7e) -- [Bunny v0.0.1 代码生成器](https://www.bilibili.com/video/BV1qddHYgErv/?spm_id_from=333.1387.homepage.video_card.click) +- [代码生成器](https://www.bilibili.com/video/BV1d4Lxz9E3j/?vd_source=d42b5b664efb958be39eef8ee1196a7e) **Github地址** - 权限后端:https://github.com/BunnyMaster/bunny-admin-server - 权限前端:https://github.com/BunnyMaster/bunny-admin-web -- 代码生成器前端:https://github.com/BunnyMaster/generator-code-web -- 代码生成器后端:https://github.com/BunnyMaster/generator-code-server +- 代码生成器端:https://github.com/BunnyMaster/generator-code-server -**`Gitee`地址** +**Gitee地址** - 权限后端:https://gitee.com/BunnyBoss/bunny-admin-server - 权限前端:https://gitee.com/BunnyBoss/bunny-admin-web -- 代码生成器前端:https://gitee.com/BunnyBoss/generator-code-web -- 代码生成器后端:https://gitee.com/BunnyBoss/generator-code-server +- 代码生成器端:https://gitee.com/BunnyBoss/generator-code-server ## 🚀 项目简介 @@ -83,6 +81,21 @@ ![权限管理界面](./images/image-20250428223816172.png) ![角色管理界面](./images/image-20250428223843974.png) +## :tipping_hand_man:用法提示 + +> [!TIP] +> +> 多语言使用提示: +> +> 虽然直接让用户操作JSON文件有一定门槛(多数用户不熟悉JSON格式),但在多语言项目开发中,JSON格式具有独特优势: +> +> 1. 结构化特性 - 纯文本格式便于AI解析处理 +> 2. 高效翻译流程: +> - 开发者只需完成中文版本 +> - 上传JSON文件至AI翻译工具 +> - 简单指令即可批量生成英文/繁体中文/韩语等版本 +> 3. 显著节省开发时间 - 实现"一次编写,多语言适配"的高效工作流 + ## 🔐 权限控制体系 ![image-20250428225337843](./images/image-20250428225337843-1745854181492-5.png) @@ -240,10 +253,10 @@ docker compose up -d ## 📈 后续规划 -- [ ] 权限级别拖拽 -- [ ] 权限树型结构动态添加、更新、删除 +- [x] 权限级别拖拽 +- [x] 权限树型结构动态添加、更新、删除 - [ ] 用户设置持久化存储到数据库 -- [ ] 权限弹窗页面优化 +- [x] 权限弹窗页面优化 - [x] 后端文档注释完善 - [x] 系统监控后端返回403停止请求 - [x] 优化用户配置权限逻辑,配置后热更新逻辑等 diff --git a/src/api/service/config.ts b/src/api/service/config.ts index ac63b19..de2e5a2 100644 --- a/src/api/service/config.ts +++ b/src/api/service/config.ts @@ -8,7 +8,7 @@ export const defaultConfig: AxiosRequestConfig = { // 默认请求地址 baseURL: '/api', // 设置超时时间 - timeout: 6000, + timeout: 19000, // @ts-expect-error retry: 3, //设置全局重试请求次数(最多重试几次请求) retryDelay: 3000, //设置全局请求间隔 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/i18n/i18n.ts b/src/store/i18n/i18n.ts index 76da12f..00e46bb 100644 --- a/src/store/i18n/i18n.ts +++ b/src/store/i18n/i18n.ts @@ -74,7 +74,6 @@ export const userI18nStore = defineStore('i18nStore', { /* 用文件更新多语言 */ async editI18nByFile(data: any) { - console.log(data); const result = await uploadI18nFile(data); return storeMessage(result); }, 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(() => { +