优化结果总览模型卡片加载反馈

This commit is contained in:
wkc
2026-03-20 14:19:48 +08:00
parent 2bc4f00ce6
commit ad20d356af
3 changed files with 54 additions and 2 deletions

View File

@@ -251,7 +251,7 @@ export default {
this.selectedModelCodes = [...this.selectedModelCodes, modelCode];
}
this.pageNum = 1;
this.fetchPeopleList();
this.fetchPeopleList({ syncCardLoading: true });
},
handleMatchModeChange() {
this.pageNum = 1;
@@ -312,13 +312,17 @@ export default {
this.deptLoading = false;
}
},
async fetchPeopleList() {
async fetchPeopleList(options = {}) {
if (!this.projectId) {
this.peopleList = [];
this.total = 0;
return;
}
const { syncCardLoading = false } = options;
if (syncCardLoading) {
this.cardLoading = true;
}
this.tableLoading = true;
try {
const response = await getOverviewRiskModelPeople(this.buildPeopleParams());
@@ -331,6 +335,9 @@ export default {
console.error("加载风险模型命中人员失败", error);
} finally {
this.tableLoading = false;
if (syncCardLoading) {
this.cardLoading = false;
}
}
},
},
@@ -456,6 +463,8 @@ export default {
.summary-label {
font-size: 12px;
color: #64748b;
flex-shrink: 0;
white-space: nowrap;
}
.filter-summary {

View File

@@ -0,0 +1,17 @@
const assert = require("assert");
const fs = require("fs");
const path = require("path");
const source = fs.readFileSync(
path.resolve(
__dirname,
"../../src/views/ccdiProject/components/detail/RiskModelSection.vue"
),
"utf8"
);
[
"this.cardLoading = true",
"this.cardLoading = false",
"white-space: nowrap",
].forEach((token) => assert(source.includes(token), token));