移除风险仪表盘操作按钮
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
- 对齐结果总览内容区与其他页签的顶部间距,去掉额外的 16px 顶部留白
|
||||
- 按最新页面反馈为风险总览统计卡补阴影,并将“风险交易”指标文案调整为“无风险人员”
|
||||
- 按最新页面反馈将页面主标题“风险总览”调整为“风险仪表盘”
|
||||
- 按最新页面反馈移除风险仪表盘卡片内的“批量导出”和“切换视图”按钮
|
||||
|
||||
## 验证情况
|
||||
- 新增 4 个静态断言脚本,分别覆盖页面骨架、前两块区块、后两块区块和三种页面状态
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="section-title">{{ summary.title || "风险仪表盘" }}</div>
|
||||
<div class="section-subtitle">{{ summary.subtitle || "风险总体数据概览" }}</div>
|
||||
</div>
|
||||
<div class="section-actions">
|
||||
<div v-if="summary.actions && summary.actions.length" class="section-actions">
|
||||
<el-button
|
||||
v-for="action in summary.actions || []"
|
||||
:key="action.key"
|
||||
|
||||
@@ -2,10 +2,7 @@ export const mockOverviewData = {
|
||||
summary: {
|
||||
title: "风险仪表盘",
|
||||
subtitle: "风险仪表盘数据概览",
|
||||
actions: [
|
||||
{ key: "download", label: "批量导出", type: "primary", plain: false },
|
||||
{ key: "state", label: "切换视图", type: "primary", plain: true },
|
||||
],
|
||||
actions: [],
|
||||
stats: [
|
||||
{ key: "people", label: "总人数", value: 500, icon: "el-icon-user", tone: "blue" },
|
||||
{ key: "riskPeople", label: "风险人数", value: 10, icon: "el-icon-warning-outline", tone: "red" },
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
const assert = require("assert");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
const overviewSource = fs.readFileSync(
|
||||
path.resolve(
|
||||
__dirname,
|
||||
"../../src/views/ccdiProject/components/detail/OverviewStats.vue"
|
||||
),
|
||||
"utf8"
|
||||
);
|
||||
const mockSource = fs.readFileSync(
|
||||
path.resolve(
|
||||
__dirname,
|
||||
"../../src/views/ccdiProject/components/detail/preliminaryCheck.mock.js"
|
||||
),
|
||||
"utf8"
|
||||
);
|
||||
|
||||
assert(
|
||||
overviewSource.includes('v-if="summary.actions && summary.actions.length"'),
|
||||
"风险仪表盘无操作按钮时不应渲染空的操作区"
|
||||
);
|
||||
assert(!mockSource.includes('label: "批量导出"'), "风险仪表盘不应保留批量导出按钮");
|
||||
assert(!mockSource.includes('label: "切换视图"'), "风险仪表盘不应保留切换视图按钮");
|
||||
Reference in New Issue
Block a user