合并结果总览顶部风险总览卡片

This commit is contained in:
wkc
2026-03-27 14:52:12 +08:00
parent 55c8f1c29c
commit a76806acfc
4 changed files with 103 additions and 147 deletions

View File

@@ -1,24 +1,5 @@
<template> <template>
<section class="overview-stats"> <section class="overview-stats">
<div class="section-card">
<div class="section-header">
<div class="section-title-group">
<div class="section-title">{{ summary.title || "风险仪表盘" }}</div>
<div class="section-subtitle">{{ summary.subtitle || "风险总体数据概览" }}</div>
</div>
<div v-if="summary.actions && summary.actions.length" class="section-actions">
<el-button
v-for="action in summary.actions || []"
:key="action.key"
size="mini"
:type="action.type || 'primary'"
:plain="action.plain !== false"
>
{{ action.label }}
</el-button>
</div>
</div>
<div class="stats-grid"> <div class="stats-grid">
<div <div
v-for="item in summary.stats || []" v-for="item in summary.stats || []"
@@ -34,7 +15,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</section> </section>
</template> </template>
@@ -55,38 +35,6 @@ export default {
margin-bottom: 16px; margin-bottom: 16px;
} }
.section-card {
padding: 20px;
border-radius: 0;
background: #fff;
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
gap: 16px;
}
.section-title {
font-size: 16px;
font-weight: 600;
color: #1f2937;
}
.section-subtitle {
margin-top: 4px;
font-size: 12px;
color: #94a3b8;
}
.section-actions {
display: flex;
gap: 8px;
}
.stats-grid { .stats-grid {
display: grid; display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-columns: repeat(5, minmax(0, 1fr));

View File

@@ -13,12 +13,20 @@
</div> </div>
<div v-else class="preliminary-check-page"> <div v-else class="preliminary-check-page">
<section class="section-card risk-overview-card">
<div class="section-header">
<div>
<div class="section-title">风险总览</div>
<div class="section-subtitle">集中展示项目风险统计与命中人员总览</div>
</div>
</div>
<overview-stats :summary="currentData.summary" /> <overview-stats :summary="currentData.summary" />
<risk-people-section <risk-people-section
:section-data="currentData.riskPeople" :section-data="currentData.riskPeople"
:selected-model-codes="selectedModelCodes" :selected-model-codes="selectedModelCodes"
@view-project-analysis="handleRiskPeopleProjectAnalysis" @view-project-analysis="handleRiskPeopleProjectAnalysis"
/> />
</section>
<risk-model-section <risk-model-section
:section-data="currentData.riskModels" :section-data="currentData.riskModels"
@selection-change="handleRiskModelSelectionChange" @selection-change="handleRiskModelSelectionChange"
@@ -244,4 +252,31 @@ export default {
.preliminary-check-page { .preliminary-check-page {
min-height: 400px; min-height: 400px;
} }
.section-card {
padding: 20px;
border-radius: 0;
background: #fff;
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.risk-overview-card {
margin-bottom: 16px;
}
.section-header {
margin-bottom: 16px;
}
.section-title {
font-size: 16px;
font-weight: 600;
color: #1f2937;
}
.section-subtitle {
margin-top: 4px;
font-size: 12px;
color: #94a3b8;
}
</style> </style>

View File

@@ -1,12 +1,6 @@
<template> <template>
<section class="risk-people-section"> <section class="risk-people-section">
<div class="section-card"> <div class="section-toolbar">
<div class="block">
<div class="block-header">
<div>
<div class="block-title">风险人员总览</div>
<div class="block-subtitle">展示命中风险规则的重点人员</div>
</div>
<el-button size="mini" type="text">导出</el-button> <el-button size="mini" type="text">导出</el-button>
</div> </div>
@@ -52,8 +46,6 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div>
</div>
</section> </section>
</template> </template>
@@ -186,35 +178,16 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.risk-people-section { .risk-people-section {
margin-bottom: 16px; margin-bottom: 0;
} }
.section-card { .section-toolbar {
padding: 20px;
border-radius: 0;
background: #fff;
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.block-header {
display: flex; display: flex;
justify-content: space-between; justify-content: flex-end;
align-items: center; align-items: center;
margin-bottom: 14px; margin-bottom: 14px;
} }
.block-title {
font-size: 16px;
font-weight: 600;
color: #1f2937;
}
.block-subtitle {
margin-top: 4px;
font-size: 12px;
color: #94a3b8;
}
.people-table { .people-table {
border-radius: 12px; border-radius: 12px;
overflow: hidden; overflow: hidden;

View File

@@ -1,14 +1,14 @@
export const mockOverviewData = { export const mockOverviewData = {
summary: { summary: {
title: "风险仪表盘", title: "风险总览",
subtitle: "风险仪表盘数据概览", subtitle: "集中展示项目风险统计与命中人员总览",
actions: [], actions: [],
stats: [ stats: [
{ key: "people", label: "总人数", value: 500, icon: "el-icon-user", tone: "blue" }, { key: "people", label: "总人数", value: 500, icon: "el-icon-user", tone: "blue" },
{ key: "riskPeople", label: "高风险", value: 10, icon: "el-icon-warning-outline", tone: "red" }, { key: "riskPeople", label: "高风险", value: 10, icon: "el-icon-warning-outline", tone: "red" },
{ key: "medium", label: "中风险", value: 20, icon: "el-icon-s-opportunity", tone: "amber" }, { key: "medium", label: "中风险", value: 20, icon: "el-icon-s-opportunity", tone: "amber" },
{ key: "low", label: "低风险", value: 38, icon: "el-icon-data-line", tone: "green" }, { key: "low", label: "低风险", value: 38, icon: "el-icon-data-line", tone: "green" },
{ key: "count", label: "无风险人员", value: 432, icon: "el-icon-document", tone: "blue" }, { key: "count", label: "无预警人数", value: 432, icon: "el-icon-document", tone: "blue" },
], ],
}, },
riskPeople: { riskPeople: {