优化流水账号入库和明细筛选

This commit is contained in:
wjj
2026-07-10 17:33:16 +08:00
parent c999497693
commit 486a499af7
9 changed files with 120 additions and 18 deletions

View File

@@ -35,11 +35,11 @@
/>
</el-select>
</el-form-item>
<el-form-item label="可疑规则">
<el-form-item label="预警类型">
<el-select
v-model="currentSuspiciousType"
class="suspicious-filter-select suspicious-type-select"
placeholder="全部可疑规则"
placeholder="全部预警类型"
@change="handleSuspiciousTypeSelectChange"
>
<el-option
@@ -369,7 +369,7 @@ import { getBankStatementDetail } from "@/api/ccdiProjectBankStatement";
import { buildFlowEvidenceFingerprint, buildFlowEvidenceSnapshot } from "@/utils/ccdiEvidence";
const SUSPICIOUS_TYPE_OPTIONS = [
{ value: "ALL", label: "全部可疑规则" },
{ value: "ALL", label: "全部预警类型" },
{ value: "MODEL_RULE", label: "员工规则命中" },
{ value: "EXTERNAL_PERSON", label: "外部人员预警" },
];
@@ -404,6 +404,23 @@ const normalizeRiskModelOptions = (rows) => {
});
};
const mergeRiskModelOptions = (...optionGroups) => {
const seen = new Set();
return optionGroups
.flat()
.filter((item) => {
if (!item || !item.value || seen.has(item.value)) {
return false;
}
seen.add(item.value);
return true;
});
};
const isExternalModelCode = (value) => (
typeof value === "string" && value.indexOf("EXTERNAL_") === 0
);
const ABNORMAL_CUSTOMER_TRANSACTION_RULE_CODE = "ABNORMAL_CUSTOMER_TRANSACTION";
const ABNORMAL_CUSTOMER_TRANSACTION_RULE_NAME = "与客户之间非正常资金往来";
@@ -542,7 +559,13 @@ export default {
return this.currentSuspiciousType === "EXTERNAL_PERSON";
},
displayRiskModelOptions() {
return this.isExternalSuspiciousType ? EXTERNAL_RISK_MODEL_OPTIONS : this.riskModelOptions;
if (this.isExternalSuspiciousType) {
return EXTERNAL_RISK_MODEL_OPTIONS;
}
if (this.currentSuspiciousType === "ALL") {
return mergeRiskModelOptions(this.riskModelOptions, EXTERNAL_RISK_MODEL_OPTIONS);
}
return this.riskModelOptions;
},
allModelOptionLabel() {
return this.isExternalSuspiciousType ? "全部外部模型" : "全部模型";
@@ -589,7 +612,7 @@ export default {
}
return;
}
if (this.selectedModelCode && this.selectedModelCode.indexOf("EXTERNAL_") === 0) {
if (value === "MODEL_RULE" && isExternalModelCode(this.selectedModelCode)) {
this.selectedModelCode = "";
}
},