32 Commits

Author SHA1 Message Date
8a453f5852 chore(projects): release v1.1.3 2025-08-16 11:29:13 +08:00
4d120ffe63 Merge branch 'dev' into flow 2025-08-16 11:15:57 +08:00
4e625111ce chore(projects): release v1.1.3 2025-08-16 11:14:41 +08:00
AN
8524ae7666 Merge branch 'dev' of https://gitee.com/xlsea/ruoyi-plus-soybean into dev 2025-08-15 17:49:07 +08:00
AN
d6ae85d218 fix(projects): 修复新增用户未查询角色列表问题 2025-08-15 17:45:11 +08:00
89719abe34 Merge remote-tracking branch 'Soybean/main' into dev
# Conflicts:
#	README.en_US.md
#	README.md
2025-08-14 18:10:28 +08:00
8d7f91dccf chore(other): update the ESLint validation configuration to support more file types. 2025-08-13 10:10:10 +08:00
33ade53904 chore(readme): remove DartNode sponsorship badge from README files 2025-08-11 10:46:15 +08:00
AN
ab9c84d831 Merge branch 'dev' of https://gitee.com/xlsea/ruoyi-plus-soybean into dev 2025-08-11 09:42:59 +08:00
AN
7651816495 typo(projects): 去除console打印 2025-08-11 09:22:05 +08:00
4539fe01fb fix(projects): Fix the icon size in the image preview toolbar 2025-08-08 17:17:23 +08:00
AN
71297cf2e4 optimize(types): 补充标签类型 2025-08-07 20:44:13 +08:00
AN
30316d7e4a optimize(types): 补充标签类型 2025-08-07 20:39:17 +08:00
AN
aaad817131 Merge branch 'dev' of https://gitee.com/xlsea/ruoyi-plus-soybean into flow 2025-08-07 20:36:14 +08:00
AN
4e9839bd48 fix(projects): 修复用户导入功能无法更新问题 2025-08-07 20:29:56 +08:00
AN
a15b683b1d fix(projects): 修复用户新增时角色下拉包含超级管理员问题 2025-08-06 09:12:24 +08:00
9df8d2f55f Merge remote-tracking branch 'origin/dev' into dev 2025-07-31 13:55:10 +08:00
710374398a fix(projects): 修复登录过期事件监听未被重置 2025-07-31 13:52:07 +08:00
AN
52318c106d fix(projects): 修复日期搜索条件清除问题 2025-07-31 13:30:51 +08:00
AN
41c74db1cd Merge branch 'dev' of https://gitee.com/xlsea/ruoyi-plus-soybean into flow 2025-07-30 20:44:52 +08:00
9027632bef !25 fix(project): 关闭多租户功能后仍然遍历租户列表导致控制台报错的问题
Merge pull request !25 from littleghost2016/dev
2025-07-30 12:43:44 +00:00
b96c46baa9 fix(project): 关闭多租户功能后仍然遍历租户列表导致控制台报错的问题 2025-07-30 18:02:24 +08:00
AN
befc61a4ff Merge branch 'flow' of https://gitee.com/xlsea/ruoyi-plus-soybean into flow 2025-07-29 16:16:55 +08:00
AN
d1f0ce28cb Merge branch 'dev' of https://gitee.com/xlsea/ruoyi-plus-soybean into flow 2025-07-29 16:15:56 +08:00
AN
2d31d7dc62 fix(hooks): 修复oss下载时未转码问题 2025-07-28 17:56:12 +08:00
e538355f2b refactor(projects): 菜单列表新增禁用菜单样式 2025-07-26 12:55:19 +08:00
f89835578c fix(hooks): 非安全环境下不使用流式下载 2025-07-26 12:43:10 +08:00
4eb77eac78 !24 refactor(menu): 菜单管理中隐藏的菜单显示灰色
Merge pull request !24 from NicholasLD/N/A
2025-07-25 07:27:35 +00:00
adca2e26be refactor(menu): 菜单管理中隐藏的菜单显示灰色
Signed-off-by: NicholasLD <nicholasld505@gmail.com>
2025-07-25 03:51:09 +00:00
AN
ff576f3f42 Merge branch 'dev' of https://gitee.com/xlsea/ruoyi-plus-soybean into dev 2025-07-25 10:31:57 +08:00
AN
8fcc70d73d fix(projects): 修复一级菜单隐藏失效问题 2025-07-25 10:25:50 +08:00
923eb98a5c fix(readme): update GitHub stars and forks links for gitee 2025-07-20 01:12:19 +08:00
19 changed files with 240 additions and 47 deletions

