diff --git a/ruoyi-ui/src/views/loanPricing/workflow/components/ModelOutputDisplay.vue b/ruoyi-ui/src/views/loanPricing/workflow/components/ModelOutputDisplay.vue index 2f045dc..fa247e7 100644 --- a/ruoyi-ui/src/views/loanPricing/workflow/components/ModelOutputDisplay.vue +++ b/ruoyi-ui/src/views/loanPricing/workflow/components/ModelOutputDisplay.vue @@ -18,6 +18,62 @@ +
+

忠诚度分析

+ + + + + + + + + +
模型输出结果影响BP
汇总
{{ item.label }}{{ item.value }}
{{ row.bpLabel }}:{{ row.bpValue }}
+
+ +
+

贡献度分析

+ + + + + + + + + +
模型输出结果影响BP
{{ item.label }}{{ item.value }}
{{ row.bpLabel }}:{{ row.bpValue }}
+
+ +
+

关联度分析

+ + + + + + + + + +
模型输出结果影响BP
汇总
{{ item.label }}{{ item.value }}
{{ row.bpLabel }}:{{ row.bpValue }}
+
+ +
+

风险度分析

+ + + + + + + + + +
模型输出结果影响BP
汇总
{{ item.label }}{{ item.value }}
{{ row.bpLabel }}:{{ row.bpValue }}
+
+

测算结果

@@ -30,77 +86,6 @@ {{ formatRate(retailOutput.finalCalculateRate) }} %
- -
-

忠诚度分析

- - {{ formatBoolean(retailOutput.isFirstLoan) }} - {{ retailOutput.faithDay || '-' }} - {{ retailOutput.custAge || '-' }} - {{ retailOutput.bpFirstLoan || '-' }} - {{ retailOutput.bpAgeLoan || '-' }} - {{ retailOutput.bpAge || '-' }} - {{ retailOutput.totalBpLoyalty || '-' }} - -
- -
-

贡献度分析

- - {{ retailOutput.balanceAvg || '-' }} - {{ retailOutput.loanAvg || '-' }} - {{ formatRate(retailOutput.derivationRate) }} - {{ retailOutput.totalBpContribution || '-' }} - -
- -
-

关联度分析

- - {{ formatBoolean(retailOutput.midPerCard) }} - {{ formatBoolean(retailOutput.midPerPass) }} - {{ formatBoolean(retailOutput.midPerHarvest) }} - {{ formatBoolean(retailOutput.midPerEffect) }} - {{ formatBoolean(retailOutput.midPerQuickPay) }} - {{ formatBoolean(retailOutput.midPerEleDdc) }} - {{ formatBoolean(retailOutput.midPerWaterDdc) }} - {{ formatBoolean(retailOutput.midPerHuashuDdc) }} - {{ formatBoolean(retailOutput.MidPerGasDdc) }} - {{ formatBoolean(retailOutput.midPerCitizencard) }} - {{ formatBoolean(retailOutput.midPerFinMan) }} - {{ formatBoolean(retailOutput.midPerEtc) }} - {{ retailOutput.bpMid || '-' }} - {{ retailOutput.totalBpRelevance || '-' }} - -
- -
-

贷款特征

- - {{ retailOutput.applyAmt || '-' }} - {{ retailOutput.bpLoanAmount || '-' }} - {{ formatLoanPurpose(retailOutput.loanPurpose) }} - {{ formatBoolean(retailOutput.bizProof) }} - {{ retailOutput.bpLoanUse || '-' }} - {{ formatBoolean(retailOutput.loanLoop) }} - {{ retailOutput.bpLoanLoop || '-' }} - {{ retailOutput.collType || '-' }} - {{ formatBoolean(retailOutput.collThirdParty) }} - {{ retailOutput.bpCollateral || '-' }} - -
- -
-

风险度分析

- - {{ formatBoolean(retailOutput.greyCust) }} - {{ formatBoolean(retailOutput.prinOverdue) }} - {{ formatBoolean(retailOutput.interestOverdue) }} - {{ formatBoolean(retailOutput.cardOverdue) }} - {{ retailOutput.bpGreyOverdue || '-' }} - {{ retailOutput.totalBpRisk || '-' }} - -
@@ -116,6 +101,76 @@ +
+

忠诚度分析

+ + + + + + + + + +
模型输出结果影响BP
汇总
{{ item.label }}{{ item.value }}
{{ row.bpLabel }}:{{ row.bpValue }}
+
+ +
+

贡献度分析

+ + + + + + + + + +
模型输出结果影响BP
{{ item.label }}{{ item.value }}
{{ row.bpLabel }}:{{ row.bpValue }}
+
+ +
+

关联度分析

+ + + + + + + + + +
模型输出结果影响BP
汇总
{{ item.label }}{{ item.value }}
{{ row.bpLabel }}:{{ row.bpValue }}
+
+ +
+

