补充项目详情风险人员导出能力
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
@@ -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列表");
|
||||
|
||||
@@ -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"'), "导出按钮必须绑定导出事件");
|
||||
Reference in New Issue
Block a user