运营幸运数据查询 - 增加比列百分比以及千分号
This commit is contained in:
@@ -39,10 +39,18 @@
|
|||||||
align="center"
|
align="center"
|
||||||
label="充值等级"
|
label="充值等级"
|
||||||
/>
|
/>
|
||||||
<el-table-column prop="totalInput" align="center" label="进入" />
|
<el-table-column prop="totalInput" align="center" label="进入">
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{ formattedNumber(scope.row.totalInput) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="totalOutput" align="center" label="退出" />
|
<el-table-column prop="totalOutput" align="center" label="退出" />
|
||||||
<el-table-column prop="receiverReward" align="center" label="送主播" />
|
<el-table-column prop="receiverReward" align="center" label="送主播" />
|
||||||
<el-table-column prop="productionRatio" align="center" label="比例" />
|
<el-table-column prop="productionRatio" align="center" label="比例" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{ toPercentage(scope.row.productionRatio) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="production" align="center" label="差额" />
|
<el-table-column prop="production" align="center" label="差额" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
@@ -112,6 +120,17 @@ const resetFormData = () => {
|
|||||||
dataTime.value = [];
|
dataTime.value = [];
|
||||||
tableData.data = [];
|
tableData.data = [];
|
||||||
};
|
};
|
||||||
|
// 百分比
|
||||||
|
const toPercentage = (value) => {
|
||||||
|
return (value * 100).toFixed(2) + "%";
|
||||||
|
};
|
||||||
|
// 千分位
|
||||||
|
const formattedNumber = computed(() => {
|
||||||
|
return (num) => {
|
||||||
|
if (num === null || num === undefined) return "";
|
||||||
|
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
|
};
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
Reference in New Issue
Block a user