企业类别

+ + + + + + + + + +
模型输出结果影响BP
{{ item.label }}{{ item.value }}
{{ row.bpLabel }}:{{ row.bpValue }}
+
+ +
+

风险度分析

+ + + + + + + + + +
模型输出结果影响BP
汇总
{{ item.label }}{{ item.value }}
{{ row.bpLabel }}:{{ row.bpValue }}
+
+

测算结果

@@ -128,81 +183,6 @@ {{ formatRate(corpOutput.finalCalculateRate) }} %
- -
-

忠诚度分析

- - {{ formatBoolean(corpOutput.isFirstLoan) }} - {{ corpOutput.faithDay || '-' }} - {{ corpOutput.bpFirstLoan || '-' }} - {{ corpOutput.bpAgeLoan || '-' }} - {{ corpOutput.totalBpLoyalty || '-' }} - -
- -
-

贡献度分析

- - {{ corpOutput.balanceAvg || '-' }} - {{ corpOutput.loanAvg || '-' }} - {{ formatRate(corpOutput.derivationRate) }} - {{ corpOutput.totalBpContribution || '-' }} - -
- -
-

关联度分析

- - {{ formatBoolean(corpOutput.midEntConnect) }} - {{ formatBoolean(corpOutput.midEntEffect) }} - {{ formatBoolean(corpOutput.midEntInter) }} - {{ formatBoolean(corpOutput.midEntAccept) }} - {{ formatBoolean(corpOutput.midEntDiscount) }} - {{ formatBoolean(corpOutput.midEntEleDdc) }} - {{ formatBoolean(corpOutput.midEntWaterDdc) }} - {{ corpOutput.bpMid || '-' }} - {{ corpOutput.payroll || '-' }} - {{ corpOutput.invLoanAmount || '-' }} - {{ corpOutput.bpPayroll || '-' }} - {{ corpOutput.totalBpRelevance || '-' }} - -
- -
-

企业类别

- - {{ formatBoolean(corpOutput.isCleanEnt) }} - {{ formatBoolean(corpOutput.hasSettleAcct) }} - {{ formatBoolean(corpOutput.isGreenLoan) }} - {{ formatBoolean(corpOutput.isTechEnt) }} - {{ formatBoolean(corpOutput.isTradeBuildEnt) }} - {{ corpOutput.bpEntType || '-' }} - -
- -
-

贷款特征

- - {{ corpOutput.loanTerm || '-' }} - {{ corpOutput.bpLoanTerm || '-' }} - {{ corpOutput.applyAmt || '-' }} - {{ corpOutput.bpLoanAmount || '-' }} - {{ corpOutput.collType || '-' }} - {{ formatBoolean(corpOutput.collThirdParty) }} - {{ corpOutput.bpCollateral || '-' }} - -
- -
-

风险度分析

