调整个人模型问号提示位置

This commit is contained in:
wkc
2026-08-24 16:28:28 +08:00
parent b769180bb1
commit 3afff5d942

View File

@@ -41,16 +41,15 @@
<thead><tr><th>模型输出结果</th><th>影响BP</th></tr></thead> <thead><tr><th>模型输出结果</th><th>影响BP</th></tr></thead>
<tbody> <tbody>
<tr v-for="(row, index) in retailContributionRows" :key="`retail-contribution-${index}`" :class="{ 'is-total-row': row.total }"> <tr v-for="(row, index) in retailContributionRows" :key="`retail-contribution-${index}`" :class="{ 'is-total-row': row.total }">
<td><span v-if="row.summary">汇总</span><div v-else v-for="item in row.results" :key="item.label" class="result-item"><span class="result-label">{{ item.label }}</span><span class="result-value">{{ item.value }}</span></div></td>
<td> <td>
<span v-if="row.summary"> <span v-if="row.bpLabel" :class="row.total ? 'total-bp-value' : 'bp-value'">
汇总 {{ row.bpLabel }}{{ row.bpValue }}
<el-tooltip v-if="row.summaryTooltip" :content="row.summaryTooltip" placement="top"> <el-tooltip v-if="row.bpTooltip" :content="row.bpTooltip" placement="top">
<i class="el-icon-question analysis-help" tabindex="0" aria-label="查看贡献度汇总上限"></i> <i class="el-icon-question analysis-help" tabindex="0" :aria-label="row.bpTooltipAriaLabel"></i>
</el-tooltip> </el-tooltip>
</span> </span>
<div v-else v-for="item in row.results" :key="item.label" class="result-item"><span class="result-label">{{ item.label }}</span><span class="result-value">{{ item.value }}</span></div>
</td> </td>
<td><span v-if="row.bpLabel" :class="row.total ? 'total-bp-value' : 'bp-value'">{{ row.bpLabel }}{{ row.bpValue }}</span></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -67,20 +66,17 @@
<span v-if="row.summary">汇总</span> <span v-if="row.summary">汇总</span>
<div v-else v-for="item in row.results" :key="item.label" class="result-item"> <div v-else v-for="item in row.results" :key="item.label" class="result-item">
<span class="result-label">{{ item.label }}</span> <span class="result-label">{{ item.label }}</span>
<el-tooltip v-if="item.tooltip" :content="item.tooltip" placement="top">
<i class="el-icon-question analysis-help" tabindex="0" :aria-label="`${item.label}提示`"></i>
</el-tooltip>
<span v-if="item.showValue !== false" class="result-value">{{ item.value }}</span> <span v-if="item.showValue !== false" class="result-value">{{ item.value }}</span>
</div> </div>
</td> </td>
<td> <td>
<span :class="row.total ? 'total-bp-value' : 'bp-value'"> <span :class="row.total ? 'total-bp-value' : 'bp-value'">
<template v-if="row.bpLabel"> <template v-if="row.bpLabel">
{{ row.bpLabel }} {{ row.bpLabel }}
<el-tooltip v-if="row.bpTooltip" :content="row.bpTooltip" placement="top">
<i class="el-icon-question analysis-help" tabindex="0" aria-label="查看中间业务BP上限"></i>
</el-tooltip>
</template>{{ row.bpValue }} </template>{{ row.bpValue }}
<el-tooltip v-if="row.bpTooltip" :content="row.bpTooltip" placement="top">
<i class="el-icon-question analysis-help" tabindex="0" :aria-label="row.bpTooltipAriaLabel"></i>
</el-tooltip>
</span> </span>
</td> </td>
</tr> </tr>
@@ -220,7 +216,7 @@ export default {
this.resultItem('贷款年日均', this.retailOutput.loanAvg), this.resultItem('贷款年日均', this.retailOutput.loanAvg),
this.resultItem('派生率', this.formatRate(this.retailOutput.derivationRate)) this.resultItem('派生率', this.formatRate(this.retailOutput.derivationRate))
]), ]),
this.totalRow('TOTAL_BP_贡献度', this.retailOutput.totalBpContribution, '最高上限100BP') this.totalRow('TOTAL_BP_贡献度', this.retailOutput.totalBpContribution, '最高上限100BP', '查看贡献度汇总上限')
] ]
}, },
retailRelevanceRows() { retailRelevanceRows() {
@@ -237,8 +233,7 @@ export default {
this.middleBusinessRow('中间业务_个人_市民卡', this.retailOutput.midPerCitizencard), this.middleBusinessRow('中间业务_个人_市民卡', this.retailOutput.midPerCitizencard),
this.middleBusinessRow('中间业务_个人_理财业务', this.retailOutput.midPerFinMan), this.middleBusinessRow('中间业务_个人_理财业务', this.retailOutput.midPerFinMan),
this.middleBusinessRow('中间业务_个人_etc', this.retailOutput.midPerEtc), this.middleBusinessRow('中间业务_个人_etc', this.retailOutput.midPerEtc),
this.summaryRow('BP_中间业务', this.retailOutput.bpMid, '最高上限-30BP'), this.totalRow('TOTAL_BP_关联度', this.retailOutput.totalBpRelevance, '最高上限-30BP', '查看中间业务BP上限')
this.totalRow('TOTAL_BP_关联度', this.retailOutput.totalBpRelevance)
] ]
}, },
retailRiskRows() { retailRiskRows() {
@@ -323,8 +318,8 @@ export default {
}, },
methods: { methods: {
formatRate, formatRate,
resultItem(label, value, tooltip = null, showValue = true) { resultItem(label, value, showValue = true) {
return {label, value: this.formatOutputValue(value), tooltip, showValue} return {label, value: this.formatOutputValue(value), showValue}
}, },
groupedAnalysisRow(results, bpLabel, bpValue, total = false, category = null) { groupedAnalysisRow(results, bpLabel, bpValue, total = false, category = null) {
return {results, bpLabel, bpValue: this.formatOutputValue(bpValue), total, category} return {results, bpLabel, bpValue: this.formatOutputValue(bpValue), total, category}
@@ -333,13 +328,17 @@ export default {
return this.groupedAnalysisRow([this.resultItem(resultLabel, resultValue)], bpLabel, bpValue) return this.groupedAnalysisRow([this.resultItem(resultLabel, resultValue)], bpLabel, bpValue)
}, },
middleBusinessRow(resultLabel, bpValue, tooltip = null) { middleBusinessRow(resultLabel, bpValue, tooltip = null) {
return this.groupedAnalysisRow([this.resultItem(resultLabel, null, tooltip, false)], null, bpValue) return {
results: [this.resultItem(resultLabel, null, false)],
bpLabel: null,
bpValue: this.formatOutputValue(bpValue),
total: false,
bpTooltip: tooltip,
bpTooltipAriaLabel: tooltip ? `${resultLabel}提示` : null
}
}, },
summaryRow(bpLabel, bpValue, bpTooltip) { totalRow(bpLabel, bpValue, bpTooltip = null, bpTooltipAriaLabel = null) {
return {summary: true, bpLabel, bpValue: this.formatOutputValue(bpValue), bpTooltip, total: false} return {summary: true, bpLabel, bpValue: this.formatOutputValue(bpValue), total: true, bpTooltip, bpTooltipAriaLabel}
},
totalRow(bpLabel, bpValue, summaryTooltip = null) {
return {summary: true, bpLabel, bpValue: this.formatOutputValue(bpValue), total: true, summaryTooltip}
}, },
/** 格式化布尔值为中文 */ /** 格式化布尔值为中文 */
formatBoolean(value) { formatBoolean(value) {