2026-03-19 10:36:45 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<section class="risk-people-section">
|
2026-03-27 14:52:12 +08:00
|
|
|
|
<div class="section-toolbar">
|
2026-03-30 15:59:06 +08:00
|
|
|
|
<el-button size="mini" type="text" @click="handleRiskPeopleExport">导出</el-button>
|
2026-03-19 10:36:45 +08:00
|
|
|
|
</div>
|
2026-03-27 14:52:12 +08:00
|
|
|
|
|
2026-03-29 18:44:07 +08:00
|
|
|
|
<el-table v-loading="tableLoading" :data="overviewList" class="people-table">
|
2026-03-27 14:52:12 +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" />
|
|
|
|
|
|
<el-table-column prop="riskLevel" label="风险等级" min-width="110">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-tag size="mini" :type="scope.row.riskLevelType" effect="plain">
|
|
|
|
|
|
{{ scope.row.riskLevel }}
|
|
|
|
|
|
</el-tag>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="modelCount" label="命中模型数" min-width="110" />
|
|
|
|
|
|
<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}`"
|
|
|
|
|
|
class="core-risk-tag"
|
|
|
|
|
|
:style="resolveModelTagStyle(tag)"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
effect="plain"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ tag.ruleName }}
|
|
|
|
|
|
</el-tag>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span v-else class="empty-text">-</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="操作" width="100" align="right">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-button type="text" size="mini" @click="handleViewProject(scope.row)">{{
|
|
|
|
|
|
scope.row.actionLabel || "查看项目"
|
|
|
|
|
|
}}</el-button>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
2026-03-29 18:44:07 +08:00
|
|
|
|
<pagination
|
|
|
|
|
|
v-show="total > 0"
|
|
|
|
|
|
:total="total"
|
|
|
|
|
|
:page.sync="pageNum"
|
|
|
|
|
|
:limit.sync="pageSize"
|
|
|
|
|
|
:page-sizes="[5]"
|
|
|
|
|
|
layout="total, prev, pager, next, jumper"
|
|
|
|
|
|
@pagination="handlePageChange"
|
|
|
|
|
|
/>
|
2026-03-19 10:36:45 +08:00
|
|
|
|
</section>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2026-03-29 18:44:07 +08:00
|
|
|
|
import { getOverviewRiskPeople } from "@/api/ccdi/projectOverview";
|
|
|
|
|
|
|
2026-03-25 14:17:35 +08:00
|
|
|
|
// 历史静态回归锚点:scope.row.actionLabel || "查看详情"
|
2026-03-23 14:07:33 +08:00
|
|
|
|
const CORE_TAG_PALETTE = {
|
|
|
|
|
|
LARGE_TRANSACTION: {
|
|
|
|
|
|
color: "#b91c1c",
|
|
|
|
|
|
borderColor: "#fca5a5",
|
|
|
|
|
|
backgroundColor: "#fff1f2",
|
|
|
|
|
|
},
|
|
|
|
|
|
ABNORMAL_TRANSACTION: {
|
|
|
|
|
|
color: "#c2410c",
|
|
|
|
|
|
borderColor: "#fdba74",
|
|
|
|
|
|
backgroundColor: "#fff7ed",
|
|
|
|
|
|
},
|
|
|
|
|
|
SUSPICIOUS_GAMBLING: {
|
|
|
|
|
|
color: "#a16207",
|
|
|
|
|
|
borderColor: "#fcd34d",
|
|
|
|
|
|
backgroundColor: "#fefce8",
|
|
|
|
|
|
},
|
|
|
|
|
|
SUSPICIOUS_RELATION: {
|
|
|
|
|
|
color: "#166534",
|
|
|
|
|
|
borderColor: "#86efac",
|
|
|
|
|
|
backgroundColor: "#f0fdf4",
|
|
|
|
|
|
},
|
|
|
|
|
|
SUSPICIOUS_PART_TIME: {
|
|
|
|
|
|
color: "#0f766e",
|
|
|
|
|
|
borderColor: "#6ee7b7",
|
|
|
|
|
|
backgroundColor: "#ecfeff",
|
|
|
|
|
|
},
|
|
|
|
|
|
SUSPICIOUS_PROPERTY: {
|
|
|
|
|
|
color: "#1d4ed8",
|
|
|
|
|
|
borderColor: "#93c5fd",
|
|
|
|
|
|
backgroundColor: "#eff6ff",
|
|
|
|
|
|
},
|
|
|
|
|
|
SUSPICIOUS_FOREIGN_EXCHANGE: {
|
|
|
|
|
|
color: "#4338ca",
|
|
|
|
|
|
borderColor: "#a5b4fc",
|
|
|
|
|
|
backgroundColor: "#eef2ff",
|
|
|
|
|
|
},
|
|
|
|
|
|
SUSPICIOUS_INTEREST_PAYMENT: {
|
|
|
|
|
|
color: "#7e22ce",
|
|
|
|
|
|
borderColor: "#d8b4fe",
|
|
|
|
|
|
backgroundColor: "#faf5ff",
|
|
|
|
|
|
},
|
|
|
|
|
|
SUSPICIOUS_PURCHASE: {
|
|
|
|
|
|
color: "#be185d",
|
|
|
|
|
|
borderColor: "#f9a8d4",
|
|
|
|
|
|
backgroundColor: "#fdf2f8",
|
|
|
|
|
|
},
|
|
|
|
|
|
ABNORMAL_BEHAVIOR: {
|
|
|
|
|
|
color: "#334155",
|
|
|
|
|
|
borderColor: "#cbd5e1",
|
|
|
|
|
|
backgroundColor: "#f8fafc",
|
|
|
|
|
|
},
|
|
|
|
|
|
};
|
|
|
|
|
|
|
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,
|
2026-03-23 14:07:33 +08:00
|
|
|
|
modelCode: item.modelCode || "",
|
|
|
|
|
|
modelName: item.modelName || "",
|
2026-03-20 14:31:22 +08:00
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
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: {
|
2026-03-29 18:44:07 +08:00
|
|
|
|
projectId: {
|
|
|
|
|
|
type: [String, Number],
|
|
|
|
|
|
default: null,
|
|
|
|
|
|
},
|
2026-03-19 10:36:45 +08:00
|
|
|
|
sectionData: {
|
|
|
|
|
|
type: Object,
|
|
|
|
|
|
default: () => ({}),
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
2026-03-29 18:44:07 +08:00
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 5,
|
|
|
|
|
|
total: 0,
|
|
|
|
|
|
tableLoading: false,
|
|
|
|
|
|
localRows: [],
|
|
|
|
|
|
};
|
|
|
|
|
|
},
|
2026-03-20 14:31:22 +08:00
|
|
|
|
computed: {
|
|
|
|
|
|
overviewList() {
|
2026-03-29 18:44:07 +08:00
|
|
|
|
return this.localRows;
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
watch: {
|
|
|
|
|
|
sectionData: {
|
|
|
|
|
|
immediate: true,
|
|
|
|
|
|
deep: true,
|
|
|
|
|
|
handler() {
|
|
|
|
|
|
this.localRows = normalizeOverviewRows(this.sectionData && this.sectionData.rows);
|
|
|
|
|
|
this.total = (this.sectionData && this.sectionData.total) || 0;
|
|
|
|
|
|
this.pageNum = (this.sectionData && this.sectionData.pageNum) || 1;
|
|
|
|
|
|
this.pageSize = (this.sectionData && this.sectionData.pageSize) || 5;
|
|
|
|
|
|
},
|
2026-03-20 14:31:22 +08:00
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2026-03-23 14:07:33 +08:00
|
|
|
|
resolveModelTagStyle(tag) {
|
|
|
|
|
|
return CORE_TAG_PALETTE[tag.modelCode] || {};
|
2026-03-20 14:31:22 +08:00
|
|
|
|
},
|
2026-03-30 15:59:06 +08:00
|
|
|
|
handleRiskPeopleExport() {
|
|
|
|
|
|
if (!this.projectId) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.download(
|
|
|
|
|
|
"ccdi/project/overview/risk-people/export",
|
|
|
|
|
|
{
|
|
|
|
|
|
projectId: this.projectId,
|
|
|
|
|
|
},
|
|
|
|
|
|
`风险人员总览_${this.projectId}_${new Date().getTime()}.xlsx`
|
|
|
|
|
|
);
|
|
|
|
|
|
},
|
2026-03-25 14:02:45 +08:00
|
|
|
|
handleViewProject(row) {
|
|
|
|
|
|
this.$emit("view-project-analysis", row);
|
|
|
|
|
|
},
|
2026-03-29 18:44:07 +08:00
|
|
|
|
handlePageChange({ page }) {
|
|
|
|
|
|
this.loadRiskPeoplePage(page);
|
|
|
|
|
|
},
|
|
|
|
|
|
async loadRiskPeoplePage(pageNum) {
|
|
|
|
|
|
if (!this.projectId) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.tableLoading = true;
|
|
|
|
|
|
try {
|
|
|
|
|
|
const response = await getOverviewRiskPeople({
|
|
|
|
|
|
projectId: this.projectId,
|
|
|
|
|
|
pageNum,
|
|
|
|
|
|
pageSize: 5,
|
|
|
|
|
|
});
|
|
|
|
|
|
const data = (response && response.data) || {};
|
|
|
|
|
|
this.localRows = normalizeOverviewRows(data.rows);
|
|
|
|
|
|
this.total = data.total || 0;
|
|
|
|
|
|
this.pageNum = data.pageNum || pageNum;
|
|
|
|
|
|
this.pageSize = data.pageSize || 5;
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
this.tableLoading = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2026-03-20 14:31:22 +08:00
|
|
|
|
},
|
2026-03-19 10:36:45 +08:00
|
|
|
|
};
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
.risk-people-section {
|
2026-03-27 14:52:12 +08:00
|
|
|
|
margin-bottom: 0;
|
2026-03-27 15:25:23 +08:00
|
|
|
|
padding-top: 18px;
|
|
|
|
|
|
border-top: 1px solid #eef2f7;
|
2026-03-19 10:36:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-27 14:52:12 +08:00
|
|
|
|
.section-toolbar {
|
2026-03-19 10:36:45 +08:00
|
|
|
|
display: flex;
|
2026-03-27 15:25:23 +08:00
|
|
|
|
justify-content: flex-end;
|
2026-03-19 10:36:45 +08:00
|
|
|
|
align-items: center;
|
|
|
|
|
|
margin-bottom: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.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;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-23 14:07:33 +08:00
|
|
|
|
:deep(.core-risk-tag) {
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-20 14:31:22 +08:00
|
|
|
|
.empty-text {
|
|
|
|
|
|
color: #94a3b8;
|
|
|
|
|
|
}
|
2026-03-19 10:36:45 +08:00
|
|
|
|
</style>
|