- - {{ formatBoolean(corpOutput.greyCust) }} - {{ formatBoolean(corpOutput.prinOverdue) }} - {{ formatBoolean(corpOutput.interestOverdue) }} - {{ corpOutput.bpGreyOverdue || '-' }} - {{ corpOutput.totalBpRisk || '-' }} - -
@@ -227,8 +207,134 @@ export default { default: null } }, + computed: { + retailLoyaltyRows() { + return [ + this.analysisRow('我行首贷客户', this.formatBoolean(this.retailOutput.isFirstLoan), 'BP_首贷', this.retailOutput.bpFirstLoan), + this.analysisRow('用信天数', this.retailOutput.faithDay, 'BP_贷龄', this.retailOutput.bpAgeLoan), + this.analysisRow('客户年龄', this.retailOutput.custAge, 'BP_年龄', this.retailOutput.bpAge), + this.totalRow('TOTAL_BP_忠诚度', this.retailOutput.totalBpLoyalty) + ] + }, + retailContributionRows() { + return [this.groupedAnalysisRow([ + this.resultItem('存款年日均', this.retailOutput.balanceAvg), + this.resultItem('贷款年日均', this.retailOutput.loanAvg), + this.resultItem('派生率', this.formatRate(this.retailOutput.derivationRate)) + ], 'TOTAL_BP_贡献度', this.retailOutput.totalBpContribution, true)] + }, + retailRelevanceRows() { + return [ + this.groupedAnalysisRow([ + this.resultItem('中间业务_个人_信用卡', this.formatBoolean(this.retailOutput.midPerCard)), + this.resultItem('中间业务_个人_一码通', this.formatBoolean(this.retailOutput.midPerPass)), + this.resultItem('中间业务_个人_丰收互联', this.formatBoolean(this.retailOutput.midPerHarvest)), + this.resultItem('中间业务_个人_有效客户', this.formatBoolean(this.retailOutput.midPerEffect)), + this.resultItem('中间业务_个人_快捷支付', this.formatBoolean(this.retailOutput.midPerQuickPay)), + this.resultItem('中间业务_个人_电费代扣', this.formatBoolean(this.retailOutput.midPerEleDdc)), + this.resultItem('中间业务_个人_水费代扣', this.formatBoolean(this.retailOutput.midPerWaterDdc)), + this.resultItem('中间业务_个人_华数费代扣', this.formatBoolean(this.retailOutput.midPerHuashuDdc)), + this.resultItem('中间业务_个人_煤气费代扣', this.formatBoolean(this.retailOutput.MidPerGasDdc)), + this.resultItem('中间业务_个人_市民卡', this.formatBoolean(this.retailOutput.midPerCitizencard)), + this.resultItem('中间业务_个人_理财业务', this.formatBoolean(this.retailOutput.midPerFinMan)), + this.resultItem('中间业务_个人_etc', this.formatBoolean(this.retailOutput.midPerEtc)) + ], 'BP_中间业务', this.retailOutput.bpMid), + this.totalRow('TOTAL_BP_关联度', this.retailOutput.totalBpRelevance) + ] + }, + retailRiskRows() { + return [ + this.analysisRow('申请金额', this.retailOutput.applyAmt, 'BP_贷款额度', this.retailOutput.bpLoanAmount), + this.groupedAnalysisRow([ + this.resultItem('贷款用途', this.formatLoanPurpose(this.retailOutput.loanPurpose)), + this.resultItem('是否有经营佐证', this.formatBoolean(this.retailOutput.bizProof)) + ], 'BP_贷款用途', this.retailOutput.bpLoanUse), + this.analysisRow('循环功能', this.formatBoolean(this.retailOutput.loanLoop), 'BP_循环功能', this.retailOutput.bpLoanLoop), + this.groupedAnalysisRow([ + this.resultItem('抵质押类型', this.retailOutput.collType), + this.resultItem('抵质押物三方所有', this.formatBoolean(this.retailOutput.collThirdParty)) + ], 'BP_抵押物', this.retailOutput.bpCollateral), + this.groupedAnalysisRow([ + this.resultItem('灰名单客户', this.formatBoolean(this.retailOutput.greyCust)), + this.resultItem('本金逾期', this.formatBoolean(this.retailOutput.prinOverdue)), + this.resultItem('利息逾期', this.formatBoolean(this.retailOutput.interestOverdue)), + this.resultItem('信用卡逾期', this.formatBoolean(this.retailOutput.cardOverdue)) + ], 'BP_灰名单与逾期', this.retailOutput.bpGreyOverdue), + this.totalRow('TOTAL_BP_风险度', this.retailOutput.totalBpRisk) + ] + }, + corporateLoyaltyRows() { + return [ + this.analysisRow('我行首贷客户', this.formatBoolean(this.corpOutput.isFirstLoan), 'BP_首贷', this.corpOutput.bpFirstLoan), + this.analysisRow('用信天数', this.corpOutput.faithDay, 'BP_贷龄', this.corpOutput.bpAgeLoan), + this.totalRow('TOTAL_BP_忠诚度', this.corpOutput.totalBpLoyalty) + ] + }, + corporateContributionRows() { + return [this.groupedAnalysisRow([ + this.resultItem('存款年日均', this.corpOutput.balanceAvg), + this.resultItem('贷款年日均', this.corpOutput.loanAvg), + this.resultItem('派生率', this.formatRate(this.corpOutput.derivationRate)) + ], 'TOTAL_BP_贡献度', this.corpOutput.totalBpContribution, true)] + }, + corporateRelevanceRows() { + return [ + this.groupedAnalysisRow([ + this.resultItem('中间业务_企业_企业互联', this.formatBoolean(this.corpOutput.midEntConnect)), + this.resultItem('中间业务_企业_有效价值客户', this.formatBoolean(this.corpOutput.midEntEffect)), + this.resultItem('中间业务_企业_国际业务', this.formatBoolean(this.corpOutput.midEntInter)), + this.resultItem('中间业务_企业_承兑', this.formatBoolean(this.corpOutput.midEntAccept)), + this.resultItem('中间业务_企业_贴现', this.formatBoolean(this.corpOutput.midEntDiscount)), + this.resultItem('中间业务_企业_电费代扣', this.formatBoolean(this.corpOutput.midEntEleDdc)), + this.resultItem('中间业务_企业_水费代扣', this.formatBoolean(this.corpOutput.midEntWaterDdc)) + ], 'BP_中间业务', this.corpOutput.bpMid), + this.groupedAnalysisRow([ + this.resultItem('代发工资户数', this.corpOutput.payroll), + this.resultItem('存量贷款余额', this.corpOutput.invLoanAmount) + ], 'BP_代发工资', this.corpOutput.bpPayroll), + this.totalRow('TOTAL_BP_关联度', this.corpOutput.totalBpRelevance) + ] + }, + corporateTypeRows() { + return [this.groupedAnalysisRow([ + this.resultItem('净身企业', this.formatBoolean(this.corpOutput.isCleanEnt)), + this.resultItem('开立基本结算账户', this.formatBoolean(this.corpOutput.hasSettleAcct)), + this.resultItem('绿色贷款', this.formatBoolean(this.corpOutput.isGreenLoan)), + this.resultItem('科技型企业', this.formatBoolean(this.corpOutput.isTechEnt)), + this.resultItem('贸易和建筑业企业', this.formatBoolean(this.corpOutput.isTradeBuildEnt)) + ], 'BP_企业客户类别', this.corpOutput.bpEntType)] + }, + corporateRiskRows() { + return [ + this.analysisRow('借款期限', this.corpOutput.loanTerm, 'BP_贷款期限', this.corpOutput.bpLoanTerm), + this.analysisRow('申请金额', this.corpOutput.applyAmt, 'BP_贷款额度', this.corpOutput.bpLoanAmount), + this.groupedAnalysisRow([ + this.resultItem('抵质押类型', this.corpOutput.collType), + this.resultItem('抵质押物三方所有', this.formatBoolean(this.corpOutput.collThirdParty)) + ], 'BP_抵押物', this.corpOutput.bpCollateral), + this.groupedAnalysisRow([ + this.resultItem('灰名单客户', this.formatBoolean(this.corpOutput.greyCust)), + this.resultItem('本金逾期', this.formatBoolean(this.corpOutput.prinOverdue)), + this.resultItem('利息逾期', this.formatBoolean(this.corpOutput.interestOverdue)) + ], 'BP_灰名单与逾期', this.corpOutput.bpGreyOverdue), + this.totalRow('TOTAL_BP_风险度', this.corpOutput.totalBpRisk) + ] + } + }, methods: { formatRate, + resultItem(label, value) { + return {label, value: this.formatOutputValue(value)} + }, + groupedAnalysisRow(results, bpLabel, bpValue, total = false) { + return {results, bpLabel, bpValue: this.formatOutputValue(bpValue), total} + }, + analysisRow(resultLabel, resultValue, bpLabel, bpValue) { + return this.groupedAnalysisRow([this.resultItem(resultLabel, resultValue)], bpLabel, bpValue) + }, + totalRow(bpLabel, bpValue) { + return {summary: true, bpLabel, bpValue: this.formatOutputValue(bpValue), total: true} + }, /** 格式化布尔值为中文 */ formatBoolean(value) { if (value === 'true' || value === true || value === '1' || value === 1) return '是' @@ -283,6 +389,84 @@ export default { color: #303133; } + .output-analysis-table { + width: 100%; + table-layout: fixed; + border-collapse: collapse; + border: 1px solid #ebeef5; + color: #606266; + font-size: 13px; + + .result-column { + width: 60%; + } + + .bp-column { + width: 40%; + } + + th, + td { + padding: 10px 12px; + border-right: 1px solid #ebeef5; + border-bottom: 1px solid #ebeef5; + text-align: left; + vertical-align: top; + overflow-wrap: anywhere; + word-break: break-word; + } + + th:last-child, + td:last-child { + border-right: 0; + } + + tbody tr:last-child td { + border-bottom: 0; + } + + th { + background: #f5f7fa; + color: #909399; + font-weight: 500; + } + + .result-item { + display: flex; + align-items: flex-start; + justify-content: space-between; + flex-wrap: wrap; + gap: 4px 12px; + } + + .result-item + .result-item { + margin-top: 6px; + padding-top: 6px; + border-top: 1px dashed #ebeef5; + } + + .result-label { + min-width: 0; + color: #606266; + } + + .result-value { + margin-left: auto; + color: #303133; + font-weight: 500; + text-align: right; + } + + .is-total-row { + background: #fffaf0; + + td:first-child { + color: #606266; + font-weight: 500; + } + } + } + // BP 值样式 .bp-value { color: #409eff; @@ -308,4 +492,44 @@ export default { font-weight: 500; } } + +@media screen and (max-width: 768px) { + .model-output-card { + ::v-deep .el-card__body { + padding: 16px; + } + + .output-analysis-table { + th, + td { + padding: 8px; + } + } + } +} + +@media print { + .model-output-card { + break-inside: auto !important; + page-break-inside: auto !important; + + .output-section { + break-inside: auto; + page-break-inside: auto; + } + + .output-analysis-table { + color: #000; + + thead { + display: table-header-group; + } + + tr { + break-inside: avoid !important; + page-break-inside: avoid !important; + } + } + } +}