每日金币统计 - 默认加载七天数据,公会统计数据 - 增加千分位
This commit is contained in:
@@ -5,8 +5,9 @@
|
|||||||
<div class="block">
|
<div class="block">
|
||||||
<span class="demonstration">开始时间</span>
|
<span class="demonstration">开始时间</span>
|
||||||
<el-date-picker v-model="inquire.time[0]"
|
<el-date-picker v-model="inquire.time[0]"
|
||||||
type="dates"
|
type="date"
|
||||||
placeholder="开始时间">
|
placeholder="开始时间"
|
||||||
|
format="YYYY-MM-DD">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -14,8 +15,9 @@
|
|||||||
<div class="block">
|
<div class="block">
|
||||||
<span class="demonstration">结束时间</span>
|
<span class="demonstration">结束时间</span>
|
||||||
<el-date-picker v-model="inquire.time[1]"
|
<el-date-picker v-model="inquire.time[1]"
|
||||||
type="dates"
|
type="date"
|
||||||
placeholder="结束时间">
|
placeholder="结束时间"
|
||||||
|
format="YYYY-MM-DD">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -237,7 +239,7 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
// 查询条件
|
// 查询条件
|
||||||
inquire: {
|
inquire: {
|
||||||
time: [],
|
time: this.calculateLastSevenDays(),
|
||||||
},
|
},
|
||||||
// 表格
|
// 表格
|
||||||
tableData: [{ x: "x" }],
|
tableData: [{ x: "x" }],
|
||||||
@@ -252,7 +254,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
// this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 千分位
|
// 千分位
|
||||||
@@ -265,6 +267,13 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 默认七天
|
||||||
|
calculateLastSevenDays () {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||||
|
return [start, end];
|
||||||
|
},
|
||||||
totalDiamonds (row) {
|
totalDiamonds (row) {
|
||||||
const subDiamond = Number(row.subDiamond || 0);
|
const subDiamond = Number(row.subDiamond || 0);
|
||||||
const addDiamond = Number(row.addDiamond || 0);
|
const addDiamond = Number(row.addDiamond || 0);
|
||||||
|
@@ -1,162 +1,166 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<el-table v-loading="loading"
|
<el-table
|
||||||
:data="tableData"
|
v-loading="loading"
|
||||||
border
|
:data="tableData"
|
||||||
style="width: 100%; margin-top: 25px">
|
border
|
||||||
<el-table-column align="center"
|
style="width: 100%; margin-top: 25px"
|
||||||
label="日期"
|
>
|
||||||
width="220px">
|
<el-table-column align="center" label="日期" width="220px">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
{{ scope.row.date }} ~ {{ scope.row.endDate }}
|
{{ scope.row.date }} ~ {{ scope.row.endDate }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="totalNewCount"
|
<el-table-column
|
||||||
align="center"
|
prop="totalNewCount"
|
||||||
label="全服公会总新增" />
|
align="center"
|
||||||
|
label="全服公会总新增"
|
||||||
|
/>
|
||||||
|
|
||||||
<el-table-column align="center"
|
<el-table-column align="center" label="阿拉伯公会总新增" width="">
|
||||||
label="阿拉伯公会总新增"
|
|
||||||
width="">
|
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button @click="
|
<el-button
|
||||||
|
@click="
|
||||||
detailsTitle = '阿拉伯公会总新增' + scope.row.date;
|
detailsTitle = '阿拉伯公会总新增' + scope.row.date;
|
||||||
edi(scope.row.arNewCountDetail, false);
|
edi(scope.row.arNewCountDetail, false);
|
||||||
"
|
"
|
||||||
type="text"
|
type="text"
|
||||||
size="small">
|
size="small"
|
||||||
|
>
|
||||||
{{ scope.row.arNewCount }}
|
{{ scope.row.arNewCount }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center"
|
<el-table-column align="center" label="英语区总新增" width="">
|
||||||
label="英语区总新增"
|
|
||||||
width="">
|
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button @click="
|
<el-button
|
||||||
|
@click="
|
||||||
detailsTitle = '英语区总新增' + scope.row.date;
|
detailsTitle = '英语区总新增' + scope.row.date;
|
||||||
edi(scope.row.enNewCountDetail, false);
|
edi(scope.row.enNewCountDetail, false);
|
||||||
"
|
"
|
||||||
type="text"
|
type="text"
|
||||||
size="small">
|
size="small"
|
||||||
|
>
|
||||||
{{ scope.row.enNewCount }}
|
{{ scope.row.enNewCount }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center"
|
<el-table-column align="center" label="华语区总新增" width="">
|
||||||
label="华语区总新增"
|
|
||||||
width="">
|
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button @click="
|
<el-button
|
||||||
|
@click="
|
||||||
detailsTitle = '华语区总新增' + scope.row.date;
|
detailsTitle = '华语区总新增' + scope.row.date;
|
||||||
edi(scope.row.zhNewCountDetail, false);
|
edi(scope.row.zhNewCountDetail, false);
|
||||||
"
|
"
|
||||||
type="text"
|
type="text"
|
||||||
size="small">
|
size="small"
|
||||||
|
>
|
||||||
{{ scope.row.zhNewCount }}
|
{{ scope.row.zhNewCount }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center"
|
<el-table-column align="center" label="土耳其区总新增" width="">
|
||||||
label="土耳其区总新增"
|
|
||||||
width="">
|
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button @click="
|
<el-button
|
||||||
|
@click="
|
||||||
detailsTitle = '土耳其区总新增' + scope.row.date;
|
detailsTitle = '土耳其区总新增' + scope.row.date;
|
||||||
edi(scope.row.trNewCountDetail, false);
|
edi(scope.row.trNewCountDetail, false);
|
||||||
"
|
"
|
||||||
type="text"
|
type="text"
|
||||||
size="small">
|
size="small"
|
||||||
|
>
|
||||||
{{ scope.row.trNewCount }}
|
{{ scope.row.trNewCount }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center"
|
<el-table-column align="center" label="英语2区总新增" width="">
|
||||||
label="英语2区总新增"
|
|
||||||
width="">
|
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button @click="
|
<el-button
|
||||||
|
@click="
|
||||||
detailsTitle = '英语2区总新增' + scope.row.date;
|
detailsTitle = '英语2区总新增' + scope.row.date;
|
||||||
edi(scope.row.en2NewCountDetail, false);
|
edi(scope.row.en2NewCountDetail, false);
|
||||||
"
|
"
|
||||||
type="text"
|
type="text"
|
||||||
size="small">
|
size="small"
|
||||||
|
>
|
||||||
{{ scope.row.en2NewCount }}
|
{{ scope.row.en2NewCount }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="totalActiveCount"
|
<el-table-column
|
||||||
align="center"
|
prop="totalActiveCount"
|
||||||
label="全服公会活跃度" />
|
align="center"
|
||||||
|
label="全服公会活跃度"
|
||||||
|
/>
|
||||||
|
|
||||||
<el-table-column align="center"
|
<el-table-column align="center" label="阿拉伯公会活跃度" width="">
|
||||||
label="阿拉伯公会活跃度"
|
|
||||||
width="">
|
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button @click="
|
<el-button
|
||||||
|
@click="
|
||||||
detailsTitle = '阿拉伯公会活跃度' + scope.row.date;
|
detailsTitle = '阿拉伯公会活跃度' + scope.row.date;
|
||||||
edi(scope.row.arActiveCountDetail, true);
|
edi(scope.row.arActiveCountDetail, true);
|
||||||
"
|
"
|
||||||
type="text"
|
type="text"
|
||||||
size="small">
|
size="small"
|
||||||
|
>
|
||||||
{{ scope.row.arActiveCount }}
|
{{ scope.row.arActiveCount }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center"
|
<el-table-column align="center" label="英语区活跃度" width="">
|
||||||
label="英语区活跃度"
|
|
||||||
width="">
|
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button @click="
|
<el-button
|
||||||
|
@click="
|
||||||
detailsTitle = '英语区活跃度' + scope.row.date;
|
detailsTitle = '英语区活跃度' + scope.row.date;
|
||||||
edi(scope.row.enActiveCountDetail, true);
|
edi(scope.row.enActiveCountDetail, true);
|
||||||
"
|
"
|
||||||
type="text"
|
type="text"
|
||||||
size="small">
|
size="small"
|
||||||
|
>
|
||||||
{{ scope.row.enActiveCount }}
|
{{ scope.row.enActiveCount }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center"
|
<el-table-column align="center" label="华语区活跃度" width="">
|
||||||
label="华语区活跃度"
|
|
||||||
width="">
|
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button @click="
|
<el-button
|
||||||
|
@click="
|
||||||
detailsTitle = '华语区活跃度' + scope.row.date;
|
detailsTitle = '华语区活跃度' + scope.row.date;
|
||||||
edi(scope.row.zhActiveCountDetail, true);
|
edi(scope.row.zhActiveCountDetail, true);
|
||||||
"
|
"
|
||||||
type="text"
|
type="text"
|
||||||
size="small">
|
size="small"
|
||||||
|
>
|
||||||
{{ scope.row.zhActiveCount }}
|
{{ scope.row.zhActiveCount }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center"
|
<el-table-column align="center" label="土耳其区活跃度" width="">
|
||||||
label="土耳其区活跃度"
|
|
||||||
width="">
|
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button @click="
|
<el-button
|
||||||
|
@click="
|
||||||
detailsTitle = '土耳其区活跃度' + scope.row.date;
|
detailsTitle = '土耳其区活跃度' + scope.row.date;
|
||||||
edi(scope.row.trActiveCountDetail, true);
|
edi(scope.row.trActiveCountDetail, true);
|
||||||
"
|
"
|
||||||
type="text"
|
type="text"
|
||||||
size="small">
|
size="small"
|
||||||
|
>
|
||||||
{{ scope.row.trActiveCount }}
|
{{ scope.row.trActiveCount }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center"
|
<el-table-column align="center" label="英语2区活跃度" width="">
|
||||||
label="英语2区活跃度"
|
|
||||||
width="">
|
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button @click="
|
<el-button
|
||||||
|
@click="
|
||||||
detailsTitle = '英语2区活跃度' + scope.row.date;
|
detailsTitle = '英语2区活跃度' + scope.row.date;
|
||||||
edi(scope.row.en2ActiveCountDetail, true);
|
edi(scope.row.en2ActiveCountDetail, true);
|
||||||
"
|
"
|
||||||
type="text"
|
type="text"
|
||||||
size="small">
|
size="small"
|
||||||
|
>
|
||||||
{{ scope.row.en2ActiveCount }}
|
{{ scope.row.en2ActiveCount }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -177,54 +181,70 @@
|
|||||||
/> -->
|
/> -->
|
||||||
|
|
||||||
<!-- 详情 -->
|
<!-- 详情 -->
|
||||||
<el-dialog v-model="detailsDialog"
|
<el-dialog v-model="detailsDialog" :title="detailsTitle" width="50%" center>
|
||||||
:title="detailsTitle"
|
|
||||||
width="50%"
|
|
||||||
center>
|
|
||||||
<!-- 内表格 -->
|
<!-- 内表格 -->
|
||||||
<el-table v-loading="loading"
|
<el-table
|
||||||
:data="tableDataIn"
|
v-loading="loading"
|
||||||
border
|
:data="tableDataIn"
|
||||||
style="width: 100%; margin-top: 25px">
|
border
|
||||||
<el-table-column prop="date"
|
style="width: 100%; margin-top: 25px"
|
||||||
align="center"
|
>
|
||||||
label="日期" />
|
<el-table-column prop="date" align="center" label="日期" />
|
||||||
<el-table-column prop="endDate"
|
<el-table-column prop="endDate" align="center" label="结束时间" />
|
||||||
align="center"
|
<el-table-column prop="guildId" align="center" label="公会ID" />
|
||||||
label="结束时间" />
|
<el-table-column prop="ownerErbanNo" align="center" label="公会长ID" />
|
||||||
<el-table-column prop="guildId"
|
<el-table-column
|
||||||
align="center"
|
prop="ownerRegionName"
|
||||||
label="公会ID" />
|
align="center"
|
||||||
<el-table-column prop="ownerErbanNo"
|
label="公会长所属国家"
|
||||||
align="center"
|
/>
|
||||||
label="公会长ID" />
|
<el-table-column prop="operatorName" align="center" label="公会负责人" />
|
||||||
<el-table-column prop="ownerRegionName"
|
<el-table-column
|
||||||
align="center"
|
prop="activeMemberCount"
|
||||||
label="公会长所属国家" />
|
align="center"
|
||||||
<el-table-column prop="operatorName"
|
label="本周收礼主播数"
|
||||||
align="center"
|
/>
|
||||||
label="公会负责人" />
|
<el-table-column
|
||||||
<el-table-column prop="activeMemberCount"
|
prop="guildGoldFlow"
|
||||||
align="center"
|
align="center"
|
||||||
label="本周收礼主播数" />
|
label="本周公会钻石流水"
|
||||||
<el-table-column prop="guildGoldFlow"
|
>
|
||||||
align="center"
|
<template v-slot="scope">
|
||||||
label="本周公会钻石流水" />
|
{{
|
||||||
<el-table-column prop="guildDiamondFlow"
|
formattedNumber(scope.row.guildGoldFlow)
|
||||||
align="center"
|
}}
|
||||||
label="本周公会金币流水" />
|
</template>
|
||||||
<el-table-column prop="lastGuildGoldFlow"
|
</el-table-column>
|
||||||
align="center"
|
<el-table-column
|
||||||
label="上周公会钻石流水"
|
prop="guildDiamondFlow"
|
||||||
v-if="detailsIsShow" />
|
align="center"
|
||||||
<el-table-column prop="guildGoldFlowWow"
|
label="本周公会金币流水"
|
||||||
align="center"
|
>
|
||||||
label="周环比"
|
<template v-slot="scope">
|
||||||
v-if="detailsIsShow">
|
{{
|
||||||
|
formattedNumber(scope.row.guildDiamondFlow)
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="lastGuildGoldFlow"
|
||||||
|
align="center"
|
||||||
|
label="上周公会钻石流水"
|
||||||
|
v-if="detailsIsShow"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="guildGoldFlowWow"
|
||||||
|
align="center"
|
||||||
|
label="周环比"
|
||||||
|
v-if="detailsIsShow"
|
||||||
|
>
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
{{
|
{{
|
||||||
scope.row.lastGuildGoldFlow === 0 ? '--'
|
scope.row.lastGuildGoldFlow === 0
|
||||||
: formatPercentage(scope.row.guildGoldFlow / scope.row.lastGuildGoldFlow) + '%'
|
? "--"
|
||||||
|
: formatPercentage(
|
||||||
|
scope.row.guildGoldFlow / scope.row.lastGuildGoldFlow
|
||||||
|
) + "%"
|
||||||
}}
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -232,9 +252,9 @@
|
|||||||
<!-- 操作 -->
|
<!-- 操作 -->
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary"
|
<el-button type="primary" class="primary" @click="detailsDialog = false"
|
||||||
class="primary"
|
>关闭</el-button
|
||||||
@click="detailsDialog = false">关闭</el-button>
|
>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -245,7 +265,7 @@ import { dateFormat } from "@/utils/system-helper";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
export default {
|
export default {
|
||||||
name: "guildStatisticsData",
|
name: "guildStatisticsData",
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
// 查询条件
|
// 查询条件
|
||||||
@@ -265,12 +285,23 @@ export default {
|
|||||||
detailsIsShow: false,
|
detailsIsShow: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created () {
|
created() {
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
// 千分位
|
||||||
|
formattedNumber() {
|
||||||
|
return (num) => {
|
||||||
|
if (num === null || num === undefined) return "";
|
||||||
|
return Math.floor(num)
|
||||||
|
.toString()
|
||||||
|
.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 查询
|
// 查询
|
||||||
getData () {
|
getData() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let time = this.inquire.time;
|
let time = this.inquire.time;
|
||||||
let startTime = null;
|
let startTime = null;
|
||||||
@@ -301,19 +332,19 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 详情
|
// 详情
|
||||||
edi (res, type) {
|
edi(res, type) {
|
||||||
this.detailsIsShow = type;
|
this.detailsIsShow = type;
|
||||||
this.tableDataIn = JSON.parse(res);
|
this.tableDataIn = JSON.parse(res);
|
||||||
this.detailsDialog = true;
|
this.detailsDialog = true;
|
||||||
},
|
},
|
||||||
formatPercentage (value) {
|
formatPercentage(value) {
|
||||||
return parseFloat((value * 100).toFixed(2));
|
return parseFloat((value * 100).toFixed(2));
|
||||||
},
|
},
|
||||||
// 分页导航
|
// 分页导航
|
||||||
handleSizeChange () {
|
handleSizeChange() {
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
handleCurrentChange () {
|
handleCurrentChange() {
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -364,4 +395,4 @@ export default {
|
|||||||
margin: -25px 0 20px 0px;
|
margin: -25px 0 20px 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Reference in New Issue
Block a user