Files
ccdi/docs/reports/implementation/2026-03-20-results-overview-risk-model-loading-label-fix.md

27 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 结果总览模型卡片 loading 与筛选标签样式修复记录
## 本次改动
- 在 [`RiskModelSection.vue`](/Users/wkc/Desktop/ccdi/ccdi/ruoyi-ui/src/views/ccdiProject/components/detail/RiskModelSection.vue) 调整模型卡片点击联动逻辑,点击选中或取消模型时,向人员列表请求附带 `syncCardLoading` 开关,让“模型预警次数统计”卡片区在联动查询期间显示 loading。
- 在 [`RiskModelSection.vue`](/Users/wkc/Desktop/ccdi/ccdi/ruoyi-ui/src/views/ccdiProject/components/detail/RiskModelSection.vue) 将 `fetchPeopleList` 改为支持可选参数,保证只有模型卡片切换场景会联动卡片 loading普通查询、分页和部门筛选仍只影响下方表格 loading。
- 新增 [`preliminary-check-model-loading-and-label.test.js`](/Users/wkc/Desktop/ccdi/ccdi/ruoyi-ui/tests/unit/preliminary-check-model-loading-and-label.test.js),校验模型卡片联动 loading 代码路径和“员工姓名或工号”标签单行样式已落地。
## 处理说明
- 保持现有接口和父子组件数据流不变,只在模型区组件内部补充交互反馈,避免引入额外状态同步。
- 卡片区 loading 与表格 loading 同步开始,但只在模型卡片点击触发时打开,符合“选择模型后对统计卡片添加 loading”的需求边界。
- “员工姓名或工号”标签通过 `white-space: nowrap``flex-shrink: 0` 保持单行显示,不影响筛选栏其余控件布局。
## 验证情况
- 已执行如下验证:
```bash
npx mocha ruoyi-ui/tests/unit/preliminary-check-model-loading-and-label.test.js ruoyi-ui/tests/unit/preliminary-check-model-linkage-flow.test.js ruoyi-ui/tests/unit/preliminary-check-model-filters.test.js
npm --prefix ruoyi-ui run build:prod
```
- 结果说明:
- 定向单测已通过。
- 前端生产构建已执行,结果以本次命令输出为准。