# Bank Tag Real Rule Phase 2 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.

**Goal:** 固化第二期银行流水真实规则落地后的前端边界与联调预期，确认本期仍不新增页面字段和交互改造，只做结果链路稳定性验证与文档沉淀。

**Architecture:** 第二期后端会补齐对象聚合、时间窗口和资产比对类规则，但前端继续只消费既有结果总览接口和模型区接口，不增加规则级展示逻辑。本期前端计划聚焦无改造边界校验、结果链路回归和最终收口记录。

**Tech Stack:** Vue 2, Element UI, Node.js

---

### Task 1: 锁定第二期前端结构无扩散

**Files:**
- Test: `ruoyi-ui/tests/unit/preliminary-check-summary-and-people.test.js`
- Test: `ruoyi-ui/tests/unit/preliminary-check-risk-people-binding.test.js`
- Test: `ruoyi-ui/tests/unit/preliminary-check-model-and-detail.test.js`

- [ ] **Step 1: Write the failing test**

补静态/绑定断言，锁定：

- 第二期后端规则收口不引起 `RiskPeopleSection.vue` 新增列
- 模型区与风险明细区不增加规则编码硬编码展示
- 页面仍按现有 `riskPeople / riskModels / riskDetails` 结构消费结果

- [ ] **Step 2: Run test to verify it fails**

Run:

```bash
cd ruoyi-ui
node tests/unit/preliminary-check-summary-and-people.test.js
node tests/unit/preliminary-check-risk-people-binding.test.js
node tests/unit/preliminary-check-model-and-detail.test.js
```

Expected:

- 若边界断言未写，则至少有 1 个测试需要先失败

- [ ] **Step 3: Write minimal implementation**

只补测试边界，不改前端业务代码。目标是避免在第二期后端复杂规则落地时，把结果字段变化误扩散成页面结构改造。

- [ ] **Step 4: Run test to verify it passes**

Run:

```bash
cd ruoyi-ui
node tests/unit/preliminary-check-summary-and-people.test.js
node tests/unit/preliminary-check-risk-people-binding.test.js
node tests/unit/preliminary-check-model-and-detail.test.js
```

Expected:

- `PASS`

- [ ] **Step 5: Commit**

```bash
git add ruoyi-ui/tests/unit/preliminary-check-summary-and-people.test.js ruoyi-ui/tests/unit/preliminary-check-risk-people-binding.test.js ruoyi-ui/tests/unit/preliminary-check-model-and-detail.test.js
git commit -m "锁定第二期流水模型前端边界"
```

### Task 2: 做第二期前端收口回归并补文档

**Files:**
- Create: `docs/reports/implementation/2026-03-20-bank-tag-real-rule-phase2-frontend-record.md`
- Create: `docs/tests/records/2026-03-20-bank-tag-real-rule-phase2-frontend-verification.md`

- [ ] **Step 1: Run final frontend regression**

Run:

```bash
cd ruoyi-ui
node tests/unit/project-overview-api.test.js
node tests/unit/preliminary-check-api-integration.test.js
node tests/unit/preliminary-check-summary-and-people.test.js
node tests/unit/preliminary-check-risk-people-binding.test.js
node tests/unit/preliminary-check-model-api.test.js
node tests/unit/preliminary-check-model-data-loading.test.js
node tests/unit/preliminary-check-model-match-mode.test.js
node tests/unit/preliminary-check-model-filters.test.js
node tests/unit/preliminary-check-model-table-columns.test.js
node tests/unit/preliminary-check-model-linkage-flow.test.js
node tests/unit/preliminary-check-model-and-detail.test.js
node tests/unit/preliminary-check-states.test.js
node tests/unit/preliminary-check-layout.test.js
```

Expected:

- `PASS`
- 第二期后端规则全量收口后，前端现有结果总览结构仍稳定

- [ ] **Step 2: Write implementation record**

在 `docs/reports/implementation/2026-03-20-bank-tag-real-rule-phase2-frontend-record.md` 中记录：

- 第二期前端仍无业务代码改造
- 主要工作为结构边界锁定、联调预期确认与全量收口记录
- 后端真实规则全量落地后，前端继续消费既有接口

- [ ] **Step 3: Write verification record**

在 `docs/tests/records/2026-03-20-bank-tag-real-rule-phase2-frontend-verification.md` 中记录：

- 执行命令
- 执行时间
- 结果摘要
- 未启动额外前端长期进程；若临时启动，验证后需停止

- [ ] **Step 4: Commit**

```bash
git add docs/reports/implementation/2026-03-20-bank-tag-real-rule-phase2-frontend-record.md docs/tests/records/2026-03-20-bank-tag-real-rule-phase2-frontend-verification.md
git commit -m "补充第二期流水模型前端实施记录"
```
