Commit Graph

1478 Commits (master)

Author SHA1 Message Date
YunaiV 2a868b809f feat(mes): 新增 wm 等 api 迁移 2026-05-27 06:37:33 +08:00
YunaiV 3acc821de5 feat(mes): 迁移“生产报工(pro_feedback)”的 antd 功能 2026-05-26 08:42:49 +08:00
YunaiV 272757995e fix(iot): 修复产品、设备、规则与首页对标差异
- 对齐产品卡片默认图标和图片资源,修正产品导出文件名
- 对齐设备导入、属性历史、分组校验和物模型编辑行为
- 对齐首页统计空态、设备地图图例和快捷日期范围实现
- 对齐数据规则 source/sink 配置、Redis Stream 字段契约和场景联动选择器
- 补充空值判断工具测试,并将剩余 IoT 对标项迁入 done
2026-05-25 08:22:59 +08:00
YunaiV 8ab0c53011 Merge remote-tracking branch 'origin/master' into migration
# Conflicts:
#	apps/web-antd/src/views/iot/home/modules/message-trend-card.vue
#	apps/web-antd/src/views/iot/rule/data/sink/config/redis-stream-config-form.vue
#	apps/web-antd/src/views/mes/md/client/components/md-client-select-dialog.vue
#	apps/web-ele/src/views/iot/home/modules/message-trend-card.vue
#	apps/web-ele/src/views/iot/rule/data/sink/config/redis-stream-config-form.vue
#	apps/web-ele/src/views/iot/thingmodel/modules/input-output-param.vue
#	pnpm-lock.yaml
#	pnpm-workspace.yaml
2026-05-24 22:20:36 +08:00
YunaiV 6fb45f1ded fix(iot): 修复场景联动动态列表 key 与校验问题
- 新增 getStableObjectKey,统一处理对象列表 v-for 稳定 key
- 场景联动触发器、执行器、条件组、条件项改用稳定对象 key
- 保持场景规则 API 类型不包含 UI 专用 _key 字段
- 修复场景联动触发器/执行器校验与地图详情跳转
2026-05-24 16:43:02 +08:00
YunaiV aeff25209d fix(iot): 修复 13 处 bug 并完成 codex 三轮收口
按 codex 两轮 review 分批处理 IoT 模块 13 处 bug,对第二轮反馈中
B42/B47 的类型/字段问题做最终收尾,所有修复 web-antd / web-ele 两端同步。

主要修复:
- B91  设备分组:删除前校验 deviceCount,分组下有设备时弹警告
- B40  物模型 array 数据规格:从 Radio.Group @change 事件正确取值(antd)
- B42  物模型属性历史:list 写入时按 idx 生成 _rowKey,模板 row-key="_rowKey"
       list 类型改 IotDeviceApi.DeviceProperty & { _rowKey: string }
       匹配后端 IotDevicePropertyMapper.xml 实际返回的字段
       (修掉 codex 指出的 antd row-key TS2322 与 ele 同毫秒撞键)
- B119 物模型表单:edit 模式禁用 identifier 编辑
- B47  场景规则主条件:产品/设备切换时清 deviceId/identifier/operator/value
       (修掉 codex 指出的 condition.value.param TS2339,Trigger 无 param)
- B44  数据目的数据库配置:SQL 复制按钮 setTimeout 在 onBeforeUnmount 中清理
- B51  场景规则首页统计:total 取接口 result.total,其余基于当前页
- B29  产品卡片视图:图标为 URL 时改用 <img> 渲染,复用 @vben/utils 的 isHttpUrl
- B43  首页设备地图:移除过度设计的 AbortController,回归 vue3 源项目同款
       InfoWindow 监听写法,querySelector 限定到 .BMap_bubble_content 子树
- B105 场景规则设备选择器:productId 变化后旧 deviceId 不在新列表则清空
- B45  通用 key-value 编辑器:v-for key 改用递增的 _uid,避免编辑/删除时 DOM 复用错乱
- B132 设备导入表单:beforeUpload 校验 .xls/.xlsx
- B126 设备详情:四个 tab 子组件 v-if 增加 device.id 守卫

附带工具收敛:
- @vben-core/shared/utils 新增 formatDayjs,统一 antd TimePicker/DatePicker
  value-format 后回传的 Dayjs|string 归一
