更新
This commit is contained in:
@@ -62,3 +62,10 @@ export const getLuckyRank = params => {
|
||||
{ params }
|
||||
);
|
||||
};
|
||||
// 实时状态查询(幸运币)
|
||||
export const realTimeByluckyList = () => {
|
||||
return http.request<Result>(
|
||||
"get",
|
||||
"/adminapi/Lottery/realtime_statistics"
|
||||
);
|
||||
};
|
||||
49
src/views/Statistical/luckycoinRank/form.vue
Normal file
49
src/views/Statistical/luckycoinRank/form.vue
Normal file
@@ -0,0 +1,49 @@
|
||||
<script setup lang="ts">
|
||||
import { onBeforeMount, ref } from "vue";
|
||||
import {
|
||||
realTimeByluckyList
|
||||
} from "@/api/modules/statistics";
|
||||
onBeforeMount(() => {
|
||||
getInfo()
|
||||
});
|
||||
const labelData = ref([{ title: '循环奖池进度', props: 'pool_progress' }, { title: '蓄水池当前金额', props: 'pool_amount_now' }, { title: '最近中奖', props: 'last_winner_user' }, { title: '平台累计收入', props: 'platform_total_income' }])
|
||||
const detailData = ref({
|
||||
last_winner_user: '',
|
||||
platform_total_income: "",
|
||||
pool_amount_now: "",
|
||||
pool_progress: ""
|
||||
})
|
||||
const getInfo = async () => {
|
||||
const { code, data } = await realTimeByluckyList()
|
||||
console.log(code, data)
|
||||
if (code) detailData.value = data
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12" style="margin: 30px 0;" v-for="ele in labelData">
|
||||
<div class="box">
|
||||
<div class="title">{{ ele.title }}</div>
|
||||
<div class="value"> {{ detailData[ele.props] }}</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
<style scoped lang="scss">
|
||||
.box {
|
||||
text-align: center;
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.value {
|
||||
margin-top: 20px;
|
||||
color: #666;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -6,6 +6,7 @@ import { utils, writeFile } from "xlsx";
|
||||
import ExportForm from '@/components/exportDialog/index.vue';
|
||||
import { addDialog } from "@/components/ReDialog";
|
||||
import { message } from "@/utils/message";
|
||||
import detailView from './form.vue';
|
||||
export function useData() {
|
||||
const loading = ref(true);
|
||||
const tableList = ref([]);
|
||||
@@ -36,7 +37,7 @@ export function useData() {
|
||||
},
|
||||
{
|
||||
label: "中奖比例(%)",
|
||||
prop: "radio"
|
||||
prop: "ratio"
|
||||
},
|
||||
{
|
||||
label: "中奖金额",
|
||||
@@ -146,6 +147,16 @@ export function useData() {
|
||||
});
|
||||
|
||||
}
|
||||
// 实时状态查询
|
||||
const openDiglog = () => {
|
||||
addDialog({
|
||||
title: `实时状态查询`,
|
||||
fullscreen: false,
|
||||
hideFooter: true,
|
||||
closeOnClickModal: false,
|
||||
contentRenderer: () => h(detailView)
|
||||
});
|
||||
}
|
||||
return {
|
||||
searchForm,
|
||||
searchLabel,
|
||||
@@ -157,6 +168,7 @@ export function useData() {
|
||||
exportExcel,
|
||||
handleSizeChange,
|
||||
handleCurrentChange,
|
||||
openDiglog,
|
||||
loading
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ const {
|
||||
searchLabel,
|
||||
searchForm,
|
||||
onSearch,
|
||||
openDiglog,
|
||||
isShow,
|
||||
tableList,
|
||||
pagination,
|
||||
@@ -32,6 +33,7 @@ defineOptions({
|
||||
<PureTableBar v-if="!loading" title="幸运币中奖统计列表" :class="[isShow && !deviceDetection() ? '!w-[60vw]' : 'w-full']"
|
||||
:columns="tableLabel" @refresh="onSearch">
|
||||
<template #buttons>
|
||||
<el-button type="text" @click="openDiglog">实时状态查询</el-button>
|
||||
<el-button type="primary" @click="exportExcel">
|
||||
导出
|
||||
</el-button>
|
||||
|
||||
@@ -236,7 +236,7 @@ export function useData() {
|
||||
init_code: user_info?.init_code ?? "",
|
||||
red_status: user_info?.red_status ?? "",
|
||||
sex: user_info?.sex ?? user_info.sex === '男' ? 1 : user_info.sex === '女' ? 2 : '',
|
||||
is_real: follow_num?.is_real ?? follow_num.is_real === '未实名' ? 0 : 1
|
||||
is_real: follow_num.is_real === '已实名' ? 1 : 0
|
||||
}
|
||||
},
|
||||
width: "40%",
|
||||
|
||||
Reference in New Issue
Block a user