调整结果总览详情弹窗分页与模型摘要
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
<el-table
|
||||
v-if='group.groupType === "BANK_STATEMENT"'
|
||||
:data="group.records || []"
|
||||
:data="getStatementPageRecords(group)"
|
||||
class="abnormal-table"
|
||||
>
|
||||
<el-table-column prop="trxDate" label="交易时间" min-width="160" />
|
||||
@@ -57,6 +57,19 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="displayAmount" label="交易金额" min-width="140" />
|
||||
</el-table>
|
||||
<div
|
||||
v-if='group.groupType === "BANK_STATEMENT" && getStatementTotal(group) > statementPageSize'
|
||||
class="abnormal-pagination"
|
||||
>
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:current-page="getStatementPage(group)"
|
||||
:page-size="statementPageSize"
|
||||
:total="getStatementTotal(group)"
|
||||
@current-change="handleStatementPageChange(group, $event)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-else-if='group.groupType === "OBJECT"' class="object-card-grid">
|
||||
<article
|
||||
@@ -104,11 +117,54 @@ export default {
|
||||
}),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
statementPageSize: 5,
|
||||
statementPageMap: {},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
detailGroups: {
|
||||
immediate: true,
|
||||
handler(groups) {
|
||||
const nextPageMap = {};
|
||||
groups
|
||||
.filter((group) => group && group.groupType === "BANK_STATEMENT")
|
||||
.forEach((group, index) => {
|
||||
const groupKey = this.resolveGroupKey(group, index);
|
||||
nextPageMap[groupKey] = 1;
|
||||
});
|
||||
this.statementPageMap = nextPageMap;
|
||||
},
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
detailGroups() {
|
||||
return Array.isArray(this.detailData && this.detailData.groups) ? this.detailData.groups : [];
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
resolveGroupKey(group, index = 0) {
|
||||
return group.groupCode || group.groupName || `BANK_STATEMENT_${index}`;
|
||||
},
|
||||
getStatementPage(group) {
|
||||
const groupKey = this.resolveGroupKey(group);
|
||||
return this.statementPageMap[groupKey] || 1;
|
||||
},
|
||||
getStatementTotal(group) {
|
||||
return Array.isArray(group && group.records) ? group.records.length : 0;
|
||||
},
|
||||
getStatementPageRecords(group) {
|
||||
const records = Array.isArray(group && group.records) ? group.records : [];
|
||||
const currentPage = this.getStatementPage(group);
|
||||
const startIndex = (currentPage - 1) * this.statementPageSize;
|
||||
return records.slice(startIndex, startIndex + this.statementPageSize);
|
||||
},
|
||||
handleStatementPageChange(group, page) {
|
||||
const groupKey = this.resolveGroupKey(group);
|
||||
this.$set(this.statementPageMap, groupKey, page);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -145,6 +201,12 @@ export default {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.abnormal-pagination {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.multi-line-cell {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -89,7 +89,6 @@ export default {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
modelCount: 0,
|
||||
currentModel: "-",
|
||||
riskTags: [],
|
||||
}),
|
||||
},
|
||||
|
||||
@@ -30,10 +30,6 @@
|
||||
<span class="sidebar-field__label">命中模型数</span>
|
||||
<span class="sidebar-field__value">{{ sidebarData.modelSummary.modelCount || "-" }}</span>
|
||||
</div>
|
||||
<div class="sidebar-field">
|
||||
<span class="sidebar-field__label">当前命中模型</span>
|
||||
<span class="sidebar-field__value">{{ sidebarData.modelSummary.currentModel || "-" }}</span>
|
||||
</div>
|
||||
<div class="sidebar-field sidebar-field--column">
|
||||
<span class="sidebar-field__label">核心异常标签</span>
|
||||
<div v-if="sidebarData.modelSummary.riskTags.length" class="tag-list">
|
||||
|
||||
@@ -250,7 +250,6 @@ export function buildProjectAnalysisDialogData({ person, source = "riskPeople",
|
||||
},
|
||||
modelSummary: {
|
||||
modelCount: safePerson.modelCount || (Array.isArray(safePerson.modelNames) ? safePerson.modelNames.length : "-"),
|
||||
currentModel: currentModelValue,
|
||||
hasRiskTags: riskTags.length > 0,
|
||||
riskTags,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user