Compare commits

...

742 Commits

Author SHA1 Message Date
xingyu4j fb2595ef90 Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin 2026-05-23 18:39:12 +08:00
芋道源码 eaaf55eafa
!346 fix(sms): 修复短信渠道列表展示不一致
Merge pull request !346 from 芋道源码/dev
2026-05-23 08:45:03 +00:00
YunaiV d910450426 fix(sms): 修复短信渠道列表展示不一致 2026-05-23 16:41:36 +08:00
PanFu f813245827
feat: 偏好设置的快捷键列表追加ESC快捷键的控制(关闭当前窗口) (#7947)
* feat: 快捷键追加ESC控制,关闭当前窗口

* feat: 偏好设置中,页面切换动画的颜色看不清的问题(使用当前主题色)

* feat: 三种弹出框支持快捷键ESC动作

* feat: 代码自动格式化(3个框架改动)

* feat: 代码自动格式化(3个框架改动)

* fix: 修正locale数据获取方式

* 单元测试问题修改

* 单元测试问题修改

* fix: 解决代码评论的问题

* fix: 解决代码评论的问题

* fix: 解决代码评论的问题

* fix: 解决代码评论的问题

* 单元测试问题修改

* fix: 解决评论问题

* fix: 解决代码格式导致pnpm run lint报错的问题

---------

Co-authored-by: PanFu <panfu@zhihuaai.com>
2026-05-23 09:50:35 +08:00
芋道源码 cfbd13289f
!345 迁移 wms + iot 部分
Merge pull request !345 from 芋道源码/migration
2026-05-23 01:42:47 +00:00
过冬 e98f0b7558
fix: 移动端禁用混合布局菜单拆分 (#7949) 2026-05-23 04:21:19 +08:00
Reese Wellin cd86de54e1
fix(preferences): 修复主题等个性化信息持久化被初始化配置覆盖 (#7948)
调整 initPreferences 中 merge 顺序,使用户缓存优先于 initialPreferences。

Fixes #7943
2026-05-23 04:17:46 +08:00
YunaiV 152964395d fix(iot): 修复场景联动动作类型切换 + 数据规则弹窗 4 处 bug
- B50 动作类型切换清理失效:updateActionType 先调 onActionTypeChange
  (此时 action.type 仍是旧值)再赋新值;onActionTypeChange 内恒真的
  type !== action.type 简化为 if (action.identifier)
- B16 新增弹窗不重置主表单:onOpenChange 关闭分支补 formApi.resetForm()
- B17 允许空数据源提交:source-config-form.validate() 补空数组校验
- B18 子表单校验 reject 未处理(弹窗关闭不掉):onConfirm 内 try/catch
  包子表单校验,失败 return 中止提交
2026-05-22 20:24:30 +08:00
Jin Mao 60eb1335f8 chore: vite 降级到8.0.10 2026-05-22 13:20:25 +08:00
xingyu f2b3b12553
chore: pnpm v11 (#7942)
* chore: remove rolldown dep

* fix: issues-helper and maintain-one-comment are temporarily disabled due to security issues

* chore: update deps

* fix: change error type to TypeError for non-browser environment check in LocalStorageDriver

* chore: update pnpm v11
2026-05-22 12:02:14 +08:00
layhuts c066889c37
Fix: 在isMobile=true时无法自定义Drawer的class问题 (#7941)
* fix: 在isMobile=true时无法自定义Drawer的class问题

* fix: 在ResizableHandle两边增加边距
2026-05-22 11:56:09 +08:00
YunaiV f8c869f1ff feat(mes):md client select 迁移 2026-05-22 08:41:54 +08:00
YunaiV 00779aacb3 feat(mes): 迁移 cal、dv、tm 的 api 2026-05-22 08:34:47 +08:00
928646789 6b81d1b0d5
fix: preferences-button click to show setting drawer (#7938) 2026-05-22 07:26:12 +08:00
afe1 126b33687a
chore: vite config tsconfig include (#7936)
* fix: catelog

* fix: system

* fix(vite-config): include tsdown config in tsconfig
2026-05-22 07:25:50 +08:00
YunaiV 9d665bd6b9 docs(iot): 新增 codex 评审入口 + 登记异步竞态不修决策
- review-for-codex.md:本轮修复背景 + 决策 + 文件清单 + 给 codex
  的 5 项重点关注。与 bug.md(待修源头) / bug_ignore.md(不修登记)
  形成三文件分工,后续 codex / 二次评审不会丢上下文
- bug_ignore.md/I-1:登记 scene 表单 3 处异步竞态(property-selector
  / device-selector / device-control-config 的 watch 异步加载)不修决策。
  评估理由:触发窗口极窄、低频操作、~40 行 epoch 模板代码成本不匹配、
  vue3 源也未做。复评条件:API 层接入 AbortController 时顺手补、
  用户实际反馈、改后端 push 模式
2026-05-21 21:26:36 +08:00
Jin Mao 5b67c2e740 chore: 更新pnpm-lock 2026-05-21 20:44:38 +08:00
Jin Mao 2d7c3c3072 chore: 更新pnpm-lock 2026-05-21 20:40:49 +08:00
Jin Mao 5cc68c9dd0 chore: 更新 vite 依赖版本
- 将 vite 版本从 ^8.0.13 降级到 ^8.0.10
- 保持其他依赖包版本不变
2026-05-21 20:22:28 +08:00
YunaiV df8e23542b fix(iot): 修复 scene 表单 vue-tsc 3 处类型错误
- ele device-control-config:
  - defaultParams 类型显式为 Record<string, any> ;
    param.identifier 可能为 undefined 时跳过赋值
  - ElOption :value="service.identifier" 改为非空断言 service.identifier!
- ele json-params-input:getParamTypeTag 用 as const 让 TS 自动推断字面值
  联合('primary' | 'success' | 'info' | 'warning' | 'danger'),传给
  ElTag.type 不再报错
- antd value-input:handleNumberChange 参数改为 any 内部 String 转换
  (AntD InputNumber @change 类型为 ValueType = string | number ,
   原 number | undefined 报错)
2026-05-21 19:58:33 +08:00
YunaiV e7361a60ec feat(iot):md 模块,支持生成 2026-05-21 18:48:57 +08:00
YunaiV 66843f2392 chore(iot): 数组回调缩写参数展开为完整业务命名
- products.find((p)) → ((product)),propertyList.find((p)) → ((property))
  等:把 .find / .filter / .map / .reduce 的单字母回调参数 (p / d / s / g / v
  / acc / val) 全部展开为 product / device / service / group / value /
  total 等完整命名
- 涉及 web-antd 与 web-ele 两侧 :device 列表 / 卡片 / 物模型属性历史 /
  ota 固件 / 场景执行器服务选择 / 属性选择器 / 产品选择组件
- 外层已绑定同名变量的场景,回调形参用 item 避免命名重复
2026-05-21 18:46:59 +08:00
YunaiV 83bf576daf feat(mes): rename field 'level' to 'configLevel' for clarity 2026-05-21 17:45:25 +08:00
YunaiV 2a97bed546 feat(mes): 移除多余 defineOptions 2026-05-21 17:36:30 +08:00
YunaiV c8ce1a8911 fix(iot): 设备配置详情统一 460px 高度 + 按钮加 8px 间距,卡片视图删除按钮改 !h-8 对齐其它按钮高度 2026-05-21 17:27:17 +08:00
YunaiV d1a2601b6c fix(iot): alert 模块对齐后端 VO + 搜索体验对齐 vben 实践(P1)
- alert/config API 删除多余字段 updateTime
- alert/record API 删除多余字段 deviceName / productName / processTime
- alert/record 搜索表单告警级别字段 configLevel → level ,
  对齐后端 IotAlertRecordPageReqVO.level(之前提交后端不会按级别筛选)
- alert/record 搜索表单设备字段改用 ApiSelect + getSimpleDeviceList 全量加载,
  showSearch / filterable 模糊搜索,对齐 vben 项目 13+ 处 ApiSelect 主流实践
- alert/config + alert/record 列表移除空跑 checkbox 列(无批量删除接口)
2026-05-21 16:39:30 +08:00
YunaiV d2587c17b0 fix: iot 固件的优化 2026-05-21 15:11:01 +08:00
YunaiV 33cdfcac3c feat(im): 修管理端 3 处:群消息 atUserNicknames 类型允许 null、移除前端无效的「消息内容」查询入口、表情包宽高加表单校验 2026-05-21 15:10:22 +08:00
YunaiV 58f2e23654 fix: iot 补齐 vue3 源缺失的表单校验(P1)
- 物模型功能定义「数据类型」字段补 required 必填校验
- 产品选择器(ProductSelect)补搜索能力:antd 加 show-search + option-filter-prop ,ele 加 filterable
- 设备表单 onConfirm 增加 advancedFormApi.validate() 调用,
  否则高级表单(含经纬度等字段)的 schema rules 不会触发
- 设备经纬度增加「成对填写」跨字段校验:仅填一项时给 warning 提示,
  与 vue3 源 DeviceForm.vue 行为对齐
2026-05-21 14:43:06 +08:00
YunaiV d207e3b82c feat(mes): 优化 md 基础模块的迁移 2026-05-21 13:23:33 +08:00
YunaiV 1afa70bb53 fix: iot 二次确认统一改用 popconfirm 模式(P1)
- 设备详情「配置推送」按钮包 Popconfirm / ElPopconfirm,防误下发
- 场景联动列表 TableAction 启用 / 停用项改用 popConfirm 配置
- 产品详情头部「发布 / 撤销发布 / 同步物模型表结构」三处按钮同步切换
- 移除命令式 Modal.confirm / ElMessageBox.confirm,与 system / iot 现有惯例一致
- 顺带消除 ele 端 ElMessageBox.confirm 取消未 catch 的未处理 promise
2026-05-21 12:44:12 +08:00
YunaiV 751ba2c782 feat(mes): 迁移工作站管理及设备、工具、人员关联 2026-05-21 11:10:21 +08:00
YunaiV 057ca0bfde refactor: 收敛 iot rule/scene API 的重复类型声明(P1)
- antd / ele api/iot/rule/scene,删除外层重复的 4 个 interface
- createSceneRule / updateSceneRule 入参改用 RuleSceneApi.SceneRule
- 业务文件 import 统一改用 RuleSceneApi.SceneRule / Trigger / TriggerCondition / Action
- 清理 2 处 TODO @haohao 残留注释

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 11:01:09 +08:00
YunaiV df720b2c1a style: 应用 lint 格式化到 ele scene 设备控制 / 属性选择器组件
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 10:44:32 +08:00
YunaiV 4b6e2de778 feat(mes): 迁移客户、供应商、车间管理到 vben 2026-05-21 10:36:07 +08:00
YunaiV e6e15ca4ef feat(mes): 迁移客户、供应商、车间管理到 vben 2026-05-21 10:35:54 +08:00
YunaiV 0d175cbe9c fix: 修复 iot 模块 ele 端迁移阻塞的类型 / 字段问题(P0)
- ele property-selector / device-control-config,改用 ThingModelApi 命名空间引用
- ele api/iot/thingmodel,补 ThingModelTSL 类型,收敛 getThingModelTSLByProductId 返回值
- ele api/iot/rule/scene,SceneRule 补 lastTriggeredTime 字段
- ele views/iot/rule/scene/data.ts,useGridColumns 对齐 antd 的 5 列结构
- ele views/iot/home/modules/message-trend-card,ElSelect 改用 ElOption 子节点
- ele / antd api/iot/rule/scene,Action.params 类型 Record<string, any> 改为 string

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 10:20:30 +08:00
YunaiV f02a5975b8 feat(wms): 优化 md unit 的迁移代码(优化代码) 2026-05-21 09:15:57 +08:00
YunaiV b35ce18c6e feat(wms): 优化 md unit 的迁移代码 2026-05-21 09:11:58 +08:00
Jin Mao 63a38dce49 refactor(workflow): 优化发布工作流配置
- 简化触发条件,移除冗余的推送事件配置
- 更新标签创建输入参数描述,明确格式要求
- 移除 Husky 环境变量配置
- 重命名构建作业为发布作业,提高语义清晰度
- 移除 Node.js 版本矩阵策略配置
- 优化版本提取逻辑,支持工作流调度和推送事件
- 统一标签前缀处理,确保版本格式一致性
- 移除注释掉的冗余步骤配置
- 简化发布配置,移除不必要的发布操作注释块
2026-05-21 09:07:59 +08:00
Jin Mao 629f747795 feat(workflow): 添加手动触发release标签工作流
- 添加 workflow_dispatch 触发器支持手动运行
- 新增 tag 输入参数用于指定创建的标签
- 设置默认标签值为 staging
- 保留原有的 push tags 自动触发功能
2026-05-21 08:54:51 +08:00
YunaiV c11db17376 feat(iot): 将 antd 的 rule scene 迁移到 ele 里。 2026-05-21 08:53:22 +08:00
YunaiV b3462c3286 feat(iot): 将 antd 的 rule scene 迁移到 ele 里。 2026-05-21 08:53:16 +08:00
YunaiV 9cc52f128c feat(wms): 优化 md item 的迁移代码(继续) 2026-05-21 08:45:48 +08:00
YunaiV 67997bd44d feat(wms): 优化 md item 的迁移代码 2026-05-21 08:09:29 +08:00
YunaiV 5790211897 feat(iot): 修复 antd Select 的 v-model 用法
将场景联动执行器配置、物模型数值单位的 Select 由 EP 风格的 `:model-value` 改为 antd 标准的 `:value`;前者不被 ant-design-vue 接收,导致下拉无法选中 / 回显失效。顺手把数值单位的 `getDictOptions` 提到 computed 缓存。
2026-05-21 01:09:55 +08:00
YunaiV 6b1425d541 feat(mes): 新增 md item 的迁移 2026-05-21 00:58:45 +08:00
YunaiV 13c3028ecc feat(iot): 修复 rule scene 的样式(覆盖)问题、间隙问题 2026-05-21 00:37:30 +08:00
YunaiV cb175e331f feat(iot): 优化代码,尽量使用 ProductStatusEnum 枚举 2026-05-21 00:17:56 +08:00
YunaiV 3f09fc1498 feat(iot): 优化 iot 的代码风格(迁移 constants.ts)地址 2026-05-20 23:11:02 +08:00
Jin Mao 8585008f79 chore: release v5.7.0 2026-05-20 17:45:44 +08:00
xingyu 00990d9453
Merge branch 'main' into fix/lint 2026-05-20 17:38:19 +08:00
PanFu 2a84b590b5
feat: 偏好设置按钮,支持在右上角用户的下拉框中展示;偏好设置中支持设置时区(多一个入口); (#7931)
* feat: 偏好设置按钮支持显示在用户下拉窗中的特性

* feat: 时区设置功能支持在偏好设置列表进行配置

* feat: 偏好设置按钮支持显示在用户下拉窗中的特性 - 完善示例代码

* feat: 时区设置功能支持在偏好设置列表进行配置

* feat: 时区设置功能支持在偏好设置列表进行配置-单元测试报错问题

* feat: 时区设置功能支持在偏好设置列表进行配置-修改代码QC问题

---------

Co-authored-by: PanFu <panfu@zhihuaai.com>
2026-05-20 17:24:53 +08:00
PanFu 769c970e08
fix: 修复三个问题:偏好配置项修改后重启不会生效;锁屏弹出框的按钮文字错误;右上角偏好设置按钮排序问题优化; (#7930)
* fix: 修正偏好设置加载缓存的偏好设置并与初始配置合并的顺序

* fix: 修正锁屏弹出框的按钮文字

* fix: 偏好设置按钮排序优化(取第三个占位的数字,若是第三个占位不是数字,则自动分配排序索引)

* fix: 修正偏好设置加载缓存的偏好设置并与初始配置合并的顺序 - 代码QC问题修改

---------

Co-authored-by: PanFu <panfu@zhihuaai.com>
2026-05-20 17:24:18 +08:00
xingyu4j 4d3c481a93 fix: 当lint检查出问题后,不能在终端终止 2026-05-20 16:39:03 +08:00
xingyu4j fda4b39c01 chore: update deps 2026-05-20 16:38:19 +08:00
xingyu4j 74d8942f39 chore: remove Unused deps 2026-05-20 16:24:59 +08:00
xingyu4j 9ec98f0846 refactor: replace depcheck with knip for dependency checking
Migrate vsh check-dep from depcheck to knip, reducing
315 transitive dependencies. Config is inlined in
DEFAULT_CONFIG, matching the check-circular pattern.
Also re-export CollapsibleParams from @vben/common-ui.
2026-05-20 16:14:21 +08:00
xingyu4j f71094e878 refactor: migrate json-viewer from vue-json-viewer to vue-json-pretty
- Replace vue-json-viewer with vue-json-pretty (actively maintained, Vue 3 native)
- Map original props to vue-json-pretty API in bindProps for backward compatibility
- Implement copy functionality via renderNodeActions slot with i18n support
- Update style.scss from .jv-* to .vjs-* class names
2026-05-20 14:39:17 +08:00
YunaiV e816288b82 feat(iot): 迁移 ele 的 alert、device、product、ota、home、thingmodel 的实现 2026-05-20 13:31:27 +08:00
YunaiV f1f8f4e64a feat(iot): 迁移 ele 的 map 组件 2026-05-20 13:09:26 +08:00
xingyu4j 9badda3d11 chore: update deps 2026-05-20 11:30:03 +08:00
YunaiV 250d3eb39f feat(iot): 迁移 iot 在 ele 的 api 2026-05-20 09:57:47 +08:00
YunaiV 5607f23322 feat(iot): 优化 rule scene 的代码风格 2026-05-20 09:57:05 +08:00
YunaiV 538d04a380 feat(iot): 优化 data rule,使用 vxe 简化表单,提升 antd、ele 的代码复用性 2026-05-20 09:54:33 +08:00
YunaiV b9d333f7ec feat(mes): 同步 api 的迁移 2026-05-20 09:52:20 +08:00
YunaiV dab9509ba0 feat(iot): 完善 rule/scene 的迁移 2026-05-20 09:01:57 +08:00
YunaiV b1bd32a89b fix(iot): 完善 thingmodel 的迁移 2026-05-20 08:46:28 +08:00
YunaiV ec796b8336 fix(iot): 完善 rule data 的迁移 2026-05-20 08:45:51 +08:00
YunaiV e7a61ce150 feat(iot): 优化 antd 里的整体代码风格。 2026-05-20 00:41:06 +08:00
YunaiV 1bdc0d992f feat(mes): 新增 md item type 的迁移 2026-05-19 22:20:13 +08:00
YunaiV 8bcfa20577 feat(iot):优化 ota 的代码风格(v6) 2026-05-19 16:52:27 +08:00
YunaiV ab15c884bf feat(wms): 优化 sku-form.vue 的 skuSeq 2026-05-19 16:31:41 +08:00
YunaiV 9c57ae07a6 feat(wms): update input components to disable controls and enhance user selection 2026-05-19 16:16:28 +08:00
xingyu4j 03fcecadcc fix: lefthook config 2026-05-19 16:13:00 +08:00
xingyu4j 3a88adb8a6 feat: test 2026-05-19 16:10:18 +08:00
xingyu4j c759cb2593 fix: lint config 2026-05-19 16:08:10 +08:00
xingyu4j f77166b3a2 chore: update deps 2026-05-19 15:59:43 +08:00
xingyu4j f7928b34b2 fix: lint 2026-05-19 15:58:34 +08:00
xingyu4j 454a5b54bd chore: lefthook config 2026-05-19 15:54:03 +08:00
YunaiV 09c19526bb feat(iot):优化 ota 的代码风格(v5) 2026-05-19 15:31:45 +08:00
YunaiV b9a7eddb72 feat(iot):优化 ota 的代码风格(v4) 2026-05-19 14:51:54 +08:00
YunaiV 0bc1981675 fix(wms): 优化 WMS 首页卡片样式和区块间距 2026-05-19 14:46:05 +08:00
Jin Mao a4dd9d30ce chore: release 5.7.0 2026-05-19 14:39:46 +08:00
YunaiV 9d54f60b10 feat(iot):优化 ota 的代码风格(v3) 2026-05-19 14:29:14 +08:00
Jin Mao 76cfcda2e9 Merge branch 'fork/xingyu4j/antdv-next' 2026-05-19 14:14:28 +08:00
橙子 7ec4df4995
fix: search-panel when ArrowUp and ArrowDown (#7922) 2026-05-19 13:40:50 +08:00
leo d71c81e8ff
style: apply vsh lint formatting (#7923) 2026-05-19 13:40:13 +08:00
YunaiV a70fcc9616 fix(wms): 对齐商品分类树筛选查询 2026-05-19 13:00:05 +08:00
YunaiV 4821d49017 feat(iot):优化 ota 的代码风格(v2) 2026-05-19 11:27:35 +08:00
YunaiV a1b66588ec fix(wms): 修复首页汇总卡展示跳转和库存选择跨页勾选 2026-05-19 10:59:14 +08:00
YunaiV a098c201e1 fix(wms): 修复库存选择器跨页选择
- 合并 VXE 当前页勾选与 reserve 跨页保留记录
- 关闭或重开弹窗时清理 checkbox reserve 状态
- 补回双击库存行直接选择确认
2026-05-19 10:08:01 +08:00
YunaiV 8da5c12dfc fix(wms): 修复库存统计商品维度合并字段
- 对齐商品维度列字段为 itemId、skuId、skuWarehouseId
- 同步 antd/ele 的 spanMethod 合并字段
- 补充 WMS 迁移验证记录
2026-05-19 08:58:54 +08:00
YunaiV 3d0917f1a9 feat(wms):完成 inventory index 的迁移 2026-05-18 23:15:34 +08:00
YunaiV 0280df114f feat(wms):完成 inventory history 的迁移 2026-05-18 22:55:37 +08:00
YunaiV 6b61004b6a feat(wms):完成 md item 的迁移(antd 优化,ele 全部) 2026-05-18 22:46:47 +08:00
YunaiV 8d69e4d9f0 feat(wms):完成 md item 的迁移 2026-05-18 22:35:58 +08:00
YunaiV cd42a653c5 feat(wms):修复 inventory-select.vue、item-sku-select.vue 重叠的问题 2026-05-18 22:35:22 +08:00
YunaiV 56de1f1412 feat(iot):清理 defineOptions 冗余的 2026-05-18 22:34:31 +08:00
YunaiV 80f071d57f feat(wms):完成 antd、ele 的 inventory-select.vue 的迁移 2026-05-18 22:09:49 +08:00
YunaiV 68800c96d7 feat(wms):完成 antd、ele 的 item-sku-select.vue 的迁移 2026-05-18 22:07:32 +08:00
YunaiV 2dfa863d68 feat(wms):完成 antd、ele 的 category 的迁移 2026-05-18 21:57:19 +08:00
YunaiV 4cded0a674 feat(wms):完成 antd、ele 的 check 的迁移 2026-05-18 21:56:44 +08:00
xingyu4j aac626da32 feat: add system user view 2026-05-18 21:45:17 +08:00
YunaiV 584370358e feat(iot):优化 ota 的代码风格 2026-05-18 21:14:20 +08:00
YunaiV 76bed17ed9 feat(iot):优化 alert 的代码实现(继续) 2026-05-18 20:56:13 +08:00
YunaiV e9e534018f feat(iot):优化 alert 的代码实现(继续) 2026-05-18 20:35:07 +08:00
xingyu4j 5db93a345a fix: doc build error 2026-05-18 20:17:35 +08:00
xingyu4j 7c943cc06b chore: disable oxc typeAware and add --threads option for oxlint
Type-aware linting was consuming excessive memory with nearly all
type-aware rules turned off. Add --threads CLI option to control
oxlint parallelism.
2026-05-18 18:46:13 +08:00
xingyu4j 5c8dd1a6da chore: docs config 2026-05-18 18:35:34 +08:00
xingyu4j 6592135cc5 chore: update vitepress v2 2026-05-18 18:23:10 +08:00
xingyu4j 2f16ee7cf5 docs: use antdv-next 2026-05-18 17:30:59 +08:00
xingyu4j 0c1b737325 fix: fix lint && typecheck 2026-05-18 16:50:14 +08:00
xingyu4j 5bbdcffb97 Merge branch 'main' into antdv-next 2026-05-18 16:38:56 +08:00
xingyu4j 1867015e97 Merge branch 'antdv-next' of https://github.com/xingyu4j/vue-vben-admin into antdv-next 2026-05-18 16:35:28 +08:00
xingyu b6aeadd9a2
Merge branch 'main' into antdv-next 2026-05-18 16:35:18 +08:00
xingyu4j 1e44b87359 refactor: migrate playground deprecated antdv-next APIs
- Modal: destroyOnClose → destroyOnHidden
- Card: body-style → styles.body
- Alert: message prop/slot → title
- Spin: tip → description, wrapper-class-name → classes.root
2026-05-18 16:35:06 +08:00
xingyu4j a1081bf7a6 fix: 修复 InputNumber 组件宽度在表单中不占满的问题 2026-05-18 16:28:19 +08:00
xingyu4j 9bb2026b4d fix: 修复 InputNumber 组件宽度在表单中不占满的问题 2026-05-18 16:25:49 +08:00
xingyu4j 4554cd016a fix: lint 2026-05-18 16:19:53 +08:00
xingyu4j 350d5ee60e refactor: playground use antdv-next 2026-05-18 16:18:46 +08:00
xingyu4j 1ec058cbe3 chore: update deps 2026-05-18 15:06:59 +08:00
xingyu 709951e6db
!344 fix(@vben/web-antdv-next): 更新 antdv-next 依赖版本至 1.3.0,修复相关兼容性问题
Merge pull request !344 from XuZhiqiang/feat-antdv-next
2026-05-18 06:19:34 +00:00
YunaiV fbc03a9713 feat(wms):完成 antd、ele 的 movement 的迁移 2026-05-18 13:29:26 +08:00
YunaiV 1bbb7eb1d5 feat(wms):完成 antd、ele 的 shipment 的迁移 2026-05-18 13:13:29 +08:00
YunaiV 88515705dc feat(iot):优化 alert 的代码实现。 2026-05-18 12:36:58 +08:00
YunaiV 81b4690998 feat(iot):优化 device 的权限校验 2026-05-18 12:28:21 +08:00
YunaiV cfb1f8401e feat(iot):优化 IoT 请求的代码风格(thingmodel 界面调整引入) 2026-05-18 12:27:37 +08:00
YunaiV 5182cdbffa feat(iot):优化 IoT 请求的代码风格(device 界面调整引入) 2026-05-18 12:26:58 +08:00
YunaiV d649a617ac feat(iot):优化 IoT 请求的代码风格 2026-05-18 12:26:06 +08:00
YunaiV 71a23487f7 feat(iot):优化首页的设备统计实现 2026-05-18 08:55:39 +08:00
YunaiV 89f75428d6 feat(iot):增加 product/product 模块的代码评审 2026-05-18 08:54:44 +08:00
YunaiV 179881bd3d feat(iot):补充产品分类的 auth 操作校验 2026-05-18 08:50:23 +08:00
YunaiV 58f8b7fb22 feat(iot):增加 alert 模块的代码评审 2026-05-18 08:48:25 +08:00
YunaiV 6740401f6c fix(wms):完善 ep 的 order receipt 迁移(表单、详情) 2026-05-18 08:34:35 +08:00
YunaiV b42e9b36e5 feat(wms):优化 antd、ele 的 order receipt 迁移 2026-05-18 01:02:09 +08:00
YunaiV f8c2d4b1ff feat(wms):优化 antd、ele 的 order receipt 迁移 2026-05-17 23:56:05 +08:00
YunaiV 41d5aa93d6 feat(wms):新增 ele 的 order receipt 迁移 2026-05-17 23:40:00 +08:00
YunaiV 3135b28211 feat(全局):增加 number-range-input 组件 2026-05-17 23:35:31 +08:00
YunaiV 08511191f7 feat(wms):修复 print 顶部白块的问题,对齐 vue3 + ep 的样式 2026-05-17 23:15:16 +08:00
YunaiV 0246fa1ebc feat(wms):优化 order receipt 的实现,对齐 vue3 + ep 版本 2026-05-17 23:09:18 +08:00
YunaiV 0e4012c623 feat(全局):增加 barcode 二维码组件 2026-05-17 23:07:56 +08:00
YunaiV 4933180560 feat(wms):增加 receipt 功能、评审 2026-05-17 21:39:15 +08:00
XuZhiqiang aa577d84e9 fix(@vben/web-antdv-next): 更新 antdv-next 依赖版本至 1.3.0,修复相关兼容性问题 2026-05-17 20:13:14 +08:00
YunaiV 8710da9383 feat(wms):增加 wms 工具类 2026-05-17 19:09:01 +08:00
YunaiV 5a1f4901da feat(iot):优化 iot 设备管理的样式 2026-05-17 19:07:50 +08:00
YunaiV 3da4a3f417 feat(wms):将首页的枚举值去掉,统一合并到 constants 里,更聚焦点 2026-05-17 18:17:30 +08:00
YunaiV 84b91c6795 feat(iot):优化 iot 产品管理的样式 2026-05-17 18:11:31 +08:00
YunaiV 735ff018be feat(wms):增加 home 统计的迁移 2026-05-17 17:48:53 +08:00
YunaiV 0163794e3f feat(wms):增加 category 模块的迁移 2026-05-17 16:47:27 +08:00
YunaiV bb63ca9541 feat(wms):增加 brand 模块的迁移 2026-05-17 16:35:51 +08:00
YunaiV 6b28518165 feat(wms):迁移 api 接口 2026-05-17 16:30:50 +08:00
XuZhiqiang 0d7d7aea73 fix(@vben/web-antdv-next): 补充废弃 API 修复,补充缺失的组件导入
- 补充 TabPane 组件导入(约 48 个文件)
- 补充 TimelineItem 组件导入(3 个文件)
- Tabs tab-position → tab-placement,left → start
- Steps.Step 子组件 → items 数组模式
- TimelineItem #dot slot → #icon slot
- adapter Modal destroyOnClose → destroyOnHidden
- adapter visibleEvent onVisibleChange → onOpenChange
2026-05-17 11:03:47 +08:00
YunaiV 4adce844d3 feat(wms):增加 merchant 模块的迁移 2026-05-17 10:50:34 +08:00
YunaiV 19b5f38e23 feat(wms):增加 warehouse 模块的迁移 2026-05-16 23:12:33 +08:00
YunaiV 80fa8b74e8 feat:补齐 antd 的 component: 'InputNumber', 的 class full 样式 2026-05-16 22:46:16 +08:00
YunaiV 5710761dbe feat(wms):调整 README.md 2026-05-16 15:09:05 +08:00
YunaiV 877ba2727f feat(wms):调整 README.md 2026-05-16 14:56:01 +08:00
YunaiV 70a639967c feat:更新 README.md
- 提交时不再用节点表单值覆盖 data.variables;与预览阶段使用同一份合并变量
- onChange 加 useDebounceFn(300ms) + 请求序号去重,handleAudit 提交前 await 最新一轮重算
- 切换任务时重置请求序号与 pending 重算
- 改用 form-create 官方 formData() 取节点表单当前值
- 节点表单初始化等 fApi 就绪后再计算下一节点(until + 1s 兜底)

同步至 web-antd / web-ele 两端
2026-05-16 14:44:01 +08:00
XuZhiqiang 6cbbe88902 fix(@vben/web-antdv-next): 修复 antdv-next 废弃 API,迁移至新版本接口
将 ant-design-vue 旧版 API 统一迁移为 antdv-next 新版规范:
- Modal: destroy-on-close → destroy-on-hidden
- Card: :bordered="false" → variant="borderless",bodyStyle/headStyle → styles
- Popover: overlay-style → styles.root
- Divider: type → orientation
- Space: direction → orientation
- Alert: message → title
- Spin: tip → description
- Table: customRender → render
- notification: message → title
- Image preview: visible/onVisibleChange → open/onOpenChange
- adapter: visibleEvent onVisibleChange → onOpenChange
2026-05-16 13:35:20 +08:00
xingyu4j eb9cdbab9b fix: lint 2026-05-16 12:55:19 +08:00
xingyu4j 4907f281af chore: 更新 pnpm-workspace.yaml 配置,添加 publicHoistPattern 和 allowBuilds 设置 2026-05-16 11:56:39 +08:00
xingyu4j aadf9b6e39 chore: update deps 2026-05-16 11:52:20 +08:00
Jin Mao 84e77f64ea Merge remote-tracking branch 'origin/main' 2026-05-16 11:18:52 +08:00
guoqiangui 3e89077d46
fix(deploy): use IMAGE_NAME variable in remove_image instead of hardcoded name (#7907)
The `remove_image` function was using a hardcoded image name `vben-admin-pro`
instead of the `$IMAGE_NAME` variable (`vben-admin-local`), so the old local
image was never actually cleaned up before each build.

Co-authored-by: guoqiangui <guoqiangui@zhongshitech.cn>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 11:18:09 +08:00
Jin Mao c8c425538f Merge branch 'fork/xueyitt/main' 2026-05-16 10:49:33 +08:00
Jin Mao b04c10aab6 Merge branch 'fork/LayHuts/feature/vxe-table-viewed' 2026-05-16 10:48:00 +08:00
JyQAQ b5f79db321
fix(@vben/plugins): 修复 tiptap 重复注册扩展警告 (#7917)
StarterKit v3.22.0 已默认包含 Document、Link、Underline 扩展,
与单独导入产生重复注册,导致控制台警告:
[tiptap warn]: Duplicate extension names found: ['link', 'doc', 'underline']

- 移除 Document 单独导入和使用,StarterKit 已内置
- 移除 Underline 单独导入和使用,StarterKit 已内置
- StarterKit 配置中添加 link: false,禁用内置 Link,
  保留自定义配置的 Link.configure({...})
2026-05-16 10:45:30 +08:00
PanFu 42d82875ce
feat: 1、完善tree组件的全选状态不正确、全选没有label、item内容超长导致复选框对齐错乱、item内容超长没有tips无法看到完整内容的问题 (#7915)
Co-authored-by: PanFu <panfu@zhihuaai.com>
2026-05-16 10:44:55 +08:00
Akuria 4d8d2de6ad
fix: guard svg icon loading during docs SSR (#7912) 2026-05-16 10:43:47 +08:00
Akuria 294700a247
fix: skip fixed footer height in auto-content-height calculation (#7910)
* fix: skip fixed footer height in auto-content-height calculation

When the Page component's footer has position: fixed, it is removed
from the normal document flow and should not be subtracted from the
available content height. Previously, the footer's offsetHeight was
always subtracted, causing incorrect height calculation for fixed
footers.

Also reset shouldAutoHeight before recalculating to prevent stale
state on hot reload.

Fixes #4576

* fix: replace getComputedStyle footer height check with footerFixed prop

Use an explicit `footerFixed` boolean prop instead of runtime
getComputedStyle detection to determine whether the footer height
should be excluded from content height calculation. This avoids
unreliable style queries and makes the behavior deterministic.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 10:43:10 +08:00
Akuria f55b18ffd7
fix: update primary color when toggling dark/light mode with custom theme (#7909)
When a custom theme is selected and the user toggles between dark and
light mode, the primary color was not being recalculated. This was caused
by a guard condition in the builtin theme watcher that skipped updating
themeColorPrimary for custom themes during mode changes.

Remove the guard so that the primary color is always recalculated from
the theme preset when the mode changes, ensuring Element Plus CSS
variables stay in sync.

Fixes #6615
2026-05-16 10:42:35 +08:00
Akuria ca5931e8c4
fix: preserve tree default value when treeData starts empty (#7908)
When treeData is initially an empty array (e.g. before async data
arrives), updateTreeValue() would clear the modelValue because no
matching items could be found in the empty flattened data. This caused
default values to be lost.

Only call updateTreeValue() when flattenData has items, so that
modelValue is preserved until the actual tree data arrives.

Fixes #6522
2026-05-16 10:41:42 +08:00
XuZhiqiang ccfc122eae fix(@vben/web-antdv-next): 将依赖从 @form-create/ant-design-vue 改为 @form-create/antdv-next 2026-05-15 18:05:31 +08:00
xingyu 59183029b6
!341 fix: 修复禁用的删除按钮仍然可以点击的问题
Merge pull request !341 from li_shifeng/fix-dept-delete
2026-05-14 08:29:04 +00:00
xingyu e81ca2c13f
!343 fix(@vben/web-antdv-next): 修复 InputNumber 组件宽度在表单中不占满的问题
Merge pull request !343 from XuZhiqiang/feat-antdv-next
2026-05-14 08:03:20 +00:00
XuZhiqiang dcccef1c02 fix(@vben/web-antdv-next): 修复 InputNumber 组件宽度在表单中不占满的问题 2026-05-13 15:47:52 +08:00
XuZhiqiang 9a5bee4dce fix(@vben/web-antdv-next): adapter修正组件名称TextArea一致的大小写格式 2026-05-13 15:20:15 +08:00
xingyu 29665f02bf
!342 feat(@vben/web-antdv-next): migrate ant-design-vue to antdv-next
Merge pull request !342 from XuZhiqiang/feat-antdv-next
2026-05-12 13:46:18 +00:00
XuZhiqiang 06f776d1ef feat(@vben/web-antdv-next): 替换 antdv-next 中不可用的 List 组件,手动迁移为 div 结构,后续组件库新增 Listy 组件在进行替换 2026-05-12 16:37:42 +08:00
XuZhiqiang 40f0ba71f5 feat(@vben/web-antdv-next): migrate ant-design-vue to antdv-next
Migration Summary: ant-design-vue → antdv-next
Core Changes
package.json - Replaced "ant-design-vue": "catalog:" with "antdv-next": "catalog:"

bootstrap.ts - Changed @vben/styles/antd to @vben/styles/antdv-next

adapter/component/index.ts - Major rewrite:

Removed dynamic defineAsyncComponent imports from ant-design-vue/es/...
Added static imports from antdv-next main entry
Renamed RangePicker → DateRangePicker, Textarea → TextArea
Defined local types for Rule, Locale, UploadRequestOption, FileType, Key
Bulk Import Replacements (100+ files)
from ant-design-vue → from antdv-next
from ant-design-vue/es/locale/... → from antdv-next/locale/...
from ant-design-vue/es/... → removed (use main entry)
from ant-design-vue/lib/... → removed (use main entry)
Component API Differences Handled
ant-design-vue	antdv-next	Files affected
Form.Item	FormItem	475 references
Tabs.TabPane	TabPane	240 references
Select.Option	SelectOption	151 references
Descriptions.Item	DescriptionsItem	2 references
Timeline.Item	TimelineItem	2 references
Radio.Group	RadioGroup	20 references
Collapse.Panel	CollapsePanel	9 references
Layout.Content/Sider/Header/Footer	LayoutContent/LayoutSider/...	14 references
Dropdown#overlay slot	Dropdown#popupRender	6 references
RangePicker	DateRangePicker	15+ references
Textarea	TextArea	37 references
ButtonGroup	Space (fallback)	12 references
Known Issues (requires manual attention)
List component - Not available in antdv-next. 4 files have TODO comments where List/List.Item/List.Item.Meta are used
@form-create/ant-design-vue - Kept as-is (compatible with antdv-next at runtime)
Type errors - ~366 type errors remain (vs 189 in web-antd), mostly pre-existing business logic issues and minor API differences
2026-05-12 15:30:08 +08:00
XuZhiqiang 0fced45a9c refactor(@vben/web-antdv-next): 根据web-antd初始化web-antdv-next 2026-05-12 12:14:32 +08:00
li_shifeng 2ea7da06c5 fix: 修复禁用的删除任然可以点击的问题 2026-05-11 14:13:23 +08:00
JyQAQ aac4e88353
docs(@vben/docs): 添加 VCropper 图片裁剪组件文档 (#7904)
* docs(@vben/docs): 添加 VCropper 图片裁剪组件文档

- 新增中文文档 docs/src/components/common-ui/vben-cropper.md
- 新增英文文档 docs/src/en/components/common-ui/vben-cropper.md
- 新增基础用法示例 demos/vben-cropper/basic
- 新增固定比例裁剪示例 demos/vben-cropper/aspect-ratio
- 更新侧边栏配置添加 Cropper 入口

* fix: 更正跨域图片描述并修复 demo 内存泄漏

- 文档更正:网络图片导出裁剪结果需服务端 CORS 支持
- 修复 URL.createObjectURL 内存泄漏:添加 revokeObjectURL 释放
2026-05-11 12:50:44 +08:00
xueyitt 30356a24e6
fix: 修正vxtable不存在formConfig时,直接变更data失效问题
修正vxtable不存在formConfig时,直接变更data失效问题
2026-05-11 10:09:47 +08:00
MistyMoon ba60bc3c14
fix(@vben/layouts): correct logo theme in semi-dark sidebar (#7785) (#7902) 2026-05-10 10:41:43 +08:00
JyQAQ f5feddc6c7
feat(@vben/plugins): tiptap 组件新增 maxHeight 属性支持及文档 (#7897)
* feat(@vben/plugins): tiptap 组件新增 maxHeight 属性支持

- 新增 maxHeight prop 支持限制编辑器最大高度
- 编辑器内容区超出最大高度时自动滚动
- 移除 style.css 中未使用的 CSS 规则

* docs(@vben/plugins): 添加 tiptap 富文本编辑器组件文档

- 新增中文文档 docs/src/components/common-ui/vben-tiptap.md
- 新增英文文档 docs/src/en/components/common-ui/vben-tiptap.md
- 新增基础用法示例 demos/vben-tiptap/basic
- 新增图片上传示例 demos/vben-tiptap/image-upload
- 更新文档侧边栏配置

* fix(@vben/plugins): extract URL from response in image upload callback

The upload callback was incorrectly passing the AxiosResponse object
to resolve() instead of extracting the actual image URL string.
This caused the editor to insert [object Object] as image src,
resulting in broken images.

* chore: add changeset for tiptap maxHeight feature

* Revert "chore: add changeset for tiptap maxHeight feature"

This reverts commit a28fc4441f14641f6af6c1a143aa6959591315b2.
2026-05-10 10:38:21 +08:00
Yanghai.Lin 0868deb82b
fix: 修复 Input 组件 focus 边框被裁剪问题 (#7894)
* fix(other): 修复 oxlint ignorePatterns 导致 pre-commit hook 失败

* fix(@vben-core/shadcn-ui): 修复 Input 组件 focus 时边框被父容器 overflow hidden 裁剪

* fix(@vben-core/shadcn-ui): 修复 SelectTrigger 组件 focus 时边框被父容器 overflow hidden 裁剪
2026-05-10 10:37:39 +08:00
layhuts 1299acd8f9 fix: 获取已存在的 key,避免重复写入刷新过期时间 2026-05-09 23:27:25 +08:00
layhuts 43717807a4 style: reformat code 2026-05-09 23:18:44 +08:00
layhuts 1b4e126128 fix: 处理localStorageDriver在某些受限浏览器环境下报错导致无法使用 2026-05-09 23:10:05 +08:00
layhuts d23b246aee fix: 处理localStorage prefix === ''时提醒用户可能会全部删除数据 2026-05-09 23:04:38 +08:00
layhuts 71f2e5f504 fix: 去除onConfirm中的setTimeout 2026-05-09 22:51:39 +08:00
layhuts 4bbd34fab9 fix: 修复 labelField 和 nameField 2026-05-09 22:28:03 +08:00
layhuts 08e4bb40b4 style: reformat code 2026-05-09 18:28:23 +08:00
layhuts 9c49f4bb1e refactor: 优化viewed实例初始化,rowStyle rowClassName 从最新的配置中读取 2026-05-09 18:27:09 +08:00
layhuts 28905b0bec style: reformat code 2026-05-09 14:08:19 +08:00
layhuts bbcad709ca style: 修改注释 2026-05-09 14:07:30 +08:00
layhuts a5f0537cb0 fix: 处理viewedKeys由于 FIFO 顺序,显式提供的值可能会被异步存储恢复静默地移除。 2026-05-09 13:38:50 +08:00
layhuts c78d89f549 fix: 处理非原子性的先清除后写入操作会setKeys带来永久性数据丢失的风险 2026-05-09 13:16:50 +08:00
layhuts f2a17cbe78 fix: 处理getViewedKeys()返回对内部可变对象的直接引用问题 2026-05-09 13:10:41 +08:00
layhuts 9667232684 fix: 加上 - 分隔符来避免跨前缀误匹配 2026-05-09 12:56:50 +08:00
layhuts 1f584ff0c9 fix: 处理window不可用时降级使用Memory 2026-05-09 12:49:21 +08:00
layhuts 75ed17a1f9 docs: 更正saveToCache所属组件 2026-05-09 12:41:10 +08:00
layhuts cc6ccaab38 docs: 为符合 Markdown lint 规范,指定代码块语言。 2026-05-09 12:38:13 +08:00
layhuts 0be4b51eaa fix: 解决window在构造函数中进行访问破坏SSR/Node环境。 2026-05-09 12:33:15 +08:00
layhuts b40822e3ed fix: 解决indexedDB的getDB在失败重试时永远返回错误Promise问题 2026-05-09 12:02:41 +08:00
layhuts df5cb426d1 fix: 解决indexedDB的setItem、,removeItem以及clear在请求成功时而不是事务完成时触发resolve问题 2026-05-09 11:54:11 +08:00
layhuts 2d36d6b510 style: reformat code 2026-05-09 11:03:47 +08:00
layhuts 88d5661e0c refactor: 重构ViewedRowPersistOptions处理扁平化问题
改成按 type 字段区分的联合类型
2026-05-09 11:02:16 +08:00
layhuts 8ce773f264 feat: 在storage-manager添加keys方法 2026-05-09 10:58:41 +08:00
layhuts 329fa68207 fix: 手动操作行标记示例时动态获取列表前两行 2026-05-09 09:23:10 +08:00
layhuts e1f6449073 feat: 表格已读行操作标记 2026-05-08 20:03:05 +08:00
layhuts 51e8b27d4c style(@vben-core/shared): formatting 2026-05-08 17:36:47 +08:00
layhuts e555ee065e feat(@vben-core/shared): 新增indexedDB
在cache下新增indexedDB缓存
2026-05-08 17:34:54 +08:00
YunaiV c164904a14 chore: 合并 github/master,引入 PR #259 BPMN 流程设计器审批节点自定义配置编辑后丢失修复 2026-05-04 00:36:22 +08:00
芋道源码 a0ceb45df9
Merge pull request #259 from lb1565387341/fix_bpmn_custom_user_config
fix: [bpm][antd&ele] 修复流程设计器自定义配置编辑后丢失的问题
2026-05-04 00:26:29 +08:00
YunaiV c641542c71 fix(bpm):修正 BPM 流程实例审批弹窗网关分支重算的并发与提交问题
- 提交时不再用节点表单值覆盖 data.variables;与预览阶段使用同一份合并变量
- onChange 加 useDebounceFn(300ms) + 请求序号去重,handleAudit 提交前 await 最新一轮重算
- 切换任务时重置请求序号与 pending 重算
- 改用 form-create 官方 formData() 取节点表单当前值
- 节点表单初始化等 fApi 就绪后再计算下一节点(until + 1s 兜底)

同步至 web-antd / web-ele 两端
2026-05-03 16:35:03 +08:00
Lin b5dacd992f
feat: add time zone option to preference settings (#7871) 2026-05-03 12:16:58 +08:00
YunaiV a3d8e4bfc1 feat: 添加包含和不包含条件选项到常量定义 2026-05-03 11:04:58 +08:00
YunaiV e385823d46 fix: 修复 Vben5.0 form-create 多图上传校验拒绝 png/jpeg/gif,isImage 兼容 MIME 与扩展名两种 accept 写法 2026-05-02 22:56:38 +08:00
YunaiV 897220e19a fix: 修复 Vben5.0 download 接口 token 过期不触发刷新,导出/下载文件变成「账号未登录」JSON;web-antd / web-ele / web-naive / web-tdesign 加 Blob 业务错误嗅探拦截器 2026-05-02 20:36:00 +08:00
YunaiV b293e112c6 fix: 修复 MALL 商品保存时 SKU 价格被反复 *100 的漂移 2026-05-02 20:23:43 +08:00
YunaiV 627e31f1b0 fix: 修复 Vben5.0 CRM 合同配置 / 客户公海规则配置表单 label 错用 `labelClass: 'w-100'`,Tailwind v4 动态间距下被解析为 400px 撑爆 `w-1/4` 容器,挤掉 RadioGroup 输入区,改用 `labelWidth: 120` 2026-05-02 19:44:21 +08:00
YunaiV 8020b4b743 fix: 修复 MALL 商品列表/选择器「价格」列展示原始的「分」(web-antd / web-ele)
商品列表 [mall/product/spu/data.ts] 与商品选择器 [mall/product/spu/components/spu-select-data.ts]
的「价格」列原先 formatter: 'formatAmount2',只做了小数格式化、漏了「分转元」,导致
19900 直接显示成 19900.00(应为 199.00 元)。同文件的 marketPrice / costPrice 已正确使用
fenToYuan,唯独 price 漏了。

顺手将 spu/data.ts 的 price / marketPrice / costPrice 三列从手写闭包统一切到已注册的
formatFenToYuanAmount formatter,单位「元」从 cell 后缀挪进列标题(如「价格(元)」),
减少 8 处闭包并复用平台统一的 null/NaN 处理。
2026-05-02 19:38:50 +08:00
YunaiV 228c5463da fix: 修复 IoT 物模型表单 Form.Item 嵌套字段 name 误用点号字符串,事件类型等校验始终失败 / resetFields 写错路径 2026-05-02 19:27:35 +08:00
YunaiV 50ee691191 fix: 修复 web-ele 下 ApiSelect / ApiTreeSelect 误用 antd 的 fieldNames 写法导致下拉无内容
element-plus 适配器走 ApiComponent,识别的是 labelField / valueField / childrenField;
而 fieldNames 是 antd 风格写法,从 web-antd 复制过来未做适配,导致内部数据无法被映射成
{ label, value, children },下拉树/列表显示为空。

涉及:
- CRM 客户 / 联系人 / 线索 新增表单的「地址」树
- CRM 商机状态「应用部门」、产品「产品类型」树
- ERP 销售出库的 客户 / 销售人员 / 结算账户 / 产品 / 创建人 下拉
2026-05-02 18:55:48 +08:00
YunaiV eda6ffaf1e fix: 修复 web-ele 下 ApiSelect / ApiTreeSelect 误用 antd 的 fieldNames 写法导致下拉无内容
element-plus 适配器走 ApiComponent,识别的是 labelField / valueField / childrenField;
而 fieldNames 是 antd 风格写法,从 web-antd 复制过来未做适配,导致内部数据无法被映射成
{ label, value, children },下拉树/列表显示为空。

涉及:
- CRM 客户 / 联系人 / 线索 新增表单的「地址」树
- CRM 商机状态「应用部门」、产品「产品类型」树
- ERP 销售出库的 客户 / 销售人员 / 结算账户 / 产品 / 创建人 下拉
2026-05-02 18:53:11 +08:00
Jin Mao d55f17670a chore: 更新依赖包版本
- 更新 pkg-types 从 2.3.0 到 2.3.1
- 更新 rolldown 从 1.0.0-rc.15 到 1.0.0-rc.17
- 更新 typescript 从 6.0.2 到 6.0.3
- 更新 vite 从 8.0.8 到 8.0.10
2026-05-01 06:55:42 +08:00
Jin Mao 9f20d52b4e chore: 更新 FTP 部署操作版本
- 将 SamKirkland/FTP-Deploy-Action 从 v4.3.6 升级到 v4.4.0
- 所有部署任务中的 FTP 操作均已更新到新版本
- 保持了所有现有配置和凭据不变
2026-05-01 06:53:06 +08:00
Jin Mao 86445a38e4 Merge branch 'fork/jyqwq/feature/富文本支持图片上传' 2026-05-01 06:49:48 +08:00
leo 9a73e961fc
fix(@vben/stores): respect base URL when opening route in new window (#7837)
* fix(@vben/stores): respect base URL when opening route in new window

* fix(@vben/stores): respect base URL when opening route in new window
2026-05-01 06:49:05 +08:00
boisduval c0b2ef980e
fix: 修复 IconPicker 在手动输入时表单值不更新的问题 (#7869)
- 修复 IconPicker.vue 在 updateCurrentSelect 时未同步更新 modelValue 的 Bug
- 优化 IconPicker 适配器配置,使其兼容 Element Plus 的 ElInput 组件
2026-04-30 15:46:07 +08:00
mew e8dc464e79
fix: issue in tab bar chrome height is not full due to wrapper element `div` (#7867)
Caused by PR #7858
2026-04-30 15:45:44 +08:00
mew 99c38c93c8
feat: refactor context menu to capture native events (#7858)
* feat: refactor context menu to capture native events

prevent context-menu to show in html input fields

* fix: refactor context-menu.vue for improved structure

* chore: fix format

* chore: remove dead code

* chore: fix lint

* fix: update contenteditable selector in context menu

proposed fixed by coderabitai
2026-04-28 13:36:13 +08:00
yuan.ji 244c0a5884 fix(@vben/plugins): 根据代码审查意见修复 tiptap 图片上传
- 提取 findPlaceholderPos 辅助函数,消除重复的 descendants 查找
- 添加 editor.isDestroyed 守卫,防止操作已销毁编辑器
- renderHTML 不输出上传状态属性,防止 blob URL 泄露到序列化 HTML
- uploadImage 命令返回 boolean,添加 Commands 类型增强,移除 as any
- 拖拽/粘贴多图时仅处理第一张并提示仅支持单图上传
- 自定义 extensions 时不传 imageUpload 给工具栏,toolbar action 加运行时守卫
2026-04-27 14:33:30 +08:00
yuan.ji c6fd599784 feat(@vben/plugins): 补充 tiptap 图片上传类型、工具栏和示例
- 新增 ImageUploadOptions 类型定义和 imageUpload 属性
- 工具栏图片按钮支持上传/URL 双模式
- playground 添加图片上传 mock 示例
2026-04-27 13:42:56 +08:00
yuan.ji 4ca2f1c6e8 feat(@vben/plugins): tiptap 支持图片上传功能
- 新增 imageUpload 配置项,支持自定义上传接口
- 支持文件选择、拖拽、粘贴三种上传方式
- 上传中显示 blob 预览图 + loading spinner / 进度条
- 支持 accept 和 maxSize 文件校验
- 支持 onUploadError 自定义错误处理
- 未配置 imageUpload 时保持原有 URL 插入行为不变
- 使用 NodeView 实现实时 DOM 控制的进度展示
2026-04-27 13:42:36 +08:00
Jin Mao 36d7dc23fa Merge branch 'fork/zilvya/ta1' 2026-04-26 16:26:30 +08:00
Lgf 42317ddf41 feat(watermark): 添加暗黑模式水印颜色适配
为水印功能添加暗黑模式适配,根据当前主题自动切换水印颜色。在暗黑模式下使用浅色水印,在亮色模式下使用深色水印,提升视觉体验。
2026-04-24 15:42:07 +08:00
boisduval c7fd6ffb0e feat: 添加日期格式化函数的空值处理
- 当传入的时间参数为 undefined、null 或空字符串时,直接返回空字符串而不是继续执行格式化逻辑,避免无效的时间值导致程序错误。
2026-04-23 17:25:10 +08:00
AxiosLeo 3a83fb0c3e
fix: ensure trigger function is awaited in useDependencies (#7830) 2026-04-22 07:09:09 +08:00
AxiosLeo 5907c04e00
fix: update selector for active menu item in useMenuScroll hook (#7829) 2026-04-22 07:08:40 +08:00
Jin Mao 6885927441 chore: fix actions error 2026-04-15 18:49:07 +08:00
2ylllll c8c589ae7e
fix: type check (#7818) 2026-04-15 18:11:06 +08:00
Jin Mao d0889b5cc4 chore: 更新依赖包版本
- 更新 @tsdown/css 从 0.21.7 到 0.21.8
- 更新 @vitejs/plugin-vue 从 6.0.5 到 6.0.6
- 更新 dotenv 从 17.4.1 到 17.4.2
- 更新 globals 从 17.4.0 到 17.5.0
- 更新 happy-dom 从 20.8.9 到 20.9.0
- 更新 oxlint 从 1.59.0 到 1.60.0
- 更新 tsdown 从 0.21.7 到 0.21.8
2026-04-15 17:28:17 +08:00
Jin Mao 2f1a866cb4 chore: 更新 pnpm action 版本
- 将 .github/actions/setup-node/action.yml 中的 pnpm/action-setup 从 v4 升级到 v6
- 将 .github/workflows/ci.yml 中的 pnpm/action-setup 从 v5 升级到 v6
- 移除重复的 pnpm 安装步骤配置
- 统一使用最新的 pnpm action 版本以获得更好的兼容性
- 保持 run_install 配置为 false 以跳过自动安装依赖
2026-04-15 17:27:57 +08:00
Jin Mao fee32c1d12 chore: 优化通知组件逻辑
- 移除冗余的空值检查,简化数组长度判断条件
- 统一导入语句的引号格式为双引号
- 优化 VbenScrollbar 组件的显示条件逻辑
- 更新清除按钮的禁用状态判断逻辑
2026-04-15 17:22:39 +08:00
Jin Mao f2652833a1 Merge branch 'fork/xueyitt/main' 2026-04-15 17:20:10 +08:00
allen c3aa63982f fix: devtools warning 2026-04-15 16:44:13 +08:00
allen 4a968d9379 fix: devtools warning 2026-04-15 16:39:56 +08:00
allen ec9b323195 docs: demo注释修改 2026-04-15 14:54:40 +08:00
allen d69455e8ef fix: dependencies访问extendApi 2026-04-15 14:42:21 +08:00
allen 33e2582f60 fix: fix lint and add new form-ui features
feat(form-ui): 在 dependencies 里提供访问extendApi的能力
2026-04-15 14:21:39 +08:00
allen 991408b451 fix: default precision error 2026-04-13 21:08:03 +08:00
allen a096073a8e fix: lint 2026-04-13 20:43:29 +08:00
allen f30157fa59 fix: class 2026-04-13 20:41:43 +08:00
allen 12a81a7a7d fix: demo validator usage & types import 2026-04-13 20:15:47 +08:00
allen e808fe74c1 Merge branch 'feature-collapsible-component' of https://github.com/2yllll/vue-vben-admin into feature-collapsible-component 2026-04-13 19:44:45 +08:00
allen 4665a787a0 fix: collapsible component css fix 2026-04-13 19:44:21 +08:00
2ylllll b7774fc9d9
Merge branch 'main' into feature-collapsible-component 2026-04-13 19:26:23 +08:00
allen 6f18718c87 feat: add collapsible 组件,form表单增加单项可折叠,支持schema配置默认关闭/开启
feat: add collapsible 组件,form表单增加单项可折叠,支持schema配置默认关闭/开启
- shadcn-ui 增加 collapsible组件,collapsible-params组件
- form新增支持单项折叠
- collapsible-params组件在Form表单应用
2026-04-13 19:20:01 +08:00
Caisin 2a32715c99 feat: enable project-scoped preferences extension tabs (#7803)
* feat: enable project-scoped preferences extension tabs

Add a typed extension schema so subprojects can define extra settings,
render them in the shared preferences drawer only when configured, and
consume them in playground as a real feature demo. Extension labels now
follow locale keys instead of hardcoded app-specific strings.

Constraint: Reuse the shared preferences drawer and field blocks
Rejected: Add app-specific fields to core preferences | too tightly coupled
Rejected: Inline localized label objects | breaks existing locale-key flow
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Keep extension labels as locale keys rendered via $t in UI
Tested: Vitest preferences tests
Tested: Turbo typecheck for preferences, layouts, web-antd, and playground
Tested: ESLint for touched preferences and playground files
Not-tested: Manual browser interaction in playground preferences drawer

* fix: satisfy lint formatting for preferences extension demo

Adjust the playground preferences extension demo template so formatter and
Vue template lint rules agree on the rendered markup. This keeps CI green
without changing runtime behavior.

Constraint: Must preserve the existing demo behavior while fixing CI only
Rejected: Disable the Vue newline rule | would weaken shared lint guarantees
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Prefer computed/template structures that avoid formatter-vs-lint conflicts
Tested: pnpm run lint
Not-tested: Manual browser interaction in playground preferences extension demo

* fix: harden custom preferences validation and i18n labels

Tighten custom preferences handling so numeric extension fields respect
min, max, and step constraints. Number inputs now ignore NaN values,
and web-antd extension metadata uses locale keys instead of raw strings.
Also align tip-based hover guards in shared preference inputs/selects.

Constraint: Keep fixes scoped to verified findings only
Rejected: Broader refactor of preferences field components | not needed for these fixes
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Reuse the same validation path for updates and cache hydration
Tested: Vitest preferences tests
Tested: ESLint for touched preferences and widget files
Tested: Typecheck for web-antd, layouts, and core preferences
Not-tested: Manual browser interaction for all preference field variants

* fix: remove localized default from playground extension config

Drop the hardcoded Chinese default value from the playground extension
report title field and fall back to an empty string instead. This keeps
extension config locale-neutral while preserving localized labels and
placeholders through translation keys.

Constraint: Keep the fix limited to the verified localized default issue
Rejected: Compute the default from runtime locale in config | unnecessary for this finding
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Avoid embedding localized literals in extension default values
Tested: ESLint for playground/src/preferences.ts
Tested: Oxfmt check for playground/src/preferences.ts
Not-tested: Manual playground preferences interaction

* docs: document project-scoped preferences extension workflow

Add Chinese and English guide sections explaining how to define,
initialize, read, and update project-scoped preferences extensions.
Also document numeric field validation and point readers to the
playground demo for a complete example.

Constraint: Keep this docs-only and aligned with the shipped API
Rejected: Update only Chinese docs | would leave English docs inconsistent
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep zh/en examples and playground demo paths synchronized
Tested: git diff --check; pnpm build:docs
Not-tested: Manual browser review of the rendered docs site

* fix: harden custom preferences defaults and baselines

Use a locale-neutral default for the web-antd report title.
Also stop preference getters from exposing mutable baseline
or extension schema objects, and add a regression test for
external mutation attempts.

Constraint: Keep behavior compatible with the shipped preferences API
Rejected: Return raw refs with readonly typing only | callers could still mutate internals
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep defensive copies for baseline and schema getters unless storage semantics change
Tested: eslint, oxlint, targeted vitest, filtered typecheck, git diff --check
Not-tested: Full monorepo typecheck and test suite

* test: relax custom preference cache key matching

Avoid coupling the custom-number cache test to one exact
localStorage key string. Match the intended cache lookup
more loosely so the test still verifies filtering behavior
without depending on the full namespaced cache key.

Constraint: Focus the test on cache filtering behavior
Rejected: Assert one exact key | brittle with namespace changes
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Prefer behavior tests over literal storage keys
Tested: targeted vitest, eslint, git diff --check
Not-tested: Full monorepo test suite

---------

Co-authored-by: caisin <caisin@caisins-Mac-mini.local>
2026-04-13 17:52:17 +08:00
Caisin 46f323431c feat(form-ui): support schema valueFormat for getValues payload shaping (#7804)
* feat(@vben-core/form-ui): support schema valueFormat on getValues

Some form fields emit UI-friendly structures such as time-range arrays,
while consumers and backend APIs often need a different payload shape.
This adds schema-level `valueFormat` hooks so `getValues()` can
normalize field output at read time without forcing callers to
post-process every submission path.

Constraint: Must preserve existing range-time mapping and nested field behavior
Constraint: Must not mutate live vee-validate form state while formatting output
Rejected: Global formatter config | too coarse for per-field payload shaping
Rejected: Post-submit-only transform | misses reset/query/change handlers
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep `getValues()` output derivation side-effect free
Directive: Clone raw form values before formatting derived payloads
Tested: vitest form-api test for valueFormat and existing getValues paths
Tested: oxlint on changed form-ui source and test files
Not-tested: Full repo typecheck baseline has unrelated .vue module resolution errors

* fix(@vben-core/form-ui): restore mount compatibility and share field path parsing

Follow-up review found two real regressions and one missing assertion in the
new value formatting flow. `FormApi.mount()` had become breaking by requiring
`componentRefMap`, and delete path resolution duplicated field-name parsing
instead of sharing the reader grammar. This patch restores backward
compatibility, centralizes field-name path parsing, and extends the test to
prove formatting does not mutate live form values.

Constraint: Must preserve current valueFormat behavior and nested field support
Constraint: Must not reintroduce mutation of live vee-validate values
Rejected: Keep duplicated delete parsing | risks grammar drift from read path
Rejected: Only loosen mount tests | would leave consumer-facing API breakage
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Reuse shared field-name parsing for read/delete semantics in form-ui
Tested: vitest form-api test suite
Tested: oxlint on changed form-ui files
Not-tested: Full repo typecheck baseline has unrelated .vue module resolution errors
EOF && git push hekx feature-form-value-format

* fix(@vben-core/form-ui): clear stale component refs on unmount

A follow-up review found that `unmount()` left the private component ref map
populated. Because `mount()` now accepts an optional `componentRefMap`, a later
mount without a new map could silently reuse stale refs from a prior form
instance. This change clears the ref map on unmount and adds a regression test
covering remount behavior without a new ref map.

Constraint: Must preserve backward-compatible optional `mount()` ref map behavior
Constraint: Focus and field-ref lookups must not observe stale refs after unmount
Rejected: Clear refs only during next mount | stale state would still leak between lifecycle calls
Rejected: Remove mount fallback entirely | would undo the compatibility fix
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: When mount falls back to internal refs, unmount must always reset that cache
Tested: vitest form-api test suite
Tested: oxlint on changed form-api source and test files
Not-tested: Full repo typecheck baseline has unrelated .vue module resolution errors

* refactor(@vben-core/form-ui): trim redundant valueFormat plumbing

Review feedback identified a few small cleanups in the value formatting path.
This removes an unnecessary shallow clone in `getValues()`, reuses the
already-parsed `rawKey` from `resolveFieldNamePath()` instead of re-resolving
it in multiple helpers, and clarifies the `FormValueFormat` contract for
undefined-as-delete decomposition behavior.

Constraint: Must not change runtime valueFormat behavior or payload shape
Constraint: Documentation and helper cleanup should stay behavior-preserving
Rejected: Leave duplicate raw-key resolution in place | adds needless parsing churn
Rejected: Expand the formatter API further | outside the scope of this cleanup
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep read/format helper plumbing lean and avoid duplicate field-name parsing
Tested: vitest form-api test suite
Tested: oxlint on changed form-ui source and test files
Not-tested: Full repo typecheck baseline has unrelated .vue module resolution errors

* feat(@vben-core/form-ui): document valueFormat with live examples

The new `valueFormat` feature needed a concrete usage path in both the
playground and the docs so users can understand how raw component values differ
from the final payload returned by `getValues()`. This adds a dedicated form
example, wires it into the playground menu, and documents the API with an
interactive docs demo. The preview panels now stay in sync when values are set,
reset, or submitted.

Constraint: Must demonstrate both return-value and setValue decomposition flows
Constraint: Example previews must react to setValues, reset, and manual edits
Rejected: Only document via markdown snippet | insufficient for verifying live payload behavior
Rejected: Reuse an existing basic form page | would bury feature-specific behavior
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep playground and docs demos behaviorally aligned when extending valueFormat examples
Tested: eslint on playground/docs valueFormat demo files and route module
Tested: oxlint on playground route module
Not-tested: Full docs/playground app runtime was not launched in this session

* chore(@vben-core/form-ui): normalize valueFormat demo formatting

The previous feature/docs commit left a few formatter-only adjustments unstaged
after hooks rewrote line wrapping in the new demo and docs pages. This commit
captures those final non-behavioral formatting updates so the branch matches the
current working tree.

Constraint: Must not change runtime behavior or docs meaning
Rejected: Leave post-hook diffs unstaged | branch would not reflect local state
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: After hook-driven rewrites, verify the working tree is clean before final push
Tested: Git diff inspection of remaining changes
Not-tested: No additional runtime verification needed; formatting-only follow-up
EOF && git push hekx feature-form-value-format

* fix(@vben-core/form-ui): remove docs demo dayjs dependency

The docs valueFormat demo imported `dayjs` directly even though the docs
package does not declare it as a dependency. That caused `@vben/docs:build`
to fail in CI during VitePress bundling. This change removes the direct
import, keeps the preview formatter generic for day-like values, and drops
the docs-only preset button that required constructing dayjs instances.

Constraint: Docs build must succeed without adding new package dependencies
Constraint: Playground example should remain unchanged and fully interactive
Rejected: Add dayjs to docs dependencies | unnecessary for a small display demo
Rejected: Externalize dayjs in VitePress build | hides a package boundary issue
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Docs demos should avoid imports only available through transitive deps
Tested: pnpm exec eslint docs/src/demos/vben-form/value-format/index.vue
Tested: pnpm --dir docs run build
Not-tested: No browser-side manual verification of the docs demo in this session

---------

Co-authored-by: caisin <caisin@caisins-Mac-mini.local>
2026-04-13 17:52:17 +08:00
Caisin 2b1fcb038b feat(common-ui): add labelFn support to ApiComponent (#7801)
* feat: allow api-component labels to be derived from option data

ApiComponent already normalizes option records into the label/value shape used by
consuming controls, but label text could only come from a single field. Add
labelFn so callers can build labels from the full option record while keeping
labelField as the fallback path.

This keeps the change inside the existing component instead of introducing a
wrapper, and it also normalizes direct options through the same transform path
as API-loaded options for consistent behavior.

Constraint: Must extend the existing ApiComponent API instead of adding a second
Constraint: wrapper component
Rejected: Add a separate ApiLabelComponent wrapper |
Rejected: extra surface area for one option-mapping concern
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep labelFn as a presentation transform and preserve labelField
Directive: fallback for existing callers
Tested: pnpm exec eslint api-component.vue index.ts types.ts
Tested: pnpm exec vue-tsc --noEmit -p packages/effects/common-ui/tsconfig.json
Not-tested: runtime integration in consuming select/tree-select components

* Update packages/effects/common-ui/src/components/api-component/api-component.vue

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-04-13 17:52:17 +08:00
过冬 d779a39862 fix: antdv-next message/notification 跟随暗色主题 (#7799) 2026-04-13 17:52:17 +08:00
Jin Mao 0c8db0f6be fix: 修复VITE_APP_TITLE变量替换语法
- 将index.html中的<%= VITE_APP_TITLE %>替换为%VITE_APP_TITLE%
- 更新web-antd、web-antdv-next、web-ele、web-naive、web-tdesign应用
- 修改文档中loading组件的VITE_APP_TITLE引用方式
- 修复vite-config插件中默认加载模板的变量语法
- 统一所有应用和模板中的环境变量引用格式
2026-04-13 17:52:17 +08:00
Jin Mao 37393e1820 chore: fix actions error 2026-04-13 17:52:16 +08:00
xingyu4j 93e23c6b05 chore: update deps 2026-04-13 17:52:16 +08:00
xingyu4j e023a0852a fix: tailwindcss lint config 2026-04-13 17:52:16 +08:00
xingyu4j 306739cabb fix: lint 2026-04-13 17:52:16 +08:00
xingyu4j 093479bb33 chore: remove vite-plugin-html 2026-04-13 17:52:16 +08:00
xingyu4j bd369df3bc fix: check deps 2026-04-13 17:52:16 +08:00
xingyu4j 4f7b396ebb chore: update deps 2026-04-13 17:52:16 +08:00
xingyu4j d700b04841 fix: tailwindcss lint 2026-04-13 17:52:16 +08:00
xingyu4j 243456d928 fix: ts config 2026-04-13 17:52:16 +08:00
Jin Mao 7e8b9c2368 fix: 配置 TypeScript 构建根目录
- 添加 rootDir 编译选项指向 ./src 目录
- 保持现有编译配置不变
- 排除测试文件和 node_modules 目录
2026-04-13 17:52:15 +08:00
Jin Mao 92298bac2b chore: update deps 2026-04-13 17:52:15 +08:00
dullathanol 436a865bef chore: 修正注释 2026-04-13 17:52:15 +08:00
dullathanol 185011ee21 fix: tailwindcss config 2026-04-13 17:52:15 +08:00
过冬 feca01484b Merge branch 'vbenjs:main' into main 2026-04-13 17:52:15 +08:00
Jin Mao 35e1166b9f chore: fix lint 2026-04-13 17:52:15 +08:00
dullathanol d0c17090ef fix: 修正 Modal/Drawer 中 loading 属性注释 2026-04-13 17:52:15 +08:00
dullathanol cc32ebeb12 feat: 支持 overflow 配置以允许拖拽超出可视区 2026-04-13 17:52:15 +08:00
dullathanol 02372f12ba fix: 弹窗组件拖拽后全屏位置异常 2026-04-13 17:52:15 +08:00
Jin Mao e9bdbb610a chore: fix lint
- 关闭 vitest/require-mock-type-parameters 规则
2026-04-13 17:52:15 +08:00
dullathanol 2013ba4de4 fix: 补全 ComponentPropsMap 与 Vxe 表格表单链路的类型 2026-04-13 17:52:15 +08:00
dullathanol e417a2c209 fix: 修复 FormField 在 SFC 中的运行时异常 2026-04-13 17:52:14 +08:00
dullathanol f1273571c7 fix: 修复部分情况 component 类型丢失问题 2026-04-13 17:52:14 +08:00
dullathanol 064a6a20f0 feat: 表单 Schema 支持组件 Props 映射泛型,同步适配VxeGrid 2026-04-13 17:52:14 +08:00
dullathanol cb5e7e00f1 refactor: 简化 componentProps 回调的类型写法 2026-04-13 17:52:14 +08:00
dullathanol 5ed39c03a4 fix: 函数式 componentProps 按已注册 component 的 Props 校验返回值 2026-04-13 17:52:14 +08:00
dullathanol 794b103aa9 feat: Schema 中 componentProps 随注册组件联动类型提示 2026-04-13 17:52:14 +08:00
墨苒孤 c7b1bb3492 fix(form): 修复表单示例中 switch 组件无法切换的问题 (#7636) (#7763) 2026-04-13 17:52:14 +08:00
橙子 89349f8d91 fix: interface DropdownMenuProps don‘t have key prop (#7757) 2026-04-13 17:52:14 +08:00
HaroldZhangCode91 8e0b65a0e1 feat: fix oxlint error for oxlint upgrade (#7756)
1. remove unknown rule out of oxlint
2. add the corresponding back to eslint-config
3. fixed the eslint error for package.json
2026-04-13 17:52:13 +08:00
墨苒孤 b096e83f93 fix: make search case-insensitive (#7689) (#7755) 2026-04-13 17:52:13 +08:00
橙子 4a69c9e665 perf: replace `onUnMounted` to `tryOnScopeDispose` (#7747)
* perf: replace `onUnMounted` to `tryOnScopeDispose`

* perf: replace `onUnMounted` to `tryOnScopeDispose`
2026-04-13 17:52:13 +08:00
Jin Mao 7a60a081a2 chore: update deps 2026-04-13 17:52:13 +08:00
xingyu4j c693c854a7 fix: extension-document 2026-04-13 17:52:13 +08:00
xingyu4j 5eca357a5c feat(@vben/plugins): add tiptap rich text editor 2026-04-13 17:52:13 +08:00
xingyu4j 2930dcd78e chore: typescript config is expired‌ 2026-04-13 17:52:13 +08:00
xingyu4j e421d9d99b chore: update deps 2026-04-13 17:52:12 +08:00
xingyu f542db27f9
!340 feat: 商城订单发货后可再修改发货信息
Merge pull request !340 from hice/master
2026-04-13 08:47:29 +00:00
xingyu4j b2cf1646a4 fix: lint 2026-04-13 16:46:44 +08:00
xingyu4j adecddae67 Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin 2026-04-13 16:46:22 +08:00
xingyu4j a653e428f3 Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin 2026-04-13 16:45:32 +08:00
hice eb62e63a04 feat: 商城订单发货后可再修改发货信息 2026-04-13 16:31:48 +08:00
xueyitt 6c029bfa32
Merge branch 'main' into main 2026-04-13 16:10:29 +08:00
雪忆天堂 fe77bc8bc9 feat: 通知模块自定义加强 2026-04-13 16:05:42 +08:00
Caisin ccabbf0e97
feat: enable project-scoped preferences extension tabs (#7803)
* feat: enable project-scoped preferences extension tabs

Add a typed extension schema so subprojects can define extra settings,
render them in the shared preferences drawer only when configured, and
consume them in playground as a real feature demo. Extension labels now
follow locale keys instead of hardcoded app-specific strings.

Constraint: Reuse the shared preferences drawer and field blocks
Rejected: Add app-specific fields to core preferences | too tightly coupled
Rejected: Inline localized label objects | breaks existing locale-key flow
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Keep extension labels as locale keys rendered via $t in UI
Tested: Vitest preferences tests
Tested: Turbo typecheck for preferences, layouts, web-antd, and playground
Tested: ESLint for touched preferences and playground files
Not-tested: Manual browser interaction in playground preferences drawer

* fix: satisfy lint formatting for preferences extension demo

Adjust the playground preferences extension demo template so formatter and
Vue template lint rules agree on the rendered markup. This keeps CI green
without changing runtime behavior.

Constraint: Must preserve the existing demo behavior while fixing CI only
Rejected: Disable the Vue newline rule | would weaken shared lint guarantees
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Prefer computed/template structures that avoid formatter-vs-lint conflicts
Tested: pnpm run lint
Not-tested: Manual browser interaction in playground preferences extension demo

* fix: harden custom preferences validation and i18n labels

Tighten custom preferences handling so numeric extension fields respect
min, max, and step constraints. Number inputs now ignore NaN values,
and web-antd extension metadata uses locale keys instead of raw strings.
Also align tip-based hover guards in shared preference inputs/selects.

Constraint: Keep fixes scoped to verified findings only
Rejected: Broader refactor of preferences field components | not needed for these fixes
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Reuse the same validation path for updates and cache hydration
Tested: Vitest preferences tests
Tested: ESLint for touched preferences and widget files
Tested: Typecheck for web-antd, layouts, and core preferences
Not-tested: Manual browser interaction for all preference field variants

* fix: remove localized default from playground extension config

Drop the hardcoded Chinese default value from the playground extension
report title field and fall back to an empty string instead. This keeps
extension config locale-neutral while preserving localized labels and
placeholders through translation keys.

Constraint: Keep the fix limited to the verified localized default issue
Rejected: Compute the default from runtime locale in config | unnecessary for this finding
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Avoid embedding localized literals in extension default values
Tested: ESLint for playground/src/preferences.ts
Tested: Oxfmt check for playground/src/preferences.ts
Not-tested: Manual playground preferences interaction

* docs: document project-scoped preferences extension workflow

Add Chinese and English guide sections explaining how to define,
initialize, read, and update project-scoped preferences extensions.
Also document numeric field validation and point readers to the
playground demo for a complete example.

Constraint: Keep this docs-only and aligned with the shipped API
Rejected: Update only Chinese docs | would leave English docs inconsistent
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep zh/en examples and playground demo paths synchronized
Tested: git diff --check; pnpm build:docs
Not-tested: Manual browser review of the rendered docs site

* fix: harden custom preferences defaults and baselines

Use a locale-neutral default for the web-antd report title.
Also stop preference getters from exposing mutable baseline
or extension schema objects, and add a regression test for
external mutation attempts.

Constraint: Keep behavior compatible with the shipped preferences API
Rejected: Return raw refs with readonly typing only | callers could still mutate internals
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep defensive copies for baseline and schema getters unless storage semantics change
Tested: eslint, oxlint, targeted vitest, filtered typecheck, git diff --check
Not-tested: Full monorepo typecheck and test suite

* test: relax custom preference cache key matching

Avoid coupling the custom-number cache test to one exact
localStorage key string. Match the intended cache lookup
more loosely so the test still verifies filtering behavior
without depending on the full namespaced cache key.

Constraint: Focus the test on cache filtering behavior
Rejected: Assert one exact key | brittle with namespace changes
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Prefer behavior tests over literal storage keys
Tested: targeted vitest, eslint, git diff --check
Not-tested: Full monorepo test suite

---------

Co-authored-by: caisin <caisin@caisins-Mac-mini.local>
2026-04-13 15:11:57 +08:00
Caisin 5b84ac5b13
feat(form-ui): support schema valueFormat for getValues payload shaping (#7804)
* feat(@vben-core/form-ui): support schema valueFormat on getValues

Some form fields emit UI-friendly structures such as time-range arrays,
while consumers and backend APIs often need a different payload shape.
This adds schema-level `valueFormat` hooks so `getValues()` can
normalize field output at read time without forcing callers to
post-process every submission path.

Constraint: Must preserve existing range-time mapping and nested field behavior
Constraint: Must not mutate live vee-validate form state while formatting output
Rejected: Global formatter config | too coarse for per-field payload shaping
Rejected: Post-submit-only transform | misses reset/query/change handlers
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep `getValues()` output derivation side-effect free
Directive: Clone raw form values before formatting derived payloads
Tested: vitest form-api test for valueFormat and existing getValues paths
Tested: oxlint on changed form-ui source and test files
Not-tested: Full repo typecheck baseline has unrelated .vue module resolution errors

* fix(@vben-core/form-ui): restore mount compatibility and share field path parsing

Follow-up review found two real regressions and one missing assertion in the
new value formatting flow. `FormApi.mount()` had become breaking by requiring
`componentRefMap`, and delete path resolution duplicated field-name parsing
instead of sharing the reader grammar. This patch restores backward
compatibility, centralizes field-name path parsing, and extends the test to
prove formatting does not mutate live form values.

Constraint: Must preserve current valueFormat behavior and nested field support
Constraint: Must not reintroduce mutation of live vee-validate values
Rejected: Keep duplicated delete parsing | risks grammar drift from read path
Rejected: Only loosen mount tests | would leave consumer-facing API breakage
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Reuse shared field-name parsing for read/delete semantics in form-ui
Tested: vitest form-api test suite
Tested: oxlint on changed form-ui files
Not-tested: Full repo typecheck baseline has unrelated .vue module resolution errors
EOF && git push hekx feature-form-value-format

* fix(@vben-core/form-ui): clear stale component refs on unmount

A follow-up review found that `unmount()` left the private component ref map
populated. Because `mount()` now accepts an optional `componentRefMap`, a later
mount without a new map could silently reuse stale refs from a prior form
instance. This change clears the ref map on unmount and adds a regression test
covering remount behavior without a new ref map.

Constraint: Must preserve backward-compatible optional `mount()` ref map behavior
Constraint: Focus and field-ref lookups must not observe stale refs after unmount
Rejected: Clear refs only during next mount | stale state would still leak between lifecycle calls
Rejected: Remove mount fallback entirely | would undo the compatibility fix
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: When mount falls back to internal refs, unmount must always reset that cache
Tested: vitest form-api test suite
Tested: oxlint on changed form-api source and test files
Not-tested: Full repo typecheck baseline has unrelated .vue module resolution errors

* refactor(@vben-core/form-ui): trim redundant valueFormat plumbing

Review feedback identified a few small cleanups in the value formatting path.
This removes an unnecessary shallow clone in `getValues()`, reuses the
already-parsed `rawKey` from `resolveFieldNamePath()` instead of re-resolving
it in multiple helpers, and clarifies the `FormValueFormat` contract for
undefined-as-delete decomposition behavior.

Constraint: Must not change runtime valueFormat behavior or payload shape
Constraint: Documentation and helper cleanup should stay behavior-preserving
Rejected: Leave duplicate raw-key resolution in place | adds needless parsing churn
Rejected: Expand the formatter API further | outside the scope of this cleanup
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep read/format helper plumbing lean and avoid duplicate field-name parsing
Tested: vitest form-api test suite
Tested: oxlint on changed form-ui source and test files
Not-tested: Full repo typecheck baseline has unrelated .vue module resolution errors

* feat(@vben-core/form-ui): document valueFormat with live examples

The new `valueFormat` feature needed a concrete usage path in both the
playground and the docs so users can understand how raw component values differ
from the final payload returned by `getValues()`. This adds a dedicated form
example, wires it into the playground menu, and documents the API with an
interactive docs demo. The preview panels now stay in sync when values are set,
reset, or submitted.

Constraint: Must demonstrate both return-value and setValue decomposition flows
Constraint: Example previews must react to setValues, reset, and manual edits
Rejected: Only document via markdown snippet | insufficient for verifying live payload behavior
Rejected: Reuse an existing basic form page | would bury feature-specific behavior
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep playground and docs demos behaviorally aligned when extending valueFormat examples
Tested: eslint on playground/docs valueFormat demo files and route module
Tested: oxlint on playground route module
Not-tested: Full docs/playground app runtime was not launched in this session

* chore(@vben-core/form-ui): normalize valueFormat demo formatting

The previous feature/docs commit left a few formatter-only adjustments unstaged
after hooks rewrote line wrapping in the new demo and docs pages. This commit
captures those final non-behavioral formatting updates so the branch matches the
current working tree.

Constraint: Must not change runtime behavior or docs meaning
Rejected: Leave post-hook diffs unstaged | branch would not reflect local state
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: After hook-driven rewrites, verify the working tree is clean before final push
Tested: Git diff inspection of remaining changes
Not-tested: No additional runtime verification needed; formatting-only follow-up
EOF && git push hekx feature-form-value-format

* fix(@vben-core/form-ui): remove docs demo dayjs dependency

The docs valueFormat demo imported `dayjs` directly even though the docs
package does not declare it as a dependency. That caused `@vben/docs:build`
to fail in CI during VitePress bundling. This change removes the direct
import, keeps the preview formatter generic for day-like values, and drops
the docs-only preset button that required constructing dayjs instances.

Constraint: Docs build must succeed without adding new package dependencies
Constraint: Playground example should remain unchanged and fully interactive
Rejected: Add dayjs to docs dependencies | unnecessary for a small display demo
Rejected: Externalize dayjs in VitePress build | hides a package boundary issue
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Docs demos should avoid imports only available through transitive deps
Tested: pnpm exec eslint docs/src/demos/vben-form/value-format/index.vue
Tested: pnpm --dir docs run build
Not-tested: No browser-side manual verification of the docs demo in this session

---------

Co-authored-by: caisin <caisin@caisins-Mac-mini.local>
2026-04-13 11:22:04 +08:00
芋道源码 f610bd690b
!339 增加 iot、mes 的说明
Merge pull request !339 from 芋道源码/dev
2026-04-12 13:29:10 +00:00
YunaiV 76f9d3d9fc merge: 合并 master 分支,解决 isUrl 冲突(保留从 @vben/utils 导出的方式)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 21:27:05 +08:00
YunaiV 1e6c39a4c6 feat:增加 iot 模块 2026-04-12 21:24:37 +08:00
YunaiV 7a1f8da68f feat:增加 iot 模块 2026-04-12 21:24:19 +08:00
YunaiV 51cae9b00c feat(mes):增加 mes 模块 2026-04-12 16:45:38 +08:00
YunaiV 7cbeaa8390 feat(mes):增加 mes 模块 2026-04-12 16:44:53 +08:00
Caisin 6be3a0e204
feat(common-ui): add labelFn support to ApiComponent (#7801)
* feat: allow api-component labels to be derived from option data

ApiComponent already normalizes option records into the label/value shape used by
consuming controls, but label text could only come from a single field. Add
labelFn so callers can build labels from the full option record while keeping
labelField as the fallback path.

This keeps the change inside the existing component instead of introducing a
wrapper, and it also normalizes direct options through the same transform path
as API-loaded options for consistent behavior.

Constraint: Must extend the existing ApiComponent API instead of adding a second
Constraint: wrapper component
Rejected: Add a separate ApiLabelComponent wrapper |
Rejected: extra surface area for one option-mapping concern
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep labelFn as a presentation transform and preserve labelField
Directive: fallback for existing callers
Tested: pnpm exec eslint api-component.vue index.ts types.ts
Tested: pnpm exec vue-tsc --noEmit -p packages/effects/common-ui/tsconfig.json
Not-tested: runtime integration in consuming select/tree-select components

* Update packages/effects/common-ui/src/components/api-component/api-component.vue

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-04-12 14:29:18 +08:00
过冬 a9b76ba2ed
fix: antdv-next message/notification 跟随暗色主题 (#7799) 2026-04-12 11:51:23 +08:00
Jin Mao 53ccec1d80 fix: 修复VITE_APP_TITLE变量替换语法
- 将index.html中的<%= VITE_APP_TITLE %>替换为%VITE_APP_TITLE%
- 更新web-antd、web-antdv-next、web-ele、web-naive、web-tdesign应用
- 修改文档中loading组件的VITE_APP_TITLE引用方式
- 修复vite-config插件中默认加载模板的变量语法
- 统一所有应用和模板中的环境变量引用格式
2026-04-11 14:29:18 +08:00
Jin Mao 4af5d6152b chore: fix actions error 2026-04-11 14:13:13 +08:00
xingyu4j 307781f437 chore: update deps 2026-04-10 22:16:33 +08:00
xingyu4j 1326994d8e fix: tailwindcss lint config 2026-04-10 22:14:09 +08:00
xingyu4j fd70a3f3e0 fix: lint 2026-04-10 22:01:01 +08:00
xingyu4j 298930b0d7 chore: remove vite-plugin-html 2026-04-10 22:00:33 +08:00
xingyu4j 54d95b8761 fix: check deps 2026-04-10 21:23:24 +08:00
xingyu4j 4a16040d3e chore: update deps 2026-04-10 21:18:26 +08:00
xingyu4j ee95548340 fix: tailwindcss lint 2026-04-10 21:13:04 +08:00
xingyu4j 320e687bad fix: ts config 2026-04-10 21:08:54 +08:00
Jin Mao ad43c6817e fix: 配置 TypeScript 构建根目录
- 添加 rootDir 编译选项指向 ./src 目录
- 保持现有编译配置不变
- 排除测试文件和 node_modules 目录
2026-04-09 14:48:26 +08:00
Jin Mao c8747c079d chore: update deps 2026-04-08 18:25:39 +08:00
dullathanol 224bfe7fcb chore: 修正注释 2026-04-08 10:19:53 +08:00
dullathanol f443bfbc7b fix: tailwindcss config 2026-04-08 10:11:05 +08:00
过冬 195b2ea0d2
Merge branch 'vbenjs:main' into main 2026-04-08 09:34:24 +08:00
Jin Mao 4150479549 chore: fix lint 2026-04-08 07:20:52 +08:00
dullathanol 5ebf513498 fix: 修正 Modal/Drawer 中 loading 属性注释 2026-04-07 12:28:57 +08:00
dullathanol 4e4ffc439c feat: 支持 overflow 配置以允许拖拽超出可视区 2026-04-07 11:41:39 +08:00
dullathanol ad7ed50b52 fix: 弹窗组件拖拽后全屏位置异常 2026-04-06 22:26:27 +08:00
Jin Mao 92f8916225 chore: fix lint
- 关闭 vitest/require-mock-type-parameters 规则
2026-04-06 21:20:53 +08:00
dullathanol 7e4edd270d fix: 补全 ComponentPropsMap 与 Vxe 表格表单链路的类型 2026-04-05 19:03:03 +08:00
dullathanol 332ff44219 fix: 修复 FormField 在 SFC 中的运行时异常 2026-04-05 03:05:01 +08:00
dullathanol 834ce3efc0 fix: 修复部分情况 component 类型丢失问题 2026-04-05 01:59:17 +08:00
dullathanol 5211f5065d feat: 表单 Schema 支持组件 Props 映射泛型,同步适配VxeGrid 2026-04-04 23:40:27 +08:00
dullathanol 96d6f89732 refactor: 简化 componentProps 回调的类型写法 2026-04-03 15:02:32 +08:00
dullathanol 6ab06584eb fix: 函数式 componentProps 按已注册 component 的 Props 校验返回值 2026-04-03 13:36:03 +08:00
dullathanol a6433c2b50 feat: Schema 中 componentProps 随注册组件联动类型提示 2026-04-03 01:39:49 +08:00
墨苒孤 128a131797
fix(form): 修复表单示例中 switch 组件无法切换的问题 (#7636) (#7763) 2026-04-02 18:18:56 +08:00
橙子 c775d7ed80
fix: interface DropdownMenuProps don‘t have key prop (#7757) 2026-04-02 08:33:26 +08:00
HaroldZhangCode91 b8b4308e1c
feat: fix oxlint error for oxlint upgrade (#7756)
1. remove unknown rule out of oxlint
2. add the corresponding back to eslint-config
3. fixed the eslint error for package.json
2026-04-01 19:28:57 +08:00
墨苒孤 80d6e2255f
fix: make search case-insensitive (#7689) (#7755) 2026-04-01 19:17:36 +08:00
橙子 4e0968d4b7
perf: replace `onUnMounted` to `tryOnScopeDispose` (#7747)
* perf: replace `onUnMounted` to `tryOnScopeDispose`

* perf: replace `onUnMounted` to `tryOnScopeDispose`
2026-04-01 10:30:54 +08:00
Jin Mao 44a5809a46 chore: update deps 2026-04-01 08:10:49 +08:00
xingyu4j 2428fb1407 fix: extension-document 2026-03-30 19:50:44 +08:00
xingyu4j bb78882f72 feat(@vben/plugins): add tiptap rich text editor 2026-03-30 19:36:29 +08:00
xingyu4j df88a23102 chore: typescript config is expired‌ 2026-03-30 18:26:07 +08:00
xingyu4j ca5f360231 chore: update deps 2026-03-30 18:24:25 +08:00
Anonymouscen 147b50ec45
chore: 修复名称错误问题,帐户改为账户 (#7735) 2026-03-29 14:17:00 +08:00
橙子 34439dce4e
fix: history search can not remove (#7732) 2026-03-29 14:16:32 +08:00
Jin Mao 9a22027b35 chore: 更新 GitHub Actions 依赖版本
- 将 pnpm/action-setup 从 v4 升级到 v5
- 将 release-drafter/release-drafter 从 v6 升级到 v7
- 更新所有工作流中的依赖版本以确保兼容性
2026-03-25 17:58:47 +08:00
Jin Mao 282a102826 chore: fix lint 2026-03-25 17:31:33 +08:00
Jin Mao 417e6c2ade chore: fix lint && typecheck 2026-03-25 16:33:41 +08:00
Jin Mao 9d69d7f46c
Merge branch 'main' into chore/plugins 2026-03-25 15:19:21 +08:00
Jin Mao 87d1593a1f refactor(effects): 扩展 echarts 类型定义并优化插件配置合并逻辑
- 添加 PieSeriesOption 和 RadarSeriesOption 到 echarts 类型定义
- 添加 LegendComponentOption 和 ToolboxComponentOption 组件选项
- 重构 providePluginsOptions 函数实现深合并逻辑
- 优化 vxe-table 初始化中的表单工厂优先级处理
- 调整 playground 中的 import 语句顺序和格式
2026-03-25 15:16:24 +08:00
过冬 7fbdf3d914
fix(@vben/common-ui): 修复 JsonViewer 在 Vite 下因 CJS 默认导出未解包导致的渲染失败 (#7728)
* fix: lint

* fix(@vben/common-ui): 修复 JsonViewer 在 Vite 下因 CJS 默认导出未解包导致的渲染失败
2026-03-25 14:54:14 +08:00
JyQAQ 65287cf4b7
feat: Dockerfile构建调整 (#7727)
Co-authored-by: 吉远 <jiyuan@txhmo.com>
2026-03-25 14:53:26 +08:00
Jin Mao 6da3017dcf feat: 插件新增依赖注入功能 2026-03-25 14:46:55 +08:00
Jin Mao 5c02057198 refactor(effects): 替换上下文创建逻辑为全局选项管理
- 移除 createContext 依赖并实现全局插件选项存储
- 添加 providePluginsOptions 函数用于提供插件配置
- 添加 injectPluginsOptions 函数用于注入插件配置
- 添加 resetPluginsOptions 函数用于重置插件配置
- 更新 package.json 导出配置添加主入口点定义
2026-03-25 14:42:40 +08:00
Jin Mao a7ca7cdb9f refactor(vxe-table): 重构 useTableForm 函数实现并优化初始化逻辑
- 将 useTableForm 从箭头函数改为普通函数声明
- 简化表单工厂函数的获取逻辑,支持上下文注入
- 移除初始化时的重复上下文注入代码
- 改进错误提示信息的准确性
- 调整代码结构以提高可读性和维护性
- 将 SetupVxeTable 接口中的 useVbenForm 字段改为可选参数
2026-03-25 14:42:31 +08:00
Jin Mao 79408d406d feat: 添加插件模块导出
- 导出 types 模块
- 导出 plugins-context 模块
2026-03-25 13:33:12 +08:00
Jin Mao e555f71bf8 feat(vxe-table): 集成表格插件并优化初始化配置
- 添加了完整的 vxe-table 插件功能实现
- 实现了插件上下文选项注入机制
- 重构了 useTableForm 工厂函数的初始化逻辑
- 支持通过参数或上下文注入 useVbenForm 函数
- 优化了组件导入和类型定义
- 添加了插件使用文档说明
- 移除了未使用的组件注释代码
- 统一了字符串引号格式为双引号
2026-03-25 13:32:21 +08:00
Jin Mao 4c320346c3 docs(motion): 添加 motion 插件文档
- 创建了 Motion 插件的 README.md 文件
- 添加了插件导出组件和类型的说明表格
- 提供了插件的基本使用示例代码
- 包含了 MotionOptions 和 MotionVariants 类型导入说明
2026-03-25 13:27:10 +08:00
Jin Mao e5ec88169a refactor: 重构 ECharts 插件类型定义和导出结构
- 将 ECOption 类型定义移至独立的 types.ts 文件
- 修改 echarts.ts 文件导入 ECOption 类型而不是定义
- 更新 index.ts 添加 types 导出
- 移除 echarts.ts 中冗余的类型导入和定义
- 添加完整的 README.md 文档说明插件使用方法
- 优化代码组织结构提高可维护性
2026-03-25 13:27:02 +08:00
Jin Mao 914711ae04 feat: 添加插件上下文和类型定义
- 创建了插件选项的 createContext 功能
- 定义了 VbenPluginsOptions 接口结构
- 添加了表单、模态框、消息和组件的插件选项接口
- 提供了插件选项的注入和提供功能
2026-03-25 13:25:19 +08:00
Jin Mao 4c1e3b9548 Merge branch 'fork/Voidlurk/fix-default' 2026-03-24 10:36:40 +08:00
Jin Mao 9cd3987475
Merge branch 'main' into fix 2026-03-24 10:24:18 +08:00
xueyitt 47a853330d
feat: ApiSelect增加shouldFetch控制,在api请求之前的判断是否允许请求的回调函数 (#7713) 2026-03-24 10:22:02 +08:00
xueyitt 2aced2f659
feat: 增加table 帮助信息help通过表单values动态展示内容 (#7712) 2026-03-24 10:20:43 +08:00
Jin Mao cd955df02f chore: fix lint 2026-03-24 10:19:24 +08:00
Bk201 0a819df2bf
fix bug
[Vue warn]: Invalid prop: custom validator check failed for prop "variant".
2026-03-24 03:01:00 +08:00
xingyu4j 67afcadcf0 fix: rollup -> rolldown 2026-03-23 17:51:46 +08:00
xingyu4j 1128ef5acd chore: update deps 2026-03-23 17:13:39 +08:00
xingyu ca39b8d0c9
!337 Merge branch 'main' of <a href="https://gitee.com/link?target=https%3A%2F%2Fgithub.com%2Fvbenjs%2Fvue-vben-admin">https://github.com/vbenjs/vue-vben-admin</a> into vite8
Merge pull request !337 from xingyu/vite8
2026-03-23 08:57:12 +00:00
xingyu4j fece74f744 Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin into vite8 2026-03-23 16:55:27 +08:00
雪忆天堂 6b3506f128 feat: table 类型VxeTableGridColumns替代VxeTableGridOptions['columns']魔法值写法 2026-03-23 10:06:35 +08:00
雪忆天堂 5613dcef99 feat: table允许通过props动态变化data数据 2026-03-23 10:05:32 +08:00
MistyMoon 3528517fe0
fix(project): fix sub sidebar theme in two-column menu (#7708)
- Reset light tokens for nested sub sidebars.
- Align the extra title logo theme with sidebarThemeSub.
2026-03-22 09:15:56 +08:00
Jin Mao 2a5b520ec9 chore: update deps 2026-03-22 09:15:27 +08:00
lmx e2fb3602f1 fix: 修复菜单项外部链接跳转问题
- 引入 isHttpUrl 工具函数用于判断 URL 类型
- 添加 isHttp 计算属性检测父路径是否为 HTTP 链接
- 修改菜单项渲染逻辑,对外部链接直接使用原地址跳转
- 调整 HTML 结构,将链接属性移到正确位置
- 确保内部路由和外部链接都能正常工作
2026-03-19 23:56:13 +08:00
lmx da3580cbd7 Merge remote-tracking branch 'origin/main' 2026-03-19 22:07:20 +08:00
xingyu 0c300d040c
fix: tailwindcss config (#7693)
* chore: update deps

* fix: tailwindcss config

* fix: lint

* fix: lint

* chore: update deps
2026-03-19 15:51:09 +08:00
橙子 d43a3729c3
fix: playground(drawer) comment (#7695) 2026-03-19 09:03:40 +08:00
Jin Mao bed97a84d8 revert: "fix: sass-embedded@1.98.0 在 macOS 13 会直接崩 (#7692)" 2026-03-19 09:02:28 +08:00
afe1 b908076846
fix: sass-embedded@1.98.0 在 macOS 13 会直接崩 (#7692)
* fix: catelog

* fix: system
2026-03-18 20:18:25 +08:00
Noah Lan 885a0a9a00
fix: build.mjs commands could not be executed correctly. (#7682)
* fix: Fix issue where commands could not be executed correctly when they contained spaces

* chore: oxfmt
2026-03-17 18:59:35 +08:00
Jin Mao 340baf4f0b chore: 处理合并的一些问题 2026-03-16 20:50:01 +08:00
Jin Mao 82cda0edaa Merge branch 'fork/xingyu4j/tsdown'
# Conflicts:
#	pnpm-lock.yaml
2026-03-16 20:36:27 +08:00
Jin Mao 9fe875355a fix: 修复构建脚本中的进程执行问题
- 移除平台特定的 pnpm 命令路径检测逻辑
- 统一使用 'pnpm' 命令执行
- 启用 shell 模式以正确处理命令执行
- 确保子进程继承正确的标准输入输出流
2026-03-16 20:30:27 +08:00
Jin Mao 5f21bd2036 Merge branch 'fork/jyqwq/feature/antd上传组件支持拖拽排序' 2026-03-16 19:54:08 +08:00
Sun 5b5ea6d2d8
chore: Configure the ESLint auto-repair feature (#7670) 2026-03-16 18:26:42 +08:00
JyQAQ 3dcfd23036
perf: 裁剪组件默认输出格式调整 (#7673)
Co-authored-by: 吉远 <jiyuan@txhmo.com>
2026-03-16 18:25:04 +08:00
xingyu 186914bcac
fix: vxe i18n (#7675)
* chore: engines node

* chore: update deps

* fix: oxlint

* chore: fix lint issues

* chore: update deps

* fix: vxe i18n
2026-03-16 18:24:28 +08:00
吉远 4b3205fee8 feat: antd Upload 组件上传文件组支持拖拽排序 2026-03-16 15:01:43 +08:00
lmx e4453841db fix: 修复在vue-router 的模式hash复制路径不对 2026-03-16 01:32:11 +08:00
xingyu4j 32db4cbd11 fix: build warn 2026-03-15 23:11:59 +08:00
xingyu4j 5558249cd3 chore: unbuild 2026-03-15 23:11:41 +08:00
xingyu4j 86b636ae54 fix(@vben/vite-config): externalize node utils dependency 2026-03-15 22:47:28 +08:00
xingyu4j c9f7154524 chore(tsdown): remove unbuild leftovers 2026-03-15 22:04:48 +08:00
xingyu4j d72f872369 refactor(tsdown): migrate styled ui-kit packages 2026-03-15 21:42:44 +08:00
xingyu4j b300011d07 refactor(tsdown): migrate ui-kit vue packages 2026-03-15 21:30:13 +08:00
xingyu4j 3946253d6e chore(tsdown): align stub scripts and package exports 2026-03-15 21:17:41 +08:00
xingyu4j 11fc367845 chore: migrate vite build to tsdown 2026-03-15 21:04:12 +08:00
xingyu4j bdc65cc250 chore: update deps 2026-03-15 21:03:41 +08:00
xingyu4j 70dad0f600 fix(node-utils): avoid find-up sync API in monorepo root lookup 2026-03-15 20:50:07 +08:00
xingyu4j 26e9aa244b fix(vite): adapt rolldown workspace resolution 2026-03-15 20:27:01 +08:00
xingyu4j 913f77fd2f chore(pnpm): sync lockfile for tsdown migration 2026-03-15 19:41:17 +08:00
xingyu4j dba774e1c7 chore(vsh): migrate build to tsdown 2026-03-15 19:41:00 +08:00
xingyu4j af09d652a3 chore(turbo-run): migrate build to tsdown 2026-03-15 19:40:54 +08:00
xingyu4j 0babdfbc44 chore(core-preferences): migrate build to tsdown 2026-03-15 19:40:48 +08:00
xingyu4j f154d53be9 chore(core-composables): migrate build to tsdown 2026-03-15 19:40:42 +08:00
xingyu4j ed3cd2fe3b chore(core-typings): migrate build to tsdown 2026-03-15 19:40:36 +08:00
xingyu4j 59912a00bc chore(core-shared): migrate build to tsdown 2026-03-15 19:40:29 +08:00
xingyu4j 675d8b0179 chore(core-icons): migrate build to tsdown 2026-03-15 19:40:17 +08:00
xingyu4j a1ca296fc0 chore(node-utils): migrate build to tsdown 2026-03-15 19:40:09 +08:00
xingyu4j c1b1fe90fd chore(oxlint-config): migrate build to tsdown 2026-03-15 19:39:59 +08:00
xingyu4j 30b5610a73 chore(oxfmt-config): migrate build to tsdown 2026-03-15 19:39:51 +08:00
xingyu4j db9b9df8f7 chore(eslint-config): migrate build to tsdown 2026-03-15 19:39:43 +08:00
xingyu4j ae6a75e913 build: migrate core ts packages to tsdown 2026-03-15 18:13:49 +08:00
xingyu 37d72c1628
fix: oxlint config (#7661)
* chore: engines node

* chore: update deps

* fix: oxlint

* chore: fix lint issues
2026-03-15 17:41:47 +08:00
xingyu4j ab3e6bb37c chore: fix lint issues 2026-03-15 16:35:34 +08:00
xingyu4j 9ddb899a1a fix: oxlint 2026-03-15 16:23:18 +08:00
xingyu4j 1f0cda8aee chore: update deps 2026-03-15 12:35:42 +08:00
xingyu4j 90ae85317c chore: engines node 2026-03-15 12:33:23 +08:00
Jin Mao a8ae891aff chore: update pnpm-lock 2026-03-15 03:57:55 +08:00
Jin Mao 1f2df3e944 Merge branch 'fork/Lmx1220/main'
# Conflicts:
#	pnpm-lock.yaml
2026-03-15 03:53:43 +08:00
Jin Mao e39a432210 Merge branch 'fork/caodachen/fix_useEcharts' 2026-03-15 03:50:21 +08:00
xingyu4j 6b3bcee582 docs(@vben/docs): sync component docs with current APIs 2026-03-14 21:34:48 +08:00
xingyu4j 6c274b75b8 docs(@vben/docs): align guide docs with current tooling 2026-03-14 21:33:55 +08:00
xingyu4j 278032c94b docs: remove docs 2026-03-14 20:29:49 +08:00
xingyu4j 23a8982f5c chore: add prepare 2026-03-14 20:19:34 +08:00
xingyu4j 5df6c32d04 fix: lint 2026-03-14 20:14:35 +08:00
xingyu4j 7cae330c3c chore: deps 2026-03-14 19:48:49 +08:00
xingyu4j 100aaa4cee chore: vsh lint 2026-03-14 19:48:40 +08:00
xingyu4j ead0b73e7b fix: lint 2026-03-14 19:47:02 +08:00
xingyu4j 2ace846e38 chore: recommend vscode yaml extension 2026-03-14 19:41:28 +08:00
xingyu4j 1d98393f0c chore: recommend vscode eslint extension 2026-03-14 19:39:37 +08:00
xingyu4j c48ee2a364 revert: restore vscode extensions comments 2026-03-14 19:38:09 +08:00
xingyu4j 95d1e8432f fix: surface eslint diagnostics in vscode 2026-03-14 19:36:27 +08:00
xingyu4j 4d59ac78bd fix: lint 2026-03-14 19:34:22 +08:00
xingyu4j f1143e134e fix: match root json files in oxfmt overrides 2026-03-14 19:33:55 +08:00
xingyu4j e3e869faee fix: align oxfmt json commas with lint 2026-03-14 19:31:01 +08:00
xingyu4j 8350e72393 fix: align json formatter with lint rules 2026-03-14 19:28:25 +08:00
xingyu4j 15f74b9d97 refactor: drop unused turbo eslint shim 2026-03-14 19:20:39 +08:00
xingyu4j 55b54e24fe refactor: migrate command lint to oxlint 2026-03-14 19:13:50 +08:00
xingyu4j 46b4ce81e4 refactor: shrink eslint fallback layer 2026-03-14 19:10:22 +08:00
xingyu4j 7a723d03d0 fix: tailwindcss 2026-03-14 18:48:30 +08:00
xingyu4j 9d6fbfd0d6 refactor: replace simple px utility styles 2026-03-14 18:43:00 +08:00
xingyu4j 8fd6bf47b1 revert: restore px-based calc utilities 2026-03-14 18:36:31 +08:00
xingyu4j f25f3a34d0 refactor: replace px calc spacing utilities 2026-03-14 18:31:35 +08:00
xingyu4j 2823848fae refactor: migrate spacing utilities to tailwind v4 syntax 2026-03-14 18:27:16 +08:00
xingyu4j b9467b2bc3 chore: configure tailwind v4 dynamic spacing 2026-03-14 18:14:44 +08:00
xingyu4j fa190e0975 chore: checkpoint tailwind spacing updates 2026-03-14 18:11:08 +08:00
xingyu4j 90dc8cf997 chore: update deps 2026-03-14 17:52:40 +08:00
xingyu 53c5ccc00a
!336 chore: vite 8.0
Merge pull request !336 from xingyu/vite8
2026-03-14 05:40:10 +00:00
xingyu4j 06c9e8d7c1 fix: type check 2026-03-14 13:39:51 +08:00
xingyu4j f32818c6aa fix(lint): resolve shared form and utility warnings 2026-03-14 13:28:45 +08:00
xingyu4j fb03afb6b7 fix(lint): clean up ai rich text views 2026-03-14 13:28:13 +08:00
xingyu4j 577efa56a9 fix(lint): update bpmn designer compatibility code 2026-03-14 13:27:38 +08:00
xingyu4j cb98b3a47e fix(lint): add ts-expect-error descriptions 2026-03-14 13:27:00 +08:00
xingyu4j 8daf9a3ce5 docs: update version 2026-03-14 12:32:50 +08:00
xingyu4j a83d8248d7 fix: lint 2026-03-14 12:27:31 +08:00
xingyu4j 4cdc92f759 fix: lint 2026-03-14 12:16:31 +08:00
xingyu4j 54c668c3f0 chore: update deps 2026-03-14 11:37:28 +08:00
xingyu4j ac3fc6b7d3 Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin into vite8 2026-03-14 11:34:06 +08:00
Jin Mao a6a6efdf59 chore: release 5.7.0
- 更新 backend-mock 包版本
- 更新 web-antd 包版本
- 更新 web-antdv-next 包版本
- 更新 web-ele 包版本
- 更新 web-naive 包版本
- 更新 web-tdesign 包版本
- 更新 docs 包版本
- 更新 commitlint-config 包版本
- 更新 eslint-config 包版本
- 更新 oxfmt-config 包版本
- 更新 oxlint-config 包版本
- 更新 stylelint-config 包版本
- 更新 node-utils 包版本
- 更新 tsconfig 包版本
- 更新 vite-config 包版本
- 更新 @core/base/design 包版本
- 更新 @core/base/icons 包版本
- 更新 @core/base/shared 包版本
- 更新 @core/base/typings 包版本
- 更新 @core/composables 包版本
- 更新 @core/preferences 包版本
- 更新 @core/ui-kit/form-ui 包版本
- 更新 @core/ui-kit/layout-ui 包版本
- 更新 @core/ui-kit/menu-ui 包版本
- 更新 @core/ui-kit/popup-ui 包版本
- 更新 @core/ui-kit/shadcn-ui 包版本
- 更新 @core/ui-kit/tabs-ui 包版本
- 更新 constants 包版本
- 更新 access 包版本
- 更新 common-ui 包版本
- 更新 hooks 包版本
- 更新 layouts 包版本
- 更新 plugins 包版本
- 更新 request 包版本
- 更新 icons 包版本
- 更新 locales 包版本
- 更新 preferences 包版本
- 更新 stores 包版本
- 更新 styles 包版本
- 更新 types 包版本
- 更新 utils 包版本
- 更新 playground 包版本
- 更新 turbo-run 包版本
- 更新 vsh 包版本
- 更新根目录包版本
2026-03-14 09:14:23 +08:00
xingyu4j 8043faf6c7 docs: remove doc 2026-03-14 00:18:54 +08:00
xingyu4j ebed9e64ed fix: lint 2026-03-14 00:17:06 +08:00
xingyu4j 913636ae44 refactor: simplify oxc eslint compatibility 2026-03-14 00:16:27 +08:00
xingyu4j 7b064e9f33 chore: vsh lint 2026-03-13 23:41:17 +08:00
xingyu4j 16da0eaca3 fix: vsh lint 2026-03-13 23:31:19 +08:00
xingyu4j 6acfee2737 fix: vsh lint 2026-03-13 23:26:29 +08:00
xingyu4j 92abf7edaa chore: oxlint-tsgolint 2026-03-13 23:22:52 +08:00
xingyu4j 395babc1f5 feat: tsgolint 2026-03-13 23:13:10 +08:00
xingyu4j 68cde54bad feat: add tsgolint 2026-03-13 23:13:01 +08:00
xingyu4j c7d7529c00 chore: ts 2026-03-13 23:07:04 +08:00
xingyu4j 748f60c7bb chore: lint config 2026-03-13 22:12:15 +08:00
xingyu4j ffee62e940 chore(vscode): update workspace editor settings 2026-03-13 22:02:50 +08:00
xingyu4j a0ea221131 style(common-ui): normalize generic formatting 2026-03-13 21:57:18 +08:00
xingyu4j 2846bcb84e fix(common-ui): guard resize drag start state 2026-03-13 21:56:53 +08:00
xingyu4j 542ed6c08f refactor: rename formatter utilities 2026-03-13 21:56:23 +08:00
xingyu4j 6dabb848a5 build: migrate formatting pipeline to oxfmt 2026-03-13 21:56:08 +08:00
xingyu4j de0181e0d9 fix: lint 2026-03-13 20:58:07 +08:00
xingyu4j a850d426ef chore: fix lint and typecheck issues 2026-03-13 20:57:52 +08:00
xingyu4j 771277d5d9 fix: align oxlint compat config typing 2026-03-13 20:28:56 +08:00
xingyu4j 20b4f5c99f chore: oxlint config 2026-03-13 20:26:10 +08:00
xingyu4j e7fa87b301 chore: finalize oxlint migration config 2026-03-13 20:25:25 +08:00
xingyu4j 40c66958bc chore: remove un use deps 2026-03-13 15:59:04 +08:00
xingyu4j 600fc71aed fix: eslint 2026-03-13 15:58:53 +08:00
xingyu4j 443e4b04cd chore: update vite 8 2026-03-13 15:51:28 +08:00
Lmx1220 556a3c0fab
Update pnpm-lock.yaml 2026-03-13 15:25:14 +08:00
Lmx1220 1eca52f962
Update pnpm-lock.yaml
更新到使用vue3版本
2026-03-13 15:20:58 +08:00
Lmx1220 e21adb395b
Merge branch 'main' into main 2026-03-13 15:08:24 +08:00
xingyu4j 0e4bf80bf4 chore: update deps 2026-03-13 10:33:23 +08:00
cdc 107750971b fix: fix useEcharts 2026-03-10 21:48:33 +08:00
橙子 24e1be47ca
fix: fix component type (#7601) 2026-03-10 05:11:06 +08:00
Mr. Xie 7e0978c764
fix: 修复验证码登录发送逻辑,未校验手机号或发送失败仍开始倒计时的问题 (#7616) 2026-03-10 05:10:34 +08:00
Leo 83a0c9662d
fix: 修复路由重复 (#7590)
* fix: 修复路由重复

优化mixed模式路由合并逻辑。以backend 为基础,并从frontend补充

* fix: 修复名称冲突时子项合并顺序/覆盖(后端子项可能会丢失)。

* fix: 优化可访问性判断逻辑

* fix: error Forbidden non-null assertion

* refactor(access): 调整可访问性判断逻辑
2026-03-10 05:09:48 +08:00
xingyu a4736a49f8
feat: migrate to Tailwind CSS v4 (#7614)
* chore: update deps

* feat: use jsonc/x language

* chore: update eslint 10.0

* fix: no-useless-assignment

* feat: add CLAUDE.md

* chore: ignore

* feat: claude

* fix: lint

* chore: suppot eslint v10

* fix: lint

* fix: lint

* fix: type check

* fix: unit test

* fix: Suggested fix

* fix: unit test

* chore: update stylelint v17

* chore: update all major deps

* fix:  echarts console warn

* chore: update vitest v4

* feat: add skills ignores

* chore: update deps

* chore: update deps

* fix: cspell

* chore: update deps

* chore: update tailwindcss v4

* chore: remove postcss config

* fix: no use catalog

* chore: tailwind v4 config

* fix: tailwindcss v4 sort

* feat: use eslint-plugin-better-tailwindcss

* fix: Interference between enforce-consistent-line-wrapping, jsx-curly-brace-presence and Prettier

* fix: Interference between enforce-consistent-line-wrapping, jsx-curly-brace-presence and Prettier

* fix(lint): resolve prettier and better-tailwindcss formatting conflicts

* fix(tailwind): update theme references and lint sources

* style(format): normalize apps docs and playground vue files

* style(format): normalize core ui-kit components

* style(format): normalize effects ui and layout components
2026-03-10 05:08:45 +08:00
YunaiV 1cbdf442ee feat: 添加 URL 验证工具函数并优化 area-select 组件的类型定义 2026-03-07 17:33:02 +08:00
YunaiV f91a2702c9 merge: 合并 master 分支的 form-create 修复
合并 master 分支中关于 form-create 组件的修复,包括 area-select 和 iframe 组件的改进。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 11:32:54 +08:00
芋道源码 c885c0c71a
!333 fix(form-create): 【ele/antd】完成 vue3 review c153ff93 的所有 TODO 修复
Merge pull request !333 from puhui999/master-fix
2026-03-07 03:23:42 +00:00
YunaiV a8f67ab717 !335 fix: 修复上传头像时,如果图片加载失败,弹框一直loading的问题,针对 ele 版本 2026-03-07 11:21:03 +08:00
zouawen aa7d8630b5
fix: 侧边菜单栏拖拽优化 (#7606)
* fix: 拖拽使用遮罩层实现,使得拖拽到min或max临界值时cursor显示not-allowed,同时拖拽线条颜色变浅,类似于disabled,提升用户体验

* fix: 修复代码审查建议;修复lint和test报错

* fix: 修复遮罩层挡住hover:bg-primary视觉效果问题
2026-03-07 05:32:09 +08:00
lmx 36313f378e chore: update package.json and cspell.json 2026-03-04 19:17:33 +08:00
lmx 45054d3238 chore: update pnpm-lock.yaml 2026-03-04 19:03:41 +08:00
lmx 173e6b08c9 fix: 修复执行: check:cspell 命令路径参数传入没有转义导致检测路径失效。添加菜单右键功能。优化:多余监听 activePath 变化,自动滚动到激活项 watch 2026-03-04 18:25:15 +08:00
xingyu 75e4d07395
!335 fix: 修复上传头像时,如果图片加载失败,弹框一直loading的问题
Merge pull request !335 from li_shifeng/fix-upload-avatar
2026-03-04 02:21:33 +00:00
zouawen 2a86404ba5
fix: 修复混合双列布局侧边栏拖拽线条位置显示bug,同步修复普通布局和混合双列布局切换时width计算导致侧边栏宽度显示异常问题,新增普通布局和混合双列布局侧边栏菜单折叠状态同步 (#7596) 2026-03-02 15:31:29 +08:00
han b8a0199cde
feat(preferences): add toggle for copy preferences button (#7594)
Co-authored-by: hl <hl@nmcsoft.com>
2026-03-02 15:30:38 +08:00
Bryan Qiu a46ed55a86
fix: bump version to 5.6.0 (#7592) 2026-03-02 04:22:21 +08:00
Jin Mao 1a9fbddef4
Merge branch 'main' into main 2026-02-28 12:04:48 +08:00
zouawen 1209aaafb4 fix: 修复lint报错 2026-02-28 11:25:08 +08:00
zouawen 8e71261d49 fix: 侧边栏菜单拖拽功能在设置内增加开关 2026-02-28 11:19:24 +08:00
li_shifeng 586978f1b0 fix: 修复上传头像时,如果图片加载失败,弹框一直loading的问题 2026-02-28 10:00:39 +08:00
dependabot[bot] 49e45eab54
chore(deps): bump vue-router from 4.6.4 to 5.0.3 (#7583)
Bumps [vue-router](https://github.com/vuejs/router) from 4.6.4 to 5.0.3.
- [Release notes](https://github.com/vuejs/router/releases)
- [Commits](https://github.com/vuejs/router/compare/v4.6.4...v5.0.3)

---
updated-dependencies:
- dependency-name: vue-router
  dependency-version: 5.0.3
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-27 17:06:18 +08:00
Jin Mao bd22793ceb feat: add the attribute routeCached to route to control cache the DOM corresponding to the route 2026-02-27 16:04:01 +08:00
zouawen b2013436c5 fix: 优化最大值限制 2026-02-27 11:12:51 +08:00
zouawen cc808cb8c5 fix: 优化最小值限制 2026-02-27 11:07:28 +08:00
zouawen afffc4b3f0 fix: 优化侧边栏拖拽逻辑,支持展开和折叠 2026-02-27 10:54:15 +08:00
zouawen 99710ef9dc feat: 优化侧边栏拖拽逻辑 2026-02-26 18:11:53 +08:00
zouawen 3d4ae04d9b
Merge branch 'main' into main 2026-02-26 10:20:32 +08:00
zouawen 707b391449 feat: 侧边栏宽度拖拽改为composable实现,同时修复tabbar.ts文件lint报错 2026-02-26 10:09:57 +08:00
ming4762 45b843f344
fix: fix bug where `renderEcharts` gets stuck in a dead loop (#7561)
* 触发条件:echart所在页面开启keepalive 在其他页面切换颜色模式
2026-02-26 06:21:08 +08:00
Wu Clan 191fd90f06
chore: 更新表单描述显示样式 (#6938) 2026-02-26 06:17:04 +08:00
moil-xm 05920cd66d
feat(vite-config): vite export typing (#7569)
* feat(vite-config): vite export typing

* feat(vite-config): add type

---------

Co-authored-by: Jin Mao <50581550+jinmao88@users.noreply.github.com>
2026-02-26 06:14:12 +08:00
Jin Mao 01508d5e42 fix: fix lint 2026-02-26 05:45:36 +08:00
zouawen 57cf6cbc9e feature: 简易版菜单宽度拖拽功能 2026-02-25 17:50:22 +08:00
芋道源码 dd69d7c1a5
!334 feat(iot):增加 modbus 配置 100%
Merge pull request !334 from 芋道源码/dev
2026-02-14 03:04:43 +00:00
YunaiV 63743b6929 feat(iot):增加 modbus 配置 100% 2026-02-14 11:02:56 +08:00
YunaiV 38597dd19d feat(iot):增加 modbus 配置 50% 2026-02-14 09:19:43 +08:00
AxiosLeo 03ebbea46a
fix(menu): update hover color variable to use the correct reference (#7544)
* fix(menu): update hover color variable to use the correct reference

Medium Severity

In the horizontal .is-light menu section, --menu-item-hover-color is set to hsl(var(--menu-item-color)), but --menu-item-color is already defined as hsl(var(--accent-foreground)). This results in hsl(hsl(...)) at computed-value time, which is invalid CSS. The non-horizontal .is-light block correctly uses var(--menu-item-color) without the extra hsl() wrapper.

* fix(menu): simplify hover styles by removing redundant nested hover rules

Low Severity

The SCSS &:not(.is-active):hover { &:hover { ... } } compiles to a :hover:hover pseudo-class chain, which is functionally identical to a single :hover. The inner &:hover nesting is redundant and adds unnecessary complexity compared to placing styles directly inside the &:not(.is-active):hover block.
2026-02-12 22:22:53 +08:00
zouawen 8e7a5d1ec3
fix: Fix layout change, ensure div[ref="asideRef"] is contained within <aside> (#7551) 2026-02-12 22:22:34 +08:00
puhui999 e7365a4a00 fix(form-create): 【ele/antd】完成 vue3 review c153ff93 的所有 TODO 修复 2026-02-11 17:58:13 +08:00
AxiosLeo aa74a2535b
fix(tabbar): visitHistory field (#7543)
High Severity

The visitHistory field is a Stack<string> class instance persisted to sessionStorage via pinia-plugin-persistedstate. There's no custom serializer or hydration hook. When the page reloads, JSON.parse(JSON.stringify(stack)) produces a plain object {dedup, items, maxSize} that lacks all Stack methods (push, pop, remove, retain, etc.) and the size getter. Pinia's $patch replaces the Stack instance with this plain object, so subsequent calls like this.visitHistory.push(...) will throw a TypeError.
2026-02-11 16:09:37 +08:00
zouawen 32379ba4b7
fix: 双列菜单模式下新增深色侧边栏和深色侧边栏子栏 (#7542)
* fix: 双列菜单模式下新增深色侧边栏和深色侧边栏子栏

* fix: 修复报错 config.test.ts.snap

* fix: 修复lint报错

* fix: 修复侧边栏菜单文本内容溢出问题

* fix: 修复lint报错
2026-02-11 16:08:32 +08:00
xingyu bf4fed78f2
!332 Merge branch 'main' of <a href="https://gitee.com/link?target=https%3A%2F%2Fgithub.com%2Fvbenjs%2Fvue-vben-admin">https://github.com/vbenjs/vue-vben-admin</a> into dev
Merge pull request !332 from xingyu/dev
2026-02-11 03:12:23 +00:00
xingyu4j 722afc85df Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin into dev 2026-02-11 11:01:44 +08:00
xingyu 3036596d16
!331 Merge remote-tracking branch 'yudao/dev' into dev
Merge pull request !331 from Jason/dev
2026-02-10 14:34:20 +00:00
jason aee539f37e Merge remote-tracking branch 'yudao/dev' into dev 2026-02-10 22:08:57 +08:00
jason 05b41692ba feat: 移动端 uniapp 流程表单嵌入页面 2026-02-10 22:07:19 +08:00
moil-xm 7fe8d7b4be
fix: ts 错误: 类型实例化过深,且可能无限 2026-02-10 16:13:36 +08:00
Bin aace726a91
feat(playground): add antdv-next router link (#7532)
Co-authored-by: fuwb <fuwb@sunsharing.com.cn>
2026-02-10 13:09:34 +08:00
Jin Mao e6f6e5464a
Merge branch 'main' into main 2026-02-10 12:08:16 +08:00
Aliner 7d04b600fb
fix: correct updateDate to updateData in the echarts hook (#7538)
* fix(@vben/plugins): Fixed the misspelling of the data update method name in the echarts hook

Correct updateDate to updateData, ensuring that the API method name is correct and consistent

* Revert "fix(@vben/plugins): Fixed the misspelling of the data update method name in the echarts hook"

This reverts commit 86d679cf25631bd1abd56d4f971e6db3a9b9d6d5.

* fix(@vben/plugins): fixed the misspelling of the data update method name in the echarts hook

Correct updateDate to updateData, ensuring that the API method name is correct and consistent
2026-02-10 11:19:45 +08:00
xingyu 8a622889ff
!330 feat(form-create): 【ele/antd】新增 iframe 和省市区选择器组件
Merge pull request !330 from puhui999/master-fix
2026-02-10 01:32:01 +00:00
zouawen 463bfde2ac fix: config.test.ts.snap新增showRefresh参数 2026-02-10 08:50:06 +08:00
zouawen 893f74dc3e fix: 优化横向布局时菜单激活或聚焦时背景色,标签工具栏新增刷新按钮,其他样式优化 2026-02-09 16:32:02 +08:00
liubei e136679934 fix: [bpm][antd&ele] 修复流程设计器自定义配置编辑后丢失的问题 2026-02-09 15:35:53 +08:00
Jin Mao 8a215fbcc7 chore: release 5.6.0 2026-02-09 05:09:57 +08:00
Jin Mao ac5e4c4722 chore: update deps 2026-02-09 04:52:06 +08:00
Jin Mao 04d01b0bab chore: fix lint 2026-02-09 04:49:06 +08:00
Jin Mao cb1d7565a3 Merge branch 'fork/ffgenius/antd-vue-next' 2026-02-09 03:09:01 +08:00
Jin Mao 1d9b6407a4 chore: 更新开发环境端口号配置
- 将 VITE_PORT 从 5555 修改为 5999
- 保持其他环境变量配置不变
2026-02-09 03:04:42 +08:00
MistyMoon 22ed522711
feat: support `menuVisibleWithForbidden` in generate-routes-backend (#7526)
当后端菜单项 `meta.menuVisibleWithForbidden` 为 true 时,将其路由组件替换为 403 页,菜单仍展示该项,访问时展示 403,便于用户知悉功能并申请权限。
2026-02-09 02:44:29 +08:00
Jin Mao a3598ef859 chore: fix lint 2026-02-09 02:42:50 +08:00
Jin Mao 6fe09ec2dd perf: optimize the closing jump logic of tabs 2026-02-09 02:36:38 +08:00
Jin Mao 57911d9e09 Merge branch 'tab-2026020401' of https://github.com/ming4762/smart-boot-ui-vben into ming4762-tab-2026020401 2026-02-09 02:36:04 +08:00
Bin 3aee283495 Revert "feat(web): cancel `pnpm-lock.yaml` submission"
This reverts commit 54b24c2677.
2026-02-08 23:14:31 +08:00
Bin 54b24c2677 feat(web): cancel `pnpm-lock.yaml` submission 2026-02-08 23:12:40 +08:00
Bin 8cadad0a1e feat(web): add antdv-next model 2026-02-08 23:00:19 +08:00
zhongming4762 633c5f3cda perf: optimize the closing jump logic of tabs
* 依据tab访问历史回退上一个tab,原逻辑是返回一下个 或 上一个
 * 支持在配置中开启或关闭
2026-02-08 20:50:54 +08:00
zhongming4762 a8431e2040 perf: optimize the closing jump logic of tabs
* 依据tab访问历史回退上一个tab,原逻辑是返回一下个 或 上一个
 * 支持在配置中开启或关闭
2026-02-08 20:36:32 +08:00
zhongming4762 7a2b916387 perf: optimize the closing jump logic of tabs
* 依据tab访问历史回退上一个tab,原逻辑是返回一下个 或 上一个
 * 支持在配置中开启或关闭
2026-02-08 20:36:16 +08:00
puhui999 f3deefae56 Merge remote-tracking branch 'yudao/master' into master-fix 2026-02-08 11:57:23 +08:00
puhui999 d0a7065991 feat(form-create): 【ele/antd】新增 iframe 和省市区选择器组件
- 新增 iframe 网页嵌入组件,支持 URL 配置和实时预览
- 新增省市区三级联动选择器组件
- 支持 web-ele 和 web-antd 双版本
2026-02-08 11:56:02 +08:00
YunaiV 5b7e7c4d56 fix: 修复新增空目录菜单时 component 为 null 导致路由生成报错 2026-02-07 18:30:03 +08:00
Jin Mao f4dfb68b7b Merge branch 'MrLeo-main' 2026-02-06 15:41:55 +08:00
Jin Mao 8f4f27d860 Merge branch 'main' of https://github.com/MrLeo/vue-vben-admin into MrLeo-main 2026-02-06 15:39:48 +08:00
tikitoki e9eab29953
fix:fix password input icon visual bug in certain browser (#7521)
Co-authored-by: nick8799981325 <zc1078134211@163.com>
2026-02-06 15:28:48 +08:00
Leo Caan (陈栋) 4f1eeb7da5
fix: 修复设置default-expanded-level后无法check更低层级节点 logic and tree value updates (#7155)
假设缺省展开2级,当check 3级节点时,会触发effectWatch重新收缩到2级,并丢失check操作check操作andling.
2026-02-06 12:55:14 +08:00
Leo 6fd426d719 fix: 当 showToolbar 为 false 时禁用工具栏(vxe-table),减少无 Toolbar 的 Gird 留白 2026-02-04 22:20:17 +08:00
zhongming4762 331da3c8c7 perf: optimize the closing jump logic of tabs
* 依据tab访问历史回退上一个tab,原逻辑是返回一下个 或 上一个
2026-02-04 19:29:33 +08:00
ming4762 c48943bc67
fix: fix Nested Objects dependencies not effective (#7345) 2026-01-31 16:44:20 +08:00
芋道源码 f6c5bc4b7c
!329 同步最新代码(2026.01 发版前)
Merge pull request !329 from 芋道源码/dev
2026-01-29 15:54:36 +00:00
YunaiV 448f073143 review:【antd/ele】【bpm】工作流相关的代码 2026-01-29 21:20:24 +08:00
xingyu fc31aa3c8f
!328 表单设计器 UserSelect/DeptSelect 支持默认选中当前用户/部门、修复商品 SKU 名称校验失败的问题
Merge pull request !328 from puhui999/master-fix
2026-01-29 03:28:24 +00:00
xingyu 7680b33b99
fix: #7140 (#7153)
* chore: add yaml eslint validate

* chore: update deps

* fix: unused ts lint

* fix: 弹窗只能点击一次 #7140

* chore: update actions/checkout v6

* chore: update node version v22.22.0
2026-01-28 18:05:20 +08:00
puhui999 548da70f9f fix(mall): 【antd/ele】修复商品 SKU 名称校验失败的问题
前端创建/编辑商品时,SKU 对象缺少 name 字段初始化,导致提交时后端校验 "商品 SKU 名字不能为空" 失败。

修改内容:
- form/index.vue: 初始化 SKU 添加 name 字段,提交前校验商品名称并赋值给 SKU
- sku-list.vue: createEmptySku 函数添加 name 字段

影响范围:web-antd、web-ele 两个版本
2026-01-28 17:45:20 +08:00
puhui999 0441afc24f Merge remote-tracking branch 'yudao/master' 2026-01-28 17:37:04 +08:00
puhui999 1196dab9e4 feat(form-create): 【antd/ele】表单选择器支持默认选中当前用户/部门
- UserSelect 组件新增 defaultCurrentUser 配置,支持默认选中当前登录用户
- DeptSelect 组件重构为独立的树形选择器,支持 defaultCurrentDept 配置
- DeptSelect 支持 returnType 配置,可返回部门 ID 或部门名称
- 修复 useSelectRule 未将自定义 props 默认值传递给组件的问题
- 修复 DeptSelect 数据加载完成前回显失败的问题
- 同时支持 web-antd 和 web-ele 两个应用
2026-01-28 17:23:39 +08:00
xingyu 00bf48704d
!327 docs: README
Merge pull request !327 from xingyu/dev
2026-01-28 07:25:26 +00:00
xingyu4j 7a1218e6f0 fix: lint 2026-01-28 15:24:55 +08:00
xingyu4j dbb1a19c5d fix: lint 2026-01-28 15:24:49 +08:00
xingyu4j f433b207c6 docs: README lint 2026-01-28 15:24:44 +08:00
xingyu4j 82b91dfed3 fix: lint 2026-01-28 15:22:35 +08:00
xingyu4j 1295aee180 feta: add moddle cspell 2026-01-28 15:22:28 +08:00
xingyu4j 00105e1302 docs: README 2026-01-28 15:12:23 +08:00
xingyu e82433e3e7
!326 fix: 弹窗只能点击一次
Merge pull request !326 from xingyu/dev
2026-01-28 06:33:37 +00:00
xingyu4j ccaef2b591 fix: 弹窗只能点击一次 2026-01-28 14:32:06 +08:00
Jin Mao bb5d75bc7e
fix: 修复表单展开无效 (#7148)
- 修正模板中 ref 属性的引用名称
2026-01-27 11:35:50 +08:00
ming4762 528395e2c3
perf: optimizing hidden fields cannot trigger `dependencies` (#7142) 2026-01-26 16:12:26 +08:00
programmer 6a9012e5e4
chore: 给个人中心的2个按钮加上 i18n (#7138)
* fix: 个人中心按钮i18n

* fix: eslint format

* fix: 调整label宽度让英文显示在一行

* chore: 调整label小点

* fix: import

---------

Co-authored-by: Jin Mao <50581550+jinmao88@users.noreply.github.com>
2026-01-26 16:12:09 +08:00
橙子 6e8315ab40
fix: arguments order update (#7132)
Co-authored-by: Jin Mao <50581550+jinmao88@users.noreply.github.com>
2026-01-26 16:11:37 +08:00
xingyu 36aa195378
!325 remove playground
Merge pull request !325 from xingyu/dev
2026-01-26 07:08:43 +00:00
xingyu4j de2662ca8f fix: remove playground 2026-01-26 15:08:14 +08:00
xingyu 35acb9558b
!324 merge dev
Merge pull request !324 from xingyu/dev
2026-01-26 07:06:52 +00:00
xingyu4j c4a262d1e2 docs: README 2026-01-26 15:06:10 +08:00
xingyu4j a1e021074e docs: README 2026-01-26 15:03:32 +08:00
xingyu4j 0a7ead980a feat: naive add AutoComplete 2026-01-26 14:59:34 +08:00
xingyu4j cdcbd58f0e fix: ele auto complete 2026-01-26 14:35:53 +08:00
xingyu4j c57f3d8820 fix: ele auto complete 2026-01-26 14:34:45 +08:00
xingyu4j 02c977f969 fix: IDLPAD 2026-01-26 11:06:38 +08:00
xingyu4j a0019cef04 chore: update deps 2026-01-26 10:37:44 +08:00
xingyu4j e447a8a569 chore: remove unused deps 2026-01-26 10:34:58 +08:00
xingyu4j 071468b716 chore: yaml validate 2026-01-26 10:34:33 +08:00
xingyu4j 24b8bba754 fix: lint 2026-01-26 10:34:14 +08:00
xingyu4j 6d60071515 fix: lint sort 2026-01-26 10:33:23 +08:00
xingyu4j baed599fcc Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin into dev 2026-01-26 10:13:23 +08:00
Jin Mao 7cb2699f19 chore: 更新pnpm工作区配置
- 移除 neverBuiltDependencies 配置
- 移除 peerDependencyRules.allowedVersions 配置
- 重新整理 overrides 和 catalog 部分
- 保持 @ast-grep/napi 等依赖的目录引用配置
- 维持 eslint 版本约束在目录顶层配置中
2026-01-25 19:55:53 +08:00
YunaiV 1ce562601f feat(iot):【网关设备:80%】动态注册的初步实现(已测试) 2026-01-25 18:50:26 +08:00
Jin Mao 4b5da81ba6 chore(deps): 更新项目依赖包版本
- 更新 @playwright/test 从 1.57.0 到 1.58.0
- 更新 @tanstack/vue-query 从 5.92.8 到 5.92.9
- 更新 cheerio 从 1.1.2 到 1.2.0
- 更新 eslint-config-turbo 从 2.7.5 到 2.7.6
- 更新 playwright 从 1.57.0 到 1.58.0
- 更新 turbo 从 2.7.5 到 2.7.6
- 更新 vxe-pc-ui 从 4.12.10 到 4.12.12
- 更新 @babel/helper-define-polyfill-provider 从 0.6.5 到 0.6.6
- 更新 @cspell/dict-fullstack 从 3.2.7 到 3.2.8
- 更新 @cspell/dict-git 从 3.0.7 到 3.1.0
- 更新 @cspell/dict-node 从 5.0.8 到 5.0.9
- 更新 @cspell/dict-npm 从 5.2.29 到 5.2.30
- 更新 @parcel/watcher 相关包从 2.5.4 到 2.5.6
- 更新 @tanstack/query-core 从 5.90.19 到 5.90.20
- 更新 babel-plugin-polyfill 相关包到最新版本
- 更新 baseline-browser-mapping 从 2.9.17 到 2.9.18
- 更新 caniuse-lite 从 1.0.30001765 到 1.0.30001766
- 更新 electron-to-chromium 从 1.5.277 到 1.5.278
- 更新 eslint-plugin-turbo 从 2.7.5 到 2.7.6
- 更新 playwright-core 从 1.57.0 到 1.58.0
- 更新 turbo 平台特定版本到 2.7.6
- 更新 undici 从 7.19.0 到 7.19.1
2026-01-25 15:05:14 +08:00
Jin Mao 6aca9a9c99 test(dom): 更新元素可见区域计算的测试用例
- 修正了getElementVisibleRect函数的期望值断言
- 将bottom值从800更正为0以匹配实际计算结果
- 将left值从1100更正为0以匹配实际计算结果
- 将right值从1000更正为0以匹配实际计算结果
- 将top值从900更正为0以匹配实际计算结果
2026-01-25 14:22:22 +08:00
YunaiV c55465a6c0 chore: merge origin/dev branch 2026-01-24 09:31:43 +08:00
YunaiV 2ae684bdad feat(iot):【设备定位】添加设备位置功能,支持地图展示和坐标选择 2026-01-23 07:06:28 +00:00
haohao ce2bfa5cd2 refactor:【antd】【iot】将 DeviceSaveReqVO 和 DeviceRespVO 合并到 Device,简化设备 API 接口 2026-01-23 07:06:28 +00:00
jason 63265c1a6b feat: [bpm][antd] 审批签名大小控制 2026-01-23 07:06:28 +00:00
xingyu4j fa195fde8e fix: lint 2026-01-23 14:48:21 +08:00
xingyu4j 1057f2932b chore: update deps 2026-01-23 14:48:06 +08:00
Jin Mao b9224fc379
Merge branch 'main' into fix 2026-01-23 13:48:54 +08:00
Jin Mao 57dd818170 Merge branch 'fork/kuchaguangjie/fix' 2026-01-23 13:47:54 +08:00
Jin Mao 49256ec1b7
Merge branch 'main' into fix 2026-01-23 13:46:59 +08:00
Jin Mao f6f92e5403 Merge branch 'fork/kuchaguangjie/fix' 2026-01-23 13:45:38 +08:00
Jin Mao 613c311076 Merge branch 'fork/abcd0f/dev/sun-local' 2026-01-23 13:25:03 +08:00
Jin Mao 9ee7a7d9ff Merge branch 'fork/Child-qjj/patch-1' 2026-01-23 13:21:49 +08:00
橙子 44f8aed06d
fix: timer not need reactivity (#7128) 2026-01-23 13:16:09 +08:00
Sun d5d4a5c591 feat(effects-plugins): 添加 echarts 图表更新功能
新增 updateDate 方法用于更新 echarts 图表选项,支持合并配置、
完全替换和延迟更新等模式。该方法会在组件未初始化时自动执
行首次渲染,并能够合并全局配置如 backgroundColor 等选项。
2026-01-23 11:06:45 +08:00
yuhengshen 74381aa8c1
fix: 嵌套弹窗,错误 merge options (#7126) 2026-01-22 20:07:13 +08:00
橙子 203ee9b623
fix(@vben-core/shared): element outside viewport, the element visible rect each prop expect 0 (#7120)
* fix(@vben-core/shared): element outside viewport

* fix(@vben-core/shared): element outside viewport
2026-01-22 11:37:01 +08:00
xingyu 13b1ef71a9
!323 Merge remote-tracking branch 'yudao/dev' into dev
Merge pull request !323 from Jason/dev
2026-01-22 03:10:39 +00:00
jason ba08820be8 Merge remote-tracking branch 'yudao/dev' into dev 2026-01-21 23:28:00 +08:00
jason d9e933e3a6 feat: [bpm][antd] 审批签名大小控制 2026-01-21 23:25:48 +08:00
YunaiV 50216e5047 feat(iot):【设备定位】添加设备位置功能,支持地图展示和坐标选择 2026-01-21 21:10:09 +08:00
JyQAQ 6c8c49966a
Perf: 优化antd upload组件参数获取 (#7114)
* perf(antd upload params): 优化组件参数取值 确保不同调用场景配置参数可用

* perf(antd upload params): 优化组件参数取值 确保不同调用场景配置参数可用

* perf(antd upload params): 优化组件参数取值 确保不同调用场景配置参数可用

* perf(antd upload params): 优化组件参数取值 确保不同调用场景配置参数可用
2026-01-21 17:20:53 +08:00
芋道源码 4aeb7a489a
!322 refactor:【antd】【iot】将 DeviceSaveReqVO 和 DeviceRespVO 合并到 Device,简化设备 API 接口
Merge pull request !322 from haohaoMT/dev
2026-01-21 05:43:57 +00:00
Qiu 3862942e9f
fix: chart instance disposal condition
dom has been disposed in vue3 v-if,but chartInstance exist
2026-01-21 11:47:01 +08:00
xingyu 8571fc43b0
Merge branch 'main' into fix 2026-01-19 15:28:12 +08:00
JyQAQ 59aabd956d
Perf: Optimization of cropping component result acquisition & optimization of cropping frame prompts (#7111)
* perf(cropper): enhance image cropping functionality and add output type support

* perf(cropper): enhance image cropping functionality and add output type support
2026-01-19 14:18:36 +08:00
xingyu 9b09ba4483
Merge branch 'main' into fix 2026-01-19 10:54:43 +08:00
芋道源码 42f2fecb1e
!320 完成 mall、bpm 的全部迁移
Merge pull request !320 from 芋道源码/dev
2026-01-18 10:12:49 +00:00
YunaiV af0057940a feat:增加 allowedHosts 变量,允许 natapp 转发,对应 https://t.zsxq.com/kSg2A 2026-01-18 17:04:03 +08:00
YunaiV 9e3d75ae65 fix:【infra】代码生成:全选不生效的问题 2026-01-18 16:20:43 +08:00
YunaiV e5f5523bc6 fix:外链是子菜单时,路径不正确的问题,对应 https://t.zsxq.com/aE8AX 问题 2026-01-18 14:46:56 +08:00
YunaiV 4cc900f542 review:【antd/ele】【mall】商城相关的代码 2026-01-18 14:43:49 +08:00
芋道源码 ce34e6e1a0
!319 feat: [bpm][antd] todo 修改
Merge pull request !319 from Jason/dev
2026-01-17 09:09:11 +00:00
jason db1dfae481 feat: [bpm][antd] todo 修改 2026-01-17 15:47:31 +08:00
jason 012412ec22 feat: [bpm][antd] todo 修改 2026-01-17 15:31:54 +08:00
jason db97d414ec feat: [bpm][antd] todo 流程监听器、流程表达式修改 2026-01-17 12:09:46 +08:00
haohao 8bf286fda0 refactor:【antd】【iot】将 DeviceSaveReqVO 和 DeviceRespVO 合并到 Device,简化设备 API 接口 2026-01-16 17:38:02 +08:00
xingyu 91119eac8e
!318 fix:【ele/antd】修复更新个人信息后菜单丢失问题
Merge pull request !318 from zlflying/dev
2026-01-15 08:11:15 +00:00
橙子 686c3f9208
docs(@vben-core/preferences): update comments (#7107) 2026-01-14 19:36:45 +08:00
MRSWC 8a7e2bd8e4
fix:修复默认默认首页如果携带参数时刷新页面参数丢失问题 (#7102)
Co-authored-by: chenwei <chenw@jiuzhekan.com>
2026-01-14 15:38:55 +08:00
JyQAQ 174c4ae749
fix(antd Upload onChange Event): rewrite onChange event to handle upl… (#7098)
* fix(antd Upload onChange Event): rewrite onChange event to handle upload success or error messages

* fix(antd Upload onChange Event): rewrite onChange event to handle upload success or error messages

* fix(antd Upload onChange Event): rewrite onChange event to handle upload success or error messages
2026-01-14 15:38:21 +08:00
JyQAQ 67da9417a8
feat(upload prop:crop,aspectRatio): from Upload component accept prop… (#7095)
* feat(upload prop:crop,aspectRatio): from Upload component accept prop crop,aspectRatio

* feat(upload prop:crop,aspectRatio): from Upload component accept prop crop,aspectRatio

* feat(upload prop:crop,aspectRatio): from Upload component accept prop crop,aspectRatio

* feat(upload prop:crop,aspectRatio): from Upload component accept prop crop,aspectRatio
2026-01-14 15:38:05 +08:00
zlflying d5b49e6a3b fix:【ele/antd】修复更新个人信息后菜单丢失问题
Signed-off-by: zlflying <zlflying@qq.com>
2026-01-14 14:44:17 +08:00
芋道源码 c894617e10
!317 修复一些 review TODO 提到的问题
Merge pull request !317 from puhui999/dev-mall
2026-01-13 12:27:48 +00:00
puhui999 10f4641fee fix:【ele/antd】修复 setup() 函数没有接收 props 参数,导致渲染函数中的 props 无法从 formCreate 传递 2026-01-13 12:37:13 +08:00
puhui999 c478bef269 feat:【ele】cropper todo 优化,对齐 antd 2026-01-13 12:32:00 +08:00
puhui999 0302b70c48 feat:【antd/ele】Element Plus 的 value-format="x" 返回的值可以直接赋值,不需要 Number() 转换,与 antd 版本保持一致 2026-01-13 12:25:27 +08:00
puhui999 2426f891e7 feat:【antd/ele】将文章的商品关联字段从手动输入 SPU 编号改为使用 SpuShowcase 组件选择商品 2026-01-13 12:13:22 +08:00
puhui999 e2433fc531 feat:【antd/ele】使用 productSpuIds 和 productCategoryIds 自定义插槽的表单在验证前同步 formData 中的值到表单中 2026-01-13 12:06:10 +08:00
puhui999 bbc74ae663 feat:【antd/ele】discountActivity 移除 structuredClone 使用 cloneDeep 2026-01-13 11:55:13 +08:00
puhui999 ea79b7d6a1 feat:【antd】cropper-modal 删除多余的 Image 预加载逻辑 2026-01-13 11:33:11 +08:00
ppxb f4a4ced88d
fix: header auto mode issue (#7096) 2026-01-12 21:40:26 +08:00
ppxb 19b2d7af41
fix: tdesign theme toggle and demos (#7087) 2026-01-10 14:11:08 +08:00
yuhengshen 343d8a1c1e
fix: 切换时区后,页面不刷新 (#7085)
* fix: 切换时区后,页面不刷新

* fix: keep-alive 的页面,i18n 和 timezone 不更新
2026-01-10 14:10:27 +08:00
JyQAQ 9480f8272a
feat(common-ui cropper): Implement the image cropping component VCropper (#7082)
* feat(common-ui cropper): Implement the image cropping component VCropper

* feat(common-ui cropper): Implement the image cropping component VCropper

* feat(common-ui cropper): Implement the image cropping component VCropper

* feat(common-ui cropper): Implement the image cropping component VCropper

* feat(common-ui cropper): Implement the image cropping component VCropper
2026-01-10 14:08:15 +08:00
ppxb 0d9e260a6a
fix: vite.config.mts type error (#7081) 2026-01-10 14:07:28 +08:00
ppxb 51bca25345
fix(lint): pnpm format lint warning (#7080) 2026-01-10 14:06:03 +08:00
eric 694396dcfb refactor: move cleanup to finally block 2026-01-09 23:22:49 +08:00
eric 1cb53e943e refactor: 将跳转放到最后 2026-01-09 23:13:06 +08:00
eric 13c8318adc refactor: 1. 用 ref 包装 flag; 2. 在最后 清理 flag; 2026-01-09 23:05:05 +08:00
eric 48ed797055 fix: 防止 /logout 死循环 2026-01-09 22:38:11 +08:00
xingyu4j 3c2285141c chore: update deps 2026-01-06 13:58:42 +08:00
xingyu 49b884c0b1
Merge branch 'main' into fix 2026-01-06 13:50:26 +08:00
ppxb 24d20ca9ee
refactor: preference manager and export (#7068)
* fix: preferences drawer outline z-index

* refactor: preferencesManager and exports
2026-01-06 12:42:32 +08:00
wyc001122 6f02181024
fix(layout): 修复双列模式下重复显示logo的问题(#7071) (#7072) 2026-01-05 21:13:06 +08:00
YunaiV 17d5d1b889 review:【antd】【iot】设备管理相关 2026-01-05 20:45:39 +08:00
芋道源码 a5c76ef89d
!315 refactor:【antd】【iot】设备管理跟后端对齐,必要的 ReqVO、RespVO,子设备管理实现
Merge pull request !315 from haohaoMT/dev
2026-01-05 12:10:39 +00:00
YunaiV e622c052a9 feat:【antd/ele】菜单支持查询参数、iframe 内嵌功能 2026-01-05 19:35:01 +08:00
ppxb ed3353a271
fix: preferences drawer outline z-index (#7067) 2026-01-04 14:44:33 +08:00
haohao de28c5c4c2 refactor:【antd】【iot】设备管理跟后端对齐,必要的 ReqVO、RespVO,子设备管理实现 2026-01-04 12:25:25 +08:00
xingyu4j 965f5f96b7 chore: update deps 2026-01-04 11:03:19 +08:00
xingyu4j 61d9df7f58 feat: add cascader cspell:words 2026-01-04 11:00:07 +08:00
xingyu4j 231a5169ec fix: lint 2026-01-04 10:56:55 +08:00
xingyu4j ce7b7b910a Merge branch 'main' of https://github.com/xingyu4j/vue-vben-admin into fix 2026-01-04 10:56:14 +08:00
YunaiV f7f01c9280 feat:【antd/ele】生产环境下,默认开启 CAPTCHA 验证码,保证安全性 2026-01-03 19:20:25 +08:00
JyQAQ 81a61558cb
feat(upload prop:maxSize): from Upload component accept prop maxSize (AI prompt fixed) (#7059)
* feat(upload prop:maxSize): from component accept prop maxSize

* feat(upload prop:maxSize): from component accept prop maxSize

* feat(upload prop:maxSize): from component accept prop maxSize

* feat(upload prop:maxSize): from component accept prop maxSize
2026-01-03 13:19:40 +08:00
YunaiV a9f21c1acb feat:【system】菜单管理:增加 visible 管理字段 2026-01-02 19:50:38 +08:00
YunaiV 19c7f0d5dd feat: 【框架】更新 operate-log 的实现 2026-01-02 19:44:09 +08:00
YunaiV cd43149429 review:【antd/ele】【bpm】流程模型的迁移 2026-01-02 18:49:47 +08:00
YunaiV 19919f6685 Merge remote-tracking branch 'origin/dev' into dev
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2026-01-02 18:29:54 +08:00
YunaiV 036ef294db feat:【infra】代码生成:字典筛选时,支持 key、name 两种类型 2026-01-02 18:12:23 +08:00
ppxb 7d2bc2e885
fix: dropdown raido menu type error (#7062)
* fix: dropdown raido menu type

* chore: format code
2026-01-02 14:25:19 +08:00
luoqiz 89b237f6b4
feat: 添加上下文菜单演示,添加菜单项隐藏性 (#7057)
Co-authored-by: luoqiz <851092732@qq.com>
2026-01-02 14:22:19 +08:00
芋道源码 d8f685708d
!314 Merge remote-tracking branch 'yudao/dev' into dev
Merge pull request !314 from Jason/dev
2026-01-01 13:27:55 +00:00
jason f8ce09a203 Merge remote-tracking branch 'yudao/dev' into dev 2025-12-31 11:02:11 +08:00
jason 59d83d29cb feat: [bpm][ele] bpm oa 请假迁移 2025-12-31 11:00:13 +08:00
jason 02193755be feat: [bpm][antd] oa 请假优化 2025-12-31 00:04:40 +08:00
芋道源码 6d524906a3
!313 Merge remote-tracking branch 'yudao/dev' into dev
Merge pull request !313 from Jason/dev
2025-12-29 14:43:47 +00:00
jason cbd1f0bcbb Merge remote-tracking branch 'yudao/dev' into dev 2025-12-29 11:53:00 +08:00
jason 2ba2c8e986 feat: [bpm] [ele,antd] todo 优化, 更多设置问题修复 2025-12-29 11:51:48 +08:00
YunaiV 06f1ae1a66 review:【mall】营销相关 2025-12-29 08:17:35 +08:00
YunaiV 029b2ffaab review:【antd/ele】【mall】营销活动的实现 2025-12-29 07:03:00 +08:00
jason 64ac25de00 Merge remote-tracking branch 'yudao/dev' into dev 2025-12-29 00:12:30 +08:00
jason 6606dfd40a feat: [bpm][ele] todo 优化 2025-12-29 00:09:22 +08:00
芋道源码 6da4a39ff9
!312 feat:【ele/antd】mall todo 优化
Merge pull request !312 from puhui999/dev-mall
2025-12-28 13:23:18 +00:00
puhui999 aa95d0e87c feat:【ele/antd】profile todo 优化 2025-12-28 18:55:07 +08:00
puhui999 6353f0a8e9 feat:【ele/antd】discountActivity todo 优化 2025-12-28 18:34:28 +08:00
puhui999 e6327ae9da feat:【ele】spu todo 优化 2025-12-28 17:57:10 +08:00
puhui999 4395353c22 feat:【ele/antd】rewardActivity todo 优化 2025-12-28 17:35:43 +08:00
puhui999 c023ebbdb9 feat:【ele】cropper、form-create\rules todo 优化 2025-12-28 15:44:21 +08:00
xingyu4j af3fe53ec8 fix: type error 2025-12-22 17:50:06 +08:00
xingyu4j e981fb159f chore: update deps 2025-12-22 17:49:51 +08:00
xingyu 79b9d55854
Merge branch 'main' into fix 2025-12-22 16:42:15 +08:00
xingyu4j b2055a4457 chore: update deps 2025-12-17 13:47:37 +08:00
xingyu4j 7bf7e09002 fix: lint 2025-12-05 15:09:43 +08:00
xingyu4j de8d39ffed chore: workspace file is deprecated 2025-12-05 15:07:39 +08:00
xingyu4j 543a7e3962 chore: update deps 2025-12-05 14:55:44 +08:00
xingyu4j 9dfe3f5af8 fix: type not find 2025-12-04 18:03:55 +08:00
xingyu4j f11b08d8cb chore: update deps 2025-12-04 17:59:12 +08:00
xingyu4j 45b6f08984 chore: neverBuiltDependencies 2025-12-03 16:34:14 +08:00
xingyu4j 92a4676f8d chore: update version 2025-12-03 16:27:14 +08:00
xingyu4j 7bf7c0bb06 chore: remove unused deps 2025-12-03 16:26:58 +08:00
xingyu4j 8f8cf5b704 chore: update deps 2025-12-03 16:22:14 +08:00
xingyu4j 6be238430d chore: add cspell 2025-12-03 16:12:08 +08:00
xingyu4j f77216d8f4 feat: lint add pnpm config 2025-12-03 16:11:51 +08:00
xingyu4j d42a9b2409 feat: lint add yaml config 2025-12-03 16:01:27 +08:00
xingyu4j 6753834054 fix: lint 2025-12-03 15:37:33 +08:00
xingyu4j 77a4a64eb4 fix: stylelint 2025-12-03 15:37:20 +08:00
xingyu4j 49db40d557 feat: cspell sort 2025-12-03 15:37:04 +08:00
xingyu4j 0032c608f1 chore: update deps 2025-12-03 15:36:43 +08:00
xingyu4j fa603b32b1 fix: locales 2025-12-03 13:51:30 +08:00
3394 changed files with 363685 additions and 20388 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@ -6,10 +6,10 @@ runs:
using: 'composite'
steps:
- name: Install pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@v6
- name: Install Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: 'pnpm'

View File

@ -30,7 +30,7 @@ jobs:
- windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

View File

@ -25,7 +25,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

View File

@ -28,12 +28,12 @@ jobs:
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@v6
with:
run_install: false
@ -67,7 +67,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
@ -90,7 +90,7 @@ jobs:
- windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

View File

@ -57,7 +57,7 @@ jobs:
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL

View File

@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
@ -30,7 +30,7 @@ jobs:
run: pnpm build:play
- name: Sync Playground files
uses: SamKirkland/FTP-Deploy-Action@v4.3.6
uses: SamKirkland/FTP-Deploy-Action@v4.4.0
with:
server: ${{ secrets.PRO_FTP_HOST }}
username: ${{ secrets.WEB_PLAYGROUND_FTP_ACCOUNT }}
@ -43,7 +43,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
@ -54,7 +54,7 @@ jobs:
run: pnpm build:docs
- name: Sync Docs files
uses: SamKirkland/FTP-Deploy-Action@v4.3.6
uses: SamKirkland/FTP-Deploy-Action@v4.4.0
with:
server: ${{ secrets.PRO_FTP_HOST }}
username: ${{ secrets.WEBSITE_FTP_ACCOUNT }}
@ -67,7 +67,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
@ -85,7 +85,7 @@ jobs:
run: pnpm run build:antd
- name: Sync files
uses: SamKirkland/FTP-Deploy-Action@v4.3.6
uses: SamKirkland/FTP-Deploy-Action@v4.4.0
with:
server: ${{ secrets.PRO_FTP_HOST }}
username: ${{ secrets.WEB_ANTD_FTP_ACCOUNT }}
@ -98,7 +98,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
@ -116,7 +116,7 @@ jobs:
run: pnpm run build:ele
- name: Sync files
uses: SamKirkland/FTP-Deploy-Action@v4.3.6
uses: SamKirkland/FTP-Deploy-Action@v4.4.0
with:
server: ${{ secrets.PRO_FTP_HOST }}
username: ${{ secrets.WEB_ELE_FTP_ACCOUNT }}
@ -129,7 +129,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
@ -147,7 +147,7 @@ jobs:
run: pnpm run build:naive
- name: Sync files
uses: SamKirkland/FTP-Deploy-Action@v4.3.6
uses: SamKirkland/FTP-Deploy-Action@v4.4.0
with:
server: ${{ secrets.PRO_FTP_HOST }}
username: ${{ secrets.WEB_NAIVE_FTP_ACCOUNT }}

View File

@ -20,6 +20,6 @@ jobs:
if: github.repository == 'vbenjs/vue-vben-admin'
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
- uses: release-drafter/release-drafter@v7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -18,7 +18,7 @@ jobs:
steps:
- name: remove enhancement pending
if: github.event.label.name == 'enhancement'
uses: actions-cool/issues-helper@v3
uses: actions-cool/issues-helper-backup@d65454423c6fbbd20026b9b499d403f79422ac69
with:
actions: 'remove-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@ -27,7 +27,7 @@ jobs:
- name: remove bug pending
if: github.event.label.name == 'bug'
uses: actions-cool/issues-helper@v3
uses: actions-cool/issues-helper-backup@d65454423c6fbbd20026b9b499d403f79422ac69
with:
actions: 'remove-labels'
token: ${{ secrets.GITHUB_TOKEN }}
@ -36,7 +36,7 @@ jobs:
- name: needs reproduction
if: github.event.label.name == 'needs reproduction'
uses: actions-cool/issues-helper@v3
uses: actions-cool/issues-helper-backup@d65454423c6fbbd20026b9b499d403f79422ac69
with:
actions: 'create-comment, remove-labels'
token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -3,78 +3,48 @@ name: Create Release Tag
on:
push:
tags:
- 'v*.*.*' # Push events to matching v*, i.e. v1.0, v20.15.10
env:
HUSKY: '0'
- 'v*.*.*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to create (e.g. v1.2.3)'
required: true
type: string
permissions:
pull-requests: write
contents: write
jobs:
build:
release:
name: Create Release
if: github.repository == 'vbenjs/vue-vben-admin'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
# - name: Checkout code
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Install pnpm
# uses: pnpm/action-setup@v4
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# cache: "pnpm"
# - name: Install dependencies
# run: pnpm install --frozen-lockfile
# - name: Test and Build
# run: |
# pnpm run test
# pnpm run build
- name: version
- name: Extract version
id: version
run: |
tag=${GITHUB_REF/refs\/tags\//}
version=${tag#v}
major=${version%%.*}
echo "tag=${tag}" >> $GITHUB_OUTPUT
echo "version=${version}" >> $GITHUB_OUTPUT
echo "major=${major}" >> $GITHUB_OUTPUT
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
raw_tag="${{ inputs.tag }}"
else
raw_tag="${GITHUB_REF_NAME}"
fi
# Normalize: ensure v prefix
tag="${raw_tag}"
[[ "${tag:0:1}" != "v" ]] && tag="v${tag}"
version="${tag#v}"
major="${version%%.*}"
echo "tag=${tag}" >> "${GITHUB_OUTPUT}"
echo "version=${version}" >> "${GITHUB_OUTPUT}"
echo "major=${major}" >> "${GITHUB_OUTPUT}"
- uses: release-drafter/release-drafter@v6
- uses: release-drafter/release-drafter@v7
with:
version: ${{ steps.version.outputs.version }}
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: force update major tag
# run: |
# git tag v${{ steps.version.outputs.major }} ${{ steps.version.outputs.tag }} -f
# git push origin refs/tags/v${{ steps.version.outputs.major }} -f
# - name: Create Release for Tag
# id: release_tag
# uses: ncipollo/release-action@v1
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# generateReleaseNotes: "true"
# body: |
# > Please refer to [CHANGELOG.md](https://github.com/vbenjs/vue-vben-admin/blob/main/CHANGELOG.md) for details.

12
.gitignore vendored
View File

@ -22,7 +22,8 @@ yarn.lock
package-lock.json
.VSCodeCounter
**/backend-mock/data
.omx
.pnpm-store
# local env files
.env.local
.env.*.local
@ -50,3 +51,12 @@ vite.config.ts.*
*.sw?
.history
.cursor
# AI
.agent
.agents
.claude
.codex
skills-lock.json
.atomcode
datalog

View File

@ -1 +1 @@
22.1.0
22.22.0

12
.npmrc
View File

@ -1,13 +1 @@
registry=https://registry.npmmirror.com
public-hoist-pattern[]=lefthook
public-hoist-pattern[]=eslint
public-hoist-pattern[]=prettier
public-hoist-pattern[]=prettier-plugin-tailwindcss
public-hoist-pattern[]=stylelint
public-hoist-pattern[]=*postcss*
public-hoist-pattern[]=@commitlint/*
public-hoist-pattern[]=czg
strict-peer-dependencies=false
auto-install-peers=true
dedupe-peer-dependents=true

View File

@ -1,18 +0,0 @@
dist
dev-dist
.local
.output.js
node_modules
.nvmrc
coverage
CODEOWNERS
.nitro
.output
**/*.svg
**/*.sh
public
.npmrc
*-lock.yaml

View File

@ -1 +0,0 @@
export { default } from '@vben/prettier-config';

View File

@ -2,3 +2,7 @@ dist
public
__tests__
coverage
.codex
.claude
.agent
.agents

View File

@ -2,14 +2,18 @@
"recommendations": [
// Vue 3
"Vue.volar",
// ESLint JavaScript VS Code
// eslint VS Code
"dbaeumer.vscode-eslint",
// oxlint VS Code
"oxc.oxc-vscode",
// Visual Studio Code Stylelint
"stylelint.vscode-stylelint",
// 使 Prettier
"esbenp.prettier-vscode",
// 使 oxfmt
"oxc.oxc-vscode",
// dotenv
"mikestead.dotenv",
// YAML ESLint pnpm-workspace.yaml
"redhat.vscode-yaml",
//
"streetsidesoftware.code-spell-checker",
// Tailwind CSS VS Code

9
.vscode/launch.json vendored
View File

@ -2,6 +2,15 @@
"$schema": "https://json.schemastore.org/launchsettings.json",
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"name": "vben admin antd dev",
"request": "launch",
"url": "http://localhost:5999",
"env": { "NODE_ENV": "development" },
"sourceMaps": true,
"webRoot": "${workspaceFolder}/apps/web-antdv-next"
},
{
"type": "chrome",
"name": "vben admin antd dev",

59
.vscode/settings.json vendored
View File

@ -1,5 +1,6 @@
{
"tailwindCSS.experimental.configFile": "internal/tailwind-config/src/index.ts",
"tailwindCSS.experimental.configFile": "internal/tailwind-config/src/theme.css",
"tailwindCSS.lint.suggestCanonicalClasses": "ignore",
// workbench
"workbench.list.smoothScrolling": true,
"workbench.startupEditor": "newUntitledFile",
@ -31,39 +32,51 @@
"editor.autoClosingOvertype": "always",
"editor.autoClosingQuotes": "beforeWhitespace",
"editor.wordSeparators": "`~!@#%^&*()=+[{]}\\|;:'\",.<>/?",
"editor.quickSuggestions": {
"strings": "on"
},
// lint && format
"oxc.enable": true,
"oxc.typeAware": false,
"oxc.configPath": "oxlint.config.ts",
"oxc.fmt.configPath": "oxfmt.config.ts",
"eslint.useFlatConfig": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll.oxc": "explicit",
"source.fixAll.stylelint": "explicit",
"source.organizeImports": "never"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.defaultFormatter": "oxc.oxc-vscode",
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "oxc.oxc-vscode"
},
// extensions
"extensions.ignoreRecommendations": true,
@ -79,6 +92,7 @@
"files.insertFinalNewline": true,
"files.simpleDialog.enable": true,
"files.associations": {
"*.css": "tailwindcss",
"*.ejs": "html",
"*.art": "html",
"**/tsconfig.json": "jsonc",
@ -118,7 +132,7 @@
// search
"search.searchEditor.singleClickBehaviour": "peekDefinition",
"search.followSymlinks": false,
// 使/
// 使
"search.exclude": {
"**/node_modules": true,
"**/*.log": true,
@ -159,7 +173,7 @@
"emmet.triggerExpansionOnTab": false,
"errorLens.enabledDiagnosticLevels": ["warning", "error"],
"errorLens.excludeBySource": ["cSpell", "Grammarly", "eslint"],
"errorLens.excludeBySource": ["cSpell", "Grammarly"],
"stylelint.enable": true,
"stylelint.packageManager": "pnpm",
@ -167,9 +181,10 @@
"stylelint.customSyntax": "postcss-html",
"stylelint.snippet": ["css", "less", "postcss", "scss", "vue"],
"typescript.inlayHints.enumMemberValues.enabled": true,
"typescript.preferences.preferTypeOnlyAutoImports": true,
"typescript.preferences.includePackageJsonAutoImports": "on",
"js/ts.tsdk.path": "node_modules/typescript/lib",
"js/ts.inlayHints.enumMemberValues.enabled": true,
"js/ts.preferences.preferTypeOnlyAutoImports": true,
"js/ts.preferences.includePackageJsonAutoImports": "on",
"eslint.validate": [
"javascript",
@ -181,7 +196,8 @@
"markdown",
"json",
"jsonc",
"json5"
"json5",
"yaml"
],
"tailwindCSS.experimental.classRegex": [
@ -192,7 +208,7 @@
"*": false
},
"cssVariables.lookupFiles": ["packages/core/base/design/src/**/*.css"],
"cssVariables.lookupFiles": ["packages/@core/base/design/src/**/*.css"],
"i18n-ally.localesPaths": [
"packages/locales/src/langs",
@ -217,12 +233,9 @@
"*.env": "$(capture).env.*",
"README.md": "README*,CHANGELOG*,LICENSE,CNAME",
"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,.gitattributes,.gitignore,.gitpod.yml,.npmrc,.browserslistrc,.node-version,.git*,.tazerc.json",
"eslint.config.mjs": ".eslintignore,.prettierignore,.stylelintignore,.commitlintrc.*,.prettierrc.*,stylelint.config.*,.lintstagedrc.mjs,cspell.json,lefthook.yml",
"tailwind.config.mjs": "postcss.*"
"oxlint.config.ts": ".eslintignore,.stylelintignore,.commitlintrc.*,stylelint.config.*,.lintstagedrc.mjs,cspell.json,lefthook.yml,oxfmt.config.*,eslint.config.*"
},
"commentTranslate.hover.enabled": false,
"commentTranslate.multiLineMerge": true,
"vue.server.hybridMode": true,
"typescript.tsdk": "node_modules/typescript/lib",
"oxc.enable": false
"vue.server.hybridMode": true
}

234
README.md
View File

@ -9,7 +9,7 @@
## 🐶 新手必读
- nodejs > 20.12.0 && pnpm > 10.22.0 (强制使用pnpm)
- nodejs >= v20.19.0(推荐 v22 / v24 && pnpm >= 10.32.1(强制使用 pnpm
- 演示地址【Vue3 + element-plus】<http://dashboard-vue3.yudao.iocoder.cn>
- 演示地址【Vue3 + vben5(ant-design-vue)】:<http://dashboard-vben.yudao.iocoder.cn>
- 演示地址【Vue2 + element-ui】<http://dashboard.yudao.iocoder.cn>
@ -20,12 +20,12 @@
**芋道**,以开发者为中心,打造中国第一流的快速开发平台,全部开源,个人与企业可 100% 免费使用。
- 采用最新 [vue-vben-admin](https://github.com/vbenjs/vue-vben-admin) v5 实现
- 采用最新 [vue-vben-admin](https://github.com/vbenjs/vue-vben-admin) v5.7.0 实现
- 支持 [Ant Design Vue](https://www.antdv.com/) | [Element Plus](https://element-plus.org/zh-CN/) | [Naive UI](https://www.naiveui.com/) | [TDesign](https://tdesign.tencent.com/) 多种免费开源的中后台模版,具备如下特性:
![首页](.gitee/image/demo/vben.png)
- **最新技术栈**:使用 Vue3、Vite6 等前端前沿技术开发
- **最新技术栈**:使用 Vue3、Vite8 等前端前沿技术开发
- **TypeScript**: 应用程序级 JavaScript 的语言
- **主题**: 提供多套主题色彩,可配置自定义主题
- **国际化**:内置完善的国际化方案
@ -33,7 +33,7 @@
- **组件**:二次封装了多个常用的组件
- **示例**:内置丰富的示例
## [外包项目请联系【非项目需求请勿扫码,非客服,不解答项目问题】](https://www.shuduokeji.com)
## [外包项目请联系【非项目需求请勿扫码,非客服,不解答项目问题】](https://www.shuduokeji.com?yudao)
![alt 软件定制开发 数舵科技](.gitee/image/wx-xingyu.png)
@ -41,26 +41,26 @@
| 框架 | 说明 | 版本 |
| --- | --- | --- |
| [Vue](https://staging-cn.vuejs.org/) | vue框架 | 3.5.24 |
| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 7.2.2 |
| [Vue](https://staging-cn.vuejs.org/) | vue框架 | 3.5.30 |
| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 8.0.0 |
| [Ant Design Vue](https://www.antdv.com/) | Ant Design Vue | 4.2.6 |
| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.10.2 |
| [Naive UI](https://www.naiveui.com/) | Naive UI | 2.42.0 |
| [TDesign](https://tdesign.tencent.com/) | TDesign | 1.17.1 |
| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.13.5 |
| [Naive UI](https://www.naiveui.com/) | Naive UI | 2.44.1 |
| [TDesign](https://tdesign.tencent.com/) | TDesign | 1.18.5 |
| [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 超集 | 5.9.3 |
| [pinia](https://pinia.vuejs.org/) | Vue 存储库替代 vuex5 | 3.0.3 |
| [vueuse](https://vueuse.org/) | 常用工具集 | 13.4.0 |
| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 11.1.7 |
| [vue-router](https://router.vuejs.org/) | Vue 路由 | 4.5.1 |
| [Tailwind CSS](https://tailwindcss.com/) | 原子 CSS | 3.4.18 |
| [pinia](https://pinia.vuejs.org/) | Vue 存储库替代 vuex5 | 3.0.4 |
| [vueuse](https://vueuse.org/) | 常用工具集 | 14.2.1 |
| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 11.3.0 |
| [vue-router](https://router.vuejs.org/) | Vue 路由 | 5.0.3 |
| [Tailwind CSS](https://tailwindcss.com/) | 原子 CSS | 4.2.1 |
| [Iconify](https://iconify.design/) | 图标组件 | 5.0.0 |
| [Iconify](https://icon-sets.iconify.design/) | 在线图标库 | 2.2.406 |
| [TinyMCE](https://www.tiny.cloud/) | 富文本编辑器 | 6.1.0 |
| [Iconify](https://icon-sets.iconify.design/) | 在线图标库 | 2.2.449 |
| [TinyMCE](https://www.tiny.cloud/) | 富文本编辑器 | 7.3.0 |
| [Echarts](https://echarts.apache.org/) | 图表库 | 6.0.0 |
| [axios](https://axios-http.com/) | http客户端 | 1.10.0 |
| [dayjs](https://day.js.org/) | 日期处理库 | 1.11.13 |
| [axios](https://axios-http.com/) | http客户端 | 1.13.6 |
| [dayjs](https://day.js.org/) | 日期处理库 | 1.11.20 |
| [vee-validate](https://vee-validate.logaretm.com/) | 表单验证 | 4.15.1 |
| [zod](https://zod.dev/) | 数据验证 | 3.25.67 |
| [zod](https://zod.dev/) | 数据验证 | 3.25.76 |
## 🔥 后端架构
@ -84,31 +84,31 @@
- 通用模块(必选):系统功能、基础设施
- 通用模块(可选):工作流程、支付系统、数据报表、会员中心
- 业务系统(按需):ERP 系统、CRM 系统、商城系统、微信公众号、AI 大模型
- 业务系统(按需):Mall 电子商城、OA 办公自动化、ERP 企业资源计划系统、WMS 仓库管理系统、CRM 客户关系管理、CMS 内容管理系统、MES 执行制造系统、AI 大模型平台、IoT 物联网系统、IM 即时通讯系统、Mobile 手机移动端、Report 数据大屏
### 系统功能
| | 功能 | 描述 |
|----|-------|---------------------------------|
| | 用户管理 | 用户是系统操作者,该功能主要完成系统用户配置 |
| ⭐️ | 在线用户 | 当前系统中活跃用户状态监控,支持手动踢下线 |
| | 角色管理 | 角色菜单权限分配、设置角色按机构进行数据范围权限划分 |
| | 菜单管理 | 配置系统菜单、操作权限、按钮权限标识等,本地缓存提供性能 |
| | 部门管理 | 配置系统组织机构(公司、部门、小组),树结构展现支持数据权限 |
| | 岗位管理 | 配置系统用户所属担任职务 |
| 🚀 | 租户管理 | 配置系统租户,支持 SaaS 场景下的多租户功能 |
| 🚀 | 租户套餐 | 配置租户套餐,自定每个租户的菜单、操作、按钮的权限 |
| | 字典管理 | 对系统中经常使用的一些较为固定的数据进行维护 |
| 🚀 | 短信管理 | 短信渠道、短息模板、短信日志,对接阿里云、腾讯云等主流短信平台 |
| 🚀 | 邮件管理 | 邮箱账号、邮件模版、邮件发送日志,支持所有邮件平台 |
| 🚀 | 站内信 | 系统内的消息通知,提供站内信模版、站内信消息 |
| 🚀 | 操作日志 | 系统正常操作日志记录和查询,集成 Swagger 生成日志内容 |
| ⭐️ | 登录日志 | 系统登录日志记录查询,包含登录异常 |
| 🚀 | 错误码管理 | 系统所有错误码的管理,可在线修改错误提示,无需重启服务 |
| | 通知公告 | 系统通知公告信息发布维护 |
| 🚀 | 敏感词 | 配置系统敏感词,支持标签分组 |
| 🚀 | 应用管理 | 管理 SSO 单点登录的应用,支持多种 OAuth2 授权方式 |
| 🚀 | 地区管理 | 展示省份、城市、区镇等城市信息,支持 IP 对应城市 |
| | 功能 | 描述 |
| --- | --- | --- |
| | 用户管理 | 用户是系统操作者,该功能主要完成系统用户配置 |
| ⭐️ | 在线用户 | 当前系统中活跃用户状态监控,支持手动踢下线 |
| | 角色管理 | 角色菜单权限分配、设置角色按机构进行数据范围权限划分 |
| | 菜单管理 | 配置系统菜单、操作权限、按钮权限标识等,本地缓存提供性能 |
| | 部门管理 | 配置系统组织机构(公司、部门、小组),树结构展现支持数据权限 |
| | 岗位管理 | 配置系统用户所属担任职务 |
| 🚀 | 租户管理 | 配置系统租户,支持 SaaS 场景下的多租户功能 |
| 🚀 | 租户套餐 | 配置租户套餐,自定每个租户的菜单、操作、按钮的权限 |
| | 字典管理 | 对系统中经常使用的一些较为固定的数据进行维护 |
| 🚀 | 短信管理 | 短信渠道、短息模板、短信日志,对接阿里云、腾讯云等主流短信平台 |
| 🚀 | 邮件管理 | 邮箱账号、邮件模版、邮件发送日志,支持所有邮件平台 |
| 🚀 | 站内信 | 系统内的消息通知,提供站内信模版、站内信消息 |
| 🚀 | 操作日志 | 系统正常操作日志记录和查询,集成 Swagger 生成日志内容 |
| ⭐️ | 登录日志 | 系统登录日志记录查询,包含登录异常 |
| 🚀 | 错误码管理 | 系统所有错误码的管理,可在线修改错误提示,无需重启服务 |
| | 通知公告 | 系统通知公告信息发布维护 |
| 🚀 | 敏感词 | 配置系统敏感词,支持标签分组 |
| 🚀 | 应用管理 | 管理 SSO 单点登录的应用,支持多种 OAuth2 授权方式 |
| 🚀 | 地区管理 | 展示省份、城市、区镇等城市信息,支持 IP 对应城市 |
![功能图](/.gitee/image/common/system-feature.png)
@ -126,32 +126,32 @@
>
> 前者支持轻量配置简单流程,后者实现复杂场景深度编排
| 功能列表 | 功能描述 | 是否完成 |
|------------|-------------------------------------------------------------------------------------|------|
| SIMPLE 设计器 | 仿钉钉/飞书设计器支持拖拽搭建表单流程10 分钟快速完成审批流程配置 | ✅ |
| BPMN 设计器 | 基于 BPMN 标准开发,适配复杂业务场景,满足多层级审批及流程自动化需求 | ✅ |
| 会签 | 同一个审批节点设置多个人(如 A、B、C 三人,三人会同时收到待办任务),需全部同意之后,审批才可到下一审批节点 | ✅ |
| 或签 | 同一个审批节点设置多个人,任意一个人处理后,就能进入下一个节点 | ✅ |
| 依次审批 | (顺序会签)同一个审批节点设置多个人(如 A、B、C 三人),三人按顺序依次收到待办,即 A 先审批A 提交后 B 才能审批,需全部同意之后,审批才可到下一审批节点 | ✅ |
| 抄送 | 将审批结果通知给抄送人,同一个审批默认排重,不重复抄送给同一人 | ✅ |
| 驳回 | (退回)将审批重置发送给某节点,重新审批。可驳回至发起人、上一节点、任意节点 | ✅ |
| 转办 | A 转给其 B 审批B 审批后,进入下一节点 | ✅ |
| 委派 | A 转给其 B 审批B 审批后,转给 AA 继续审批后进入下一节点 | ✅ |
| 加签 | 允许当前审批人根据需要,自行增加当前节点的审批人,支持向前、向后加签 | ✅ |
| 减签 | (取消加签)在当前审批人操作之前,减少审批人 | ✅ |
| 撤销 | (取消流程)流程发起人,可以对流程进行撤销处理 | ✅ |
| 终止 | 系统管理员,在任意节点终止流程实例 | ✅ |
| 表单权限 | 支持拖拉拽配置表单,每个审批节点可配置只读、编辑、隐藏权限 | ✅ |
| 超时审批 | 配置超时审批时间,超时后自动触发审批通过、不通过、驳回等操作 | ✅ |
| 自动提醒 | 配置提醒时间,到达时间后自动触发短信、邮箱、站内信等通知提醒,支持自定义重复提醒频次 | ✅ |
| 父子流程 | 主流程设置子流程节点,子流程节点会自动触发子流程。子流程结束后,主流程才会执行(继续往下下执行),支持同步子流程、异步子流程 | ✅ |
| 条件分支 | (排它分支)用于在流程中实现决策,即根据条件选择一个分支执行 | ✅ |
| 并行分支 | 允许将流程分成多条分支,不进行条件判断,所有分支都会执行 | ✅ |
| 包容分支 | (条件分支 + 并行分支的结合体)允许基于条件选择多条分支执行,但如果没有任何一个分支满足条件,则可以选择默认分支 | ✅ |
| 路由分支 | 根据条件选择一个分支执行(重定向到指定配置节点),也可以选择默认分支执行(继续往下执行) | ✅ |
| 触发节点 | 执行到该节点,触发 HTTP 请求、HTTP 回调、更新数据、删除数据等 | ✅ |
| 延迟节点 | 执行到该节点,审批等待一段时间再执行,支持固定时长、固定日期等 | ✅ |
| 拓展设置 | 流程前置/后置通知,节点(任务)前置、后置通知,流程报表,自动审批去重,自定流程编号、标题、摘要,流程报表等 | ✅ |
| 功能列表 | 功能描述 | 是否完成 |
| --- | --- | --- |
| SIMPLE 设计器 | 仿钉钉/飞书设计器支持拖拽搭建表单流程10 分钟快速完成审批流程配置 | ✅ |
| BPMN 设计器 | 基于 BPMN 标准开发,适配复杂业务场景,满足多层级审批及流程自动化需求 | ✅ |
| 会签 | 同一个审批节点设置多个人(如 A、B、C 三人,三人会同时收到待办任务),需全部同意之后,审批才可到下一审批节点 | ✅ |
| 或签 | 同一个审批节点设置多个人,任意一个人处理后,就能进入下一个节点 | ✅ |
| 依次审批 | (顺序会签)同一个审批节点设置多个人(如 A、B、C 三人),三人按顺序依次收到待办,即 A 先审批A 提交后 B 才能审批,需全部同意之后,审批才可到下一审批节点 | ✅ |
| 抄送 | 将审批结果通知给抄送人,同一个审批默认排重,不重复抄送给同一人 | ✅ |
| 驳回 | (退回)将审批重置发送给某节点,重新审批。可驳回至发起人、上一节点、任意节点 | ✅ |
| 转办 | A 转给其 B 审批B 审批后,进入下一节点 | ✅ |
| 委派 | A 转给其 B 审批B 审批后,转给 AA 继续审批后进入下一节点 | ✅ |
| 加签 | 允许当前审批人根据需要,自行增加当前节点的审批人,支持向前、向后加签 | ✅ |
| 减签 | (取消加签)在当前审批人操作之前,减少审批人 | ✅ |
| 撤销 | (取消流程)流程发起人,可以对流程进行撤销处理 | ✅ |
| 终止 | 系统管理员,在任意节点终止流程实例 | ✅ |
| 表单权限 | 支持拖拉拽配置表单,每个审批节点可配置只读、编辑、隐藏权限 | ✅ |
| 超时审批 | 配置超时审批时间,超时后自动触发审批通过、不通过、驳回等操作 | ✅ |
| 自动提醒 | 配置提醒时间,到达时间后自动触发短信、邮箱、站内信等通知提醒,支持自定义重复提醒频次 | ✅ |
| 父子流程 | 主流程设置子流程节点,子流程节点会自动触发子流程。子流程结束后,主流程才会执行(继续往下下执行),支持同步子流程、异步子流程 | ✅ |
| 条件分支 | (排它分支)用于在流程中实现决策,即根据条件选择一个分支执行 | ✅ |
| 并行分支 | 允许将流程分成多条分支,不进行条件判断,所有分支都会执行 | ✅ |
| 包容分支 | (条件分支 + 并行分支的结合体)允许基于条件选择多条分支执行,但如果没有任何一个分支满足条件,则可以选择默认分支 | ✅ |
| 路由分支 | 根据条件选择一个分支执行(重定向到指定配置节点),也可以选择默认分支执行(继续往下执行) | ✅ |
| 触发节点 | 执行到该节点,触发 HTTP 请求、HTTP 回调、更新数据、删除数据等 | ✅ |
| 延迟节点 | 执行到该节点,审批等待一段时间再执行,支持固定时长、固定日期等 | ✅ |
| 拓展设置 | 流程前置/后置通知,节点(任务)前置、后置通知,流程报表,自动审批去重,自定流程编号、标题、摘要,流程报表等 | ✅ |
### 支付系统
@ -165,26 +165,26 @@
### 基础设施
| | 功能 | 描述 |
|----|-----------|----------------------------------------------|
| 🚀 | 代码生成 | 前后端代码的生成Java、Vue、SQL、单元测试支持 CRUD 下载 |
| 🚀 | 系统接口 | 基于 Swagger 自动生成相关的 RESTful API 接口文档 |
| 🚀 | 数据库文档 | 基于 Screw 自动生成数据库文档,支持导出 Word、HTML、MD 格式 |
| | 表单构建 | 拖动表单元素生成相应的 HTML 代码,支持导出 JSON、Vue 文件 |
| 🚀 | 配置管理 | 对系统动态配置常用参数,支持 SpringBoot 加载 |
| ⭐️ | 定时任务 | 在线(添加、修改、删除)任务调度包含执行结果日志 |
| 🚀 | 文件服务 | 支持将文件存储到 S3MinIO、阿里云、腾讯云、七牛云、本地、FTP、数据库等 |
| 🚀 | WebSocket | 提供 WebSocket 接入示例,支持一对一、一对多发送方式 |
| 🚀 | API 日志 | 包括 RESTful API 访问日志、异常日志两部分,方便排查 API 相关的问题 |
| | MySQL 监控 | 监视当前系统数据库连接池状态可进行分析SQL找出系统性能瓶颈 |
| | Redis 监控 | 监控 Redis 数据库的使用情况,使用的 Redis Key 管理 |
| 🚀 | 消息队列 | 基于 Redis 实现消息队列Stream 提供集群消费Pub/Sub 提供广播消费 |
| 🚀 | Java 监控 | 基于 Spring Boot Admin 实现 Java 应用的监控 |
| 🚀 | 链路追踪 | 接入 SkyWalking 组件,实现链路追踪 |
| 🚀 | 日志中心 | 接入 SkyWalking 组件,实现日志中心 |
| 🚀 | 服务保障 | 基于 Redis 实现分布式锁、幂等、限流功能,满足高并发场景 |
| 🚀 | 日志服务 | 轻量级日志中心,查看远程服务器的日志 |
| 🚀 | 单元测试 | 基于 JUnit + Mockito 实现单元测试,保证功能的正确性、代码的质量等 |
| | 功能 | 描述 |
| --- | --- | --- |
| 🚀 | 代码生成 | 前后端代码的生成Java、Vue、SQL、单元测试支持 CRUD 下载 |
| 🚀 | 系统接口 | 基于 Swagger 自动生成相关的 RESTful API 接口文档 |
| 🚀 | 数据库文档 | 基于 Screw 自动生成数据库文档,支持导出 Word、HTML、MD 格式 |
| | 表单构建 | 拖动表单元素生成相应的 HTML 代码,支持导出 JSON、Vue 文件 |
| 🚀 | 配置管理 | 对系统动态配置常用参数,支持 SpringBoot 加载 |
| ⭐️ | 定时任务 | 在线(添加、修改、删除)任务调度包含执行结果日志 |
| 🚀 | 文件服务 | 支持将文件存储到 S3MinIO、阿里云、腾讯云、七牛云、本地、FTP、数据库等 |
| 🚀 | WebSocket | 提供 WebSocket 接入示例,支持一对一、一对多发送方式 |
| 🚀 | API 日志 | 包括 RESTful API 访问日志、异常日志两部分,方便排查 API 相关的问题 |
| | MySQL 监控 | 监视当前系统数据库连接池状态可进行分析SQL找出系统性能瓶颈 |
| | Redis 监控 | 监控 Redis 数据库的使用情况,使用的 Redis Key 管理 |
| 🚀 | 消息队列 | 基于 Redis 实现消息队列Stream 提供集群消费Pub/Sub 提供广播消费 |
| 🚀 | Java 监控 | 基于 Spring Boot Admin 实现 Java 应用的监控 |
| 🚀 | 链路追踪 | 接入 SkyWalking 组件,实现链路追踪 |
| 🚀 | 日志中心 | 接入 SkyWalking 组件,实现日志中心 |
| 🚀 | 服务保障 | 基于 Redis 实现分布式锁、幂等、限流功能,满足高并发场景 |
| 🚀 | 日志服务 | 轻量级日志中心,查看远程服务器的日志 |
| 🚀 | 单元测试 | 基于 JUnit + Mockito 实现单元测试,保证功能的正确性、代码的质量等 |
![功能图](/.gitee/image/common/infra-feature.png)
@ -197,19 +197,19 @@
### 微信公众号
| | 功能 | 描述 |
|----|--------|-------------------------------|
| 🚀 | 账号管理 | 配置接入的微信公众号,可支持多个公众号 |
| 🚀 | 数据统计 | 统计公众号的用户增减、累计用户、消息概况、接口分析等数据 |
| 🚀 | 粉丝管理 | 查看已关注、取关的粉丝列表,可对粉丝进行同步、打标签等操作 |
| 🚀 | 消息管理 | 查看粉丝发送的消息列表,可主动回复粉丝消息 |
| 🚀 | 模版消息 | 配置和发送模版消息,用于向粉丝推送通知类消息 |
| 🚀 | 自动回复 | 自动回复粉丝发送的消息,支持关注回复、消息回复、关键字回复 |
| 🚀 | 标签管理 | 对公众号的标签进行创建、查询、修改、删除等操作 |
| 🚀 | 菜单管理 | 自定义公众号的菜单,也可以从公众号同步菜单 |
| 🚀 | 素材管理 | 管理公众号的图片、语音、视频等素材,支持在线播放语音、视频 |
| 🚀 | 图文草稿箱 | 新增常用的图文素材到草稿箱,可发布到公众号 |
| 🚀 | 图文发表记录 | 查看已发布成功的图文素材,支持删除操作 |
| | 功能 | 描述 |
| --- | --- | --- |
| 🚀 | 账号管理 | 配置接入的微信公众号,可支持多个公众号 |
| 🚀 | 数据统计 | 统计公众号的用户增减、累计用户、消息概况、接口分析等数据 |
| 🚀 | 粉丝管理 | 查看已关注、取关的粉丝列表,可对粉丝进行同步、打标签等操作 |
| 🚀 | 消息管理 | 查看粉丝发送的消息列表,可主动回复粉丝消息 |
| 🚀 | 模版消息 | 配置和发送模版消息,用于向粉丝推送通知类消息 |
| 🚀 | 自动回复 | 自动回复粉丝发送的消息,支持关注回复、消息回复、关键字回复 |
| 🚀 | 标签管理 | 对公众号的标签进行创建、查询、修改、删除等操作 |
| 🚀 | 菜单管理 | 自定义公众号的菜单,也可以从公众号同步菜单 |
| 🚀 | 素材管理 | 管理公众号的图片、语音、视频等素材,支持在线播放语音、视频 |
| 🚀 | 图文草稿箱 | 新增常用的图文素材到草稿箱,可发布到公众号 |
| 🚀 | 图文发表记录 | 查看已发布成功的图文素材,支持删除操作 |
### 商城系统
@ -219,18 +219,44 @@
![功能图](/.gitee/image/common/mall-preview.png)
### 会员中心
| | 功能 | 描述 |
| --- | --- | --- |
| 🚀 | 会员管理 | 会员是 C 端的消费者,该功能用于会员的搜索与管理 |
| 🚀 | 会员标签 | 对会员的标签进行创建、查询、修改、删除等操作 |
| 🚀 | 会员等级 | 对会员的等级、成长值进行管理,可用于订单折扣等会员权益 |
| 🚀 | 会员分组 | 对会员进行分组,用于用户画像、内容推送等运营手段 |
| 🚀 | 积分签到 | 回馈给签到、消费等行为的积分,会员可订单抵现、积分兑换等途径消耗 |
### ERP 系统
演示地址:<https://doc.iocoder.cn/erp-preview/>
![功能图](/.gitee/image/common/erp-feature.png)
### WMS 系统
演示地址:<https://doc.iocoder.cn/wms-preview/>
![功能图](/.gitee/image/common/wms-feature.png)
![预览图](/.gitee/image/common/wms-preview.png)
### CRM 系统
演示地址:<https://doc.iocoder.cn/crm-preview/>
![功能图](/.gitee/image/common/crm-feature.png)
### MES 系统
演示地址:<https://doc.iocoder.cn/mes-preview/>
![功能图](/.gitee/image/common/mes-feature.png)
![功能图](/.gitee/image/common/mes-preview.png)
### AI 大模型
演示地址:<https://doc.iocoder.cn/ai-preview/>
@ -238,3 +264,11 @@
![功能图](/.gitee/image/common/ai-feature.png)
![功能图](/.gitee/image/common/ai-preview.gif)
### IoT 物联网
演示地址:<https://doc.iocoder.cn/iot/build>
![功能图](/.gitee/image/common/iot-feature.png)
![预览图](/.gitee/image/common/iot-preview.png)

View File

@ -33,3 +33,6 @@ VITE_APP_API_ENCRYPT_REQUEST_KEY = 52549111389893486934626385991395
VITE_APP_API_ENCRYPT_RESPONSE_KEY = 96103715984234343991809655248883
# VITE_APP_API_ENCRYPT_REQUEST_KEY = MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCls2rIpnGdYnLFgz1XU13GbNQ5DloyPpvW00FPGjqn5Z6JpK+kDtVlnkhwR87iRrE5Vf2WNqRX6vzbLSgveIQY8e8oqGCb829myjf1MuI+ZzN4ghf/7tEYhZJGPI9AbfxFqBUzm+kR3/HByAI22GLT96WM26QiMK8n3tIP/yiLswIDAQAB
# VITE_APP_API_ENCRYPT_RESPONSE_KEY = MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAOH8IfIFxL/MR9XIg1UDv5z1fGXQI93E8wrU4iPFovL/sEt9uSgSkjyidC2O7N+m7EKtoN6b1u7cEwXSkwf3kfK0jdWLSQaNpX5YshqXCBzbDfugDaxuyYrNA4/tIMs7mzZAk0APuRXB35Dmupou7Yw7TFW/7QhQmGfzeEKULQvnAgMBAAECgYAw8LqlQGyQoPv5p3gRxEMOCfgL0JzD3XBJKztiRd35RDh40Nx1ejgjW4dPioFwGiVWd2W8cAGHLzALdcQT2KDJh+T/tsd4SPmI6uSBBK6Ff2DkO+kFFcuYvfclQQKqxma5CaZOSqhgenacmgTMFeg2eKlY3symV6JlFNu/IKU42QJBAOhxAK/Eq3e61aYQV2JSguhMR3b8NXJJRroRs/QHEanksJtl+M+2qhkC9nQVXBmBkndnkU/l2tYcHfSBlAyFySMCQQD445tgm/J2b6qMQmuUGQAYDN8FIkHjeKmha+l/fv0igWm8NDlBAem91lNDIPBUzHL1X1+pcts5bjmq99YdOnhtAkAg2J8dN3B3idpZDiQbC8fd5bGPmdI/pSUudAP27uzLEjr2qrE/QPPGdwm2m7IZFJtK7kK1hKio6u48t/bg0iL7AkEAuUUs94h+v702Fnym+jJ2CHEkXvz2US8UDs52nWrZYiM1o1y4tfSHm8H8bv8JCAa9GHyriEawfBraILOmllFdLQJAQSRZy4wmlaG48MhVXodB85X+VZ9krGXZ2TLhz7kz9iuToy53l9jTkESt6L5BfBDCVdIwcXLYgK+8KFdHN5W7HQ==
# 百度地图
VITE_BAIDU_MAP_KEY=Y2aJXiswwPxy6mwFs1z9c7U5gwX9WfUN

View File

@ -21,3 +21,6 @@ VITE_INJECT_APP_LOADING=true
# 打包后是否生成dist.zip
VITE_ARCHIVER=true
# 验证码的开关
VITE_APP_CAPTCHA_ENABLE=true

View File

@ -12,16 +12,15 @@
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
/>
<!-- 由 vite 注入 VITE_APP_TITLE 变量,在 .env 文件内配置 -->
<title><%= VITE_APP_TITLE %></title>
<title>%VITE_APP_TITLE%</title>
<link rel="icon" href="/favicon.ico" />
<script>
var HM_ID = '<%= VITE_APP_BAIDU_CODE %>'
var HM_ID = '<%= VITE_APP_BAIDU_CODE %>';
if (HM_ID) {
var _hmt = _hmt || [];
(function () {
var hm = document.createElement('script');
hm.src =
'https://hm.baidu.com/hm.js?' + HM_ID;
hm.src = 'https://hm.baidu.com/hm.js?' + HM_ID;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s);
})();

View File

@ -1,6 +1,6 @@
{
"name": "@vben/web-antd",
"version": "5.5.9",
"version": "5.7.0",
"homepage": "https://vben.pro",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@ -1 +0,0 @@
export { default } from '@vben/tailwind-config/postcss';

View File

@ -2537,12 +2537,12 @@ interface EditorSelection {
normalize: () => Range;
selectorChanged: (selector: string, callback: (active: boolean, args: {
node: Node;
selector: String;
selector: string;
parents: Node[];
}) => void) => EditorSelection;
selectorChangedWithUnbind: (selector: string, callback: (active: boolean, args: {
node: Node;
selector: String;
selector: string;
parents: Node[];
}) => void) => {
unbind: () => void;
@ -3217,9 +3217,9 @@ interface Tools {
<T, R>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback<T, R>): R[];
<T, R>(obj: Record<string, T> | null | undefined, cb: ObjCallback<T, R>): R[];
};
extend: (obj: Object, ext: Object, ...objs: Object[]) => any;
extend: (obj: object, ext: object, ...objs: object[]) => any;
walk: <T extends Record<string, any>>(obj: T, f: WalkCallback<T>, n?: keyof T, scope?: any) => void;
resolve: (path: string, o?: Object) => any;
resolve: (path: string, o?: object) => any;
explode: (s: string | string[], d?: string | RegExp) => string[];
_addCacheSuffix: (url: string) => string;
}

View File

@ -3,36 +3,82 @@
* vben-formvben-modalvben-drawer 使,
*/
/* eslint-disable vue/one-component-per-file */
import type {
AutoCompleteProps,
ButtonProps,
CascaderProps,
CheckboxGroupProps,
CheckboxProps,
DatePickerProps,
DividerProps,
InputNumberProps,
InputProps,
MentionsProps,
RadioGroupProps,
RadioProps,
RateProps,
SelectProps,
SpaceProps,
SwitchProps,
TextAreaProps,
TimePickerProps,
TreeSelectProps,
UploadChangeParam,
UploadFile,
UploadProps,
} from 'ant-design-vue';
import type { RangePickerProps } from 'ant-design-vue/es/date-picker';
import type { Component, Ref } from 'vue';
import type { BaseFormComponentType } from '@vben/common-ui';
import type {
ApiComponentSharedProps,
BaseFormComponentType,
IconPickerProps,
} from '@vben/common-ui';
import type { Sortable } from '@vben/hooks';
import type { Recordable } from '@vben/types';
import {
computed,
defineAsyncComponent,
defineComponent,
h,
nextTick,
onMounted,
onUnmounted,
ref,
render,
unref,
watch,
} from 'vue';
import { ApiComponent, globalShareState, IconPicker } from '@vben/common-ui';
import {
ApiComponent,
globalShareState,
IconPicker,
VCropper,
} from '@vben/common-ui';
import { useSortable } from '@vben/hooks';
import { IconifyIcon } from '@vben/icons';
import { $t } from '@vben/locales';
import { isEmpty } from '@vben/utils';
import { notification } from 'ant-design-vue';
import { message, Modal, notification } from 'ant-design-vue';
import { Tinymce as RichTextarea } from '#/components/tinymce';
import { FileUpload, ImageUpload } from '#/components/upload';
type AdapterUploadProps = UploadProps & {
aspectRatio?: string;
crop?: boolean;
draggable?: boolean;
handleChange?: (event: UploadChangeParam) => void;
maxSize?: number;
onDragSort?: (oldIndex: number, newIndex: number) => void;
onHandleChange?: (event: UploadChangeParam) => void;
};
const AutoComplete = defineAsyncComponent(
() => import('ant-design-vue/es/auto-complete'),
@ -90,8 +136,8 @@ const PreviewGroup = defineAsyncComponent(() =>
import('ant-design-vue/es/image').then((res) => res.ImagePreviewGroup),
);
const withDefaultPlaceholder = <T extends Component>(
component: T,
const withDefaultPlaceholder = (
component: Component,
type: 'input' | 'select',
componentProps: Recordable<any> = {},
) => {
@ -124,173 +170,110 @@ const withDefaultPlaceholder = <T extends Component>(
});
};
const withPreviewUpload = () => {
return defineComponent({
name: Upload.name,
emits: ['change', 'update:modelValue'],
setup: (
props: any,
{ attrs, slots, emit }: { attrs: any; emit: any; slots: any },
) => {
const previewVisible = ref<boolean>(false);
const IMAGE_EXTENSIONS = new Set([
'bmp',
'gif',
'jpeg',
'jpg',
'png',
'svg',
'webp',
]);
const placeholder = attrs?.placeholder || $t(`ui.placeholder.upload`);
const listType = attrs?.listType || attrs?.['list-type'] || 'text';
const fileList = ref<UploadProps['fileList']>(
attrs?.fileList || attrs?.['file-list'] || [],
);
const handleChange = async (event: UploadChangeParam) => {
fileList.value = event.fileList;
emit('change', event);
emit(
'update:modelValue',
event.fileList?.length ? fileList.value : undefined,
);
};
const handlePreview = async (file: UploadFile) => {
previewVisible.value = true;
await previewImage(file, previewVisible, fileList);
};
const renderUploadButton = (): any => {
const isDisabled = attrs.disabled;
// 如果禁用,不渲染上传按钮
if (isDisabled) {
return null;
}
// 否则渲染默认上传按钮
return isEmpty(slots)
? createDefaultSlotsWithUpload(listType, placeholder)
: slots;
};
// 可以监听到表单API设置的值
watch(
() => attrs.modelValue,
(res) => {
fileList.value = res;
},
);
return () =>
h(
Upload,
{
...props,
...attrs,
fileList: fileList.value,
onChange: handleChange,
onPreview: handlePreview,
},
renderUploadButton(),
);
},
});
};
const createDefaultSlotsWithUpload = (
listType: string,
placeholder: string,
) => {
switch (listType) {
case 'picture-card': {
return {
default: () => placeholder,
};
}
default: {
return {
default: () =>
h(
Button,
{
icon: h(IconifyIcon, {
icon: 'ant-design:upload-outlined',
class: 'mb-1 size-4',
}),
},
() => placeholder,
),
};
/**
*
*/
function isImageFile(file: UploadFile): boolean {
if (file.url) {
try {
const pathname = new URL(file.url, 'http://localhost').pathname;
const ext = pathname.split('.').pop()?.toLowerCase();
return ext ? IMAGE_EXTENSIONS.has(ext) : false;
} catch {
const ext = file.url?.split('.').pop()?.toLowerCase();
return ext ? IMAGE_EXTENSIONS.has(ext) : false;
}
}
};
if (!file.type) {
const ext = file.name?.split('.').pop()?.toLowerCase();
return ext ? IMAGE_EXTENSIONS.has(ext) : false;
}
return file.type.startsWith('image/');
}
const previewImage = async (
/**
*
*/
function createDefaultUploadSlots(listType: string, placeholder: string) {
if (listType === 'picture-card') {
return { default: () => placeholder };
}
return {
default: () =>
h(
Button,
{
icon: h(IconifyIcon, {
icon: 'ant-design:upload-outlined',
class: 'mb-1 size-4',
}),
},
() => placeholder,
),
};
}
/**
* Base64
*/
function getBase64(file: File): Promise<string> {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.addEventListener('load', () => resolve(reader.result as string));
reader.addEventListener('error', reject);
});
}
/**
*
*/
async function previewImage(
file: UploadFile,
visible: Ref<boolean>,
fileList: Ref<UploadProps['fileList']>,
) => {
// 检查是否为图片文件的辅助函数
const isImageFile = (file: UploadFile): boolean => {
const imageExtensions = new Set([
'bmp',
'gif',
'jpeg',
'jpg',
'png',
'webp',
]);
if (file.url) {
const ext = file.url?.split('.').pop()?.toLowerCase();
return ext ? imageExtensions.has(ext) : false;
}
if (!file.type) {
const ext = file.name?.split('.').pop()?.toLowerCase();
return ext ? imageExtensions.has(ext) : false;
}
return file.type.startsWith('image/');
};
// 如果当前文件不是图片,直接打开
) {
// 非图片文件直接打开链接
if (!isImageFile(file)) {
if (file.url) {
window.open(file.url, '_blank');
} else if (file.preview) {
window.open(file.preview, '_blank');
const url = file.url || file.preview;
if (url) {
window.open(url, '_blank');
} else {
console.warn('无法打开文件没有可用的URL或预览地址');
message.error($t('ui.formRules.previewWarning'));
}
return;
}
// 对于图片文件,继续使用预览组
const [ImageComponent, PreviewGroupComponent] = await Promise.all([
Image,
PreviewGroup,
]);
const getBase64 = (file: File) => {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.addEventListener('load', () => resolve(reader.result));
reader.addEventListener('error', (error) => reject(error));
});
};
// 从fileList中过滤出所有图片文件
const imageFiles = (unref(fileList) || []).filter((element) =>
isImageFile(element),
);
// 过滤图片文件并生成预览
const imageFiles = (unref(fileList) || []).filter((f) => isImageFile(f));
// 为所有没有预览地址的图片生成预览
for (const imgFile of imageFiles) {
if (!imgFile.url && !imgFile.preview && imgFile.originFileObj) {
imgFile.preview = (await getBase64(imgFile.originFileObj)) as string;
imgFile.preview = await getBase64(imgFile.originFileObj);
}
}
const container: HTMLElement | null = document.createElement('div');
document.body.append(container);
// 用于追踪组件是否已卸载
const container = document.createElement('div');
document.body.append(container);
let isUnmounted = false;
const currentIndex = imageFiles.findIndex((f) => f.uid === file.uid);
const PreviewWrapper = {
setup() {
return () => {
@ -301,12 +284,10 @@ const previewImage = async (
class: 'hidden',
preview: {
visible: visible.value,
// 设置初始显示的图片索引
current: imageFiles.findIndex((f) => f.uid === file.uid),
current: currentIndex,
onVisibleChange: (value: boolean) => {
visible.value = value;
if (!value) {
// 延迟清理,确保动画完成
setTimeout(() => {
if (!isUnmounted && container) {
isUnmounted = true;
@ -319,7 +300,6 @@ const previewImage = async (
},
},
() =>
// 渲染所有图片文件
imageFiles.map((imgFile) =>
h(ImageComponent, {
key: imgFile.uid,
@ -332,6 +312,292 @@ const previewImage = async (
};
render(h(PreviewWrapper), container);
}
/**
*
*/
function cropImage(file: File, aspectRatio: string | undefined) {
return new Promise<Blob | string | undefined>((resolve, reject) => {
const container = document.createElement('div');
document.body.append(container);
let isUnmounted = false;
let objectUrl: null | string = null;
const open = ref<boolean>(true);
const cropperRef = ref<InstanceType<typeof VCropper> | null>(null);
const closeModal = () => {
open.value = false;
setTimeout(() => {
if (!isUnmounted && container) {
if (objectUrl) {
URL.revokeObjectURL(objectUrl);
}
isUnmounted = true;
render(null, container);
container.remove();
}
}, 300);
};
const CropperWrapper = {
setup() {
return () => {
if (isUnmounted) return null;
if (!objectUrl) {
objectUrl = URL.createObjectURL(file);
}
return h(
Modal,
{
open: open.value,
title: h('div', {}, [
$t('ui.crop.title'),
h(
'span',
{
class: `${aspectRatio ? '' : 'hidden'} ml-2 text-sm text-gray-400 font-normal`,
},
$t('ui.crop.titleTip', [aspectRatio]),
),
]),
centered: true,
width: 548,
keyboard: false,
maskClosable: false,
closable: false,
cancelText: $t('common.cancel'),
okText: $t('ui.crop.confirm'),
destroyOnClose: true,
onOk: async () => {
const cropper = cropperRef.value;
if (!cropper) {
reject(new Error('Cropper not found'));
closeModal();
return;
}
try {
const dataUrl = await cropper.getCropImage();
if (dataUrl) {
resolve(dataUrl);
} else {
reject(new Error($t('ui.crop.errorTip')));
}
} catch {
reject(new Error($t('ui.crop.errorTip')));
} finally {
closeModal();
}
},
onCancel() {
resolve('');
closeModal();
},
},
() =>
h(VCropper, {
ref: (ref: any) => (cropperRef.value = ref),
img: objectUrl as string,
aspectRatio,
}),
);
};
},
};
render(h(CropperWrapper), container);
});
}
/**
*
*/
const withPreviewUpload = () => {
return defineComponent({
name: Upload.name,
emits: ['update:modelValue'],
setup(
props: any,
{ attrs, slots, emit }: { attrs: any; emit: any; slots: any },
) {
const previewVisible = ref<boolean>(false);
const placeholder = attrs?.placeholder || $t('ui.placeholder.upload');
const listType = attrs?.listType || attrs?.['list-type'] || 'text';
const fileList = ref<UploadProps['fileList']>(
attrs?.fileList || attrs?.['file-list'] || [],
);
const maxSize = computed(() => attrs?.maxSize ?? attrs?.['max-size']);
const aspectRatio = computed(
() => attrs?.aspectRatio ?? attrs?.['aspect-ratio'],
);
const handleBeforeUpload = async (
file: UploadFile,
originFileList: Array<File>,
) => {
// 文件大小限制
if (maxSize.value && (file.size || 0) / 1024 / 1024 > maxSize.value) {
message.error($t('ui.formRules.sizeLimit', [maxSize.value]));
file.status = 'removed';
return false;
}
// 图片裁剪处理
if (
attrs.crop &&
!attrs.multiple &&
originFileList[0] &&
isImageFile(file)
) {
file.status = 'removed';
const blob = await cropImage(originFileList[0], aspectRatio.value);
if (!blob) {
throw new Error($t('ui.crop.errorTip'));
}
return blob;
}
return attrs.beforeUpload?.(file) ?? true;
};
const handleChange = (event: UploadChangeParam) => {
try {
attrs.handleChange?.(event);
attrs.onHandleChange?.(event);
} catch (error) {
console.error(error);
}
fileList.value = event.fileList.filter(
(file) => file.status !== 'removed',
);
emit(
'update:modelValue',
event.fileList?.length ? fileList.value : undefined,
);
};
const handlePreview = async (file: UploadFile) => {
previewVisible.value = true;
await previewImage(file, previewVisible, fileList);
};
const renderUploadButton = () => {
if (attrs.disabled) return null;
return isEmpty(slots)
? createDefaultUploadSlots(listType, placeholder)
: slots;
};
// 拖拽排序
const draggable = computed(
() => (attrs.draggable ?? false) && !attrs.disabled,
);
const uploadId = `upload-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
const sortableInstance = ref<null | Sortable>(null);
const styleId = `upload-drag-style-${uploadId}`;
function injectDragStyle() {
if (!document.querySelector(`[id="${styleId}"]`)) {
const style = document.createElement('style');
style.id = styleId;
style.textContent = `
[data-upload-id="${uploadId}"] .ant-upload-list-item { cursor: move; }
[data-upload-id="${uploadId}"] .ant-upload-list-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
`;
document.head.append(style);
}
}
function removeDragStyle() {
document.querySelector(`[id="${styleId}"]`)?.remove();
}
async function initSortable(retryCount = 0) {
if (!draggable.value) return;
injectDragStyle();
await nextTick();
await new Promise((resolve) => setTimeout(resolve, 100));
const container = document.querySelector(
`[data-upload-id="${uploadId}"] .ant-upload-list`,
) as HTMLElement;
if (!container) {
if (retryCount < 5) {
setTimeout(() => initSortable(retryCount + 1), 200);
}
return;
}
const { initializeSortable } = useSortable(container, {
animation: 300,
delay: 400,
delayOnTouchOnly: true,
filter:
'.ant-upload-select, .ant-upload-list-item-error, .ant-upload-list-item-uploading',
onEnd: (evt) => {
const { oldIndex, newIndex } = evt;
if (
oldIndex === undefined ||
newIndex === undefined ||
oldIndex === newIndex
) {
return;
}
const list = [...(fileList.value || [])];
const [movedItem] = list.splice(oldIndex, 1);
if (movedItem) {
list.splice(newIndex, 0, movedItem);
fileList.value = list;
}
attrs.onDragSort?.(oldIndex, newIndex);
emit('update:modelValue', fileList.value);
},
});
sortableInstance.value = await initializeSortable();
}
// 监听表单值变化
watch(
() => attrs.modelValue,
(res) => {
fileList.value = res;
},
);
onMounted(initSortable);
onUnmounted(() => {
sortableInstance.value?.destroy();
removeDragStyle();
});
return () =>
h(
'div',
{ 'data-upload-id': uploadId, class: 'w-full' },
h(
Upload,
{
...props,
...attrs,
fileList: fileList.value,
beforeUpload: handleBeforeUpload,
onChange: handleChange,
onPreview: handlePreview,
},
renderUploadButton() as any,
),
);
},
});
};
// 这里需要自行根据业务组件库进行适配,需要用到的组件都需要在这里类型说明
@ -369,11 +635,45 @@ export type ComponentType =
| 'Upload'
| BaseFormComponentType;
/**
* {@link ComponentType} 便 Schema `component` + `componentProps`
*/
export interface ComponentPropsMap {
ApiCascader: ApiComponentSharedProps & CascaderProps;
ApiSelect: ApiComponentSharedProps & SelectProps;
ApiTreeSelect: ApiComponentSharedProps & TreeSelectProps;
AutoComplete: AutoCompleteProps;
Cascader: CascaderProps;
Checkbox: CheckboxProps;
CheckboxGroup: CheckboxGroupProps;
DatePicker: DatePickerProps;
DefaultButton: ButtonProps;
Divider: DividerProps;
IconPicker: IconPickerProps;
Input: InputProps;
InputNumber: InputNumberProps;
InputPassword: InputProps;
Mentions: MentionsProps;
PrimaryButton: ButtonProps;
Radio: RadioProps;
RadioGroup: RadioGroupProps;
RangePicker: RangePickerProps;
Rate: RateProps;
Select: SelectProps;
Space: SpaceProps;
Switch: SwitchProps;
Textarea: TextAreaProps;
TimePicker: TimePickerProps;
TreeSelect: TreeSelectProps;
Upload: AdapterUploadProps;
}
async function initComponentAdapter() {
const components: Partial<Record<ComponentType, Component>> = {
// 如果你的组件体积比较大,可以使用异步加载
// Button: () =>
// import('xxx').then((res) => res.Button),
ApiCascader: withDefaultPlaceholder(ApiComponent, 'select', {
component: Cascader,
fieldNames: { label: 'label', value: 'value', children: 'children' },
@ -381,34 +681,20 @@ async function initComponentAdapter() {
modelPropName: 'value',
visibleEvent: 'onVisibleChange',
}),
ApiSelect: withDefaultPlaceholder(
{
...ApiComponent,
name: 'ApiSelect',
},
'select',
{
component: Select,
loadingSlot: 'suffixIcon',
visibleEvent: 'onDropdownVisibleChange',
modelPropName: 'value',
},
),
ApiTreeSelect: withDefaultPlaceholder(
{
...ApiComponent,
name: 'ApiTreeSelect',
},
'select',
{
component: TreeSelect,
fieldNames: { label: 'label', value: 'value', children: 'children' },
loadingSlot: 'suffixIcon',
modelPropName: 'value',
optionsPropName: 'treeData',
visibleEvent: 'onVisibleChange',
},
),
ApiSelect: withDefaultPlaceholder(ApiComponent, 'select', {
component: Select,
loadingSlot: 'suffixIcon',
modelPropName: 'value',
visibleEvent: 'onVisibleChange',
}),
ApiTreeSelect: withDefaultPlaceholder(ApiComponent, 'select', {
component: TreeSelect,
fieldNames: { label: 'label', value: 'value', children: 'children' },
loadingSlot: 'suffixIcon',
modelPropName: 'value',
optionsPropName: 'treeData',
visibleEvent: 'onVisibleChange',
}),
AutoComplete,
Cascader,
Checkbox,
@ -425,7 +711,9 @@ async function initComponentAdapter() {
modelValueProp: 'value',
}),
Input: withDefaultPlaceholder(Input, 'input'),
InputNumber: withDefaultPlaceholder(InputNumber, 'input'),
InputNumber: withDefaultPlaceholder(InputNumber, 'input', {
style: { width: '100%' },
}),
InputPassword: withDefaultPlaceholder(InputPassword, 'input'),
Mentions: withDefaultPlaceholder(Mentions, 'input'),
// 自定义主要按钮

View File

@ -1,9 +1,9 @@
import type {
VbenFormProps as FormProps,
VbenFormSchema as FormSchema,
VbenFormProps,
} from '@vben/common-ui';
import type { ComponentType } from './component';
import type { ComponentPropsMap, ComponentType } from './component';
import { setupVbenForm, useVbenForm as useForm, z } from '@vben/common-ui';
import { $t } from '@vben/locales';
@ -61,9 +61,10 @@ async function initSetupVbenForm() {
});
}
const useVbenForm = useForm<ComponentType>;
const useVbenForm = useForm<ComponentType, ComponentPropsMap>;
export { initSetupVbenForm, useVbenForm, z };
export type VbenFormSchema = FormSchema<ComponentType>;
export type { VbenFormProps };
export type VbenFormApi = ReturnType<typeof useVbenForm>[1]; // add by 芋艿:用于 data.ts 表单 schema 内调用 setFieldValue
export type VbenFormSchema = FormSchema<ComponentType, ComponentPropsMap>;
export type VbenFormProps = FormProps<ComponentType, ComponentPropsMap>;

View File

@ -1,6 +1,8 @@
import type { VxeTableGridOptions } from '@vben/plugins/vxe-table';
import type { Recordable } from '@vben/types';
import type { ComponentPropsMap, ComponentType } from './component';
import { h } from 'vue';
import { IconifyIcon } from '@vben/icons';
@ -10,7 +12,7 @@ import {
AsyncVxeTable,
createRequiredValidation,
setupVbenVxeTable,
useVbenVxeGrid,
useVbenVxeGrid as useGrid,
} from '@vben/plugins/vxe-table';
import {
erpCountInputFormatter,
@ -199,7 +201,7 @@ setupVbenVxeTable({
vxeUI.renderer.add('CellOperation', {
renderTableDefault({ attrs, options, props }, { column, row }) {
const defaultProps = { size: 'small', type: 'link', ...props };
let align = 'end';
let align: string;
switch (column.align) {
case 'center': {
align = 'center';
@ -363,10 +365,13 @@ setupVbenVxeTable({
useVbenForm,
});
export { createRequiredValidation, useVbenVxeGrid };
export { createRequiredValidation };
export const [VxeTable, VxeColumn] = [AsyncVxeTable, AsyncVxeColumn];
export * from '#/components/table-action';
export const useVbenVxeGrid = <T extends Record<string, any>>(
...rest: Parameters<typeof useGrid<T, ComponentType, ComponentPropsMap>>
) => useGrid<T, ComponentType, ComponentPropsMap>(...rest);
export type * from '@vben/plugins/vxe-table';

View File

@ -16,10 +16,10 @@ export namespace CrmCustomerLimitConfigApi {
/** 客户限制配置类型 */
export enum LimitConfType {
/** 锁定客户数限制 */
CUSTOMER_LOCK_LIMIT = 2,
/** 拥有客户数限制 */
CUSTOMER_QUANTITY_LIMIT = 1,
/** 锁定客户数限制 */
CUSTOMER_LOCK_LIMIT = 2,
}
/** 查询客户限制配置列表 */

View File

@ -35,11 +35,11 @@ export namespace CrmPermissionApi {
* CRM
*/
export enum BizTypeEnum {
CRM_BUSINESS = 4, // 商机
CRM_CLUE = 1, // 线索
CRM_CONTACT = 3, // 联系人
CRM_CONTRACT = 5, // 合同
CRM_CUSTOMER = 2, // 客户
CRM_CONTACT = 3, // 联系人
CRM_BUSINESS = 4, // 商机
CRM_CONTRACT = 5, // 合同
CRM_PRODUCT = 6, // 产品
CRM_RECEIVABLE = 7, // 回款
CRM_RECEIVABLE_PLAN = 8, // 回款计划

View File

@ -3,37 +3,21 @@ import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace AlertConfigApi {
/** IoT 告警配置 VO */
/** IoT 告警配置 */
export interface AlertConfig {
id?: number;
name: string;
name?: string;
description?: string;
level?: number;
status?: number;
sceneRuleIds?: number[];
receiveUserIds?: number[];
receiveUserNames?: string;
receiveUserNames?: string[];
receiveTypes?: number[];
createTime?: Date;
updateTime?: Date;
}
}
/** IoT 告警配置 */
export interface AlertConfig {
id?: number;
name?: string;
description?: string;
level?: number;
status?: number;
sceneRuleIds?: number[];
receiveUserIds?: number[];
receiveUserNames?: string;
receiveTypes?: number[];
createTime?: Date;
updateTime?: Date;
}
/** 查询告警配置分页 */
export function getAlertConfigPage(params: PageParam) {
return requestClient.get<PageResult<AlertConfigApi.AlertConfig>>(
@ -49,20 +33,20 @@ export function getAlertConfig(id: number) {
);
}
/** 查询所有告警配置列表 */
export function getAlertConfigList() {
/** 获取告警配置简单列表 */
export function getSimpleAlertConfigList() {
return requestClient.get<AlertConfigApi.AlertConfig[]>(
'/iot/alert-config/list',
'/iot/alert-config/simple-list',
);
}
/** 新增告警配置 */
export function createAlertConfig(data: AlertConfig) {
export function createAlertConfig(data: AlertConfigApi.AlertConfig) {
return requestClient.post('/iot/alert-config/create', data);
}
/** 修改告警配置 */
export function updateAlertConfig(data: AlertConfig) {
export function updateAlertConfig(data: AlertConfigApi.AlertConfig) {
return requestClient.put('/iot/alert-config/update', data);
}
@ -70,25 +54,3 @@ export function updateAlertConfig(data: AlertConfig) {
export function deleteAlertConfig(id: number) {
return requestClient.delete(`/iot/alert-config/delete?id=${id}`);
}
/** 批量删除告警配置 */
export function deleteAlertConfigList(ids: number[]) {
return requestClient.delete('/iot/alert-config/delete-list', {
params: { ids: ids.join(',') },
});
}
/** 启用/禁用告警配置 */
export function toggleAlertConfig(id: number, enabled: boolean) {
return requestClient.put(`/iot/alert-config/toggle`, {
id,
enabled,
});
}
/** 获取告警配置简单列表 */
export function getSimpleAlertConfigList() {
return requestClient.get<AlertConfigApi.AlertConfig[]>(
'/iot/alert-config/simple-list',
);
}

View File

@ -3,41 +3,21 @@ import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace AlertRecordApi {
/** IoT 告警记录 VO */
/** IoT 告警记录 */
export interface AlertRecord {
id?: number;
configId?: number;
configName?: string;
configLevel?: number;
deviceId?: number;
deviceName?: string;
productId?: number;
productName?: string;
deviceMessage?: string;
deviceMessage?: any;
processStatus?: boolean;
processRemark?: string;
processTime?: Date;
createTime?: Date;
}
}
/** IoT 告警记录 */
export interface AlertRecord {
id?: number;
configId?: number;
configName?: string;
configLevel?: number;
deviceId?: number;
deviceName?: string;
productId?: number;
productName?: string;
deviceMessage?: string;
processStatus?: boolean;
processRemark?: string;
processTime?: Date;
createTime?: Date;
}
/** 查询告警记录分页 */
export function getAlertRecordPage(params: PageParam) {
return requestClient.get<PageResult<AlertRecordApi.AlertRecord>>(
@ -54,29 +34,9 @@ export function getAlertRecord(id: number) {
}
/** 处理告警记录 */
export function processAlertRecord(id: number, remark?: string) {
export function processAlertRecord(id: number, processRemark?: string) {
return requestClient.put('/iot/alert-record/process', {
id,
remark,
});
}
/** 批量处理告警记录 */
export function batchProcessAlertRecord(ids: number[], remark?: string) {
return requestClient.put('/iot/alert-record/batch-process', {
ids,
remark,
});
}
/** 删除告警记录 */
export function deleteAlertRecord(id: number) {
return requestClient.delete(`/iot/alert-record/delete?id=${id}`);
}
/** 批量删除告警记录 */
export function deleteAlertRecordList(ids: number[]) {
return requestClient.delete('/iot/alert-record/delete-list', {
params: { ids: ids.join(',') },
processRemark,
});
}

View File

@ -3,39 +3,48 @@ import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace IotDeviceApi {
// TODO @haohao需要跟后端对齐必要的 ReqVO、RespVO
/** 设备 */
export interface Device {
id?: number; // 设备 ID主键自增
id?: number; // 设备编号
deviceName: string; // 设备名称
nickname?: string; // 备注名称
serialNumber?: string; // 设备序列号
picUrl?: string; // 设备图片
groupIds?: number[]; // 设备分组编号数组
productId: number; // 产品编号
productKey?: string; // 产品标识
productName?: string; // 产品名称(只有部分接口返回,例如 getDeviceLocationList
deviceType?: number; // 设备类型
nickname?: string; // 设备备注名称
gatewayId?: number; // 网关设备 ID
state?: number; // 设备状态
status?: number; // 设备状态(兼容字段)
onlineTime?: Date; // 最后上线时间
offlineTime?: Date; // 最后离线时间
activeTime?: Date; // 设备激活时间
createTime?: Date; // 创建时间
ip?: string; // 设备的 IP 地址
firmwareVersion?: string; // 设备的固件版本
deviceSecret?: string; // 设备密钥,用于设备认证,需安全存储
mqttClientId?: string; // MQTT 客户端 ID
mqttUsername?: string; // MQTT 用户名
mqttPassword?: string; // MQTT 密码
authType?: string; // 认证类型
locationType?: number; // 定位类型
deviceSecret?: string; // 设备密钥,用于设备认证
config?: string; // 设备配置
latitude?: number; // 设备位置的纬度
longitude?: number; // 设备位置的经度
areaId?: number; // 地区编码
address?: string; // 设备详细地址
serialNumber?: string; // 设备序列号
config?: string; // 设备配置
groupIds?: number[]; // 添加分组 ID
picUrl?: string; // 设备图片
location?: string; // 位置信息(格式:经度,纬度)
createTime?: Date; // 创建时间
}
/** 设备更新分组 Request VO */
export interface DeviceUpdateGroupReqVO {
ids: number[]; // 设备编号列表(必填)
groupIds: number[]; // 分组编号列表(必填)
}
/** 设备认证信息 Response VO */
export interface DeviceAuthInfoRespVO {
clientId: string; // 客户端 ID
username: string; // 用户名
password: string; // 密码
}
/** 设备导入 Response VO */
export interface DeviceImportRespVO {
createDeviceNames?: string[]; // 创建成功的设备名称列表
updateDeviceNames?: string[]; // 更新成功的设备名称列表
failureDeviceNames?: Record<string, string>; // 失败的设备名称及原因
}
/** IoT 设备属性详细 VO */
@ -56,25 +65,12 @@ export namespace IotDeviceApi {
updateTime: Date; // 更新时间
}
/** 设备认证参数 VO */
export interface DeviceAuthInfo {
clientId: string; // 客户端 ID
username: string; // 用户名
password: string; // 密码
}
/** 设备发送消息 Request VO */
export interface DeviceMessageSendReq {
deviceId: number; // 设备编号
method: string; // 请求方法
params?: any; // 请求参数
}
/** 设备分组更新请求 */
export interface DeviceGroupUpdateReq {
ids: number[]; // 设备 ID 列表
groupIds: number[]; // 分组 ID 列表
}
}
/** 查询设备分页 */
@ -92,33 +88,33 @@ export function getDevice(id: number) {
/** 新增设备 */
export function createDevice(data: IotDeviceApi.Device) {
return requestClient.post('/iot/device/create', data);
return requestClient.post<number>('/iot/device/create', data);
}
/** 修改设备 */
export function updateDevice(data: IotDeviceApi.Device) {
return requestClient.put('/iot/device/update', data);
return requestClient.put<boolean>('/iot/device/update', data);
}
/** 修改设备分组 */
export function updateDeviceGroup(data: IotDeviceApi.DeviceGroupUpdateReq) {
return requestClient.put('/iot/device/update-group', data);
export function updateDeviceGroup(data: IotDeviceApi.DeviceUpdateGroupReqVO) {
return requestClient.put<boolean>('/iot/device/update-group', data);
}
/** 删除单个设备 */
export function deleteDevice(id: number) {
return requestClient.delete(`/iot/device/delete?id=${id}`);
return requestClient.delete<boolean>(`/iot/device/delete?id=${id}`);
}
/** 删除多个设备 */
export function deleteDeviceList(ids: number[]) {
return requestClient.delete('/iot/device/delete-list', {
return requestClient.delete<boolean>('/iot/device/delete-list', {
params: { ids: ids.join(',') },
});
}
/** 导出设备 */
export function exportDeviceExcel(params: any) {
export function exportDeviceExcel(params: PageParam) {
return requestClient.download('/iot/device/export-excel', { params });
}
@ -141,6 +137,11 @@ export function getDeviceListByProductId(productId: number) {
});
}
/** 获取设备位置列表(用于地图展示) */
export function getDeviceLocationList() {
return requestClient.get<IotDeviceApi.Device[]>('/iot/device/location-list');
}
/** 获取导入模板 */
export function importDeviceTemplate() {
return requestClient.download('/iot/device/get-import-template');
@ -148,10 +149,10 @@ export function importDeviceTemplate() {
/** 导入设备 */
export function importDevice(file: File, updateSupport: boolean) {
return requestClient.upload('/iot/device/import', {
file,
updateSupport,
});
return requestClient.upload<IotDeviceApi.DeviceImportRespVO>(
`/iot/device/import?updateSupport=${updateSupport}`,
{ file },
);
}
/** 获取设备属性最新数据 */
@ -164,7 +165,7 @@ export function getLatestDeviceProperties(params: any) {
/** 获取设备属性历史数据 */
export function getHistoryDevicePropertyList(params: any) {
return requestClient.get<PageResult<IotDeviceApi.DeviceProperty>>(
return requestClient.get<IotDeviceApi.DeviceProperty[]>(
'/iot/device/property/history-list',
{ params },
);
@ -172,7 +173,7 @@ export function getHistoryDevicePropertyList(params: any) {
/** 获取设备认证信息 */
export function getDeviceAuthInfo(id: number) {
return requestClient.get<IotDeviceApi.DeviceAuthInfo>(
return requestClient.get<IotDeviceApi.DeviceAuthInfoRespVO>(
'/iot/device/get-auth-info',
{ params: { id } },
);
@ -196,3 +197,35 @@ export function getDeviceMessagePairPage(params: PageParam) {
export function sendDeviceMessage(params: IotDeviceApi.DeviceMessageSendReq) {
return requestClient.post('/iot/device/message/send', params);
}
/** 绑定子设备到网关设备 */
export function bindDeviceGateway(gatewayId: number, subIds: number[]) {
return requestClient.put<boolean>('/iot/device/bind-gateway', {
gatewayId,
subIds,
});
}
/** 解绑子设备与网关设备 */
export function unbindDeviceGateway(gatewayId: number, subIds: number[]) {
return requestClient.put<boolean>('/iot/device/unbind-gateway', {
gatewayId,
subIds,
});
}
/** 获取网关设备的子设备列表 */
export function getSubDeviceList(gatewayId: number) {
return requestClient.get<IotDeviceApi.Device[]>(
'/iot/device/sub-device-list',
{ params: { gatewayId } },
);
}
/** 获取未绑定的子设备分页 */
export function getUnboundSubDevicePage(params: PageParam) {
return requestClient.get<PageResult<IotDeviceApi.Device>>(
'/iot/device/unbound-sub-device-page',
{ params },
);
}

View File

@ -0,0 +1,30 @@
import { requestClient } from '#/api/request';
export namespace IotDeviceModbusConfigApi {
/** Modbus 连接配置 VO */
export interface ModbusConfig {
id?: number; // 主键
deviceId: number; // 设备编号
ip: string; // Modbus 服务器 IP 地址
port: number; // Modbus 服务器端口
slaveId: number; // 从站地址
timeout: number; // 连接超时时间,单位:毫秒
retryInterval: number; // 重试间隔,单位:毫秒
mode: number; // 模式
frameFormat: number; // 帧格式
status: number; // 状态
}
}
/** 获取设备的 Modbus 连接配置 */
export function getModbusConfig(deviceId: number) {
return requestClient.get<IotDeviceModbusConfigApi.ModbusConfig>(
'/iot/device-modbus-config/get',
{ params: { deviceId } },
);
}
/** 保存 Modbus 连接配置 */
export function saveModbusConfig(data: IotDeviceModbusConfigApi.ModbusConfig) {
return requestClient.post('/iot/device-modbus-config/save', data);
}

View File

@ -0,0 +1,52 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace IotDeviceModbusPointApi {
/** Modbus 点位配置 VO */
export interface ModbusPoint {
id?: number; // 主键
deviceId: number; // 设备编号
thingModelId?: number; // 物模型属性编号
identifier: string; // 属性标识符
name: string; // 属性名称
functionCode?: number; // Modbus 功能码
registerAddress?: number; // 寄存器起始地址
registerCount?: number; // 寄存器数量
byteOrder?: string; // 字节序
rawDataType?: string; // 原始数据类型
scale: number; // 缩放因子
pollInterval: number; // 轮询间隔,单位:毫秒
status: number; // 状态
}
}
/** 获取设备的 Modbus 点位分页 */
export function getModbusPointPage(params: PageParam) {
return requestClient.get<PageResult<IotDeviceModbusPointApi.ModbusPoint>>(
'/iot/device-modbus-point/page',
{ params },
);
}
/** 获取 Modbus 点位详情 */
export function getModbusPoint(id: number) {
return requestClient.get<IotDeviceModbusPointApi.ModbusPoint>(
`/iot/device-modbus-point/get?id=${id}`,
);
}
/** 创建 Modbus 点位配置 */
export function createModbusPoint(data: IotDeviceModbusPointApi.ModbusPoint) {
return requestClient.post('/iot/device-modbus-point/create', data);
}
/** 更新 Modbus 点位配置 */
export function updateModbusPoint(data: IotDeviceModbusPointApi.ModbusPoint) {
return requestClient.put('/iot/device-modbus-point/update', data);
}
/** 删除 Modbus 点位配置 */
export function deleteModbusPoint(id: number) {
return requestClient.delete(`/iot/device-modbus-point/delete?id=${id}`);
}

View File

@ -3,39 +3,22 @@ import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace IoTOtaFirmwareApi {
/** IoT OTA 固件 VO */
/** IoT OTA 固件信息 */
export interface Firmware {
id?: number;
name: string;
version: string;
productId: number;
productName?: string;
name?: string;
description?: string;
version?: string;
productId?: number;
productName?: string;
fileUrl?: string;
fileMd5?: string;
fileSize?: number;
status?: number;
fileDigestAlgorithm?: string;
fileDigestValue?: string;
createTime?: Date;
updateTime?: Date;
}
}
/** IoT OTA 固件 */
export interface IoTOtaFirmware {
id?: number;
name?: string;
version?: string;
productId?: number;
productName?: string;
description?: string;
fileUrl?: string;
fileMd5?: string;
fileSize?: number;
status?: number;
createTime?: Date;
updateTime?: Date;
}
/** 查询 OTA 固件分页 */
export function getOtaFirmwarePage(params: PageParam) {
return requestClient.get<PageResult<IoTOtaFirmwareApi.Firmware>>(
@ -52,12 +35,12 @@ export function getOtaFirmware(id: number) {
}
/** 新增 OTA 固件 */
export function createOtaFirmware(data: IoTOtaFirmware) {
export function createOtaFirmware(data: IoTOtaFirmwareApi.Firmware) {
return requestClient.post('/iot/ota/firmware/create', data);
}
/** 修改 OTA 固件 */
export function updateOtaFirmware(data: IoTOtaFirmware) {
export function updateOtaFirmware(data: IoTOtaFirmwareApi.Firmware) {
return requestClient.put('/iot/ota/firmware/update', data);
}
@ -65,26 +48,3 @@ export function updateOtaFirmware(data: IoTOtaFirmware) {
export function deleteOtaFirmware(id: number) {
return requestClient.delete(`/iot/ota/firmware/delete?id=${id}`);
}
/** 批量删除 OTA 固件 */
export function deleteOtaFirmwareList(ids: number[]) {
return requestClient.delete('/iot/ota/firmware/delete-list', {
params: { ids: ids.join(',') },
});
}
/** 更新 OTA 固件状态 */
export function updateOtaFirmwareStatus(id: number, status: number) {
return requestClient.put(`/iot/ota/firmware/update-status`, {
id,
status,
});
}
/** 根据产品 ID 查询固件列表 */
export function getOtaFirmwareListByProductId(productId: number) {
return requestClient.get<IoTOtaFirmwareApi.Firmware[]>(
'/iot/ota/firmware/list-by-product-id',
{ params: { productId } },
);
}

View File

@ -3,45 +3,21 @@ import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace IoTOtaTaskApi {
/** IoT OTA 升级任务 VO */
/** IoT OTA 升级任务 */
export interface Task {
id?: number;
name: string;
name?: string;
description?: string;
firmwareId: number;
firmwareName?: string;
productId?: number;
productName?: string;
firmwareId?: number;
status?: number;
deviceScope?: number;
deviceIds?: number[];
status?: number;
successCount?: number;
failureCount?: number;
pendingCount?: number;
deviceTotalCount?: number;
deviceSuccessCount?: number;
createTime?: Date;
updateTime?: Date;
}
}
/** IoT OTA 升级任务 */
export interface OtaTask {
id?: number;
name?: string;
description?: string;
firmwareId?: number;
firmwareName?: string;
productId?: number;
productName?: string;
deviceScope?: number;
deviceIds?: number[];
status?: number;
successCount?: number;
failureCount?: number;
pendingCount?: number;
createTime?: Date;
updateTime?: Date;
}
/** 查询 OTA 升级任务分页 */
export function getOtaTaskPage(params: PageParam) {
return requestClient.get<PageResult<IoTOtaTaskApi.Task>>(
@ -56,43 +32,11 @@ export function getOtaTask(id: number) {
}
/** 新增 OTA 升级任务 */
export function createOtaTask(data: OtaTask) {
export function createOtaTask(data: IoTOtaTaskApi.Task) {
return requestClient.post('/iot/ota/task/create', data);
}
/** 修改 OTA 升级任务 */
export function updateOtaTask(data: OtaTask) {
return requestClient.put('/iot/ota/task/update', data);
}
/** 删除 OTA 升级任务 */
export function deleteOtaTask(id: number) {
return requestClient.delete(`/iot/ota/task/delete?id=${id}`);
}
/** 批量删除 OTA 升级任务 */
export function deleteOtaTaskList(ids: number[]) {
return requestClient.delete('/iot/ota/task/delete-list', {
params: { ids: ids.join(',') },
});
}
/** 取消 OTA 升级任务 */
export function cancelOtaTask(id: number) {
return requestClient.put(`/iot/ota/task/cancel?id=${id}`);
}
/** 启动 OTA 升级任务 */
export function startOtaTask(id: number) {
return requestClient.put(`/iot/ota/task/start?id=${id}`);
}
/** 暂停 OTA 升级任务 */
export function pauseOtaTask(id: number) {
return requestClient.put(`/iot/ota/task/pause?id=${id}`);
}
/** 恢复 OTA 升级任务 */
export function resumeOtaTask(id: number) {
return requestClient.put(`/iot/ota/task/resume?id=${id}`);
return requestClient.post(`/iot/ota/task/cancel?id=${id}`);
}

View File

@ -3,44 +3,24 @@ import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace IoTOtaTaskRecordApi {
/** IoT OTA 升级任务记录 VO */
/** IoT OTA 升级任务记录 */
export interface TaskRecord {
id?: number;
taskId: number;
taskName?: string;
deviceId: number;
deviceName?: string;
firmwareId?: number;
firmwareName?: string;
firmwareVersion?: string;
taskId?: number;
deviceId?: string;
deviceName?: string;
currentVersion?: string;
fromFirmwareId?: number;
fromFirmwareVersion?: string;
status?: number;
progress?: number;
errorMessage?: string;
startTime?: Date;
endTime?: Date;
createTime?: Date;
description?: string;
updateTime?: Date;
}
}
// TODO @AI这里应该拿到 IoTOtaTaskRecordApi 里
/** IoT OTA 升级任务记录 */
export interface OtaTaskRecord {
id?: number;
taskId?: number;
taskName?: string;
deviceId?: number;
deviceName?: string;
firmwareId?: number;
firmwareName?: string;
firmwareVersion?: string;
status?: number;
progress?: number;
errorMessage?: string;
startTime?: Date;
endTime?: Date;
createTime?: Date;
}
/** 查询 OTA 升级任务记录分页 */
export function getOtaTaskRecordPage(params: PageParam) {
return requestClient.get<PageResult<IoTOtaTaskRecordApi.TaskRecord>>(
@ -49,48 +29,12 @@ export function getOtaTaskRecordPage(params: PageParam) {
);
}
/** 查询 OTA 升级任务记录详情 */
export function getOtaTaskRecord(id: number) {
return requestClient.get<IoTOtaTaskRecordApi.TaskRecord>(
`/iot/ota/task/record/get?id=${id}`,
);
}
/** 根据任务 ID 查询记录列表 */
export function getOtaTaskRecordListByTaskId(taskId: number) {
return requestClient.get<IoTOtaTaskRecordApi.TaskRecord[]>(
'/iot/ota/task/record/list-by-task-id',
{ params: { taskId } },
);
}
/** 根据设备 ID 查询记录列表 */
export function getOtaTaskRecordListByDeviceId(deviceId: number) {
return requestClient.get<IoTOtaTaskRecordApi.TaskRecord[]>(
'/iot/ota/task/record/list-by-device-id',
{ params: { deviceId } },
);
}
/** 根据固件 ID 查询记录列表 */
export function getOtaTaskRecordListByFirmwareId(firmwareId: number) {
return requestClient.get<IoTOtaTaskRecordApi.TaskRecord[]>(
'/iot/ota/task/record/list-by-firmware-id',
{ params: { firmwareId } },
);
}
/** 重试升级任务记录 */
export function retryOtaTaskRecord(id: number) {
return requestClient.put(`/iot/ota/task/record/retry?id=${id}`);
}
/** 取消升级任务记录 */
/** 取消 OTA 升级任务记录 */
export function cancelOtaTaskRecord(id: number) {
return requestClient.put(`/iot/ota/task/record/cancel?id=${id}`);
}
/** 获取升级任务记录状态统计 */
/** 获取 OTA 升级任务记录状态统计 */
export function getOtaTaskRecordStatusStatistics(
firmwareId?: number,
taskId?: number,

View File

@ -7,11 +7,10 @@ export namespace IotProductCategoryApi {
export interface ProductCategory {
id?: number; // 分类 ID
name: string; // 分类名称
parentId?: number; // 父级分类 ID
sort?: number; // 分类排序
status?: number; // 分类状态
description?: string; // 分类描述
createTime?: string; // 创建时间
createTime?: Date; // 创建时间
}
}

View File

@ -8,8 +8,9 @@ export namespace IotProductApi {
id?: number; // 产品编号
name: string; // 产品名称
productKey?: string; // 产品标识
productSecret?: string; // 产品密钥
protocolId?: number; // 协议编号
protocolType?: number; // 接入协议类型
protocolType?: string; // 协议类型
categoryId?: number; // 产品所属品类标识符
categoryName?: string; // 产品所属品类名称
icon?: string; // 产品图标
@ -17,16 +18,33 @@ export namespace IotProductApi {
description?: string; // 产品描述
status?: number; // 产品状态
deviceType?: number; // 设备类型
locationType?: number; // 定位类型
netType?: number; // 联网方式
codecType?: string; // 数据格式(编解码器类型)
dataFormat?: number; // 数据格式
validateType?: number; // 认证方式
serializeType?: string; // 序列化类型
registerEnabled?: boolean; // 是否开启动态注册
deviceCount?: number; // 设备数量
createTime?: Date; // 创建时间
}
}
// IoT 协议类型枚举
export enum ProtocolTypeEnum {
COAP = 'coap',
EMQX = 'emqx',
HTTP = 'http',
MODBUS_TCP_CLIENT = 'modbus_tcp_client',
MODBUS_TCP_SERVER = 'modbus_tcp_server',
MQTT = 'mqtt',
TCP = 'tcp',
UDP = 'udp',
WEBSOCKET = 'websocket',
}
// IoT 序列化类型枚举
export enum SerializeTypeEnum {
BINARY = 'binary',
JSON = 'json',
}
/** 查询产品分页 */
export function getProductPage(params: PageParam) {
return requestClient.get<PageResult<IotProductApi.Product>>(
@ -68,8 +86,13 @@ export function updateProductStatus(id: number, status: number) {
}
/** 查询产品(精简)列表 */
export function getSimpleProductList() {
return requestClient.get<IotProductApi.Product[]>('/iot/product/simple-list');
export function getSimpleProductList(deviceType?: number) {
return requestClient.get<IotProductApi.Product[]>(
'/iot/product/simple-list',
{
params: { deviceType },
},
);
}
/** 根据 ProductKey 获取产品信息 */
@ -78,3 +101,10 @@ export function getProductByKey(productKey: string) {
params: { productKey },
});
}
/** 同步产品物模型 TDengine 超级表结构 */
export function syncProductPropertyTable(productId: number) {
return requestClient.post(
`/iot/product/sync-property-table?productId=${productId}`,
);
}

View File

@ -3,45 +3,21 @@ import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace DataRuleApi {
/** IoT 数据流转规则 VO */
export interface Rule {
/** IoT 数据流转规则 */
export interface DataRule {
id?: number;
name: string;
name?: string;
description?: string;
status?: number;
productId?: number;
productKey?: string;
sourceConfigs?: SourceConfig[];
sourceConfigs?: any[];
sinkIds?: number[];
createTime?: Date;
}
/** IoT 数据源配置 */
export interface SourceConfig {
productId?: number;
productKey?: string;
deviceId?: number;
type?: string;
topic?: string;
}
}
/** IoT 数据流转规则 */
export interface DataRule {
id?: number;
name?: string;
description?: string;
status?: number;
productId?: number;
productKey?: string;
sourceConfigs?: any[];
sinkIds?: number[];
createTime?: Date;
}
/** 查询数据流转规则分页 */
export function getDataRulePage(params: PageParam) {
return requestClient.get<PageResult<DataRuleApi.Rule>>(
return requestClient.get<PageResult<DataRuleApi.DataRule>>(
'/iot/data-rule/page',
{ params },
);
@ -49,16 +25,16 @@ export function getDataRulePage(params: PageParam) {
/** 查询数据流转规则详情 */
export function getDataRule(id: number) {
return requestClient.get<DataRuleApi.Rule>(`/iot/data-rule/get?id=${id}`);
return requestClient.get<DataRuleApi.DataRule>(`/iot/data-rule/get?id=${id}`);
}
/** 新增数据流转规则 */
export function createDataRule(data: DataRule) {
export function createDataRule(data: DataRuleApi.DataRule) {
return requestClient.post('/iot/data-rule/create', data);
}
/** 修改数据流转规则 */
export function updateDataRule(data: DataRule) {
export function updateDataRule(data: DataRuleApi.DataRule) {
return requestClient.put('/iot/data-rule/update', data);
}
@ -66,18 +42,3 @@ export function updateDataRule(data: DataRule) {
export function deleteDataRule(id: number) {
return requestClient.delete(`/iot/data-rule/delete?id=${id}`);
}
/** 批量删除数据流转规则 */
export function deleteDataRuleList(ids: number[]) {
return requestClient.delete('/iot/data-rule/delete-list', {
params: { ids: ids.join(',') },
});
}
/** 更新数据流转规则状态 */
export function updateDataRuleStatus(id: number, status: number) {
return requestClient.put(`/iot/data-rule/update-status`, {
id,
status,
});
}

View File

@ -2,101 +2,147 @@ import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
interface BaseConfig {
type: string;
}
export namespace DataSinkApi {
/** IoT 数据流转目的 VO */
export interface Sink {
export interface DataSink {
id?: number;
name: string;
name?: string;
description?: string;
status?: number;
type: string;
config?: any;
direction?: number;
type?: number;
config?:
| DatabaseConfig
| HttpConfig
| KafkaMQConfig
| MqttConfig
| RabbitMQConfig
| RedisStreamMQConfig
| RocketMQConfig
| TcpConfig
| WebSocketConfig;
createTime?: Date;
}
/** HTTP 配置 */
export interface HttpConfig extends BaseConfig {
url: string;
method: string;
headers: Record<string, string>;
query: Record<string, string>;
body: string;
}
/** TCP 配置 */
export interface TcpConfig extends BaseConfig {
host: string;
port: number;
connectTimeoutMs: number;
readTimeoutMs: number;
ssl: boolean;
sslCertPath: string;
dataFormat: string;
heartbeatIntervalMs: number;
reconnectIntervalMs: number;
maxReconnectAttempts: number;
}
/** WebSocket 配置 */
export interface WebSocketConfig extends BaseConfig {
serverUrl: string;
connectTimeoutMs: number;
sendTimeoutMs: number;
heartbeatIntervalMs: number;
heartbeatMessage: string;
subprotocols: string;
customHeaders: string;
verifySslCert: boolean;
dataFormat: string;
reconnectIntervalMs: number;
maxReconnectAttempts: number;
enableCompression: boolean;
sendRetryCount: number;
sendRetryIntervalMs: number;
}
/** MQTT 配置 */
export interface MqttConfig extends BaseConfig {
url: string;
username: string;
password: string;
clientId: string;
topic: string;
}
/** Database 配置 */
export interface DatabaseConfig extends BaseConfig {
jdbcUrl: string;
username: string;
password: string;
tableName: string;
}
/** RocketMQ 配置 */
export interface RocketMQConfig extends BaseConfig {
nameServer: string;
accessKey: string;
secretKey: string;
group: string;
topic: string;
tags: string;
}
/** Kafka 配置 */
export interface KafkaMQConfig extends BaseConfig {
bootstrapServers: string;
username: string;
password: string;
ssl: boolean;
topic: string;
}
/** RabbitMQ 配置 */
export interface RabbitMQConfig extends BaseConfig {
host: string;
port: number;
virtualHost: string;
username: string;
password: string;
exchange: string;
routingKey: string;
queue: string;
}
/** Redis Stream MQ 配置 */
export interface RedisStreamMQConfig extends BaseConfig {
host: string;
port: number;
password: string;
database: number;
topic: string;
}
}
/** IoT 数据流转目的 */
export interface DataSinkVO {
id?: number;
name?: string;
description?: string;
status?: number;
type?: string;
config?: any;
createTime?: Date;
}
/** IoT 数据目的类型枚举 */
export enum IotDataSinkTypeEnum {
HTTP = 'HTTP',
KAFKA = 'KAFKA',
MQTT = 'MQTT',
RABBITMQ = 'RABBITMQ',
REDIS_STREAM = 'REDIS_STREAM',
ROCKETMQ = 'ROCKETMQ',
}
/** HTTP 配置 */
export interface HttpConfig {
url?: string;
method?: string;
headers?: Record<string, string>;
timeout?: number;
}
/** MQTT 配置 */
export interface MqttConfig {
broker?: string;
port?: number;
topic?: string;
username?: string;
password?: string;
clientId?: string;
qos?: number;
}
/** Kafka 配置 */
export interface KafkaMQConfig {
bootstrapServers?: string;
topic?: string;
acks?: string;
retries?: number;
batchSize?: number;
}
/** RabbitMQ 配置 */
export interface RabbitMQConfig {
host?: string;
port?: number;
virtualHost?: string;
username?: string;
password?: string;
exchange?: string;
routingKey?: string;
queue?: string;
}
/** RocketMQ 配置 */
export interface RocketMQConfig {
nameServer?: string;
topic?: string;
tag?: string;
producerGroup?: string;
}
/** Redis Stream 配置 */
export interface RedisStreamMQConfig {
host?: string;
port?: number;
password?: string;
database?: number;
streamKey?: string;
maxLen?: number;
}
/** 数据流转目的类型 */
export const IotDataSinkTypeEnum = {
HTTP: 1,
TCP: 2,
WEBSOCKET: 3,
MQTT: 10,
DATABASE: 20,
REDIS_STREAM: 21,
ROCKETMQ: 30,
RABBITMQ: 31,
KAFKA: 32,
} as const;
/** 查询数据流转目的分页 */
export function getDataSinkPage(params: PageParam) {
return requestClient.get<PageResult<DataSinkApi.Sink>>(
return requestClient.get<PageResult<DataSinkApi.DataSink>>(
'/iot/data-sink/page',
{ params },
);
@ -104,26 +150,23 @@ export function getDataSinkPage(params: PageParam) {
/** 查询数据流转目的详情 */
export function getDataSink(id: number) {
return requestClient.get<DataSinkApi.Sink>(`/iot/data-sink/get?id=${id}`);
return requestClient.get<DataSinkApi.DataSink>(`/iot/data-sink/get?id=${id}`);
}
/** 查询所有数据流转目的列表 */
export function getDataSinkList() {
return requestClient.get<DataSinkApi.Sink[]>('/iot/data-sink/list');
}
/** 查询数据流转目的简单列表 */
/** 查询数据流转目的(精简)列表 */
export function getDataSinkSimpleList() {
return requestClient.get<DataSinkApi.Sink[]>('/iot/data-sink/simple-list');
return requestClient.get<DataSinkApi.DataSink[]>(
'/iot/data-sink/simple-list',
);
}
/** 新增数据流转目的 */
export function createDataSink(data: DataSinkVO) {
export function createDataSink(data: DataSinkApi.DataSink) {
return requestClient.post('/iot/data-sink/create', data);
}
/** 修改数据流转目的 */
export function updateDataSink(data: DataSinkVO) {
export function updateDataSink(data: DataSinkApi.DataSink) {
return requestClient.put('/iot/data-sink/update', data);
}
@ -131,18 +174,3 @@ export function updateDataSink(data: DataSinkVO) {
export function deleteDataSink(id: number) {
return requestClient.delete(`/iot/data-sink/delete?id=${id}`);
}
/** 批量删除数据流转目的 */
export function deleteDataSinkList(ids: number[]) {
return requestClient.delete('/iot/data-sink/delete-list', {
params: { ids: ids.join(',') },
});
}
/** 更新数据流转目的状态 */
export function updateDataSinkStatus(id: number, status: number) {
return requestClient.put(`/iot/data-sink/update-status`, {
id,
status,
});
}

View File

@ -11,25 +11,20 @@ export namespace RuleSceneApi {
status?: number;
triggers?: Trigger[];
actions?: Action[];
lastTriggeredTime?: Date;
createTime?: Date;
}
/** 场景联动规则的触发器 */
export interface Trigger {
type?: string;
type?: number;
productId?: number;
deviceId?: number;
identifier?: string;
operator?: string;
value?: any;
cronExpression?: string;
conditionGroups?: TriggerConditionGroup[];
}
/** 场景联动规则的触发条件组 */
export interface TriggerConditionGroup {
conditions?: TriggerCondition[];
operator?: string;
conditionGroups?: TriggerCondition[][];
}
/** 场景联动规则的触发条件 */
@ -39,72 +34,22 @@ export namespace RuleSceneApi {
identifier?: string;
operator?: string;
value?: any;
type?: string;
type?: number;
param?: string;
}
/** 场景联动规则的动作 */
export interface Action {
type?: string;
type?: number;
productId?: number;
deviceId?: number;
identifier?: string;
value?: any;
alertConfigId?: number;
params?: string;
}
}
// TODO @haohao貌似下面的和 RuleSceneApi 重复了。
/** IoT 场景联动规则 */
export interface IotSceneRule {
id?: number;
name?: string;
description?: string;
status?: number;
triggers?: Trigger[];
actions?: Action[];
createTime?: Date;
}
/** IoT 场景联动规则触发器 */
export interface Trigger {
type?: string;
productId?: number;
deviceId?: number;
identifier?: string;
operator?: string;
value?: any;
cronExpression?: string;
conditionGroups?: TriggerConditionGroup[];
}
/** IoT 场景联动规则触发条件组 */
export interface TriggerConditionGroup {
conditions?: TriggerCondition[];
operator?: string;
}
/** IoT 场景联动规则触发条件 */
export interface TriggerCondition {
productId?: number;
deviceId?: number;
identifier?: string;
operator?: string;
value?: any;
type?: string;
param?: string;
}
/** IoT 场景联动规则动作 */
export interface Action {
type?: string;
productId?: number;
deviceId?: number;
identifier?: string;
value?: any;
alertConfigId?: number;
params?: string;
}
/** 查询场景联动规则分页 */
export function getSceneRulePage(params: PageParam) {
return requestClient.get<PageResult<RuleSceneApi.SceneRule>>(
@ -121,12 +66,12 @@ export function getSceneRule(id: number) {
}
/** 新增场景联动规则 */
export function createSceneRule(data: IotSceneRule) {
export function createSceneRule(data: RuleSceneApi.SceneRule) {
return requestClient.post('/iot/scene-rule/create', data);
}
/** 修改场景联动规则 */
export function updateSceneRule(data: IotSceneRule) {
export function updateSceneRule(data: RuleSceneApi.SceneRule) {
return requestClient.put('/iot/scene-rule/update', data);
}
@ -136,7 +81,6 @@ export function deleteSceneRule(id: number) {
}
/** 批量删除场景联动规则 */
// TODO @haohao貌似用上。
export function deleteSceneRuleList(ids: number[]) {
return requestClient.delete('/iot/scene-rule/delete-list', {
params: { ids: ids.join(',') },

View File

@ -17,18 +17,6 @@ export namespace IotStatisticsApi {
productCategoryDeviceCounts: Record<string, number>; // 按品类统计的设备数量
}
/** 时间戳-数值的键值对类型 */
export interface TimeValueItem {
[key: string]: number;
}
/** 消息统计数据类型 */
export interface DeviceMessageSummary {
statType: number;
upstreamCounts: TimeValueItem[];
downstreamCounts: TimeValueItem[];
}
/** 设备消息数量统计(按日期) */
export interface DeviceMessageSummaryByDateRespVO {
time: string; // 时间轴

View File

@ -1,126 +1,209 @@
import type { Rule } from 'ant-design-vue/es/form';
import type { PageParam, PageResult } from '@vben/request';
import { isEmpty } from '@vben/utils';
import { requestClient } from '#/api/request';
export namespace ThingModelApi {
/** IoT 物模型数据 VO */
/** IoT 物模型数据 */
export interface ThingModel {
id?: number;
productId?: number;
productKey?: string;
identifier: string;
name: string;
desc?: string;
type: string;
property?: ThingModelProperty;
event?: ThingModelEvent;
service?: ThingModelService;
identifier?: string;
name?: string;
description?: string;
dataType?: string;
type?: number; // 参见 IoTThingModelTypeEnum 枚举类
property?: Property;
event?: Event;
service?: Service;
}
/** IoT 物模型属性 */
export interface Property {
identifier: string;
name: string;
accessMode: string;
dataType: string;
identifier?: string;
name?: string;
accessMode?: string;
required?: boolean;
dataType?: string;
description?: string;
dataSpecs?: any;
dataSpecsList?: any[];
desc?: string;
}
/** IoT 物模型服务 */
export interface Service {
identifier: string;
name: string;
callType: string;
inputData?: any[];
outputData?: any[];
desc?: string;
identifier?: string;
name?: string;
required?: boolean;
callType?: string;
description?: string;
inputParams?: Param[];
outputParams?: Param[];
method?: string;
}
/** IoT 物模型事件 */
export interface Event {
identifier: string;
identifier?: string;
name?: string;
required?: boolean;
type?: string;
description?: string;
outputParams?: Param[];
method?: string;
}
/** IoT 物模型参数 */
export interface Param {
identifier?: string;
name?: string;
direction?: string;
paraOrder?: number;
dataType?: string;
dataSpecs?: any;
dataSpecsList?: any[];
}
/** IoT 物模型 TSL树形响应 */
export interface ThingModelTSL {
productId?: number;
productKey?: string;
properties?: Property[];
events?: Event[];
services?: Service[];
}
/** IoT 数据定义(数值型) */
export interface DataSpecsNumberData {
min?: number | string;
max?: number | string;
step?: number | string;
unit?: string;
unitName?: string;
}
/** IoT 数据定义(枚举/布尔型) */
export interface DataSpecsEnumOrBoolData {
value: number | string;
name: string;
type: string;
outputData?: any[];
desc?: string;
}
}
/** IoT 物模型数据 */
export interface ThingModelData {
id?: number;
productId?: number;
productKey?: string;
identifier?: string;
name?: string;
desc?: string;
type?: string;
dataType?: string;
property?: ThingModelProperty;
event?: ThingModelEvent;
service?: ThingModelService;
/** 生成「必填 + 数字」类校验器:拼到 size / length / 枚举值上 */
function buildRequiredNumberValidator(label: string) {
return (_rule: any, value: any, callback: any) => {
if (isEmpty(value)) {
callback(new Error(`${label}不能为空`));
return;
}
if (Number.isNaN(Number(value))) {
callback(new Error(`${label}必须是数字`));
return;
}
callback();
};
}
/** IoT 物模型属性 */
export interface ThingModelProperty {
identifier?: string;
name?: string;
accessMode?: string;
dataType?: string;
dataSpecs?: any;
dataSpecsList?: any[];
desc?: string;
}
/** IoT 物模型服务 */
export interface ThingModelService {
identifier?: string;
name?: string;
callType?: string;
inputData?: any[];
outputData?: any[];
desc?: string;
}
/** IoT 物模型事件 */
export interface ThingModelEvent {
identifier?: string;
name?: string;
type?: string;
outputData?: any[];
desc?: string;
}
/** IoT 数据定义(数值型) */
export interface DataSpecsNumberData {
min?: number | string;
max?: number | string;
step?: number | string;
unit?: string;
unitName?: string;
}
/** IoT 数据定义(枚举/布尔型) */
export interface DataSpecsEnumOrBoolData {
value: number | string;
name: string;
/** 生成「标识符样式」名称校验器:开头需为中文 / 英文 / 数字,整体仅允许中文、英文、数字、下划线、短划线,长度 ≤ 20 */
export function buildIdentifierLikeNameValidator(label: string) {
return (_rule: any, value: string, callback: any) => {
if (isEmpty(value)) {
callback(new Error(`${label}不能为空`));
return;
}
if (!/^[一-龥A-Za-z0-9]/.test(value)) {
callback(new Error(`${label}必须以中文、英文字母或数字开头`));
return;
}
if (!/^[一-龥A-Za-z0-9][\w一-龥-]*$/.test(value)) {
callback(
new Error(`${label}只能包含中文、英文字母、数字、下划线和短划线`),
);
return;
}
if (value.length > 20) {
callback(new Error(`${label}长度不能超过 20 个字符`));
return;
}
callback();
};
}
/** IoT 物模型表单校验规则 */
export interface ThingModelFormRules {
[key: string]: any;
}
export const ThingModelFormRules: Record<string, Rule[]> = {
name: [
{ required: true, message: '功能名称不能为空', trigger: 'blur' },
{
pattern: /^[一-龥A-Za-z0-9][一-龥A-Za-z0-9\-_/.]{0,29}$/,
message:
'支持中文、大小写字母、日文、数字、短划线、下划线、斜杠和小数点,必须以中文、英文或数字开头,不超过 30 个字符',
trigger: 'blur',
},
],
type: [{ required: true, message: '功能类型不能为空', trigger: 'blur' }],
identifier: [
{ required: true, message: '标识符不能为空', trigger: 'blur' },
{
pattern: /^\w{1,50}$/,
message: '支持大小写字母、数字和下划线,不超过 50 个字符',
trigger: 'blur',
},
{
validator: (_rule: any, value: string, callback: any) => {
const reservedKeywords = [
'set',
'get',
'post',
'property',
'event',
'time',
'value',
];
if (reservedKeywords.includes(value)) {
callback(
new Error(
'set, get, post, property, event, time, value 是系统保留字段,不能用于标识符定义',
),
);
return;
}
if (/^\d+$/.test(value)) {
callback(new Error('标识符不能是纯数字'));
return;
}
callback();
},
trigger: 'blur',
},
],
childDataType: [{ required: true, message: '元素类型不能为空' }],
size: [
{
required: true,
validator: buildRequiredNumberValidator('元素个数'),
trigger: 'blur',
},
],
length: [
{
required: true,
validator: buildRequiredNumberValidator('文本长度'),
trigger: 'blur',
},
],
accessMode: [
{ required: true, message: '请选择读写类型', trigger: 'change' },
],
callType: [{ required: true, message: '请选择调用方式', trigger: 'change' }],
eventType: [{ required: true, message: '请选择事件类型', trigger: 'change' }],
};
/** 验证布尔型名称 */
export function validateBoolName(_rule: any, value: any, callback: any) {
if (value) {
callback();
} else {
callback(new Error('枚举描述不能为空'));
}
}
/** 校验布尔值名称 */
export const validateBoolName = buildIdentifierLikeNameValidator('布尔值名称');
/** 查询产品物模型分页 */
export function getThingModelPage(params: PageParam) {
@ -141,17 +224,19 @@ export function getThingModel(id: number) {
export function getThingModelListByProductId(productId: number) {
return requestClient.get<ThingModelApi.ThingModel[]>(
'/iot/thing-model/list',
{ params: { productId } },
{
params: { productId },
},
);
}
/** 新增物模型 */
export function createThingModel(data: ThingModelData) {
export function createThingModel(data: ThingModelApi.ThingModel) {
return requestClient.post('/iot/thing-model/create', data);
}
/** 修改物模型 */
export function updateThingModel(data: ThingModelData) {
export function updateThingModel(data: ThingModelApi.ThingModel) {
return requestClient.put('/iot/thing-model/update', data);
}
@ -161,26 +246,11 @@ export function deleteThingModel(id: number) {
}
/** 获取物模型 TSL */
export function getThingModelTSL(productId: number) {
return requestClient.get<ThingModelApi.ThingModel[]>(
export function getThingModelTSLByProductId(productId: number) {
return requestClient.get<ThingModelApi.ThingModelTSL>(
'/iot/thing-model/get-tsl',
{ params: { productId } },
{
params: { productId },
},
);
}
/** TSL
export function importThingModelTSL(productId: number, tslData: any) {
return requestClient.post('/iot/thing-model/import-tsl', {
productId,
tslData,
});
}
*/
/** TSL
export function exportThingModelTSL(productId: number) {
return requestClient.get<any>('/iot/thing-model/export-tsl', {
params: { productId },
});
}
*/

View File

@ -0,0 +1,27 @@
import { requestClient } from '#/api/request';
export namespace MesCalCalendarApi {
/** 排班日历班组排班项 */
export interface CalendarTeamShiftItem {
teamId?: number; // 班组编号
teamName?: string; // 班组名称
shiftId?: number; // 班次编号
shiftName?: string; // 班次名称
sort?: number; // 排序
}
/** 排班日历天 */
export interface CalendarDay {
day?: string; // 日期
shiftType?: number; // 轮班方式
teamShifts?: CalendarTeamShiftItem[]; // 班组班次
}
}
/** 查询排班日历列表 */
export function getCalendarList(params: any) {
return requestClient.get<MesCalCalendarApi.CalendarDay[]>(
'/mes/cal/calendar/list',
{ params },
);
}

View File

@ -0,0 +1,39 @@
import { requestClient } from '#/api/request';
export namespace MesCalHolidayApi {
/** MES 假期设置 */
export interface Holiday {
id?: number; // 编号
day?: number | string; // 日期
type?: number; // 日期类型
remark?: string; // 备注
createTime?: Date; // 创建时间
}
/** 假期查询参数 */
export interface HolidayQuery {
startDay?: string;
endDay?: string;
}
}
/** 查询假期设置列表 */
export function getHolidayList(params?: MesCalHolidayApi.HolidayQuery) {
return requestClient.get<MesCalHolidayApi.Holiday[]>(
'/mes/cal/holiday/list',
{ params },
);
}
/** 根据日期查询假期设置 */
export function getHolidayByDay(day: string) {
return requestClient.get<MesCalHolidayApi.Holiday>(
'/mes/cal/holiday/get-by-day',
{ params: { day } },
);
}
/** 保存假期设置 */
export function saveHoliday(data: MesCalHolidayApi.Holiday) {
return requestClient.post('/mes/cal/holiday/save', data);
}

View File

@ -0,0 +1,59 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesCalPlanApi {
/** MES 排班计划 */
export interface Plan {
id?: number; // 计划编号
code?: string; // 计划编码
name?: string; // 计划名称
calendarType?: number; // 班组类型
startDate?: number; // 开始日期
endDate?: number; // 结束日期
shiftType?: number; // 轮班方式
shiftMethod?: number; // 倒班方式
shiftCount?: number; // 倒班天数
status?: number; // 状态
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询排班计划分页 */
export function getPlanPage(params: PageParam) {
return requestClient.get<PageResult<MesCalPlanApi.Plan>>(
'/mes/cal/plan/page',
{ params },
);
}
/** 查询排班计划详情 */
export function getPlan(id: number) {
return requestClient.get<MesCalPlanApi.Plan>(`/mes/cal/plan/get?id=${id}`);
}
/** 新增排班计划 */
export function createPlan(data: MesCalPlanApi.Plan) {
return requestClient.post<number>('/mes/cal/plan/create', data);
}
/** 修改排班计划 */
export function updatePlan(data: MesCalPlanApi.Plan) {
return requestClient.put('/mes/cal/plan/update', data);
}
/** 确认排班计划 */
export function confirmPlan(id: number) {
return requestClient.put(`/mes/cal/plan/confirm?id=${id}`);
}
/** 删除排班计划 */
export function deletePlan(id: number) {
return requestClient.delete(`/mes/cal/plan/delete?id=${id}`);
}
/** 导出排班计划 */
export function exportPlan(params: any) {
return requestClient.download('/mes/cal/plan/export-excel', { params });
}

View File

@ -0,0 +1,36 @@
import { requestClient } from '#/api/request';
export namespace MesCalPlanShiftApi {
/** MES 计划班次 */
export interface PlanShift {
id?: number; // 班次编号
planId?: number; // 排班计划编号
sort?: number; // 显示顺序
name?: string; // 班次名称
startTime?: string; // 开始时间
endTime?: string; // 结束时间
remark?: string; // 备注
}
}
/** 查询指定排班计划的班次列表 */
export function getPlanShiftListByPlan(planId: number) {
return requestClient.get<MesCalPlanShiftApi.PlanShift[]>(
`/mes/cal/plan-shift/list-by-plan?planId=${planId}`,
);
}
/** 新增计划班次 */
export function createPlanShift(data: MesCalPlanShiftApi.PlanShift) {
return requestClient.post('/mes/cal/plan-shift/create', data);
}
/** 修改计划班次 */
export function updatePlanShift(data: MesCalPlanShiftApi.PlanShift) {
return requestClient.put('/mes/cal/plan-shift/update', data);
}
/** 删除计划班次 */
export function deletePlanShift(id: number) {
return requestClient.delete(`/mes/cal/plan-shift/delete?id=${id}`);
}

View File

@ -0,0 +1,30 @@
import { requestClient } from '#/api/request';
export namespace MesCalPlanTeamApi {
/** MES 计划班组关联 */
export interface PlanTeam {
id?: number; // 关联编号
planId?: number; // 排班计划编号
teamId?: number; // 班组编号
teamCode?: string; // 班组编码
teamName?: string; // 班组名称
remark?: string; // 备注
}
}
/** 查询指定排班计划的班组列表 */
export function getPlanTeamListByPlan(planId: number) {
return requestClient.get<MesCalPlanTeamApi.PlanTeam[]>(
`/mes/cal/plan-team/list-by-plan?planId=${planId}`,
);
}
/** 新增计划班组关联 */
export function createPlanTeam(data: MesCalPlanTeamApi.PlanTeam) {
return requestClient.post('/mes/cal/plan-team/create', data);
}
/** 删除计划班组关联 */
export function deletePlanTeam(id: number) {
return requestClient.delete(`/mes/cal/plan-team/delete?id=${id}`);
}

View File

@ -0,0 +1,53 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesCalTeamApi {
/** MES 班组 */
export interface Team {
id?: number; // 班组编号
code?: string; // 班组编码
name?: string; // 班组名称
calendarType?: number; // 班组类型
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询班组分页 */
export function getTeamPage(params: PageParam) {
return requestClient.get<PageResult<MesCalTeamApi.Team>>(
'/mes/cal/team/page',
{ params },
);
}
/** 查询班组列表 */
export function getTeamList() {
return requestClient.get<MesCalTeamApi.Team[]>('/mes/cal/team/list');
}
/** 查询班组详情 */
export function getTeam(id: number) {
return requestClient.get<MesCalTeamApi.Team>(`/mes/cal/team/get?id=${id}`);
}
/** 新增班组 */
export function createTeam(data: MesCalTeamApi.Team) {
return requestClient.post('/mes/cal/team/create', data);
}
/** 修改班组 */
export function updateTeam(data: MesCalTeamApi.Team) {
return requestClient.put('/mes/cal/team/update', data);
}
/** 删除班组 */
export function deleteTeam(id: number) {
return requestClient.delete(`/mes/cal/team/delete?id=${id}`);
}
/** 导出班组 */
export function exportTeam(params: any) {
return requestClient.download('/mes/cal/team/export-excel', { params });
}

View File

@ -0,0 +1,51 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesCalTeamMemberApi {
/** MES 班组成员 */
export interface TeamMember {
id?: number; // 成员编号
teamId?: number; // 班组编号
userId?: number; // 用户编号
nickname?: string; // 用户昵称
telephone?: string; // 用户手机号
remark?: string; // 备注
}
}
/** 创建班组成员 */
export function createTeamMember(data: MesCalTeamMemberApi.TeamMember) {
return requestClient.post('/mes/cal/team-member/create', data);
}
/** 删除班组成员 */
export function deleteTeamMember(id: number) {
return requestClient.delete(`/mes/cal/team-member/delete?id=${id}`);
}
/** 查询班组成员分页 */
export function getTeamMemberPage(params: PageParam) {
return requestClient.get<PageResult<MesCalTeamMemberApi.TeamMember>>(
'/mes/cal/team-member/page',
{ params },
);
}
/** 查询指定班组的成员列表 */
export function getTeamMemberListByTeam(teamId: number) {
return requestClient.get<MesCalTeamMemberApi.TeamMember[]>(
'/mes/cal/team-member/list-by-team',
{ params: { teamId } },
);
}
/** 查询多个班组的成员列表 */
export function getTeamMemberListByTeamIds(teamIds: number[]) {
return requestClient.get<MesCalTeamMemberApi.TeamMember[]>(
'/mes/cal/team-member/list-by-team',
{
params: { teamIds: teamIds.join(',') },
},
);
}

View File

@ -0,0 +1,65 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesDvCheckPlanApi {
/** MES 点检保养方案 */
export interface CheckPlan {
id?: number; // 方案编号
code?: string; // 方案编码
name?: string; // 方案名称
type?: number; // 方案类型
startDate?: Date | number; // 开始日期
endDate?: Date | number; // 结束日期
cycleType?: number; // 周期类型
cycleCount?: number; // 周期数量
status?: number; // 状态
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询点检保养方案分页 */
export function getCheckPlanPage(params: PageParam) {
return requestClient.get<PageResult<MesDvCheckPlanApi.CheckPlan>>(
'/mes/dv/check-plan/page',
{ params },
);
}
/** 查询点检保养方案详情 */
export function getCheckPlan(id: number) {
return requestClient.get<MesDvCheckPlanApi.CheckPlan>(
`/mes/dv/check-plan/get?id=${id}`,
);
}
/** 新增点检保养方案 */
export function createCheckPlan(data: MesDvCheckPlanApi.CheckPlan) {
return requestClient.post<number>('/mes/dv/check-plan/create', data);
}
/** 修改点检保养方案 */
export function updateCheckPlan(data: MesDvCheckPlanApi.CheckPlan) {
return requestClient.put('/mes/dv/check-plan/update', data);
}
/** 启用点检保养方案 */
export function enableCheckPlan(id: number) {
return requestClient.put(`/mes/dv/check-plan/enable?id=${id}`);
}
/** 停用点检保养方案 */
export function disableCheckPlan(id: number) {
return requestClient.put(`/mes/dv/check-plan/disable?id=${id}`);
}
/** 删除点检保养方案 */
export function deleteCheckPlan(id: number) {
return requestClient.delete(`/mes/dv/check-plan/delete?id=${id}`);
}
/** 导出点检保养方案 */
export function exportCheckPlan(params: any) {
return requestClient.download('/mes/dv/check-plan/export-excel', { params });
}

View File

@ -0,0 +1,34 @@
import { requestClient } from '#/api/request';
export namespace MesDvCheckPlanMachineryApi {
/** MES 点检保养方案设备 */
export interface CheckPlanMachinery {
id?: number; // 关联编号
planId?: number; // 方案编号
machineryId?: number; // 设备编号
machineryCode?: string; // 设备编码
machineryName?: string; // 设备名称
machineryBrand?: string; // 品牌
machinerySpecification?: string; // 规格型号
remark?: string; // 备注
}
}
/** 查询指定方案的设备列表 */
export function getCheckPlanMachineryListByPlan(planId: number) {
return requestClient.get<MesDvCheckPlanMachineryApi.CheckPlanMachinery[]>(
`/mes/dv/check-plan-machinery/list-by-plan?planId=${planId}`,
);
}
/** 新增方案设备关联 */
export function createCheckPlanMachinery(
data: MesDvCheckPlanMachineryApi.CheckPlanMachinery,
) {
return requestClient.post('/mes/dv/check-plan-machinery/create', data);
}
/** 删除方案设备关联 */
export function deleteCheckPlanMachinery(id: number) {
return requestClient.delete(`/mes/dv/check-plan-machinery/delete?id=${id}`);
}

View File

@ -0,0 +1,35 @@
import { requestClient } from '#/api/request';
export namespace MesDvCheckPlanSubjectApi {
/** MES 点检保养方案项目 */
export interface CheckPlanSubject {
id?: number; // 关联编号
planId?: number; // 方案编号
subjectId?: number; // 项目编号
subjectCode?: string; // 项目编码
subjectName?: string; // 项目名称
subjectType?: number; // 项目类型
subjectContent?: string; // 项目内容
subjectStandard?: string; // 标准
remark?: string; // 备注
}
}
/** 查询指定方案的项目列表 */
export function getCheckPlanSubjectListByPlan(planId: number) {
return requestClient.get<MesDvCheckPlanSubjectApi.CheckPlanSubject[]>(
`/mes/dv/check-plan-subject/list-by-plan?planId=${planId}`,
);
}
/** 新增方案项目关联 */
export function createCheckPlanSubject(
data: MesDvCheckPlanSubjectApi.CheckPlanSubject,
) {
return requestClient.post('/mes/dv/check-plan-subject/create', data);
}
/** 删除方案项目关联 */
export function deleteCheckPlanSubject(id: number) {
return requestClient.delete(`/mes/dv/check-plan-subject/delete?id=${id}`);
}

View File

@ -0,0 +1,65 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesDvCheckRecordApi {
/** MES 设备点检记录 */
export interface CheckRecord {
id?: number; // 记录编号
planId?: number; // 点检计划编号
planName?: string; // 计划名称
machineryId?: number; // 设备编号
machineryCode?: string; // 设备编码
machineryName?: string; // 设备名称
machineryBrand?: string; // 品牌
machinerySpecification?: string; // 规格型号
checkTime?: Date | number; // 点检时间
userId?: number; // 点检人编号
nickname?: string; // 点检人名称
status?: number; // 状态
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询设备点检记录分页 */
export function getCheckRecordPage(params: PageParam) {
return requestClient.get<PageResult<MesDvCheckRecordApi.CheckRecord>>(
'/mes/dv/check-record/page',
{ params },
);
}
/** 查询设备点检记录详情 */
export function getCheckRecord(id: number) {
return requestClient.get<MesDvCheckRecordApi.CheckRecord>(
`/mes/dv/check-record/get?id=${id}`,
);
}
/** 新增设备点检记录 */
export function createCheckRecord(data: MesDvCheckRecordApi.CheckRecord) {
return requestClient.post<number>('/mes/dv/check-record/create', data);
}
/** 修改设备点检记录 */
export function updateCheckRecord(data: MesDvCheckRecordApi.CheckRecord) {
return requestClient.put('/mes/dv/check-record/update', data);
}
/** 提交设备点检记录 */
export function submitCheckRecord(id: number) {
return requestClient.put(`/mes/dv/check-record/submit?id=${id}`);
}
/** 删除设备点检记录 */
export function deleteCheckRecord(id: number) {
return requestClient.delete(`/mes/dv/check-record/delete?id=${id}`);
}
/** 导出设备点检记录 */
export function exportCheckRecord(params: any) {
return requestClient.download('/mes/dv/check-record/export-excel', {
params,
});
}

View File

@ -0,0 +1,53 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesDvCheckRecordLineApi {
/** MES 设备点检记录明细 */
export interface CheckRecordLine {
id?: number; // 明细编号
recordId?: number; // 点检记录编号
subjectId?: number; // 点检项目编号
subjectCode?: string; // 项目编码
subjectName?: string; // 项目名称
subjectContent?: string; // 检查内容
subjectStandard?: string; // 检查标准
checkStatus?: number; // 点检结果
checkResult?: string; // 异常描述
remark?: string; // 备注
}
}
/** 查询设备点检记录明细分页 */
export function getCheckRecordLinePage(params: PageParam) {
return requestClient.get<PageResult<MesDvCheckRecordLineApi.CheckRecordLine>>(
'/mes/dv/check-record-line/page',
{ params },
);
}
/** 查询设备点检记录明细详情 */
export function getCheckRecordLine(id: number) {
return requestClient.get<MesDvCheckRecordLineApi.CheckRecordLine>(
`/mes/dv/check-record-line/get?id=${id}`,
);
}
/** 新增设备点检记录明细 */
export function createCheckRecordLine(
data: MesDvCheckRecordLineApi.CheckRecordLine,
) {
return requestClient.post('/mes/dv/check-record-line/create', data);
}
/** 修改设备点检记录明细 */
export function updateCheckRecordLine(
data: MesDvCheckRecordLineApi.CheckRecordLine,
) {
return requestClient.put('/mes/dv/check-record-line/update', data);
}
/** 删除设备点检记录明细 */
export function deleteCheckRecordLine(id: number) {
return requestClient.delete(`/mes/dv/check-record-line/delete?id=${id}`);
}

View File

@ -0,0 +1,85 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesDvMachineryApi {
/** MES 设备台账 */
export interface Machinery {
id?: number; // 设备编号
code?: string; // 设备编码
name?: string; // 设备名称
brand?: string; // 品牌
specification?: string; // 规格型号
machineryTypeId?: number; // 设备类型编号
machineryTypeName?: string; // 设备类型名称
workshopId?: number; // 所属车间编号
workshopName?: string; // 所属车间名称
status?: number; // 设备状态
lastMaintenTime?: Date; // 最近保养时间
lastCheckTime?: Date; // 最近点检时间
remark?: string; // 备注
createTime?: Date; // 创建时间
}
/** 设备导入结果 */
export interface MachineryImportRespVO {
createCodes?: string[]; // 新增成功的设备编码
updateCodes?: string[]; // 更新成功的设备编码
failureCodes?: Record<string, string>; // 导入失败的设备编码及原因
}
}
/** 查询设备分页 */
export function getMachineryPage(params: PageParam) {
return requestClient.get<PageResult<MesDvMachineryApi.Machinery>>(
'/mes/dv/machinery/page',
{ params },
);
}
/** 查询设备精简列表 */
export function getMachinerySimpleList() {
return requestClient.get<MesDvMachineryApi.Machinery[]>(
'/mes/dv/machinery/simple-list',
);
}
/** 查询设备详情 */
export function getMachinery(id: number) {
return requestClient.get<MesDvMachineryApi.Machinery>(
`/mes/dv/machinery/get?id=${id}`,
);
}
/** 新增设备 */
export function createMachinery(data: MesDvMachineryApi.Machinery) {
return requestClient.post('/mes/dv/machinery/create', data);
}
/** 修改设备 */
export function updateMachinery(data: MesDvMachineryApi.Machinery) {
return requestClient.put('/mes/dv/machinery/update', data);
}
/** 删除设备 */
export function deleteMachinery(id: number) {
return requestClient.delete(`/mes/dv/machinery/delete?id=${id}`);
}
/** 导出设备 */
export function exportMachinery(params: any) {
return requestClient.download('/mes/dv/machinery/export-excel', { params });
}
/** 下载设备导入模板 */
export function importMachineryTemplate() {
return requestClient.download('/mes/dv/machinery/get-import-template');
}
/** 导入设备 */
export function importMachinery(file: File, updateSupport: boolean) {
return requestClient.upload<MesDvMachineryApi.MachineryImportRespVO>(
`/mes/dv/machinery/import?updateSupport=${updateSupport}`,
{ file },
);
}

View File

@ -0,0 +1,53 @@
import { requestClient } from '#/api/request';
export namespace MesDvMachineryTypeApi {
/** MES 设备类型 */
export interface MachineryType {
id?: number; // 设备类型编号
parentId?: number; // 父类型编号
code?: string; // 类型编码
name?: string; // 类型名称
sort?: number; // 显示排序
status?: number; // 状态
remark?: string; // 备注
createTime?: Date; // 创建时间
children?: MachineryType[]; // 子类型
}
}
/** 查询设备类型列表 */
export function getMachineryTypeList(params?: any) {
return requestClient.get<MesDvMachineryTypeApi.MachineryType[]>(
'/mes/dv/machinery-type/list',
{ params },
);
}
/** 查询设备类型精简列表 */
export function getMachineryTypeSimpleList() {
return requestClient.get<MesDvMachineryTypeApi.MachineryType[]>(
'/mes/dv/machinery-type/simple-list',
);
}
/** 查询设备类型详情 */
export function getMachineryType(id: number) {
return requestClient.get<MesDvMachineryTypeApi.MachineryType>(
`/mes/dv/machinery-type/get?id=${id}`,
);
}
/** 新增设备类型 */
export function createMachineryType(data: MesDvMachineryTypeApi.MachineryType) {
return requestClient.post('/mes/dv/machinery-type/create', data);
}
/** 修改设备类型 */
export function updateMachineryType(data: MesDvMachineryTypeApi.MachineryType) {
return requestClient.put('/mes/dv/machinery-type/update', data);
}
/** 删除设备类型 */
export function deleteMachineryType(id: number) {
return requestClient.delete(`/mes/dv/machinery-type/delete?id=${id}`);
}

View File

@ -0,0 +1,65 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesDvMaintenRecordApi {
/** MES 设备保养记录 */
export interface MaintenRecord {
id?: number; // 记录编号
planId?: number; // 计划编号
planName?: string; // 计划名称
machineryId?: number; // 设备编号
machineryCode?: string; // 设备编码
machineryName?: string; // 设备名称
machineryBrand?: string; // 品牌
machinerySpecification?: string; // 规格型号
maintenTime?: Date | number; // 保养时间
userId?: number; // 用户编号
nickname?: string; // 保养人名称
status?: number; // 状态
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询设备保养记录分页 */
export function getMaintenRecordPage(params: PageParam) {
return requestClient.get<PageResult<MesDvMaintenRecordApi.MaintenRecord>>(
'/mes/dv/mainten-record/page',
{ params },
);
}
/** 查询设备保养记录详情 */
export function getMaintenRecord(id: number) {
return requestClient.get<MesDvMaintenRecordApi.MaintenRecord>(
`/mes/dv/mainten-record/get?id=${id}`,
);
}
/** 新增设备保养记录 */
export function createMaintenRecord(data: MesDvMaintenRecordApi.MaintenRecord) {
return requestClient.post<number>('/mes/dv/mainten-record/create', data);
}
/** 修改设备保养记录 */
export function updateMaintenRecord(data: MesDvMaintenRecordApi.MaintenRecord) {
return requestClient.put('/mes/dv/mainten-record/update', data);
}
/** 提交设备保养记录 */
export function submitMaintenRecord(id: number) {
return requestClient.put(`/mes/dv/mainten-record/submit?id=${id}`);
}
/** 删除设备保养记录 */
export function deleteMaintenRecord(id: number) {
return requestClient.delete(`/mes/dv/mainten-record/delete?id=${id}`);
}
/** 导出设备保养记录 */
export function exportMaintenRecord(params: any) {
return requestClient.download('/mes/dv/mainten-record/export-excel', {
params,
});
}

View File

@ -0,0 +1,51 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesDvMaintenRecordLineApi {
/** MES 设备保养记录明细 */
export interface MaintenRecordLine {
id?: number; // 明细编号
recordId?: number; // 保养记录编号
subjectId?: number; // 项目编号
subjectName?: string; // 项目名称
subjectContent?: string; // 项目内容
subjectStandard?: string; // 项目标准
status?: number; // 保养结果
result?: string; // 异常描述
remark?: string; // 备注
}
}
/** 查询设备保养记录明细分页 */
export function getMaintenRecordLinePage(params: PageParam) {
return requestClient.get<
PageResult<MesDvMaintenRecordLineApi.MaintenRecordLine>
>('/mes/dv/mainten-record-line/page', { params });
}
/** 查询设备保养记录明细详情 */
export function getMaintenRecordLine(id: number) {
return requestClient.get<MesDvMaintenRecordLineApi.MaintenRecordLine>(
`/mes/dv/mainten-record-line/get?id=${id}`,
);
}
/** 新增设备保养记录明细 */
export function createMaintenRecordLine(
data: MesDvMaintenRecordLineApi.MaintenRecordLine,
) {
return requestClient.post('/mes/dv/mainten-record-line/create', data);
}
/** 修改设备保养记录明细 */
export function updateMaintenRecordLine(
data: MesDvMaintenRecordLineApi.MaintenRecordLine,
) {
return requestClient.put('/mes/dv/mainten-record-line/update', data);
}
/** 删除设备保养记录明细 */
export function deleteMaintenRecordLine(id: number) {
return requestClient.delete(`/mes/dv/mainten-record-line/delete?id=${id}`);
}

View File

@ -0,0 +1,81 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesDvRepairApi {
/** MES 维修工单 */
export interface Repair {
id?: number; // 工单编号
code?: string; // 维修工单编码
name?: string; // 维修工单名称
machineryId?: number; // 设备编号
machineryCode?: string; // 设备编码
machineryName?: string; // 设备名称
machineryBrand?: string; // 品牌
machinerySpecification?: string; // 规格型号
requireDate?: Date | number; // 报修日期
finishDate?: Date | number; // 维修完成日期
confirmDate?: Date | number; // 验收日期
result?: number; // 维修结果
acceptedUserId?: number; // 维修人编号
acceptedUserNickname?: string; // 维修人名称
confirmUserId?: number; // 验收人编号
confirmUserNickname?: string; // 验收人名称
sourceDocType?: number; // 来源单据类型
sourceDocId?: number; // 来源单据编号
sourceDocCode?: string; // 来源单据编码
status?: number; // 状态
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询维修工单分页 */
export function getRepairPage(params: PageParam) {
return requestClient.get<PageResult<MesDvRepairApi.Repair>>(
'/mes/dv/repair/page',
{ params },
);
}
/** 查询维修工单详情 */
export function getRepair(id: number) {
return requestClient.get<MesDvRepairApi.Repair>(
`/mes/dv/repair/get?id=${id}`,
);
}
/** 新增维修工单 */
export function createRepair(data: MesDvRepairApi.Repair) {
return requestClient.post<number>('/mes/dv/repair/create', data);
}
/** 修改维修工单 */
export function updateRepair(data: MesDvRepairApi.Repair) {
return requestClient.put('/mes/dv/repair/update', data);
}
/** 删除维修工单 */
export function deleteRepair(id: number) {
return requestClient.delete(`/mes/dv/repair/delete?id=${id}`);
}
/** 导出维修工单 */
export function exportRepair(params: any) {
return requestClient.download('/mes/dv/repair/export-excel', { params });
}
/** 提交维修工单 */
export function submitRepair(id: number) {
return requestClient.put(`/mes/dv/repair/submit?id=${id}`);
}
/** 确认维修完成 */
export function confirmRepair(data: MesDvRepairApi.Repair) {
return requestClient.put('/mes/dv/repair/confirm', data);
}
/** 完成验收 */
export function finishRepair(id: number, result: number) {
return requestClient.put(`/mes/dv/repair/finish?id=${id}&result=${result}`);
}

View File

@ -0,0 +1,49 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesDvRepairLineApi {
/** MES 维修工单行 */
export interface RepairLine {
id?: number; // 明细编号
repairId?: number; // 维修工单编号
subjectId?: number; // 项目编号
subjectName?: string; // 项目名称
subjectContent?: string; // 项目内容
subjectStandard?: string; // 项目标准
malfunction?: string; // 故障描述
malfunctionUrl?: string; // 故障图片 URL
description?: string; // 维修描述
remark?: string; // 备注
}
}
/** 查询维修工单行分页 */
export function getRepairLinePage(params: PageParam) {
return requestClient.get<PageResult<MesDvRepairLineApi.RepairLine>>(
'/mes/dv/repair-line/page',
{ params },
);
}
/** 查询维修工单行详情 */
export function getRepairLine(id: number) {
return requestClient.get<MesDvRepairLineApi.RepairLine>(
`/mes/dv/repair-line/get?id=${id}`,
);
}
/** 新增维修工单行 */
export function createRepairLine(data: MesDvRepairLineApi.RepairLine) {
return requestClient.post('/mes/dv/repair-line/create', data);
}
/** 修改维修工单行 */
export function updateRepairLine(data: MesDvRepairLineApi.RepairLine) {
return requestClient.put('/mes/dv/repair-line/update', data);
}
/** 删除维修工单行 */
export function deleteRepairLine(id: number) {
return requestClient.delete(`/mes/dv/repair-line/delete?id=${id}`);
}

View File

@ -0,0 +1,60 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesDvSubjectApi {
/** MES 点检保养项目 */
export interface Subject {
id?: number; // 项目编号
code?: string; // 项目编码
name?: string; // 项目名称
type?: number; // 项目类型
content?: string; // 项目内容
standard?: string; // 标准
status?: number; // 状态
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询点检保养项目分页 */
export function getSubjectPage(params: PageParam) {
return requestClient.get<PageResult<MesDvSubjectApi.Subject>>(
'/mes/dv/subject/page',
{ params },
);
}
/** 查询点检保养项目精简列表 */
export function getSubjectSimpleList() {
return requestClient.get<MesDvSubjectApi.Subject[]>(
'/mes/dv/subject/simple-list',
);
}
/** 查询点检保养项目详情 */
export function getSubject(id: number) {
return requestClient.get<MesDvSubjectApi.Subject>(
`/mes/dv/subject/get?id=${id}`,
);
}
/** 新增点检保养项目 */
export function createSubject(data: MesDvSubjectApi.Subject) {
return requestClient.post('/mes/dv/subject/create', data);
}
/** 修改点检保养项目 */
export function updateSubject(data: MesDvSubjectApi.Subject) {
return requestClient.put('/mes/dv/subject/update', data);
}
/** 删除点检保养项目 */
export function deleteSubject(id: number) {
return requestClient.delete(`/mes/dv/subject/delete?id=${id}`);
}
/** 导出点检保养项目 */
export function exportSubject(params: any) {
return requestClient.download('/mes/dv/subject/export-excel', { params });
}

View File

@ -0,0 +1,49 @@
import { requestClient } from '#/api/request';
export namespace MesMdAutoCodePartApi {
/** MES 编码规则分段 */
export interface AutoCodePart {
id?: number; // 分段编号
ruleId?: number; // 规则编号
sort?: number; // 排序
type?: number; // 分段类型
length?: number; // 长度
dateFormat?: string; // 日期格式
fixCharacter?: string; // 固定字符
serialStartNo?: number; // 流水号起始值
serialStep?: number; // 流水号步长
cycleFlag?: boolean; // 是否循环
cycleMethod?: number; // 循环方式
remark?: string; // 备注
}
}
/** 查询编码规则分段详情 */
export function getAutoCodePart(id: number) {
return requestClient.get<MesMdAutoCodePartApi.AutoCodePart>(
`/mes/md/auto-code-part/get?id=${id}`,
);
}
/** 查询编码规则分段列表 */
export function getAutoCodePartListByRuleId(ruleId: number) {
return requestClient.get<MesMdAutoCodePartApi.AutoCodePart[]>(
'/mes/md/auto-code-part/list-by-rule-id',
{ params: { ruleId } },
);
}
/** 新增编码规则分段 */
export function createAutoCodePart(data: MesMdAutoCodePartApi.AutoCodePart) {
return requestClient.post('/mes/md/auto-code-part/create', data);
}
/** 修改编码规则分段 */
export function updateAutoCodePart(data: MesMdAutoCodePartApi.AutoCodePart) {
return requestClient.put('/mes/md/auto-code-part/update', data);
}
/** 删除编码规则分段 */
export function deleteAutoCodePart(id: number) {
return requestClient.delete(`/mes/md/auto-code-part/delete?id=${id}`);
}

View File

@ -0,0 +1,9 @@
import { requestClient } from '#/api/request';
/** 生成 MES 编码 */
export function generateAutoCode(ruleCode: string, inputChar?: string) {
return requestClient.post<string>('/mes/md/auto-code-record/generate', {
inputChar,
ruleCode,
});
}

View File

@ -0,0 +1,57 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesMdAutoCodeRuleApi {
/** MES 编码规则 */
export interface AutoCodeRule {
id?: number; // 规则编号
code?: string; // 规则编码
name?: string; // 规则名称
description?: string; // 规则描述
maxLength?: number; // 最大长度
padded?: boolean; // 是否补齐
paddedChar?: string; // 补齐字符
paddedMethod?: number; // 补齐方式
status?: number; // 状态
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询编码规则分页 */
export function getAutoCodeRulePage(params: PageParam) {
return requestClient.get<PageResult<MesMdAutoCodeRuleApi.AutoCodeRule>>(
'/mes/md/auto-code-rule/page',
{ params },
);
}
/** 查询编码规则详情 */
export function getAutoCodeRule(id: number) {
return requestClient.get<MesMdAutoCodeRuleApi.AutoCodeRule>(
`/mes/md/auto-code-rule/get?id=${id}`,
);
}
/** 新增编码规则 */
export function createAutoCodeRule(data: MesMdAutoCodeRuleApi.AutoCodeRule) {
return requestClient.post('/mes/md/auto-code-rule/create', data);
}
/** 修改编码规则 */
export function updateAutoCodeRule(data: MesMdAutoCodeRuleApi.AutoCodeRule) {
return requestClient.put('/mes/md/auto-code-rule/update', data);
}
/** 删除编码规则 */
export function deleteAutoCodeRule(id: number) {
return requestClient.delete(`/mes/md/auto-code-rule/delete?id=${id}`);
}
/** 导出编码规则 */
export function exportAutoCodeRule(params: PageParam) {
return requestClient.download('/mes/md/auto-code-rule/export-excel', {
params,
});
}

View File

@ -0,0 +1,86 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesMdClientApi {
/** MES 客户 */
export interface Client {
id?: number; // 客户编号
code?: string; // 客户编码
name?: string; // 客户名称
nickname?: string; // 客户简称
englishName?: string; // 客户英文名称
description?: string; // 客户简介
logo?: string; // 客户 LOGO 地址
type?: number; // 客户类型
address?: string; // 客户地址
website?: string; // 客户官网地址
email?: string; // 客户邮箱地址
telephone?: string; // 客户电话
contact1Name?: string; // 联系人1
contact1Telephone?: string; // 联系人1电话
contact1Email?: string; // 联系人1邮箱
contact2Name?: string; // 联系人2
contact2Telephone?: string; // 联系人2电话
contact2Email?: string; // 联系人2邮箱
creditCode?: string; // 统一社会信用代码
status?: number; // 状态
remark?: string; // 备注
createTime?: Date; // 创建时间
}
/** 客户导入结果 */
export interface ClientImportRespVO {
createCodes?: string[]; // 新增成功的客户编码
updateCodes?: string[]; // 更新成功的客户编码
failureCodes?: Record<string, string>; // 导入失败的客户编码及原因
}
}
/** 查询客户分页 */
export function getClientPage(params: PageParam) {
return requestClient.get<PageResult<MesMdClientApi.Client>>(
'/mes/md-client/page',
{ params },
);
}
/** 查询客户详情 */
export function getClient(id: number) {
return requestClient.get<MesMdClientApi.Client>(
`/mes/md-client/get?id=${id}`,
);
}
/** 新增客户 */
export function createClient(data: MesMdClientApi.Client) {
return requestClient.post('/mes/md-client/create', data);
}
/** 修改客户 */
export function updateClient(data: MesMdClientApi.Client) {
return requestClient.put('/mes/md-client/update', data);
}
/** 删除客户 */
export function deleteClient(id: number) {
return requestClient.delete(`/mes/md-client/delete?id=${id}`);
}
/** 导出客户 */
export function exportClient(params: any) {
return requestClient.download('/mes/md-client/export-excel', { params });
}
/** 下载客户导入模板 */
export function importClientTemplate() {
return requestClient.download('/mes/md-client/get-import-template');
}
/** 导入客户 */
export function importClient(file: File, updateSupport: boolean) {
return requestClient.upload<MesMdClientApi.ClientImportRespVO>(
`/mes/md-client/import?updateSupport=${updateSupport}`,
{ file },
);
}

View File

@ -0,0 +1,35 @@
import { requestClient } from '#/api/request';
export namespace MesMdItemBatchConfigApi {
/** MES 物料批次属性配置 */
export interface BatchConfig {
id?: number; // 编号
itemId?: number; // 物料编号
produceDateFlag?: boolean; // 批次属性-生产日期
expireDateFlag?: boolean; // 批次属性-有效期
receiptDateFlag?: boolean; // 批次属性-入库日期
vendorFlag?: boolean; // 批次属性-供应商
clientFlag?: boolean; // 批次属性-客户
salesOrderCodeFlag?: boolean; // 批次属性-销售订单编号
purchaseOrderCodeFlag?: boolean; // 批次属性-采购订单编号
workorderFlag?: boolean; // 批次属性-生产工单
taskFlag?: boolean; // 批次属性-生产任务
workstationFlag?: boolean; // 批次属性-工作站
toolFlag?: boolean; // 批次属性-工具
moldFlag?: boolean; // 批次属性-模具
lotNumberFlag?: boolean; // 批次属性-生产批号
qualityStatusFlag?: boolean; // 批次属性-质量状态
}
}
/** 根据物料编号获取批次属性配置 */
export function getBatchConfigByItemId(itemId: number) {
return requestClient.get<MesMdItemBatchConfigApi.BatchConfig>(
`/mes/md/item-batch-config/get-by-item-id?itemId=${itemId}`,
);
}
/** 保存批次属性配置 */
export function saveBatchConfig(data: MesMdItemBatchConfigApi.BatchConfig) {
return requestClient.post('/mes/md/item-batch-config/save', data);
}

View File

@ -0,0 +1,85 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesMdItemApi {
/** MES 物料产品 */
export interface Item {
id?: number; // 物料编号
code?: string; // 物料编码
name?: string; // 物料名称
specification?: string; // 规格型号
unitMeasureId?: number; // 计量单位编号
unitMeasureName?: string; // 计量单位名称
itemTypeId?: number; // 物料分类编号
itemTypeName?: string; // 物料分类名称
itemOrProduct?: string; // 物料/产品标识
status?: number; // 状态
safeStockFlag?: boolean; // 是否启用安全库存
minStock?: number; // 最低库存量
maxStock?: number; // 最高库存量
highValue?: boolean; // 是否高值物料
batchFlag?: boolean; // 是否启用批次管理
remark?: string; // 备注
createTime?: Date; // 创建时间
}
/** 物料导入结果 */
export interface ItemImportRespVO {
createCodes?: string[]; // 新增成功的物料编码
updateCodes?: string[]; // 更新成功的物料编码
failureCodes?: Record<string, string>; // 导入失败的物料编码及原因
}
}
/** 查询物料产品分页 */
export function getItemPage(params: PageParam) {
return requestClient.get<PageResult<MesMdItemApi.Item>>('/mes/md/item/page', {
params,
});
}
/** 查询物料产品详情 */
export function getItem(id: number) {
return requestClient.get<MesMdItemApi.Item>(`/mes/md/item/get?id=${id}`);
}
/** 新增物料产品 */
export function createItem(data: MesMdItemApi.Item) {
return requestClient.post<number>('/mes/md/item/create', data);
}
/** 修改物料产品 */
export function updateItem(data: MesMdItemApi.Item) {
return requestClient.put('/mes/md/item/update', data);
}
/** 修改物料产品状态 */
export function updateItemStatus(id: number, status: number) {
return requestClient.put('/mes/md/item/update-status', undefined, {
params: { id, status },
});
}
/** 删除物料产品 */
export function deleteItem(id: number) {
return requestClient.delete(`/mes/md/item/delete?id=${id}`);
}
/** 导出物料产品 */
export function exportItem(params: any) {
return requestClient.download('/mes/md/item/export-excel', { params });
}
/** 下载物料导入模板 */
export function importItemTemplate() {
return requestClient.download('/mes/md/item/get-import-template');
}
/** 导入物料产品 */
export function importItem(file: File, updateSupport: boolean) {
return requestClient.upload<MesMdItemApi.ItemImportRespVO>(
`/mes/md/item/import?updateSupport=${updateSupport}`,
{ file },
);
}

View File

@ -0,0 +1,58 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesMdProductBomApi {
/** MES 产品 BOM */
export interface ProductBom {
id?: number; // BOM 编号
itemId?: number; // 物料产品编号
bomItemId?: number; // BOM 物料编号
quantity?: number; // 物料使用比例
status?: number; // 是否启用
remark?: string; // 备注
createTime?: Date; // 创建时间
bomItemCode?: string; // BOM 物料编码
bomItemName?: string; // BOM 物料名称
bomItemSpecification?: string; // BOM 物料规格
unitMeasureName?: string; // 计量单位名称
itemOrProduct?: string; // 物料/产品标识
}
}
/** 新增产品 BOM */
export function createProductBom(data: MesMdProductBomApi.ProductBom) {
return requestClient.post('/mes/md/product-bom/create', data);
}
/** 修改产品 BOM */
export function updateProductBom(data: MesMdProductBomApi.ProductBom) {
return requestClient.put('/mes/md/product-bom/update', data);
}
/** 删除产品 BOM */
export function deleteProductBom(id: number) {
return requestClient.delete(`/mes/md/product-bom/delete?id=${id}`);
}
/** 查询产品 BOM 详情 */
export function getProductBom(id: number) {
return requestClient.get<MesMdProductBomApi.ProductBom>(
`/mes/md/product-bom/get?id=${id}`,
);
}
/** 查询产品 BOM 分页 */
export function getProductBomPage(params: PageParam) {
return requestClient.get<PageResult<MesMdProductBomApi.ProductBom>>(
'/mes/md/product-bom/page',
{ params },
);
}
/** 根据物料产品编号查询产品 BOM 列表 */
export function getProductBomListByItemId(itemId: number) {
return requestClient.get<MesMdProductBomApi.ProductBom[]>(
`/mes/md/product-bom/list-by-item-id?itemId=${itemId}`,
);
}

View File

@ -0,0 +1,57 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesMdProductSipApi {
/** MES 产品 SIP */
export interface ProductSip {
id?: number; // SIP 编号
itemId?: number; // 物料产品编号
sort?: number; // 排列顺序
processId?: number; // 工序编号
title?: string; // 标题
description?: string; // 详细描述
url?: string; // 图片地址
remark?: string; // 备注
createTime?: Date; // 创建时间
processCode?: string; // 工序编码
processName?: string; // 工序名称
}
}
/** 新增产品 SIP */
export function createProductSip(data: MesMdProductSipApi.ProductSip) {
return requestClient.post('/mes/md/product-sip/create', data);
}
/** 修改产品 SIP */
export function updateProductSip(data: MesMdProductSipApi.ProductSip) {
return requestClient.put('/mes/md/product-sip/update', data);
}
/** 删除产品 SIP */
export function deleteProductSip(id: number) {
return requestClient.delete(`/mes/md/product-sip/delete?id=${id}`);
}
/** 查询产品 SIP 详情 */
export function getProductSip(id: number) {
return requestClient.get<MesMdProductSipApi.ProductSip>(
`/mes/md/product-sip/get?id=${id}`,
);
}
/** 查询产品 SIP 分页 */
export function getProductSipPage(params: PageParam) {
return requestClient.get<PageResult<MesMdProductSipApi.ProductSip>>(
'/mes/md/product-sip/page',
{ params },
);
}
/** 根据物料产品编号查询产品 SIP 列表 */
export function getProductSipListByItemId(itemId: number) {
return requestClient.get<MesMdProductSipApi.ProductSip[]>(
`/mes/md/product-sip/list-by-item-id?itemId=${itemId}`,
);
}

View File

@ -0,0 +1,57 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesMdProductSopApi {
/** MES 产品 SOP */
export interface ProductSop {
id?: number; // SOP 编号
itemId?: number; // 物料产品编号
sort?: number; // 排列顺序
processId?: number; // 工序编号
title?: string; // 标题
description?: string; // 详细描述
url?: string; // 图片地址
remark?: string; // 备注
createTime?: Date; // 创建时间
processCode?: string; // 工序编码
processName?: string; // 工序名称
}
}
/** 新增产品 SOP */
export function createProductSop(data: MesMdProductSopApi.ProductSop) {
return requestClient.post('/mes/md/product-sop/create', data);
}
/** 修改产品 SOP */
export function updateProductSop(data: MesMdProductSopApi.ProductSop) {
return requestClient.put('/mes/md/product-sop/update', data);
}
/** 删除产品 SOP */
export function deleteProductSop(id: number) {
return requestClient.delete(`/mes/md/product-sop/delete?id=${id}`);
}
/** 查询产品 SOP 详情 */
export function getProductSop(id: number) {
return requestClient.get<MesMdProductSopApi.ProductSop>(
`/mes/md/product-sop/get?id=${id}`,
);
}
/** 查询产品 SOP 分页 */
export function getProductSopPage(params: PageParam) {
return requestClient.get<PageResult<MesMdProductSopApi.ProductSop>>(
'/mes/md/product-sop/page',
{ params },
);
}
/** 根据物料产品编号查询产品 SOP 列表 */
export function getProductSopListByItemId(itemId: number) {
return requestClient.get<MesMdProductSopApi.ProductSop[]>(
`/mes/md/product-sop/list-by-item-id?itemId=${itemId}`,
);
}

View File

@ -0,0 +1,54 @@
import { requestClient } from '#/api/request';
export namespace MesMdItemTypeApi {
/** MES 物料产品分类 */
export interface ItemType {
id?: number; // 分类编号
parentId?: number; // 父分类编号
code?: string; // 分类编码
name?: string; // 分类名称
itemOrProduct?: string; // 物料/产品标识
sort?: number; // 显示排序
status?: number; // 状态
remark?: string; // 备注
createTime?: Date; // 创建时间
children?: ItemType[]; // 子分类
}
}
/** 查询物料产品分类列表 */
export function getItemTypeList(params?: any) {
return requestClient.get<MesMdItemTypeApi.ItemType[]>(
'/mes/md/item-type/list',
{ params },
);
}
/** 查询物料产品分类精简列表 */
export function getItemTypeSimpleList() {
return requestClient.get<MesMdItemTypeApi.ItemType[]>(
'/mes/md/item-type/simple-list',
);
}
/** 查询物料产品分类详情 */
export function getItemType(id: number) {
return requestClient.get<MesMdItemTypeApi.ItemType>(
`/mes/md/item-type/get?id=${id}`,
);
}
/** 新增物料产品分类 */
export function createItemType(data: MesMdItemTypeApi.ItemType) {
return requestClient.post('/mes/md/item-type/create', data);
}
/** 修改物料产品分类 */
export function updateItemType(data: MesMdItemTypeApi.ItemType) {
return requestClient.put('/mes/md/item-type/update', data);
}
/** 删除物料产品分类 */
export function deleteItemType(id: number) {
return requestClient.delete(`/mes/md/item-type/delete?id=${id}`);
}

View File

@ -0,0 +1,62 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesMdUnitMeasureApi {
/** MES 计量单位 */
export interface UnitMeasure {
id?: number; // 单位编号
code?: string; // 单位编码
name?: string; // 单位名称
primaryFlag?: boolean; // 是否主单位
primaryId?: number; // 主单位编号
changeRate?: number; // 与主单位换算比例
status?: number; // 状态
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询计量单位分页 */
export function getUnitMeasurePage(params: PageParam) {
return requestClient.get<PageResult<MesMdUnitMeasureApi.UnitMeasure>>(
'/mes/md/unit-measure/page',
{ params },
);
}
/** 查询计量单位精简列表 */
export function getUnitMeasureSimpleList() {
return requestClient.get<MesMdUnitMeasureApi.UnitMeasure[]>(
'/mes/md/unit-measure/simple-list',
);
}
/** 查询计量单位详情 */
export function getUnitMeasure(id: number) {
return requestClient.get<MesMdUnitMeasureApi.UnitMeasure>(
`/mes/md/unit-measure/get?id=${id}`,
);
}
/** 新增计量单位 */
export function createUnitMeasure(data: MesMdUnitMeasureApi.UnitMeasure) {
return requestClient.post('/mes/md/unit-measure/create', data);
}
/** 修改计量单位 */
export function updateUnitMeasure(data: MesMdUnitMeasureApi.UnitMeasure) {
return requestClient.put('/mes/md/unit-measure/update', data);
}
/** 删除计量单位 */
export function deleteUnitMeasure(id: number) {
return requestClient.delete(`/mes/md/unit-measure/delete?id=${id}`);
}
/** 导出计量单位 */
export function exportUnitMeasure(params: PageParam) {
return requestClient.download('/mes/md/unit-measure/export-excel', {
params,
});
}

View File

@ -0,0 +1,87 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesMdVendorApi {
/** MES 供应商 */
export interface Vendor {
id?: number; // 供应商编号
code?: string; // 供应商编码
name?: string; // 供应商名称
nickname?: string; // 供应商简称
englishName?: string; // 供应商英文名称
description?: string; // 供应商简介
logo?: string; // 供应商 LOGO 地址
level?: string; // 供应商等级
score?: number; // 供应商评分
address?: string; // 供应商地址
website?: string; // 供应商官网地址
email?: string; // 供应商邮箱地址
telephone?: string; // 供应商电话
contact1Name?: string; // 联系人1
contact1Telephone?: string; // 联系人1电话
contact1Email?: string; // 联系人1邮箱
contact2Name?: string; // 联系人2
contact2Telephone?: string; // 联系人2电话
contact2Email?: string; // 联系人2邮箱
creditCode?: string; // 统一社会信用代码
status?: number; // 状态
remark?: string; // 备注
createTime?: Date; // 创建时间
}
/** 供应商导入结果 */
export interface VendorImportRespVO {
createCodes?: string[]; // 新增成功的供应商编码
updateCodes?: string[]; // 更新成功的供应商编码
failureCodes?: Record<string, string>; // 导入失败的供应商编码及原因
}
}
/** 查询供应商分页 */
export function getVendorPage(params: PageParam) {
return requestClient.get<PageResult<MesMdVendorApi.Vendor>>(
'/mes/md-vendor/page',
{ params },
);
}
/** 查询供应商详情 */
export function getVendor(id: number) {
return requestClient.get<MesMdVendorApi.Vendor>(
`/mes/md-vendor/get?id=${id}`,
);
}
/** 新增供应商 */
export function createVendor(data: MesMdVendorApi.Vendor) {
return requestClient.post('/mes/md-vendor/create', data);
}
/** 修改供应商 */
export function updateVendor(data: MesMdVendorApi.Vendor) {
return requestClient.put('/mes/md-vendor/update', data);
}
/** 删除供应商 */
export function deleteVendor(id: number) {
return requestClient.delete(`/mes/md-vendor/delete?id=${id}`);
}
/** 导出供应商 */
export function exportVendor(params: any) {
return requestClient.download('/mes/md-vendor/export-excel', { params });
}
/** 下载供应商导入模板 */
export function importVendorTemplate() {
return requestClient.download('/mes/md-vendor/get-import-template');
}
/** 导入供应商 */
export function importVendor(file: File, updateSupport: boolean) {
return requestClient.upload<MesMdVendorApi.VendorImportRespVO>(
`/mes/md-vendor/import?updateSupport=${updateSupport}`,
{ file },
);
}

View File

@ -0,0 +1,58 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesMdWorkstationApi {
/** MES 工作站 */
export interface Workstation {
id?: number; // 工作站编号
code?: string; // 工作站编码
name?: string; // 工作站名称
address?: string; // 工作站地点
workshopId?: number; // 所在车间编号
workshopName?: string; // 所在车间名称
processId?: number; // 工序编号
processName?: string; // 工序名称
warehouseId?: number; // 线边库编号
locationId?: number; // 库区编号
areaId?: number; // 库位编号
status?: number; // 状态
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询工作站分页 */
export function getWorkstationPage(params: PageParam) {
return requestClient.get<PageResult<MesMdWorkstationApi.Workstation>>(
'/mes/md-workstation/page',
{ params },
);
}
/** 查询工作站详情 */
export function getWorkstation(id: number) {
return requestClient.get<MesMdWorkstationApi.Workstation>(
`/mes/md-workstation/get?id=${id}`,
);
}
/** 新增工作站 */
export function createWorkstation(data: MesMdWorkstationApi.Workstation) {
return requestClient.post<number>('/mes/md-workstation/create', data);
}
/** 修改工作站 */
export function updateWorkstation(data: MesMdWorkstationApi.Workstation) {
return requestClient.put('/mes/md-workstation/update', data);
}
/** 删除工作站 */
export function deleteWorkstation(id: number) {
return requestClient.delete(`/mes/md-workstation/delete?id=${id}`);
}
/** 导出工作站 */
export function exportWorkstation(params: any) {
return requestClient.download('/mes/md-workstation/export-excel', { params });
}

View File

@ -0,0 +1,35 @@
import { requestClient } from '#/api/request';
export namespace MesMdWorkstationMachineApi {
/** MES 工作站设备资源 */
export interface WorkstationMachine {
id?: number; // 资源编号
workstationId?: number; // 工作站编号
machineryId?: number; // 设备编号
machineryCode?: string; // 设备编码
machineryName?: string; // 设备名称
quantity?: number; // 数量
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询工作站设备资源列表 */
export function getWorkstationMachineList(workstationId: number) {
return requestClient.get<MesMdWorkstationMachineApi.WorkstationMachine[]>(
'/mes/md-workstation-machine/list-by-workstation',
{ params: { workstationId } },
);
}
/** 新增工作站设备资源 */
export function createWorkstationMachine(
data: MesMdWorkstationMachineApi.WorkstationMachine,
) {
return requestClient.post('/mes/md-workstation-machine/create', data);
}
/** 删除工作站设备资源 */
export function deleteWorkstationMachine(id: number) {
return requestClient.delete(`/mes/md-workstation-machine/delete?id=${id}`);
}

View File

@ -0,0 +1,41 @@
import { requestClient } from '#/api/request';
export namespace MesMdWorkstationToolApi {
/** MES 工作站工装夹具资源 */
export interface WorkstationTool {
id?: number; // 资源编号
workstationId?: number; // 工作站编号
toolTypeId?: number; // 工具类型编号
toolTypeName?: string; // 工具类型名称
quantity?: number; // 数量
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询工作站工装夹具资源列表 */
export function getWorkstationToolList(workstationId: number) {
return requestClient.get<MesMdWorkstationToolApi.WorkstationTool[]>(
'/mes/md-workstation-tool/list-by-workstation',
{ params: { workstationId } },
);
}
/** 新增工作站工装夹具资源 */
export function createWorkstationTool(
data: MesMdWorkstationToolApi.WorkstationTool,
) {
return requestClient.post('/mes/md-workstation-tool/create', data);
}
/** 修改工作站工装夹具资源 */
export function updateWorkstationTool(
data: MesMdWorkstationToolApi.WorkstationTool,
) {
return requestClient.put('/mes/md-workstation-tool/update', data);
}
/** 删除工作站工装夹具资源 */
export function deleteWorkstationTool(id: number) {
return requestClient.delete(`/mes/md-workstation-tool/delete?id=${id}`);
}

View File

@ -0,0 +1,41 @@
import { requestClient } from '#/api/request';
export namespace MesMdWorkstationWorkerApi {
/** MES 工作站人力资源 */
export interface WorkstationWorker {
id?: number; // 资源编号
workstationId?: number; // 工作站编号
postId?: number; // 岗位编号
postName?: string; // 岗位名称
quantity?: number; // 数量
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询工作站人力资源列表 */
export function getWorkstationWorkerList(workstationId: number) {
return requestClient.get<MesMdWorkstationWorkerApi.WorkstationWorker[]>(
'/mes/md-workstation-worker/list-by-workstation',
{ params: { workstationId } },
);
}
/** 新增工作站人力资源 */
export function createWorkstationWorker(
data: MesMdWorkstationWorkerApi.WorkstationWorker,
) {
return requestClient.post('/mes/md-workstation-worker/create', data);
}
/** 修改工作站人力资源 */
export function updateWorkstationWorker(
data: MesMdWorkstationWorkerApi.WorkstationWorker,
) {
return requestClient.put('/mes/md-workstation-worker/update', data);
}
/** 删除工作站人力资源 */
export function deleteWorkstationWorker(id: number) {
return requestClient.delete(`/mes/md-workstation-worker/delete?id=${id}`);
}

View File

@ -0,0 +1,60 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesMdWorkshopApi {
/** MES 车间 */
export interface Workshop {
id?: number; // 车间编号
code?: string; // 车间编码
name?: string; // 车间名称
area?: number; // 面积
chargeUserId?: number; // 负责人用户编号
chargeUserName?: string; // 负责人名称
status?: number; // 状态
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询车间分页 */
export function getWorkshopPage(params: PageParam) {
return requestClient.get<PageResult<MesMdWorkshopApi.Workshop>>(
'/mes/md-workshop/page',
{ params },
);
}
/** 查询车间精简列表 */
export function getWorkshopSimpleList() {
return requestClient.get<MesMdWorkshopApi.Workshop[]>(
'/mes/md-workshop/simple-list',
);
}
/** 查询车间详情 */
export function getWorkshop(id: number) {
return requestClient.get<MesMdWorkshopApi.Workshop>(
`/mes/md-workshop/get?id=${id}`,
);
}
/** 新增车间 */
export function createWorkshop(data: MesMdWorkshopApi.Workshop) {
return requestClient.post('/mes/md-workshop/create', data);
}
/** 修改车间 */
export function updateWorkshop(data: MesMdWorkshopApi.Workshop) {
return requestClient.put('/mes/md-workshop/update', data);
}
/** 删除车间 */
export function deleteWorkshop(id: number) {
return requestClient.delete(`/mes/md-workshop/delete?id=${id}`);
}
/** 导出车间 */
export function exportWorkshop(params: any) {
return requestClient.download('/mes/md-workshop/export-excel', { params });
}

View File

@ -0,0 +1,38 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesProProcessApi {
/** MES 生产工序 */
export interface Process {
id: number;
code?: string;
name?: string;
attention?: string;
status?: number;
remark?: string;
createTime?: Date;
}
}
/** 查询生产工序分页 */
export function getProcessPage(params: PageParam) {
return requestClient.get<PageResult<MesProProcessApi.Process>>(
'/mes/pro/process/page',
{ params },
);
}
/** 查询生产工序精简列表 */
export function getProcessSimpleList() {
return requestClient.get<MesProProcessApi.Process[]>(
'/mes/pro/process/simple-list',
);
}
/** 查询生产工序详情 */
export function getProcess(id: number) {
return requestClient.get<MesProProcessApi.Process>(
`/mes/pro/process/get?id=${id}`,
);
}

View File

@ -0,0 +1,61 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesTmToolApi {
/** MES 工具台账 */
export interface Tool {
id?: number; // 工具编号
code?: string; // 工具编码
name?: string; // 工具名称
brand?: string; // 品牌
specification?: string; // 型号规格
toolTypeId?: number; // 工具类型编号
toolTypeName?: string; // 工具类型名称
quantity?: number; // 数量
availableQuantity?: number; // 可用数量
maintenType?: number; // 保养维护类型
nextMaintenPeriod?: number; // 下次保养周期
nextMaintenDate?: Date | number; // 下次保养日期
status?: number; // 状态
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询工具台账分页 */
export function getToolPage(params: PageParam) {
return requestClient.get<PageResult<MesTmToolApi.Tool>>('/mes/tm/tool/page', {
params,
});
}
/** 查询工具精简列表 */
export function getToolSimpleList() {
return requestClient.get<MesTmToolApi.Tool[]>('/mes/tm/tool/simple-list');
}
/** 查询工具台账详情 */
export function getTool(id: number) {
return requestClient.get<MesTmToolApi.Tool>(`/mes/tm/tool/get?id=${id}`);
}
/** 新增工具台账 */
export function createTool(data: MesTmToolApi.Tool) {
return requestClient.post('/mes/tm/tool/create', data);
}
/** 修改工具台账 */
export function updateTool(data: MesTmToolApi.Tool) {
return requestClient.put('/mes/tm/tool/update', data);
}
/** 删除工具台账 */
export function deleteTool(id: number) {
return requestClient.delete(`/mes/tm/tool/delete?id=${id}`);
}
/** 导出工具台账 */
export function exportTool(params: any) {
return requestClient.download('/mes/tm/tool/export-excel', { params });
}

View File

@ -0,0 +1,59 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesTmToolTypeApi {
/** MES 工具类型 */
export interface ToolType {
id?: number; // 工具类型编号
code?: string; // 类型编码
name?: string; // 类型名称
codeFlag?: boolean; // 是否编码管理
maintenType?: number; // 保养维护类型
maintenPeriod?: number; // 保养周期
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询工具类型分页 */
export function getToolTypePage(params: PageParam) {
return requestClient.get<PageResult<MesTmToolTypeApi.ToolType>>(
'/mes/tm/tool-type/page',
{ params },
);
}
/** 查询工具类型精简列表 */
export function getToolTypeSimpleList() {
return requestClient.get<MesTmToolTypeApi.ToolType[]>(
'/mes/tm/tool-type/simple-list',
);
}
/** 查询工具类型详情 */
export function getToolType(id: number) {
return requestClient.get<MesTmToolTypeApi.ToolType>(
`/mes/tm/tool-type/get?id=${id}`,
);
}
/** 新增工具类型 */
export function createToolType(data: MesTmToolTypeApi.ToolType) {
return requestClient.post('/mes/tm/tool-type/create', data);
}
/** 修改工具类型 */
export function updateToolType(data: MesTmToolTypeApi.ToolType) {
return requestClient.put('/mes/tm/tool-type/update', data);
}
/** 删除工具类型 */
export function deleteToolType(id: number) {
return requestClient.delete(`/mes/tm/tool-type/delete?id=${id}`);
}
/** 导出工具类型 */
export function exportToolType(params: any) {
return requestClient.download('/mes/tm/tool-type/export-excel', { params });
}

View File

@ -0,0 +1,65 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesWmBarcodeApi {
/** MES 条码清单 */
export interface Barcode {
id?: number;
configId?: number;
format?: number;
bizType?: number;
content?: string;
bizId?: number;
bizCode?: string;
bizName?: string;
status?: number;
remark?: string;
createTime?: Date;
}
}
/** 查询条码分页 */
export function getBarcodePage(params: PageParam) {
return requestClient.get<PageResult<MesWmBarcodeApi.Barcode>>(
'/mes/wm/barcode/page',
{ params },
);
}
/** 查询条码详情 */
export function getBarcode(id: number) {
return requestClient.get<MesWmBarcodeApi.Barcode>(
`/mes/wm/barcode/get?id=${id}`,
);
}
/** 根据业务对象获取条码 */
export function getBarcodeByBusiness(bizType: number, bizId: number) {
return requestClient.get<MesWmBarcodeApi.Barcode>(
'/mes/wm/barcode/get-by-business',
{ params: { bizType, bizId } },
);
}
/** 新增条码 */
export function createBarcode(data: MesWmBarcodeApi.Barcode) {
return requestClient.post('/mes/wm/barcode/create', data);
}
/** 修改条码 */
export function updateBarcode(data: MesWmBarcodeApi.Barcode) {
return requestClient.put('/mes/wm/barcode/update', data);
}
/** 删除条码 */
export function deleteBarcode(id: number) {
return requestClient.delete(`/mes/wm/barcode/delete?id=${id}`);
}
/** 生成条码内容 */
export function generateBarcodeContent(bizType: number, bizCode: string) {
return requestClient.get<string>('/mes/wm/barcode/generate-content', {
params: { bizType, bizCode },
});
}

View File

@ -0,0 +1,34 @@
import { requestClient } from '#/api/request';
export namespace MesWmItemReceiptApi {
/** MES 采购入库单 */
export interface ItemReceipt {
id?: number; // 入库单编号
code?: string; // 入库单编码
name?: string; // 入库单名称
iqcId?: number; // 来料检验单编号
iqcCode?: string; // 来料检验单编码
noticeId?: number; // 到货通知单编号
noticeCode?: string; // 到货通知单编码
purchaseOrderCode?: string; // 采购订单号
vendorId?: number; // 供应商编号
vendorName?: string; // 供应商名称
warehouseId?: number; // 仓库编号
warehouseName?: string; // 仓库名称
locationId?: number; // 库区编号
locationName?: string; // 库区名称
areaId?: number; // 库位编号
areaName?: string; // 库位名称
receiptDate?: Date | number | string; // 入库日期
status?: number; // 状态
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询采购入库单详情 */
export function getItemReceipt(id: number) {
return requestClient.get<MesWmItemReceiptApi.ItemReceipt>(
`/mes/wm/item-receipt/get?id=${id}`,
);
}

View File

@ -0,0 +1,28 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesWmItemReceiptLineApi {
/** MES 物料接收单行 */
export interface ItemReceiptLine {
id?: number; // 行编号
receiptId?: number; // 入库单编号
receiptCode?: string; // 入库单编码
purchaseOrderCode?: string; // 采购订单号
itemId?: number; // 物料编号
itemCode?: string; // 物料编码
itemName?: string; // 物料名称
specification?: string; // 规格型号
unitMeasureName?: string; // 单位
receivedQuantity?: number; // 入库数量
batchCode?: string; // 批次号
}
}
/** 查询物料接收单行分页 */
export function getItemReceiptLinePage(params: PageParam) {
return requestClient.get<PageResult<MesWmItemReceiptLineApi.ItemReceiptLine>>(
'/mes/wm/item-receipt-line/page',
{ params },
);
}

View File

@ -0,0 +1,23 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesWmProductSalesApi {
/** MES 销售出库单 */
export interface ProductSales {
id?: number; // 销售出库单编号
code?: string; // 出库单编号
name?: string; // 出库单名称
salesOrderCode?: string; // 销售订单编号
salesDate?: Date; // 出库日期
status?: number; // 单据状态
}
}
/** 查询销售出库单分页 */
export function getProductSalesPage(params: PageParam) {
return requestClient.get<PageResult<MesWmProductSalesApi.ProductSales>>(
'/mes/wm/product-sales/page',
{ params },
);
}

View File

@ -0,0 +1,24 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesWmProductSalesLineApi {
/** MES 销售出库单行 */
export interface ProductSalesLine {
id?: number; // 行编号
itemId?: number; // 物料编号
itemCode?: string; // 物料编码
itemName?: string; // 物料名称
specification?: string; // 规格型号
unitMeasureName?: string; // 单位
quantity?: number; // 出库数量
batchCode?: string; // 批次号
}
}
/** 查询销售出库单行分页 */
export function getProductSalesLinePage(params: PageParam) {
return requestClient.get<
PageResult<MesWmProductSalesLineApi.ProductSalesLine>
>('/mes/wm/product-sales-line/page', { params });
}

View File

@ -0,0 +1,50 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesWmWarehouseAreaApi {
/** MES 库位 */
export interface WarehouseArea {
id?: number; // 库位编号
code?: string; // 库位编码
name?: string; // 库位名称
warehouseId?: number; // 仓库编号
warehouseName?: string; // 仓库名称
locationId?: number; // 库区编号
locationName?: string; // 库区名称
area?: number; // 面积
maxLoad?: number; // 最大载荷
positionX?: number; // X 坐标
positionY?: number; // Y 坐标
positionZ?: number; // Z 坐标
status?: number; // 状态
frozen?: boolean; // 是否冻结
allowItemMixing?: boolean; // 是否允许物料混放
allowBatchMixing?: boolean; // 是否允许批次混放
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询库位分页 */
export function getWarehouseAreaPage(params: PageParam) {
return requestClient.get<PageResult<MesWmWarehouseAreaApi.WarehouseArea>>(
'/mes/wm/warehouse-area/page',
{ params },
);
}
/** 查询库位精简列表 */
export function getWarehouseAreaSimpleList(locationId?: number) {
return requestClient.get<MesWmWarehouseAreaApi.WarehouseArea[]>(
'/mes/wm/warehouse-area/simple-list',
{ params: { locationId } },
);
}
/** 查询库位详情 */
export function getWarehouseArea(id: number) {
return requestClient.get<MesWmWarehouseAreaApi.WarehouseArea>(
`/mes/wm/warehouse-area/get?id=${id}`,
);
}

View File

@ -0,0 +1,40 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesWmWarehouseApi {
/** MES 仓库 */
export interface Warehouse {
id?: number; // 仓库编号
code?: string; // 仓库编码
name?: string; // 仓库名称
address?: string; // 地址
area?: number; // 面积
chargeUserId?: number; // 负责人
frozen?: boolean; // 是否冻结
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询仓库分页 */
export function getWarehousePage(params: PageParam) {
return requestClient.get<PageResult<MesWmWarehouseApi.Warehouse>>(
'/mes/wm/warehouse/page',
{ params },
);
}
/** 查询仓库精简列表 */
export function getWarehouseSimpleList() {
return requestClient.get<MesWmWarehouseApi.Warehouse[]>(
'/mes/wm/warehouse/simple-list',
);
}
/** 查询仓库详情 */
export function getWarehouse(id: number) {
return requestClient.get<MesWmWarehouseApi.Warehouse>(
`/mes/wm/warehouse/get?id=${id}`,
);
}

View File

@ -0,0 +1,40 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MesWmWarehouseLocationApi {
/** MES 库区 */
export interface WarehouseLocation {
id?: number; // 库区编号
code?: string; // 库区编码
name?: string; // 库区名称
warehouseId?: number; // 仓库编号
warehouseName?: string; // 仓库名称
area?: number; // 面积
frozen?: boolean; // 是否冻结
remark?: string; // 备注
createTime?: Date; // 创建时间
}
}
/** 查询库区分页 */
export function getWarehouseLocationPage(params: PageParam) {
return requestClient.get<
PageResult<MesWmWarehouseLocationApi.WarehouseLocation>
>('/mes/wm/warehouse-location/page', { params });
}
/** 查询库区精简列表 */
export function getWarehouseLocationSimpleList(warehouseId?: number) {
return requestClient.get<MesWmWarehouseLocationApi.WarehouseLocation[]>(
'/mes/wm/warehouse-location/simple-list',
{ params: { warehouseId } },
);
}
/** 查询库区详情 */
export function getWarehouseLocation(id: number) {
return requestClient.get<MesWmWarehouseLocationApi.WarehouseLocation>(
`/mes/wm/warehouse-location/get?id=${id}`,
);
}

View File

@ -119,13 +119,58 @@ function createRequestClient(baseURL: string, options?: RequestClientOptions) {
response.data = apiEncrypt.decryptResponse(response.data);
} catch (error) {
console.error('响应数据解密失败:', error);
throw new Error(`响应数据解密失败: ${(error as Error).message}`);
throw new Error(`响应数据解密失败: ${(error as Error).message}`, {
cause: error,
});
}
}
return response;
},
});
// add by 芋艿:对应 https://t.zsxq.com/SHqWw 反馈
// 处理 Blob 响应中的业务错误(如 401后端把「账号未登录」包成 HTTP 200 + body {code: 401, msg: ...}
// download 强制 responseType: 'blob' 后被 axios 包成 application/json 的 BlobdefaultResponseInterceptor 走
// responseReturn === 'body' 分支直接返回,绕过了 authenticateResponseInterceptor 的 401 token 刷新;
// 这里把这种 Blob 解析回 JSON再以 axios 风格抛出,让后续拦截器接管
client.addResponseInterceptor({
fulfilled: async (response) => {
const blob = response.data;
if (!(blob instanceof Blob)) {
return response;
}
// Blob.type 在部分环境可能为空或大小写不一,叠加 response header 一起判断更稳
const blobType = (blob.type || '').toLowerCase();
const headerType = String(
response.headers?.['content-type'] ??
response.headers?.['Content-Type'] ??
'',
).toLowerCase();
if (
!blobType.includes('application/json') &&
!headerType.includes('application/json')
) {
return response;
}
let parsed: any;
try {
parsed = JSON.parse(await blob.text());
} catch {
return response;
}
if (parsed && parsed.code !== undefined && parsed.code !== 0) {
response.data = parsed;
throw Object.assign(new Error(parsed.msg ?? 'Request failed'), {
config: response.config,
response,
data: parsed,
isAxiosError: true,
});
}
return response;
},
});
// 处理返回的响应数据格式
client.addResponseInterceptor(
defaultResponseInterceptor({

Some files were not shown because too many files have changed in this diff Show More