2026-03-19 10:36:45 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<section class="risk-people-section">
|
|
|
|
|
|
<div class="section-card">
|
|
|
|
|
|
<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>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-03-20 14:31:22 +08:00
|
|
|
|
<el-table :data="overviewList" class="people-table">
|
2026-03-19 10:36:45 +08:00
|
|
|
|
<el-table-column type="index" label="序号" width="60" />
|
|
|
|
|
|
<el-table-column prop="name" label="姓名" min-width="100" />
|
|
|
|
|
|
<el-table-column prop="idNo" label="身份证号" min-width="180" />
|
|
|
|
|
|
<el-table-column prop="department" label="所属部门" min-width="140" />
|
|
|
|
|
|
<el-table-column prop="riskCount" label="疑似违规数" min-width="100" />
|
2026-03-20 09:31:33 +08:00
|
|
|
|
<el-table-column prop="riskLevel" label="风险等级" min-width="110">
|
2026-03-19 10:36:45 +08:00
|
|
|
|
<template slot-scope="scope">
|
2026-03-19 15:40:46 +08:00
|
|
|
|
<el-tag size="mini" :type="scope.row.riskLevelType" effect="plain">
|
2026-03-19 10:36:45 +08:00
|
|
|
|
{{ scope.row.riskLevel }}
|
|
|
|
|
|
</el-tag>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-03-20 09:31:33 +08:00
|
|
|
|
<el-table-column prop="modelCount" label="命中模型数" min-width="110" />
|
2026-03-20 14:31:22 +08:00
|
|
|
|
<el-table-column label="核心异常点" min-width="220">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<div
|
|
|
|
|
|
v-if="scope.row.riskPointTagList && scope.row.riskPointTagList.length"
|
|
|
|
|
|
class="risk-point-tag-list"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-tag
|
|
|
|
|
|
v-for="(tag, index) in scope.row.riskPointTagList"
|
|
|
|
|
|
:key="`${scope.row.idNo || scope.row.name || index}-risk-point-${index}`"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
effect="plain"
|
|
|
|
|
|
:type="mapRiskLevelToTagType(tag.riskLevel)"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ tag.ruleName }}
|
|
|
|
|
|
</el-tag>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span v-else class="empty-text">-</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-03-19 10:36:45 +08:00
|
|
|
|
<el-table-column label="操作" width="100" align="right">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-button type="text" size="mini">{{ scope.row.actionLabel || "查看详情" }}</el-button>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2026-03-20 14:31:22 +08:00
|
|
|
|
function normalizeRiskPointTags(tags, riskPoint, riskLevel) {
|
|
|
|
|
|
if (Array.isArray(tags) && tags.length) {
|
|
|
|
|
|
return tags
|
|
|
|
|
|
.map((item) => {
|
|
|
|
|
|
if (typeof item === "string") {
|
|
|
|
|
|
return {
|
|
|
|
|
|
ruleName: item.trim(),
|
|
|
|
|
|
riskLevel,
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
if (item && typeof item === "object") {
|
|
|
|
|
|
return {
|
|
|
|
|
|
ruleName: item.ruleName || item.label || item.name || "",
|
|
|
|
|
|
riskLevel: item.riskLevel || riskLevel,
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
return null;
|
|
|
|
|
|
})
|
|
|
|
|
|
.filter((item) => item && item.ruleName);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!riskPoint) {
|
|
|
|
|
|
return [];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return String(riskPoint)
|
|
|
|
|
|
.split(/[、,,;;]/)
|
|
|
|
|
|
.map((item) => item.trim())
|
|
|
|
|
|
.filter(Boolean)
|
|
|
|
|
|
.map((item) => ({
|
|
|
|
|
|
ruleName: item,
|
|
|
|
|
|
riskLevel,
|
|
|
|
|
|
}));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function normalizeOverviewRows(rows) {
|
|
|
|
|
|
if (!Array.isArray(rows)) {
|
|
|
|
|
|
return [];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return rows.map((item) => ({
|
|
|
|
|
|
...item,
|
|
|
|
|
|
riskPointTagList: normalizeRiskPointTags(item.riskPointTagList, item.riskPoint, item.riskLevelType),
|
|
|
|
|
|
}));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-19 10:36:45 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
name: "RiskPeopleSection",
|
|
|
|
|
|
props: {
|
|
|
|
|
|
sectionData: {
|
|
|
|
|
|
type: Object,
|
|
|
|
|
|
default: () => ({}),
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
2026-03-20 14:31:22 +08:00
|
|
|
|
computed: {
|
|
|
|
|
|
overviewList() {
|
|
|
|
|
|
return normalizeOverviewRows(this.sectionData.overviewList);
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
mapRiskLevelToTagType(riskLevel) {
|
|
|
|
|
|
const level = String(riskLevel || "").toUpperCase();
|
|
|
|
|
|
if (level === "HIGH" || level === "DANGER") {
|
|
|
|
|
|
return "danger";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (level === "MEDIUM" || level === "WARNING") {
|
|
|
|
|
|
return "warning";
|
|
|
|
|
|
}
|
|
|
|
|
|
return "info";
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
2026-03-19 10:36:45 +08:00
|
|
|
|
};
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
.risk-people-section {
|
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.section-card {
|
|
|
|
|
|
padding: 20px;
|
2026-03-19 11:02:16 +08:00
|
|
|
|
border-radius: 0;
|
2026-03-19 10:36:45 +08:00
|
|
|
|
background: #fff;
|
|
|
|
|
|
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.block-header {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
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 {
|
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-19 10:39:24 +08:00
|
|
|
|
:deep(.people-table th) {
|
2026-03-19 10:36:45 +08:00
|
|
|
|
background: #f8fafc;
|
|
|
|
|
|
color: #64748b;
|
|
|
|
|
|
}
|
2026-03-20 14:31:22 +08:00
|
|
|
|
|
|
|
|
|
|
.risk-point-tag-list {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
gap: 6px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.empty-text {
|
|
|
|
|
|
color: #94a3b8;
|
|
|
|
|
|
}
|
2026-03-19 10:36:45 +08:00
|
|
|
|
</style>
|