- 场景规则首页 updateStatistics 补回 JSDoc,对齐文件内其他 function 风格

验证:
- 改动文件 pnpm exec eslint 0 error
- pnpm -F @vben/web-antd / @vben/web-ele exec vue-tsc --noEmit --skipLibCheck
  过滤 src/views/iot/|src/api/iot/ 均 0 hit
2026-05-24 10:11:43 +08:00
YunaiV 241cf76788 fix(iot): 修复 21 处 bug(P1×15 + P2×6)
经 codex 4 轮复评定稿,antd / ele 两端同步。

P1(场景规则 / 物模型 / Modbus / Redis sink / 路由):
- B7/B8 隐藏路由 path 与 activePath 对齐 vue3 源(产品 / OTA 固件详情)
- B9 移除后端不存在的 deleteSceneRuleList 封装
- B10 物模型 number specs 恢复 min/max/step/unit 校验
- B11 物模型新增枚举项补 dataType: ENUM
- B12 物模型 struct 非空校验绑 fieldPath,array 嵌套显式覆盖
       property.dataSpecs.dataSpecsList,确保父表单 validate 触发
- B13 struct 与 input-output-param 编辑回填 cloneDeep,取消不污染原对象
- B14 Modbus Client 模式 ip/port/timeout/retryInterval 改 dependencies 条件必填
- B19 Redis sink 补 dataStructure(默认 Stream)+ Hash/ZSet 条件字段
- B20 仅 ALERT_RECOVER 强校验 alertConfigId,ALERT_TRIGGER 放行
- B21 conditionGroups 递归校验
       · 设备状态/属性 param 必填
       · CURRENT_TIME 按 operator 区分:TODAY 免、BETWEEN_TIME 双段、其它单段
       · 触发器 / 条件 / 执行器 deviceId 改显式 null/undefined 判断,
         保留「全部设备 = 0」(后端 action 支持广播执行)
- B22 事件上报条件改回普通 Input,允许标量值或留空
- B23 antd 当前时间条件 :value / @update:value 绑定 + Dayjs 类型 normalize;
       归一逻辑抽到 @vben/utils.formatDayjs(packages/@core/base/shared/utils/date.ts),
       供所有 app 复用
- B24 设备控制动作切换无条件清依赖,去掉 isInitialized 冗余守卫
- B26 JSON 参数输入先全部校验通过后再写入父表单

P2(产品 / 设备 / 物模型展示 / 数据源):
- B28 产品 deviceType 去默认值,强制用户显式选择
- B30 设备列表 DeviceName 加点击详情 slot
- B31 设备卡片显示备注名称(nickname || deviceName)
- B32 设备详情 hasLocation 改用 != null,合法 0 坐标不再判空
- B41 物模型数据定义展示顺序改为 name-value
- B46 数据源 getData() 剔除仅 UI 用的 identifierLoading 临时字段
2026-05-24 00:32:35 +08:00
xingyu4j fb2595ef90 Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin 2026-05-23 18:39:12 +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
过冬 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
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
928646789 6b81d1b0d5
fix: preferences-button click to show setting drawer (#7938) 2026-05-22 07:26:12 +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 d207e3b82c feat(mes): 优化 md 基础模块的迁移 2026-05-21 13:23:33 +08:00
YunaiV 4b6e2de778 feat(mes): 迁移客户、供应商、车间管理到 vben 2026-05-21 10:36:07 +08:00
YunaiV b3462c3286 feat(iot): 将 antd 的 rule scene 迁移到 ele 里。 2026-05-21 08:53:16 +08:00
YunaiV 3f09fc1498 feat(iot): 优化 iot 的代码风格(迁移 constants.ts)地址 2026-05-20 23:11:02 +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 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 b1bd32a89b fix(iot): 完善 thingmodel 的迁移 2026-05-20 08:46:28 +08:00
YunaiV e7a61ce150 feat(iot): 优化 antd 里的整体代码风格。 2026-05-20 00:41:06 +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
xingyu4j 0c1b737325 fix: fix lint && typecheck 2026-05-18 16:50:14 +08:00
YunaiV 0e4012c623 feat(全局):增加 barcode 二维码组件 2026-05-17 23:07:56 +08:00
YunaiV 735ff018be feat(wms):增加 home 统计的迁移 2026-05-17 17:48:53 +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
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 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