diff --git a/src/views/dailyCoinStatistics/dailyCoinStatistics.vue b/src/views/dailyCoinStatistics/dailyCoinStatistics.vue
index e0a7b03..c2ce668 100644
--- a/src/views/dailyCoinStatistics/dailyCoinStatistics.vue
+++ b/src/views/dailyCoinStatistics/dailyCoinStatistics.vue
@@ -5,8 +5,9 @@
开始时间
+ type="date"
+ placeholder="开始时间"
+ format="YYYY-MM-DD">
@@ -14,8 +15,9 @@
结束时间
+ type="date"
+ placeholder="结束时间"
+ format="YYYY-MM-DD">
@@ -237,7 +239,7 @@ export default {
loading: false,
// 查询条件
inquire: {
- time: [],
+ time: this.calculateLastSevenDays(),
},
// 表格
tableData: [{ x: "x" }],
@@ -252,7 +254,7 @@ export default {
};
},
created () {
- // this.getData();
+ this.getData();
},
computed: {
// 千分位
@@ -265,6 +267,13 @@ export default {
},
methods: {
+ // 默认七天
+ calculateLastSevenDays () {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+ return [start, end];
+ },
totalDiamonds (row) {
const subDiamond = Number(row.subDiamond || 0);
const addDiamond = Number(row.addDiamond || 0);
diff --git a/src/views/data/guildStatisticsData.vue b/src/views/data/guildStatisticsData.vue
index 98fb9bc..f217aeb 100644
--- a/src/views/data/guildStatisticsData.vue
+++ b/src/views/data/guildStatisticsData.vue
@@ -1,162 +1,166 @@
-
-
+
+
{{ scope.row.date }} ~ {{ scope.row.endDate }}
-
+
-
+
-
+ type="text"
+ size="small"
+ >
{{ scope.row.arNewCount }}
-
+
-
+ type="text"
+ size="small"
+ >
{{ scope.row.enNewCount }}
-
+
-
+ type="text"
+ size="small"
+ >
{{ scope.row.zhNewCount }}
-
+
-
+ type="text"
+ size="small"
+ >
{{ scope.row.trNewCount }}
-
+
-
+ type="text"
+ size="small"
+ >
{{ scope.row.en2NewCount }}
-
+
-
+
-
+ type="text"
+ size="small"
+ >
{{ scope.row.arActiveCount }}
-
+
-
+ type="text"
+ size="small"
+ >
{{ scope.row.enActiveCount }}
-
+
-
+ type="text"
+ size="small"
+ >
{{ scope.row.zhActiveCount }}
-
+
-
+ type="text"
+ size="small"
+ >
{{ scope.row.trActiveCount }}
-
+
-
+ type="text"
+ size="small"
+ >
{{ scope.row.en2ActiveCount }}
@@ -177,54 +181,70 @@
/> -->
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ {{
+ formattedNumber(scope.row.guildGoldFlow)
+ }}
+
+
+
+
+ {{
+ formattedNumber(scope.row.guildDiamondFlow)
+ }}
+
+
+
+
{{
- scope.row.lastGuildGoldFlow === 0 ? '--'
- : formatPercentage(scope.row.guildGoldFlow / scope.row.lastGuildGoldFlow) + '%'
+ scope.row.lastGuildGoldFlow === 0
+ ? "--"
+ : formatPercentage(
+ scope.row.guildGoldFlow / scope.row.lastGuildGoldFlow
+ ) + "%"
}}
@@ -232,9 +252,9 @@
@@ -245,7 +265,7 @@ import { dateFormat } from "@/utils/system-helper";
import { ElMessage } from "element-plus";
export default {
name: "guildStatisticsData",
- data () {
+ data() {
return {
loading: false,
// 查询条件
@@ -265,12 +285,23 @@ export default {
detailsIsShow: false,
};
},
- created () {
+ created() {
this.getData();
},
+ computed: {
+ // 千分位
+ formattedNumber() {
+ return (num) => {
+ if (num === null || num === undefined) return "";
+ return Math.floor(num)
+ .toString()
+ .replace(/\B(?=(\d{3})+(?!\d))/g, ",");
+ };
+ },
+ },
methods: {
// 查询
- getData () {
+ getData() {
this.loading = true;
let time = this.inquire.time;
let startTime = null;
@@ -301,19 +332,19 @@ export default {
});
},
// 详情
- edi (res, type) {
+ edi(res, type) {
this.detailsIsShow = type;
this.tableDataIn = JSON.parse(res);
this.detailsDialog = true;
},
- formatPercentage (value) {
+ formatPercentage(value) {
return parseFloat((value * 100).toFixed(2));
},
// 分页导航
- handleSizeChange () {
+ handleSizeChange() {
this.getData();
},
- handleCurrentChange () {
+ handleCurrentChange() {
this.getData();
},
},
@@ -364,4 +395,4 @@ export default {
margin: -25px 0 20px 0px;
}
}
-
\ No newline at end of file
+