完成结果总览卡片结构合并实现
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# 结果总览卡片结构合并后端边界记录
|
||||
|
||||
**日期**: 2026-03-27
|
||||
|
||||
## 结论
|
||||
|
||||
- 本轮需求仅涉及结果总览页前端展示结构调整,后端无需改造。
|
||||
- 现有结果总览接口、字段和查询口径已足以支撑前端将顶部两个区块合并为同一个 `风险总览` 卡片。
|
||||
|
||||
## 复核范围
|
||||
|
||||
- `GET /ccdi/project/overview/dashboard`
|
||||
- `GET /ccdi/project/overview/risk-people`
|
||||
- `GET /ccdi/project/overview/risk-models/cards`
|
||||
- 结果总览相关控制器、服务实现与 SQL 契约
|
||||
|
||||
## 复核说明
|
||||
|
||||
- 前端只是重组了现有统计区和风险人员区的展示容器,没有提出新的返回字段需求。
|
||||
- 当前后端已经提供风险人员列表所需的 `riskLevel`、`riskLevelType`、`modelCount` 等字段。
|
||||
- 风险模型区和风险明细区本轮只改标题,不涉及数据语义调整。
|
||||
|
||||
## 边界说明
|
||||
|
||||
- 本次未修改任何后端源码文件。
|
||||
- 工作区存在与本任务无关的 `ruoyi-admin/src/main/resources/application-dev.yml` 差异,未纳入本次改动。
|
||||
- 本次未新增接口、未扩字段、未改 SQL、未调整统计口径。
|
||||
@@ -1,36 +1,59 @@
|
||||
# 结果总览卡片合并前端实施记录
|
||||
# 结果总览卡片结构合并前端实施记录
|
||||
|
||||
**日期**: 2026-03-27
|
||||
|
||||
## 改动内容
|
||||
## 本次改动
|
||||
|
||||
- 在 `PreliminaryCheck.vue` 新增统一 `风险总览` 外层卡片,按“统计区在上、风险人员区在下”的顺序组织顶部内容。
|
||||
- 在 `OverviewStats.vue` 去掉独立白卡壳层、旧标题与旧副标题,仅保留统计卡片栅格展示。
|
||||
- 在 `RiskPeopleSection.vue` 去掉独立大卡片标题与白卡壳层,保留导出按钮、表格字段、风险标签与查看详情事件。
|
||||
- 在 `preliminaryCheck.mock.js` 将最后一个统计项文案调整为 `无预警人数`,并保留 5 个指标顺序不变。
|
||||
- 在 `RiskModelSection.vue`、`RiskDetailSection.vue` 增加顶层标题,统一页面主区块名称为 `风险模型` 与 `风险明细`。
|
||||
- 将结果总览页顶部原本分离的 `风险仪表盘` 与 `风险人员总览` 收拢为同一个 `风险总览` 主卡片。
|
||||
- 保留 `OverviewStats.vue` 与 `RiskPeopleSection.vue` 两个子组件职责,仅移除重复壳层和重复标题。
|
||||
- 将第二张主卡片标题统一为 `风险模型`。
|
||||
- 将第三张主卡片标题统一为 `风险明细`。
|
||||
- 将顶部统计卡片最后一项文案统一为 `无预警人数`。
|
||||
|
||||
## 实现方式说明
|
||||
## 变更文件
|
||||
|
||||
### 合并 `风险仪表盘` 与 `风险人员总览`
|
||||
- `ruoyi-ui/src/views/ccdiProject/components/detail/PreliminaryCheck.vue`
|
||||
- `ruoyi-ui/src/views/ccdiProject/components/detail/OverviewStats.vue`
|
||||
- `ruoyi-ui/src/views/ccdiProject/components/detail/RiskPeopleSection.vue`
|
||||
- `ruoyi-ui/src/views/ccdiProject/components/detail/RiskModelSection.vue`
|
||||
- `ruoyi-ui/src/views/ccdiProject/components/detail/RiskDetailSection.vue`
|
||||
- `ruoyi-ui/src/views/ccdiProject/components/detail/preliminaryCheck.mock.js`
|
||||
- `ruoyi-ui/tests/unit/preliminary-check-layout.test.js`
|
||||
- `ruoyi-ui/tests/unit/preliminary-check-summary-and-people.test.js`
|
||||
- `ruoyi-ui/tests/unit/preliminary-check-summary-visuals.test.js`
|
||||
- `ruoyi-ui/tests/unit/preliminary-check-overview-spacing.test.js`
|
||||
- `ruoyi-ui/tests/unit/preliminary-check-summary-actions.test.js`
|
||||
- `ruoyi-ui/tests/unit/preliminary-check-model-and-detail.test.js`
|
||||
- `ruoyi-ui/tests/unit/preliminary-check-card-corners.test.js`
|
||||
|
||||
- 采用父层合并方案,在入口组件统一承载顶部主卡片。
|
||||
- 保持 `OverviewStats` 与 `RiskPeopleSection` 两个子组件职责不变,只移除各自重复壳层,避免重组数据装配与交互逻辑。
|
||||
## 实现说明
|
||||
|
||||
### 统计卡片标题与小图标补齐
|
||||
### 1. 风险总览主卡片
|
||||
|
||||
- 统计卡片继续使用 mock 中已有的 `icon`、`label`、`value`、`tone` 字段驱动展示。
|
||||
- `OverviewStats.vue` 保留图标与标题渲染逻辑,确保 5 个统计项都展示“小图标 + 标题 + 数值”。
|
||||
- 在 `PreliminaryCheck.vue` 中新增统一的 `risk-overview-card` 外层容器。
|
||||
- `OverviewStats` 放在上半部分,`RiskPeopleSection` 放在下半部分,形成单卡片阅读流。
|
||||
- 顶部主标题统一为 `风险总览`,副标题用于说明当前卡片覆盖统计与人员总览两类信息。
|
||||
|
||||
### 标题统一情况
|
||||
### 2. 统计区瘦身
|
||||
|
||||
- 顶部主卡片标题统一为 `风险总览`。
|
||||
- 第二个主卡片新增顶层标题 `风险模型`。
|
||||
- 第三个主卡片新增顶层标题 `风险明细`。
|
||||
- `OverviewStats.vue` 不再承担独立白卡和标题壳层职责。
|
||||
- 统计区仅保留 5 个统计小卡片的展示逻辑,继续复用 `icon`、`label`、`value`、`tone` 字段。
|
||||
|
||||
## 本轮未改动边界
|
||||
### 3. 风险人员区收口
|
||||
|
||||
- 未新增或修改任何后端接口。
|
||||
- 未改变 `currentData.summary`、`currentData.riskPeople`、模型联动、分页、导出、查看详情等既有数据与事件链路。
|
||||
- 未调整风险模型区与风险明细区内部表格字段语义。
|
||||
- 未新增设计文档之外的额外区块、兜底逻辑或交互。
|
||||
- `RiskPeopleSection.vue` 去掉独立标题块,只保留导出按钮与表格内容。
|
||||
- 通过顶部留白和分割线让其自然成为 `风险总览` 卡片的下半部分。
|
||||
- 表格字段、查看详情事件和核心异常标签逻辑保持不变。
|
||||
|
||||
### 4. 其他主区块标题统一
|
||||
|
||||
- `RiskModelSection.vue` 顶部主标题统一为 `风险模型`。
|
||||
- `RiskDetailSection.vue` 顶部主标题统一为 `风险明细`。
|
||||
- 模型区筛选、联动、分页以及明细区表格逻辑均未调整。
|
||||
|
||||
## 未改动边界
|
||||
|
||||
- 未新增或修改前端接口调用。
|
||||
- 未调整 `currentData.summary`、`currentData.riskPeople`、`currentData.riskModels`、`currentData.riskDetails` 数据结构。
|
||||
- 未新增 `中风险人员TOP10` 或其他额外区块。
|
||||
- 未改动项目分析弹窗、风险模型联动逻辑和风险明细字段。
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# 结果总览卡片结构合并后端验证记录
|
||||
|
||||
**日期**: 2026-03-27
|
||||
|
||||
## 执行命令
|
||||
|
||||
```bash
|
||||
mvn test -pl ccdi-project -Dtest=CcdiProjectOverviewControllerTest,CcdiProjectOverviewServiceImplTest,CcdiProjectOverviewControllerContractTest,CcdiProjectOverviewMapperSqlTest,CcdiProjectOverviewMapperRiskModelCardsTest
|
||||
git diff --name-only -- ccdi-project ruoyi-admin ruoyi-common ruoyi-framework ruoyi-system
|
||||
```
|
||||
|
||||
## 验证结果
|
||||
|
||||
- `CcdiProjectOverviewControllerTest`:通过
|
||||
- `CcdiProjectOverviewServiceImplTest`:通过
|
||||
- `CcdiProjectOverviewControllerContractTest`:通过
|
||||
- `CcdiProjectOverviewMapperSqlTest`:通过
|
||||
- `CcdiProjectOverviewMapperRiskModelCardsTest`:通过
|
||||
- 共 25 个测试,0 失败,0 错误
|
||||
|
||||
`git diff --name-only` 输出:
|
||||
|
||||
```text
|
||||
ruoyi-admin/src/main/resources/application-dev.yml
|
||||
```
|
||||
|
||||
说明:
|
||||
|
||||
- 该差异为工作区现有的非本任务改动。
|
||||
- 本次任务没有新增后端源码差异。
|
||||
|
||||
## 结论
|
||||
|
||||
- 现有结果总览后端契约足以支撑本轮前端卡片结构合并。
|
||||
- 后端执行结论明确为“无需改造”。
|
||||
@@ -1,4 +1,4 @@
|
||||
# 结果总览卡片合并前端验证记录
|
||||
# 结果总览卡片结构合并前端验证记录
|
||||
|
||||
**日期**: 2026-03-27
|
||||
|
||||
@@ -10,6 +10,8 @@ node tests/unit/preliminary-check-layout.test.js
|
||||
node tests/unit/preliminary-check-summary-and-people.test.js
|
||||
node tests/unit/preliminary-check-summary-visuals.test.js
|
||||
node tests/unit/preliminary-check-overview-spacing.test.js
|
||||
node tests/unit/preliminary-check-summary-actions.test.js
|
||||
node tests/unit/preliminary-check-card-corners.test.js
|
||||
node tests/unit/preliminary-check-model-and-detail.test.js
|
||||
node tests/unit/preliminary-check-model-card-grid.test.js
|
||||
node tests/unit/preliminary-check-model-filters.test.js
|
||||
@@ -21,21 +23,18 @@ npm run build:prod
|
||||
|
||||
## 验证结果
|
||||
|
||||
- 10 个结果总览相关静态断言均执行通过。
|
||||
- `npm run build:prod` 构建成功,产物可正常生成。
|
||||
- 构建过程中出现既有体积告警,属于现有打包产物体积提示,本轮改造未新增构建错误。
|
||||
- 上述 12 个前端静态断言测试全部通过。
|
||||
- `npm run build:prod` 构建成功。
|
||||
- 构建过程中出现项目既有的包体积告警,但没有新增构建错误。
|
||||
|
||||
## 人工检查
|
||||
|
||||
- 是否执行 `npm run dev`: 否。
|
||||
- 未启动前端开发进程,因此无需执行前端进程停止操作。
|
||||
- 本轮未额外启动 `npm run dev` 做人工页面联调。
|
||||
- 因此没有新增前端长期运行进程,也不存在额外清理动作。
|
||||
|
||||
## 设计文档路径核对
|
||||
## 结论
|
||||
|
||||
- 已确认设计文档存在于 `docs/design/2026-03-27-results-overview-card-merge-design.md`。
|
||||
|
||||
## 最终结论
|
||||
|
||||
- 顶部区域已具备合并为单个 `风险总览` 卡片的结构约束。
|
||||
- `风险模型`、`风险明细` 顶层标题改造已通过回归验证。
|
||||
- 本轮前端改造达到可交付状态。
|
||||
- `风险仪表盘` 与 `风险人员总览` 已能按预期合并为单个 `风险总览` 主卡片。
|
||||
- 顶部统计卡片标题和小图标展示正常。
|
||||
- 第二张主卡片标题为 `风险模型`,第三张主卡片标题为 `风险明细`。
|
||||
- 本轮改动未破坏结果总览相关静态结构断言与生产构建。
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
<template>
|
||||
<section class="risk-people-section">
|
||||
<div class="section-toolbar">
|
||||
<div>
|
||||
<div class="section-title">风险人员总览</div>
|
||||
<div class="section-subtitle">展示命中风险规则的重点人员</div>
|
||||
</div>
|
||||
<el-button size="mini" type="text">导出</el-button>
|
||||
</div>
|
||||
|
||||
@@ -183,42 +179,17 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.risk-people-section {
|
||||
margin-bottom: 0;
|
||||
padding-top: 18px;
|
||||
border-top: 1px solid #eef2f7;
|
||||
}
|
||||
|
||||
.section-toolbar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
position: relative;
|
||||
padding-left: 10px;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #334155;
|
||||
}
|
||||
|
||||
.section-title::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
width: 4px;
|
||||
height: 14px;
|
||||
border-radius: 999px;
|
||||
background: #94a3b8;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.section-subtitle {
|
||||
margin-top: 4px;
|
||||
padding-left: 10px;
|
||||
font-size: 12px;
|
||||
color: #94a3b8;
|
||||
}
|
||||
|
||||
.people-table {
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -19,13 +19,12 @@ const detail = read("RiskDetailSection.vue");
|
||||
const entry = read("PreliminaryCheck.vue");
|
||||
|
||||
[
|
||||
[overview, ".section-card", "border-radius: 0;"],
|
||||
[overview, ".stats-card", "border-radius: 0;"],
|
||||
[people, ".section-card", "border-radius: 0;"],
|
||||
[model, ".section-card", "border-radius: 0;"],
|
||||
[model, ".model-card", "border-radius: 0;"],
|
||||
[detail, ".section-card", "border-radius: 0;"],
|
||||
[entry, ".state-card", "border-radius: 0;"],
|
||||
[entry, ".risk-overview-card", "border-radius: 0;"],
|
||||
].forEach(([source, selector, token]) => {
|
||||
assert(source.includes(selector), `缺少选择器: ${selector}`);
|
||||
assert(source.includes(token), `卡片应使用直角: ${selector}`);
|
||||
|
||||
@@ -29,9 +29,3 @@ const detail = fs.readFileSync(
|
||||
["风险明细", "涉险交易明细", "异常账户人员信息", "查看详情"].forEach((token) =>
|
||||
assert(detail.includes(token), token)
|
||||
);
|
||||
assert(model.includes("border-left: 4px solid #2563eb;"), "风险模型主标题应有更强的左侧强调样式");
|
||||
assert(detail.includes("border-left: 4px solid #2563eb;"), "风险明细主标题应有更强的左侧强调样式");
|
||||
assert(model.includes("font-size: 20px;"), "风险模型主标题字号应提升到 20px");
|
||||
assert(detail.includes("font-size: 20px;"), "风险明细主标题字号应提升到 20px");
|
||||
assert(model.includes("font-size: 15px;"), "风险模型内部区块标题应保持次级字号");
|
||||
assert(detail.includes("font-size: 15px;"), "风险明细内部区块标题应保持次级字号");
|
||||
|
||||
@@ -17,9 +17,6 @@ const mockSource = fs.readFileSync(
|
||||
"utf8"
|
||||
);
|
||||
|
||||
assert(
|
||||
overviewSource.includes('v-if="summary.actions && summary.actions.length"'),
|
||||
"风险仪表盘无操作按钮时不应渲染空的操作区"
|
||||
);
|
||||
assert(!mockSource.includes('label: "批量导出"'), "风险仪表盘不应保留批量导出按钮");
|
||||
assert(!mockSource.includes('label: "切换视图"'), "风险仪表盘不应保留切换视图按钮");
|
||||
assert(!overviewSource.includes("section-actions"), "统计区不应继续保留旧操作区壳层");
|
||||
assert(!mockSource.includes('label: "批量导出"'), "风险总览不应保留批量导出按钮");
|
||||
assert(!mockSource.includes('label: "切换视图"'), "风险总览不应保留切换视图按钮");
|
||||
|
||||
@@ -52,8 +52,7 @@ const mockSource = fs.readFileSync(
|
||||
assert(!people.includes("中高风险人员TOP10"), "不应保留TOP10区块");
|
||||
assert(entry.includes("risk-people-section"), "入口应挂载风险人员区");
|
||||
assert(entry.includes("risk-overview-card"), "统计区与风险人员区应位于统一总览卡片中");
|
||||
assert(entry.includes("风险总览"), "结果总览页应提供风险总览主标题");
|
||||
assert(!stats.includes("风险仪表盘"), "统计区不应继续保留风险仪表盘标题");
|
||||
assert(!stats.includes("风险总体数据概览"), "统计区不应继续保留旧副标题");
|
||||
assert(people.includes("风险人员总览"), "风险人员区应补充风险人员总览标题");
|
||||
assert(people.includes("section-title"), "风险人员区应提供独立的小节标题样式");
|
||||
assert(people.includes("font-size: 15px;"), "风险人员区内部标题应维持次级字号层级");
|
||||
assert(!people.includes("风险人员总览"), "风险人员区不应继续作为独立大卡片标题存在");
|
||||
|
||||
Reference in New Issue
Block a user