From ec69266e5df793265aa778a099710eb3d140903d Mon Sep 17 00:00:00 2001
From: yujiacong <1016029365@qq.com>
Date: Thu, 28 Aug 2025 10:54:27 +0800
Subject: [PATCH] =?UTF-8?q?=E6=AF=8F=E6=97=A5=E9=87=91=E5=B8=81=E7=BB=9F?=
=?UTF-8?q?=E8=AE=A1=20-=20=E9=BB=98=E8=AE=A4=E5=8A=A0=E8=BD=BD=E4=B8=83?=
=?UTF-8?q?=E5=A4=A9=E6=95=B0=E6=8D=AE=EF=BC=8C=E5=85=AC=E4=BC=9A=E7=BB=9F?=
=?UTF-8?q?=E8=AE=A1=E6=95=B0=E6=8D=AE=20-=20=E5=A2=9E=E5=8A=A0=E5=8D=83?=
=?UTF-8?q?=E5=88=86=E4=BD=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../dailyCoinStatistics.vue | 21 +-
src/views/data/guildStatisticsData.vue | 289 ++++++++++--------
2 files changed, 175 insertions(+), 135 deletions(-)
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
+