补充异常账户人员前端查询状态

This commit is contained in:
wkc
2026-03-31 21:07:24 +08:00
parent 001597d5e8
commit 4dca2b2b63
3 changed files with 81 additions and 0 deletions

View File

@@ -79,3 +79,15 @@ export function getOverviewEmployeeCreditNegative(params) {
}
})
}
export function getOverviewAbnormalAccountPeople(params) {
return request({
url: '/ccdi/project/overview/abnormal-account-people',
method: 'get',
params: {
projectId: params.projectId,
pageNum: params.pageNum,
pageSize: params.pageSize
}
})
}

View File

@@ -314,6 +314,7 @@
<script>
import {
getOverviewAbnormalAccountPeople,
getOverviewEmployeeCreditNegative,
getOverviewSuspiciousTransactions,
} from "@/api/ccdi/projectOverview";
@@ -391,6 +392,11 @@ export default {
employeeCreditNegativePageSize: 5,
employeeCreditNegativeTotal: 0,
employeeCreditNegativeList: [],
abnormalAccountLoading: false,
abnormalAccountPageNum: 1,
abnormalAccountPageSize: 5,
abnormalAccountTotal: 0,
abnormalAccountList: [],
projectId: null,
statementDetailCache: {},
};
@@ -417,6 +423,10 @@ export default {
this.employeeCreditNegativePageNum = 1;
this.employeeCreditNegativePageSize = 5;
this.employeeCreditNegativeTotal = Number(value && value.employeeCreditNegativeTotal) || 0;
this.abnormalAccountPageNum = 1;
this.abnormalAccountPageSize = 5;
this.abnormalAccountTotal = 0;
this.abnormalAccountList = [];
const rows = Array.isArray(value && value.suspiciousTransactionList)
? value.suspiciousTransactionList
: [];
@@ -424,6 +434,7 @@ export default {
? value.employeeCreditNegativeList
: [];
this.hydrateSuspiciousRows(rows);
this.loadAbnormalAccountPeople();
},
},
},
@@ -451,6 +462,15 @@ export default {
}
await this.loadEmployeeCreditNegative();
},
async handleAbnormalAccountPageChange(pageInfo) {
if (typeof pageInfo === "number") {
this.abnormalAccountPageNum = pageInfo;
} else {
this.abnormalAccountPageNum = pageInfo.page;
this.abnormalAccountPageSize = 5;
}
await this.loadAbnormalAccountPeople();
},
async loadSuspiciousTransactions() {
if (!this.projectId) {
this.suspiciousTransactionList = [];
@@ -505,6 +525,33 @@ export default {
this.employeeCreditNegativeLoading = false;
}
},
async loadAbnormalAccountPeople() {
if (!this.projectId) {
this.abnormalAccountList = [];
this.abnormalAccountTotal = 0;
this.abnormalAccountLoading = false;
return;
}
this.abnormalAccountLoading = true;
try {
const response = await getOverviewAbnormalAccountPeople({
projectId: this.projectId,
pageNum: this.abnormalAccountPageNum,
pageSize: this.abnormalAccountPageSize,
});
const data = (response && response.data) || {};
this.abnormalAccountList = Array.isArray(data.rows) ? data.rows : [];
this.abnormalAccountTotal = Number(data.total) || 0;
} catch (error) {
this.abnormalAccountList = [];
this.abnormalAccountTotal = 0;
this.$message.error("加载异常账户人员信息失败");
console.error("加载异常账户人员信息失败", error);
} finally {
this.abnormalAccountLoading = false;
}
},
async hydrateSuspiciousRows(rows) {
const safeRows = Array.isArray(rows) ? rows : [];
if (!safeRows.length) {

View File

@@ -0,0 +1,22 @@
const assert = require("assert");
const fs = require("fs");
const path = require("path");
const source = fs.readFileSync(
path.resolve(
__dirname,
"../../src/views/ccdiProject/components/detail/RiskDetailSection.vue"
),
"utf8"
);
[
"getOverviewAbnormalAccountPeople",
"abnormalAccountLoading",
"abnormalAccountPageNum",
"abnormalAccountPageSize",
"abnormalAccountTotal",
"abnormalAccountList",
"handleAbnormalAccountPageChange",
"loadAbnormalAccountPeople",
].forEach((token) => assert(source.includes(token), token));