补充结果总览模型区前端实施记录

This commit is contained in:
wkc
2026-03-20 11:32:18 +08:00
parent 2285ebd3f0
commit e5afc1adee
5 changed files with 130 additions and 26 deletions

View File

@@ -1,6 +1,6 @@
# Results Overview Risk Model Linkage Frontend Implementation Plan
> **For agentic workers:** REQUIRED: Use superpowers:subagent-driven-development (if subagents available) or superpowers:executing-plans to implement this plan. Steps use checkbox (`- [ ]`) syntax for tracking.
> **For agentic workers:** REQUIRED: Use superpowers:subagent-driven-development (if subagents available) or superpowers:executing-plans to implement this plan. Steps use checkbox (`- [x]`) syntax for tracking.
**Goal:** 将结果总览模型区接入真实接口,支持多卡片联动、任意触发/同时触发切换、员工姓名或工号与部门筛选,以及异常标签展示。
@@ -16,7 +16,7 @@
- Modify: `ruoyi-ui/src/api/ccdi/projectOverview.js`
- Test: `ruoyi-ui/tests/unit/preliminary-check-model-api.test.js`
- [ ] **Step 1: Write the failing test**
- [x] **Step 1: Write the failing test**
新增接口静态断言,锁定以下方法与路径:
@@ -26,7 +26,7 @@
- `/ccdi/project/overview/risk-models/people`
- `matchMode`
- [ ] **Step 2: Run test to verify it fails**
- [x] **Step 2: Run test to verify it fails**
Run:
@@ -39,7 +39,7 @@ Expected:
- `FAIL`
- [ ] **Step 3: Write minimal implementation**
- [x] **Step 3: Write minimal implementation**
在 API 模块中新增:
@@ -56,7 +56,7 @@ Expected:
- `pageNum`
- `pageSize`
- [ ] **Step 4: Run test to verify it passes**
- [x] **Step 4: Run test to verify it passes**
Run:
@@ -69,7 +69,7 @@ Expected:
- `PASS`
- [ ] **Step 5: Commit**
- [x] **Step 5: Commit**
```bash
git add ruoyi-ui/src/api/ccdi/projectOverview.js ruoyi-ui/tests/unit/preliminary-check-model-api.test.js
@@ -83,7 +83,7 @@ git commit -m "补充结果总览模型区前端接口封装"
- Modify: `ruoyi-ui/src/views/ccdiProject/components/detail/preliminaryCheck.mock.js`
- Test: `ruoyi-ui/tests/unit/preliminary-check-model-data-loading.test.js`
- [ ] **Step 1: Write the failing test**
- [x] **Step 1: Write the failing test**
新增入口页静态断言,要求:
@@ -91,7 +91,7 @@ git commit -m "补充结果总览模型区前端接口封装"
- 模型区真实数据不再只依赖旧 mock
- 页面仍保留 `loading / empty / loaded` 状态结构
- [ ] **Step 2: Run test to verify it fails**
- [x] **Step 2: Run test to verify it fails**
Run:
@@ -104,7 +104,7 @@ Expected:
- `FAIL`
- [ ] **Step 3: Write minimal implementation**
- [x] **Step 3: Write minimal implementation**
`PreliminaryCheck.vue` 中:
@@ -113,7 +113,7 @@ Expected:
- 清理 `preliminaryCheck.mock.js` 中模型区旧的 `warningTypeOptions`、旧 `filterValues.model` 依赖
- 保留空态 mock 作为兜底展示结构,不新增业务逻辑兜底
- [ ] **Step 4: Run test to verify it passes**
- [x] **Step 4: Run test to verify it passes**
Run:
@@ -126,7 +126,7 @@ Expected:
- `PASS`
- [ ] **Step 5: Commit**
- [x] **Step 5: Commit**
```bash
git add ruoyi-ui/src/views/ccdiProject/components/detail/PreliminaryCheck.vue ruoyi-ui/src/views/ccdiProject/components/detail/preliminaryCheck.mock.js ruoyi-ui/tests/unit/preliminary-check-model-data-loading.test.js
@@ -140,7 +140,7 @@ git commit -m "接入结果总览模型卡片真实数据"
- Test: `ruoyi-ui/tests/unit/preliminary-check-model-multiselect.test.js`
- Test: `ruoyi-ui/tests/unit/preliminary-check-model-match-mode.test.js`
- [ ] **Step 1: Write the failing test**
- [x] **Step 1: Write the failing test**
新增组件静态/行为断言,锁定:
@@ -149,7 +149,7 @@ git commit -m "接入结果总览模型卡片真实数据"
- 存在 `matchMode`
- 页面出现“任意触发”“同时触发”文案
- [ ] **Step 2: Run test to verify it fails**
- [x] **Step 2: Run test to verify it fails**
Run:
@@ -163,7 +163,7 @@ Expected:
- `FAIL`
- [ ] **Step 3: Write minimal implementation**
- [x] **Step 3: Write minimal implementation**
`RiskModelSection.vue` 中新增状态:
@@ -183,7 +183,7 @@ Expected:
- 选中多张卡片时允许切换 `ANY / ALL`
- 不选卡片或仅选一张时,切换模式不报错,仍按当前接口语义请求
- [ ] **Step 4: Run test to verify it passes**
- [x] **Step 4: Run test to verify it passes**
Run:
@@ -197,7 +197,7 @@ Expected:
- `PASS`
- [ ] **Step 5: Commit**
- [x] **Step 5: Commit**
```bash
git add ruoyi-ui/src/views/ccdiProject/components/detail/RiskModelSection.vue ruoyi-ui/tests/unit/preliminary-check-model-multiselect.test.js ruoyi-ui/tests/unit/preliminary-check-model-match-mode.test.js
@@ -211,7 +211,7 @@ git commit -m "补充结果总览模型卡片联动交互"
- Test: `ruoyi-ui/tests/unit/preliminary-check-model-filters.test.js`
- Test: `ruoyi-ui/tests/unit/preliminary-check-model-table-columns.test.js`
- [ ] **Step 1: Write the failing test**
- [x] **Step 1: Write the failing test**
锁定以下变更:
@@ -224,7 +224,7 @@ git commit -m "补充结果总览模型卡片联动交互"
- 新增“工号”列
- 新增“异常标签”列
- [ ] **Step 2: Run test to verify it fails**
- [x] **Step 2: Run test to verify it fails**
Run:
@@ -238,7 +238,7 @@ Expected:
- `FAIL`
- [ ] **Step 3: Write minimal implementation**
- [x] **Step 3: Write minimal implementation**
在筛选区:
@@ -260,7 +260,7 @@ Expected:
- `hitTagList``el-tag` 展示 `ruleName`
- 颜色映射复用 `DetailQuery.vue` 风险等级映射方式
- [ ] **Step 4: Run test to verify it passes**
- [x] **Step 4: Run test to verify it passes**
Run:
@@ -274,7 +274,7 @@ Expected:
- `PASS`
- [ ] **Step 5: Commit**
- [x] **Step 5: Commit**
```bash
git add ruoyi-ui/src/views/ccdiProject/components/detail/RiskModelSection.vue ruoyi-ui/tests/unit/preliminary-check-model-filters.test.js ruoyi-ui/tests/unit/preliminary-check-model-table-columns.test.js
@@ -290,7 +290,7 @@ git commit -m "调整结果总览模型区筛选与列表列"
- Create: `docs/tests/records/2026-03-20-results-overview-risk-model-linkage-frontend-verification.md`
- Create: `docs/reports/implementation/2026-03-20-results-overview-risk-model-linkage-frontend-implementation.md`
- [ ] **Step 1: Write linkage flow assertions**
- [x] **Step 1: Write linkage flow assertions**
覆盖以下联动流:
@@ -302,7 +302,7 @@ git commit -m "调整结果总览模型区筛选与列表列"
- 全部取消恢复默认
- 关键词 + 部门 + 多卡片叠加
- [ ] **Step 2: Run final frontend verification**
- [x] **Step 2: Run final frontend verification**
Run:
@@ -321,7 +321,7 @@ Expected:
- `PASS`
- [ ] **Step 3: Write verification and implementation records**
- [x] **Step 3: Write verification and implementation records**
记录:
@@ -330,7 +330,7 @@ Expected:
- 任意触发 / 同时触发切换
- 关键词、部门、分页联动验证
- [ ] **Step 4: Commit**
- [x] **Step 4: Commit**
```bash
git add ruoyi-ui/tests/unit/preliminary-check-model-and-detail.test.js ruoyi-ui/tests/unit/preliminary-check-model-linkage-flow.test.js docs/plans/frontend/2026-03-20-results-overview-risk-model-linkage-frontend-implementation.md docs/tests/records/2026-03-20-results-overview-risk-model-linkage-frontend-verification.md docs/reports/implementation/2026-03-20-results-overview-risk-model-linkage-frontend-implementation.md