game用户汇总-添加总汇总
This commit is contained in:
@@ -59,3 +59,11 @@ export const exportGameDetailExportForMiniGame = query => {
|
|||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// 汇总
|
||||||
|
export const getTotalDayGamedata = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/gamedata/user/totalDay',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
@@ -139,9 +139,9 @@ export default {
|
|||||||
const gameOptions = ref({});
|
const gameOptions = ref({});
|
||||||
const dataTime = ref('');
|
const dataTime = ref('');
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
channel: '',
|
channel: 'LEADERCC',
|
||||||
partitionId: undefined,
|
partitionId: undefined,
|
||||||
gameId: '',
|
gameId: 'All',
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
|
@@ -36,6 +36,13 @@
|
|||||||
<el-button style="" type="primary" @click="getData()">查询</el-button>
|
<el-button style="" type="primary" @click="getData()">查询</el-button>
|
||||||
<el-button class="primary" type="primary" @click="resetFormData()">重置</el-button>
|
<el-button class="primary" type="primary" @click="resetFormData()">重置</el-button>
|
||||||
<el-button class="primary" type="primary" @click="confirmExport2Excel()">导出</el-button>
|
<el-button class="primary" type="primary" @click="confirmExport2Excel()">导出</el-button>
|
||||||
|
<el-button class="primary" type="primary" @click="getTotalDayGamedataInfo()">汇总</el-button>
|
||||||
|
<div class="summary_txt" v-if="tableData.totalStat !=undefined">汇总:总进:{{tableData.totalStat.payGold}},总出:{{tableData.totalStat.winGold}},总剩余:{{tableData.totalStat.totalRemain}},比例:{{ (tableData.totalStat.betRate * 100).toFixed(2) + '%' }}</div>
|
||||||
|
<template v-if="tableData.totalList.length>0">
|
||||||
|
<div class="summary_txt" v-for="(item,index) in tableData.totalList" :key="index">
|
||||||
|
{{ item.statDate }}汇总数据: 总进:{{item.payGold}},总出:{{item.winGold}},总剩余:{{item.totalRemain}},比例:{{ (item.betRate * 100).toFixed(2) + '%' }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<!-- 表格数据 -->
|
<!-- 表格数据 -->
|
||||||
<el-table v-loading="tableData.loadingOuter" :data="tableData.dataOuter" ref="multipleTable"
|
<el-table v-loading="tableData.loadingOuter" :data="tableData.dataOuter" ref="multipleTable"
|
||||||
@selection-change="handleSelectionChange" border style="width: 100%; margin-top: 25px">
|
@selection-change="handleSelectionChange" border style="width: 100%; margin-top: 25px">
|
||||||
@@ -72,7 +79,8 @@ import { formatDate } from "@/utils/relDate";
|
|||||||
import {
|
import {
|
||||||
gameList,
|
gameList,
|
||||||
getUserGamedata,
|
getUserGamedata,
|
||||||
exportUserForMiniGame
|
exportUserForMiniGame,
|
||||||
|
getTotalDayGamedata
|
||||||
} from "@/api/gameSummary/gameSummary";
|
} from "@/api/gameSummary/gameSummary";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import PartitionSelect from "../common/partitionSelect.vue";
|
import PartitionSelect from "../common/partitionSelect.vue";
|
||||||
@@ -86,9 +94,9 @@ export default {
|
|||||||
const dataTime = ref('');
|
const dataTime = ref('');
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
erbanNoStr:'',
|
erbanNoStr:'',
|
||||||
channel: '',
|
channel: 'LEADERCC',
|
||||||
partitionId: undefined,
|
partitionId: undefined,
|
||||||
gameId: '',
|
gameId: 'All',
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
@@ -97,7 +105,10 @@ export default {
|
|||||||
});
|
});
|
||||||
const tableData = ref({
|
const tableData = ref({
|
||||||
dataOuter: [],
|
dataOuter: [],
|
||||||
loadingOuter:false
|
loadingOuter:false,
|
||||||
|
totalStat:undefined,
|
||||||
|
totalList:[]
|
||||||
|
|
||||||
});
|
});
|
||||||
const changeEvent = () => {
|
const changeEvent = () => {
|
||||||
formData.value.gameId = gameOptions.value[formData.value.channel][0].gameId;
|
formData.value.gameId = gameOptions.value[formData.value.channel][0].gameId;
|
||||||
@@ -114,7 +125,6 @@ export default {
|
|||||||
// 查询
|
// 查询
|
||||||
const getData = () => {
|
const getData = () => {
|
||||||
tableData.value.loadingOuter = true;
|
tableData.value.loadingOuter = true;
|
||||||
console.log(dataTime.value,'-----------')
|
|
||||||
if (dataTime.value && dataTime.value.length > 0) {
|
if (dataTime.value && dataTime.value.length > 0) {
|
||||||
formData.value.startTime = dateFormat(dataTime.value[0], "yyyy-MM-dd hh:mm:ss");
|
formData.value.startTime = dateFormat(dataTime.value[0], "yyyy-MM-dd hh:mm:ss");
|
||||||
formData.value.endTime = dateFormat(dataTime.value[1], "yyyy-MM-dd hh:mm:ss");
|
formData.value.endTime = dateFormat(dataTime.value[1], "yyyy-MM-dd hh:mm:ss");
|
||||||
@@ -128,6 +138,8 @@ export default {
|
|||||||
tableData.value.dataOuter = res.data.rows;
|
tableData.value.dataOuter = res.data.rows;
|
||||||
tableData.value.loadingOuter = false;
|
tableData.value.loadingOuter = false;
|
||||||
formData.value.total = res.data.total
|
formData.value.total = res.data.total
|
||||||
|
tableData.value.totalStat = res.data.totalMap?.totalStat;
|
||||||
|
tableData.value.totalList = [];
|
||||||
} else {
|
} else {
|
||||||
tableData.value.loadingOuter = false;
|
tableData.value.loadingOuter = false;
|
||||||
ElMessage.error(res.message);
|
ElMessage.error(res.message);
|
||||||
@@ -181,6 +193,26 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 汇总
|
||||||
|
const getTotalDayGamedataInfo = () => {
|
||||||
|
if (dataTime.value && dataTime.value.length > 0) {
|
||||||
|
formData.value.startTime = dateFormat(dataTime.value[0], "yyyy-MM-dd hh:mm:ss");
|
||||||
|
formData.value.endTime = dateFormat(dataTime.value[1], "yyyy-MM-dd hh:mm:ss");
|
||||||
|
} else {
|
||||||
|
formData.value.startTime = dataTime.value
|
||||||
|
formData.value.endTime = dataTime.value
|
||||||
|
}
|
||||||
|
const { channel, endTime, gameId, pageNo, pageSize, partitionId, startTime } = formData.value;
|
||||||
|
getTotalDayGamedata({ channel, endTime, gameId, pageNo, pageSize, partitionId, startTime }).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
tableData.value.totalList = res.data;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
const handleSizeChange = (val) => {
|
const handleSizeChange = (val) => {
|
||||||
formData.value.pageSize = val;
|
formData.value.pageSize = val;
|
||||||
getData();
|
getData();
|
||||||
@@ -199,6 +231,7 @@ export default {
|
|||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getGameOptions()
|
getGameOptions()
|
||||||
|
// changeEvent()
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
partitionOptions,
|
partitionOptions,
|
||||||
@@ -215,7 +248,9 @@ export default {
|
|||||||
getPartitionDesc,
|
getPartitionDesc,
|
||||||
getData,
|
getData,
|
||||||
confirmExport2Excel,
|
confirmExport2Excel,
|
||||||
calendarChange
|
calendarChange,
|
||||||
|
getTotalDayGamedataInfo
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -249,4 +284,15 @@ export default {
|
|||||||
margin: 15px 0 5px 0px;
|
margin: 15px 0 5px 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.summary_txt{
|
||||||
|
font-family: PingFang SC, PingFang SC;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #313131;
|
||||||
|
line-height: 21px;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
text-transform: none;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
Reference in New Issue
Block a user