补充项目详情风险人员导出能力

This commit is contained in:
wkc
2026-03-30 15:59:06 +08:00
parent b96161ecf4
commit 933214a495
16 changed files with 386 additions and 25 deletions

View File

@@ -1,7 +1,7 @@
<template>
<section class="risk-people-section">
<div class="section-toolbar">
<el-button size="mini" type="text">导出</el-button>
<el-button size="mini" type="text" @click="handleRiskPeopleExport">导出</el-button>
</div>
<el-table v-loading="tableLoading" :data="overviewList" class="people-table">
@@ -205,6 +205,18 @@ export default {
resolveModelTagStyle(tag) {
return CORE_TAG_PALETTE[tag.modelCode] || {};
},
handleRiskPeopleExport() {
if (!this.projectId) {
return;
}
this.download(
"ccdi/project/overview/risk-people/export",
{
projectId: this.projectId,
},
`风险人员总览_${this.projectId}_${new Date().getTime()}.xlsx`
);
},
handleViewProject(row) {
this.$emit("view-project-analysis", row);
},

View File

@@ -18,6 +18,7 @@ const source = fs.readFileSync(
"pageSize",
"total",
"riskLevelType",
'@click="handleRiskPeopleExport"',
].forEach((token) => assert(source.includes(token), token));
assert(!source.includes("sectionData.topRiskList"), "不应再绑定TOP10列表");

View File

@@ -0,0 +1,18 @@
const assert = require("assert");
const fs = require("fs");
const path = require("path");
const source = fs.readFileSync(
path.resolve(__dirname, "../../src/views/ccdiProject/components/detail/RiskPeopleSection.vue"),
"utf8"
);
[
"handleRiskPeopleExport",
"this.download(",
"ccdi/project/overview/risk-people/export",
"projectId: this.projectId",
"风险人员总览_",
].forEach((token) => assert(source.includes(token), token));
assert(source.includes('@click="handleRiskPeopleExport"'), "导出按钮必须绑定导出事件");