fix: render dashboard summary rate from live summary
This commit is contained in:
parent
b7f674b097
commit
dfe6c4d858
@ -888,6 +888,14 @@ function formatSummaryValue(key: SummaryMetricKey, summary: SummaryMetric) {
|
||||
return formatAmount(summary[key]);
|
||||
}
|
||||
|
||||
function summaryCellText(key: string) {
|
||||
const summary = visibleSummary.value;
|
||||
if (key === 'luckyGiftProfitRate') {
|
||||
return formatPercent(calcPercent(summary.luckyGiftProfit, summary.luckyGiftTotalFlow));
|
||||
}
|
||||
return formatSummaryValue(key as SummaryMetricKey, summary);
|
||||
}
|
||||
|
||||
function filterCountry(input: string, option?: Record<string, any>) {
|
||||
const keyword = input.toLowerCase();
|
||||
const label = String(option?.label || '').toLowerCase();
|
||||
@ -1288,9 +1296,9 @@ onBeforeUnmount(() => {
|
||||
:scroll="{ x: summaryScrollX }"
|
||||
size="small"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template #bodyCell="{ column }">
|
||||
<span class="number-cell summary-value-cell">
|
||||
{{ record[String(column.dataIndex)] }}
|
||||
{{ summaryCellText(String(column.dataIndex)) }}
|
||||
</span>
|
||||
</template>
|
||||
</Table>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user