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

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