13
.vscode/settings.json vendored
View File

@ -4,7 +4,18 @@
"source.organizeImports": "never"
},
"editor.formatOnSave": false,
"eslint.validate": ["html", "css", "scss", "json", "jsonc"],
"eslint.validate": [
"html",
"css",
"scss",
"json",
"jsonc",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue"
],
"i18n-ally.displayLanguage": "zh-cn",
"i18n-ally.enabledParsers": ["ts"],
"i18n-ally.enabledFrameworks": ["vue"],

View File

@ -1,5 +1,114 @@
# 更新日志
## [v1.1.3](https://gitee.com/xlsea/ruoyi-plus-soybean/compare/v1.1.2...v1.1.3) (2025-08-16)
### &nbsp;&nbsp;&nbsp;🚀 新功能
- 对接工作流分类模块 &nbsp;-&nbsp; by **AN** [<samp>(25790)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/25790d4b)
- 新增流程定义页面 &nbsp;-&nbsp; by @m-xlsea [<samp>(11aba)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/11aba9e2)
- 添加流程实例功能 &nbsp;-&nbsp; by **AN** [<samp>(f9d57)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/f9d57f1b)
- 增加流程作废功能并优化按钮组件 &nbsp;-&nbsp; by **AN** [<samp>(350de)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/350de08f)
- 流程实例,查看变量功能 &nbsp;-&nbsp; by **AN** [<samp>(92b9c)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/92b9c213)
- 更新工作流分类选择组件,修复值回显问题并优化添加数据操作 &nbsp;-&nbsp; by **AN** [<samp>(14a29)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/14a29070)
- 添加请假申请功能 &nbsp;-&nbsp; by **AN** [<samp>(d7e05)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/d7e0516c)
- 更新请假申请功能,添加日期范围选择和请假天数自动计算 &nbsp;-&nbsp; by **AN** [<samp>(89a2a)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/89a2a6cb)
- 添加请假申请详情接口,优化请假操作表单样式 &nbsp;-&nbsp; by **AN** [<samp>(ab1d3)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/ab1d3a23)
- 更新请假申请表单,添加流程类型选择和流程启动功能 &nbsp;-&nbsp; by **AN** [<samp>(49521)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/49521b66)
- 更新工作流任务申请模态框样式,添加消息类型选择禁用功能 &nbsp;-&nbsp; by **AN** [<samp>(4614b)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/4614b977)
- **components**:
- 增强审批信息面板,优化附件处理 &nbsp;-&nbsp; by **AN** [<samp>(49224)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/49224afe)
- 面板添加流程图 &nbsp;-&nbsp; by **AN** [<samp>(ae5c7)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/ae5c7e83)
- **projects**:
- 优化组件,完成流程实例-流程预览 &nbsp;-&nbsp; by **AN** [<samp>(50e7b)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/50e7b515)
- 新增group-tag组件待办任务查看功能 &nbsp;-&nbsp; by **AN** [<samp>(1c322)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/1c322e28)
- 新增用户选择器组件,添加流程干预按钮 &nbsp;-&nbsp; by **AN** [<samp>(b8c77)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/b8c771cd)
- 新增转办和终止功能 &nbsp;-&nbsp; by **AN** [<samp>(80faf)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/80faf4b4)
- 新增加签功能 &nbsp;-&nbsp; by **AN** [<samp>(55dce)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/55dceca2)
- 新增减签功能 &nbsp;-&nbsp; by **AN** [<samp>(f1d7b)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/f1d7b973)
- 新增 '我发起的' 功能 &nbsp;-&nbsp; by **AN** [<samp>(a77ed)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/a77edc2e)
- 新增抄送、下一审批人提交功能,优化组件通用性 &nbsp;-&nbsp; by **AN** [<samp>(523ac)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/523aca6b)
- 新增我的待办功能,新增审批,驳回组件 &nbsp;-&nbsp; by **AN** [<samp>(130ee)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/130ee1dc)
- 新增我的已办,我的抄送功能 &nbsp;-&nbsp; by **AN** [<samp>(01d42)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/01d42722)
- 补充搜索条件 &nbsp;-&nbsp; by **AN** [<samp>(b6c7b)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/b6c7b1b3)
- 新增流程表达式功能 &nbsp;-&nbsp; by **AN** [<samp>(d562f)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/d562f8c1)
- **types**:
- 补充类型定义 &nbsp;-&nbsp; by **AN** [<samp>(bd6b5)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/bd6b575a)
### &nbsp;&nbsp;&nbsp;🐞 Bug 修复
- 修复控制台报错Message compilation errori18n的@为特殊符号 &nbsp;-&nbsp; by **AN** [<samp>(1c646)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/1c646937)
- 修复运行状态变化时数据加载顺序问题 &nbsp;-&nbsp; by **AN** [<samp>(ed118)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/ed118069)
- 修复添加行时的操作顺序问题 &nbsp;-&nbsp; by **AN** [<samp>(f004e)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/f004e75c)
- **hooks**:
- 非安全环境下不使用流式下载 &nbsp;-&nbsp; by @m-xlsea [<samp>(f8983)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/f8983557)
- 修复oss下载时未转码问题 &nbsp;-&nbsp; by **AN** [<samp>(2d31d)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/2d31d7dc)
- **other**:
- 修复代码生成字典相关问题 &nbsp;-&nbsp; by @m-xlsea [<samp>(9aa65)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/9aa6597d)
- **project**:
- 关闭多租户功能后仍然遍历租户列表导致控制台报错的问题 &nbsp;-&nbsp; by **wang_rui** [<samp>(b96c4)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/b96c46ba)
- 关闭多租户功能后仍然遍历租户列表导致控制台报错的问题 Merge pull request !25 from littleghost2016/dev &nbsp;-&nbsp; by **不寻俗** [<samp>(90276)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/9027632b)
- **projects**:
- 修复更新后产生问题 &nbsp;-&nbsp; by **AN** [<samp>(400ea)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/400eaf89)
- 修复动态组件弹窗动画问题 &nbsp;-&nbsp; by @m-xlsea [<samp>(2e029)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/2e029929)
- 修复抽屉问题 &nbsp;-&nbsp; by **AN** [<samp>(a9c58)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/a9c58b25)
- 修复一级菜单隐藏失效问题 &nbsp;-&nbsp; by **AN** [<samp>(8fcc7)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/8fcc70d7)
- 修复日期搜索条件清除问题 &nbsp;-&nbsp; by **AN** [<samp>(52318)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/52318c10)
- 修复登录过期事件监听未被重置 &nbsp;-&nbsp; by @m-xlsea [<samp>(71037)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/71037439)
- 修复用户新增时角色下拉包含超级管理员问题 &nbsp;-&nbsp; by **AN** [<samp>(a15b6)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/a15b683b)
- 修复用户导入功能无法更新问题 &nbsp;-&nbsp; by **AN** [<samp>(4e983)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/4e9839bd)
- Fix the icon size in the image preview toolbar &nbsp;-&nbsp; by @m-xlsea [<samp>(4539f)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/4539fe01)
- 修复新增用户未查询角色列表问题 &nbsp;-&nbsp; by **AN** [<samp>(d6ae8)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/d6ae85d2)
- **readme**:
- update GitHub stars and forks links for gitee &nbsp;-&nbsp; by @soybeanjs [<samp>(923eb)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/923eb98a)
### &nbsp;&nbsp;&nbsp;🛠 优化
- **projects**:
- 统一button的添加方式 &nbsp;-&nbsp; by **AN** [<samp>(b3f81)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/b3f81ba3)
- 动态加载组件方法抽取为公共函数 &nbsp;-&nbsp; by **AN** [<samp>(2f8a6)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/2f8a6b4b)
- 优化代码 &nbsp;-&nbsp; by **AN** [<samp>(59a69)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/59a69dd9)
- 优化代码 &nbsp;-&nbsp; by **AN** [<samp>(6c608)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/6c6086f8)
- 优化搜索FormItem展示 &nbsp;-&nbsp; by **AN** [<samp>(94faf)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/94fafe39)
- **types**:
- 补充标签类型 &nbsp;-&nbsp; by **AN** [<samp>(30316)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/30316d7e)
- 补充标签类型 &nbsp;-&nbsp; by **AN** [<samp>(71297)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/71297cf2)
### &nbsp;&nbsp;&nbsp;💅 重构
- remove WorkflowLeaveForm type from Vue typings &nbsp;-&nbsp; by **AN** [<samp>(394db)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/394db6fe)
- 优化代码 &nbsp;-&nbsp; by **AN** [<samp>(56d6d)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/56d6d77d)
- **menu**:
- 菜单管理中隐藏的菜单显示灰色 &nbsp;-&nbsp; by **NicholasLD** [<samp>(adca2)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/adca2e26)
- 菜单管理中隐藏的菜单显示灰色 Merge pull request !24 from NicholasLD/N/A &nbsp;-&nbsp; by **不寻俗** [<samp>(4eb77)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/4eb77eac)
- **projects**:
- 调整为批量上传文件 &nbsp;-&nbsp; by **AN** [<samp>(ffd62)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/ffd6211e)
- 重构流程设计菜单层级 &nbsp;-&nbsp; by **AN** [<samp>(b6f4f)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/b6f4fb5a)
- 修改流程实例动态引入组件 &nbsp;-&nbsp; by **AN** [<samp>(a3dce)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/a3dcee4a)
- 文件命名修正 &nbsp;-&nbsp; by **AN** [<samp>(5e496)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/5e49622e)
- 移动工作流组件位置 &nbsp;-&nbsp; by @m-xlsea [<samp>(7ffaa)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/7ffaac58)
- 菜单列表新增禁用菜单样式 &nbsp;-&nbsp; by @m-xlsea [<samp>(e5383)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/e538355f)
- **types**:
- 移除无用type &nbsp;-&nbsp; by **AN** [<samp>(e86a6)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/e86a6d1b)
- **utils**:
- 简化加载组件方法 &nbsp;-&nbsp; by **AN** [<samp>(22710)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/22710ecb)
### &nbsp;&nbsp;&nbsp;📖 文档
- **projects**:
- 流程定义菜单更新 &nbsp;-&nbsp; by **AN** [<samp>(1af4e)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/1af4e963)
- 新增工作流更新sql &nbsp;-&nbsp; by **AN** [<samp>(89e7e)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/89e7edb3)
- 流程表达式菜单sql更新 &nbsp;-&nbsp; by **AN** [<samp>(7484f)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/7484f79b)
### &nbsp;&nbsp;&nbsp;🏡 杂项
- **other**: update the ESLint validation configuration to support more file types. &nbsp;-&nbsp; by **Azir-11** [<samp>(8d7f9)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/8d7f91dc)
- **readme**: remove DartNode sponsorship badge from README files &nbsp;-&nbsp; by @soybeanjs [<samp>(33ade)</samp>](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/33ade539)
### &nbsp;&nbsp;&nbsp;❤️ 贡献者
[![soybeanjs](https://github.com/soybeanjs.png?size=48)](https://github.com/soybeanjs)&nbsp;&nbsp;[![m-xlsea](https://github.com/m-xlsea.png?size=48)](https://github.com/m-xlsea)&nbsp;&nbsp;[![Elio-An](https://github.com/Elio-An.png?size=48)](https://gitee.com/elio-an)&nbsp;&nbsp;[![Azir-11](https://github.com/Azir-11.png?size=48)](https://github.com/Azir-11)&nbsp;&nbsp;[![Azir-11](https://github.com/NicholasLD.png?size=48)](https://github.com/NicholasLD)&nbsp;&nbsp;
[wang_rui](mailto:wrr1996@163.com)
## [v1.1.2](https://gitee.com/xlsea/ruoyi-plus-soybean/compare/v1.1.1...v1.1.2) (2025-07-24)
### &nbsp;&nbsp;&nbsp;🐞 Bug 修复

View File

@ -22,7 +22,7 @@
# 📢 重要通知
1.1.2 版本已经正式发布工作流版本迎来首个版本(请切换 [flow](https://gitee.com/xlsea/ruoyi-plus-soybean/tree/flow/) 分支查看),但仍然建议:
1.1.3 版本已经正式发布工作流版本请切换 [flow](https://gitee.com/xlsea/ruoyi-plus-soybean/tree/flow/) 分支查看),但仍然建议:
- 在生产环境使用前进行充分测试
- 关注项目更新,及时获取最新版本
- 积极反馈问题,帮助我们快速迭代
@ -40,6 +40,11 @@
<p style="font-weight: bold; font-size: 24px;">后端需要替换代码生成模板与菜单 SQL详细请看 <a href="#代码生成与菜单更新">代码生成与菜单更新</a></p>
# 💎 友情链接
- [Snail Job Pro](https://pro.snailjob.opensnail.com/home) - 灵活,可靠和快速的分布式任务重试和分布式任务调度平台
- [AiZuDa - 爱组搭(飞龙工作流企业版)](https://naiveui.aizuda.com) - 像搭积木一样进行低代码甚至零代码快速构建应用
## 📋 项目概述
RuoYi-Plus-Soybean 是一个现代化的企业级多租户管理系统,它结合了 RuoYi-Vue-Plus 的强大后端功能和 Soybean Admin 的现代化前端特性,为开发者提供了完整的企业管理解决方案。

View File

@ -1,7 +1,7 @@
{
"name": "ruoyi-vue-plus",
"type": "module",
"version": "1.1.2",
"version": "1.1.3",
"description": "结合了 RuoYi-Vue-Plus 的强大后端功能和 Soybean Admin 的现代化前端特性,为开发者提供了完整的企业管理解决方案。",
"author": {
"name": "xlsea",

View File

@ -21,27 +21,27 @@ const attrs: SelectProps = useAttrs();
const { loading: postLoading, startLoading: startPostLoading, endLoading: endPostLoading } = useLoading();
/** the enabled role options */
const roleOptions = ref<CommonType.Option<CommonType.IdType>[]>([]);
/** the enabled post options */
const postOptions = ref<CommonType.Option<CommonType.IdType>[]>([]);
watch(
() => props.deptId,
() => {
if (!props.deptId) {
roleOptions.value = [];
postOptions.value = [];
return;
}
getRoleOptions();
getPostOptions();
},
{ immediate: true }
);
async function getRoleOptions() {
async function getPostOptions() {
startPostLoading();
const { error, data } = await fetchGetPostSelect(props.deptId!);
if (!error) {
roleOptions.value = data.map(item => ({
postOptions.value = data.map(item => ({
label: item.postName,
value: item.postId
}));
@ -54,7 +54,7 @@ async function getRoleOptions() {
<NSelect
v-model:value="value"
:loading="postLoading"
:options="roleOptions"
:options="postOptions"
v-bind="attrs"
placeholder="请选择岗位"
/>

View File

@ -16,6 +16,12 @@ export function useDownload() {
const isHttpProxy = import.meta.env.DEV && import.meta.env.VITE_HTTP_PROXY === 'Y';
const { baseURL } = getServiceBaseURL(import.meta.env, isHttpProxy);
const isHttps = () => {
const protocol = document.location.protocol;
const hostname = document.location.hostname;
return protocol === 'https' || hostname === 'localhost' || hostname === '127.0.0.1';
};
/** 获取通用请求头 */
const getCommonHeaders = (contentType = 'application/octet-stream') => ({
Authorization: `Bearer ${localStg.get('token')}`,
@ -109,9 +115,10 @@ export function useDownload() {
await handleResponse(response);
const finalFilename = filename || response.headers.get('Download-Filename') || `download-${timestamp}`;
const rawHeader = response.headers.get('Download-Filename');
const finalFilename = filename || (rawHeader ? decodeURIComponent(rawHeader) : null) || `download-${timestamp}`;
if (response.body) {
if (response.body && isHttps()) {
const contentLength = Number(response.headers.get('Content-Length'));
await downloadByStream(response.body, finalFilename, contentLength);
return;

View File

@ -77,7 +77,7 @@ export const request = createFlatRequest<App.Service.Response, RequestInstanceSt
// when the backend response code is in `modalLogoutCodes`, it means the user will be logged out by displaying a modal
const modalLogoutCodes = import.meta.env.VITE_SERVICE_MODAL_LOGOUT_CODES?.split(',') || [];
if (modalLogoutCodes.includes(responseCode) && isLogin) {
const isExist = request.state.errMsgStack && request.state.errMsgStack.includes(response.data.msg);
const isExist = request.state.errMsgStack?.includes(response.data.msg);
if (isExist) {
return null;
}
@ -85,23 +85,24 @@ export const request = createFlatRequest<App.Service.Response, RequestInstanceSt
logoutAndCleanup();
return null;
}
request.state.errMsgStack = [...(request.state.errMsgStack || []), response.data.msg];
// prevent the user from refreshing the page
window.addEventListener('beforeunload', handleLogout);
window.$dialog?.warning({
title: '系统提示',
content: '登录状态已过期,您可以继续留在该页面,或者重新登录',
content: '登录状态已过期,重新登录',
positiveText: '重新登录',
negativeText: '取消',
maskClosable: false,
closeOnEsc: false,
onAfterEnter() {
// prevent the user from refreshing the page
window.addEventListener('beforeunload', handleLogout);
},
onPositiveClick() {
logoutAndCleanup();
},
onClose() {
window.removeEventListener('beforeunload', handleLogout);
request.state.errMsgStack = request.state.errMsgStack.filter(msg => msg !== response.data.msg);
logoutAndCleanup();
}
});
request.cancelAllRequest();

View File

@ -67,6 +67,8 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
if (authRouteMode.value === 'dynamic') {
if (route.path === '/' && route.children?.length) {
const child = route.children[0];
// @ts-expect-error no hidden field
child.hidden = route.hidden;
parseRouter(child);
child.name = Math.random().toString(36).slice(2, 12);
Object.assign(route, child);
@ -123,7 +125,6 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
} else if (!isNotNull(route.meta.icon)) {
route.meta.icon = defaultIcon;
}
// @ts-expect-error no hidden field
route.meta.hideInMenu = route.hidden;
if (route.meta.hideInMenu && parent) {

View File

@ -13,6 +13,13 @@
border-color: var(--un-default-border-color, #e5e7eb); /* 2 */
}
/*
* [Naive UI] Fix the icon size in the image preview toolbar
*/
.n-image-preview-toolbar .n-base-icon {
box-sizing: unset !important;
}
/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.

View File

@ -164,6 +164,8 @@ declare namespace Api {
postIds: string[];
/** user role ids */
roleIds: string[];
/** roles */
roles: Role[];
};
/** user list */

View File

@ -53,12 +53,14 @@ async function handleFetchTenantList() {
const { data, error } = await fetchTenantList();
if (error) return;
tenantEnabled.value = data.tenantEnabled;
tenantOption.value = data.voList.map(tenant => {
return {
label: tenant.companyName,
value: tenant.tenantId
};
});
if (data.tenantEnabled) {
tenantOption.value = data.voList.map(tenant => {
return {
label: tenant.companyName,
value: tenant.tenantId
};
});
}
endTenantLoading();
}

View File

@ -21,9 +21,12 @@ const dateRangeCreateTime = ref<[string, string] | null>(null);
const model = defineModel<Api.System.ConfigSearchParams>('model', { required: true });
function onDateRangeCreateTimeUpdate(value: [string, string] | null) {
if (value?.length) {
model.value.params!.beginTime = value[0];
model.value.params!.endTime = value[1];
const params = model.value.params!;
if (value && value.length === 2) {
[params.beginTime, params.endTime] = value;
} else {
params.beginTime = undefined;
params.endTime = undefined;
}
}

View File

@ -113,6 +113,24 @@ function renderLabel({ option }: { option: TreeOption }) {
if (label?.startsWith('route.') || label?.startsWith('menu.')) {
label = $t(label as App.I18n.I18nKey);
}
// 禁用的菜单显示红色
if (option.status === '1') {
return (
<div class="flex items-center gap-4px text-error-200">
{label}
<SvgIcon icon="ri:prohibited-line" class="text-16px" />
</div>
);
}
// 隐藏的菜单显示灰色
if (option.visible === '1') {
return (
<div class="flex items-center gap-4px text-gray-400">
{label}
<SvgIcon icon="codex:hidden" class="text-21px" />
</div>
);
}
return <div>{label}</div>;
}

View File

@ -21,9 +21,12 @@ const dateRangeCreateTime = ref<[string, string] | null>(null);
const model = defineModel<Api.System.OssSearchParams>('model', { required: true });
function onDateRangeCreateTimeUpdate(value: [string, string] | null) {
if (value?.length) {
model.value.params!.beginCreateTime = value[0];
model.value.params!.endCreateTime = value[1];
const params = model.value.params!;
if (value && value.length === 2) {
[params.beginTime, params.endTime] = value;
} else {
params.beginTime = undefined;
params.endTime = undefined;
}
}

View File

@ -168,9 +168,12 @@ const dateRangeCreateTime = ref<[string, string] | null>(null);
const datePickerRef = ref<InstanceType<typeof NDatePicker>>();
function onDateRangeCreateTimeUpdate(value: [string, string] | null) {
if (value?.length) {
searchParams.params!.beginTime = value[0];
searchParams.params!.endTime = value[1];
const params = searchParams.params!;
if (value && value.length === 2) {
[params.beginTime, params.endTime] = value;
} else {
params.beginTime = undefined;
params.endTime = undefined;
}
}

View File

@ -24,9 +24,12 @@ const model = defineModel<Api.System.RoleSearchParams>('model', { required: true
const { options: sysNormalDisableOptions } = useDict('sys_normal_disable', false);
function onDateRangeCreateTimeUpdate(value: [string, string] | null) {
if (value?.length) {
model.value.params!.beginTime = `${value[0]} 00:00:00`;
model.value.params!.endTime = `${value[1]} 23:59:59`;
const params = model.value.params!;
if (value && value.length === 2) {
[params.beginTime, params.endTime] = value;
} else {
params.beginTime = undefined;
params.endTime = undefined;
}
}

View File

@ -91,6 +91,7 @@ function handleDownloadTemplate() {
watch(visible, () => {
if (visible.value) {
data.value.updateSupport = false;
fileList.value = [];
success.value = false;
message.value = '';
@ -140,7 +141,7 @@ watch(visible, () => {
</NUploadDragger>
</NUpload>
<div class="flex-center">
<NCheckbox v-model="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
<NCheckbox v-model:checked="data.updateSupport">{{ $t('common.updateExisting') }}</NCheckbox>
</div>
<NAlert v-if="message" :title="$t('common.importResult')" :type="success ? 'success' : 'error'" :bordered="false">

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
import { computed, reactive, watch } from 'vue';
import { computed, reactive, ref, watch } from 'vue';
import { useLoading } from '@sa/hooks';
import { fetchCreateUser, fetchGetUserInfo, fetchUpdateUser } from '@/service/api/system';
import { useFormRules, useNaiveForm } from '@/hooks/common/form';
@ -49,6 +49,8 @@ type Model = Api.System.UserOperateParams;
const model: Model = reactive(createDefaultModel());
const roleOptions = ref<CommonType.Option<CommonType.IdType>[]>([]);
function createDefaultModel(): Model {
return {
deptId: null,
@ -76,18 +78,23 @@ const rules: Record<RuleKey, App.Global.FormRule[]> = {
roleIds: [{ ...createRequiredRule('请选择角色'), type: 'array' }]
};
async function getUserInfo() {
async function getUserInfo(id: CommonType.IdType = '') {
startLoading();
const { error, data } = await fetchGetUserInfo(props.rowData?.userId);
const { error, data } = await fetchGetUserInfo(id);
if (!error) {
model.roleIds = data.roleIds;
model.postIds = data.postIds;
roleOptions.value = data.roles.map(role => ({
label: role.roleName,
value: role.roleId
}));
}
endLoading();
}
function handleUpdateModelWhenEdit() {
if (props.operateType === 'add') {
getUserInfo();
Object.assign(model, createDefaultModel());
model.deptId = props.deptId;
return;
@ -97,7 +104,7 @@ function handleUpdateModelWhenEdit() {
startDeptLoading();
Object.assign(model, props.rowData);
model.password = '';
getUserInfo();
getUserInfo(props.rowData.userId);
endDeptLoading();
}
}
@ -209,7 +216,14 @@ watch(visible, () => {
<PostSelect v-model:value="model.postIds" :dept-id="model.deptId" multiple clearable />
</NFormItem>
<NFormItem :label="$t('page.system.user.roleIds')" path="roleIds">
<RoleSelect v-model:value="model.roleIds" multiple clearable />
<NSelect
v-model:value="model.roleIds"
:loading="loading"
:options="roleOptions"
multiple
clearable
placeholder="请选择角色"
/>
</NFormItem>
<NFormItem :label="$t('page.system.user.status')" path="status">
<DictRadio v-model:value="model.status" dict-code="sys_normal_disable" />

View File

@ -24,9 +24,12 @@ const datePickerRef = ref<InstanceType<typeof NDatePicker>>();
const model = defineModel<Api.System.UserSearchParams>('model', { required: true });
function onDateRangeCreateTimeUpdate(value: [string, string] | null) {
if (value?.length) {
model.value.params!.beginTime = value[0];
model.value.params!.endTime = value[1];
const params = model.value.params!;
if (value && value.length === 2) {
[params.beginTime, params.endTime] = value;
} else {
params.beginTime = undefined;
params.endTime = undefined;
}
}