-
+
{{
scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
@@ -232,32 +259,39 @@ onMounted(async function () {
{{
- scope.row.free12 +
- scope.row.free6 +
- scope.row.coreJb +
- scope.row.buyJb
+ (scope.row.free12 +
+ scope.row.free6 +
+ scope.row.coreJb +
+ scope.row.buyJb) /
+ 100
}}
- {{ Math.abs(scope.row.free6 + scope.row.free12) }}
+ {{
+ Math.abs(scope.row.free6 + scope.row.free12) / 100
+ }}
- {{ Math.abs(scope.row.buyJb) }}
+ {{ Math.abs(scope.row.buyJb) / 100 }}
- {{ Math.abs(scope.row.coreJb) }}
+ {{ Math.abs(scope.row.coreJb) / 100 }}
+
+
+
+
+ {{ scope.row.rcoin / 100 }}
-
- {{ Math.abs(scope.row.scoin) }}
+ {{ Math.abs(scope.row.scoin) / 100 }}
@@ -266,17 +300,42 @@ onMounted(async function () {
diff --git a/gold-system/src/views/workspace/index.vue b/gold-system/src/views/workspace/index.vue
index b922361..9200ecc 100644
--- a/gold-system/src/views/workspace/index.vue
+++ b/gold-system/src/views/workspace/index.vue
@@ -89,10 +89,22 @@ const get = async function () {
getAreaRank();
getMiddleBar();
// 发送POST请求
- const result1 = await API.post("/hwjb/statistics/getSumCoin", {});
- const result2 = await API.post("/hwjb/statistics/a", {});
- const result3 = await API.post("/hwjb/statistics/getYearConsumeCoin", {});
- const result4 = await API.post("/hwjb/statistics/getDayConsumeCoin", {});
+ const result1 = await API.post(
+ "http://54.251.137.151:10702/statistics/getSumCoin",
+ {}
+ );
+ const result2 = await API.post(
+ "http://54.251.137.151:10702/statistics/a",
+ {}
+ );
+ const result3 = await API.post(
+ "http://54.251.137.151:10702/statistics/getYearConsumeCoin",
+ {}
+ );
+ const result4 = await API.post(
+ "http://54.251.137.151:10702/statistics/getDayConsumeCoin",
+ {}
+ );
// const result5 = await API.post(
// "http://192.168.8.93:10010/statistics/getMediumAreaPay",
// {}
@@ -110,7 +122,10 @@ const get = async function () {
// "http://192.168.8.93:10010/statistics/getMediuConsumeCoin",
// {}
// );
- const result9 = await API.post("/hwjb/statistics/b", {});
+ const result9 = await API.post(
+ "http://54.251.137.151:10702/statistics/b",
+ {}
+ );
// 将响应结果存储到响应式数据中
getSumCoin.value = result1.data;
@@ -129,15 +144,20 @@ const get = async function () {
option3Data.value = [
{
value: Math.abs(statistics.value.rechargeSumCoin),
- name: "永久金币" + " | " + statistics.value.rechargeSumCoin,
+ name:
+ "永久金币" +
+ " | " +
+ formatNum(statistics.value.rechargeSumCoin / 100),
},
{
value: Math.abs(statistics.value.freeSumCoin),
- name: "免费金币" + " | " + statistics.value.freeSumCoin,
+ name:
+ "免费金币" + " | " + formatNum(statistics.value.freeSumCoin / 100),
},
{
value: Math.abs(statistics.value.taskSumCoin),
- name: "任务金币" + " | " + statistics.value.taskSumCoin,
+ name:
+ "任务金币" + " | " + formatNum(statistics.value.taskSumCoin / 100),
},
];
@@ -147,21 +167,23 @@ const get = async function () {
name:
"永久金币" +
" | " +
- Math.abs(getYearConsumeCoin.value.yearSumRechargeCoin),
+ formatNum(
+ Math.abs(getYearConsumeCoin.value.yearSumRechargeCoin / 100)
+ ),
},
{
value: Math.abs(getYearConsumeCoin.value.yearSumFreeCoin),
name:
"免费金币" +
" | " +
- Math.abs(getYearConsumeCoin.value.yearSumFreeCoin),
+ formatNum(Math.abs(getYearConsumeCoin.value.yearSumFreeCoin / 100)),
},
{
value: Math.abs(getYearConsumeCoin.value.yearSumTaskCoin),
name:
"任务金币" +
" | " +
- Math.abs(getYearConsumeCoin.value.yearSumTaskCoin),
+ formatNum(Math.abs(getYearConsumeCoin.value.yearSumTaskCoin / 100)),
},
];
console.log("option4Data", option4Data.value);
@@ -169,15 +191,16 @@ const get = async function () {
option5Data.value = [
{
value: Math.abs(getSumCoin.value.todayRecharge),
- name: "永久金币" + " | " + getSumCoin.value.todayRecharge,
+ name:
+ "永久金币" + " | " + formatNum(getSumCoin.value.todayRecharge / 100),
},
{
value: Math.abs(getSumCoin.value.todayFree),
- name: "免费金币" + " | " + getSumCoin.value.todayFree,
+ name: "免费金币" + " | " + formatNum(getSumCoin.value.todayFree / 100),
},
{
value: Math.abs(getSumCoin.value.todayTask),
- name: "任务金币" + " | " + getSumCoin.value.todayTask,
+ name: "任务金币" + " | " + formatNum(getSumCoin.value.todayTask / 100),
},
];
console.log("option5Data", option5Data.value);
@@ -353,7 +376,7 @@ const get = async function () {
// 获取中间柱状图数据
const getMiddleBar = async function () {
const result = await API.post(
- "/hwjb/statistics/getCoinTime",
+ "http://54.251.137.151:10702/statistics/getCoinTime",
getMiddleBarObj.value
);
@@ -364,16 +387,15 @@ const getMiddleBar = async function () {
middleCategory.value = getMiddleBarData.value.map((item) =>
item.day == null ? item.month : item.day.substring(5, 10)
);
- middleRecharge.value = getMiddleBarData.value.map((item) =>
- Math.abs(item.rechargeSumCoin)
+ middleRecharge.value = getMiddleBarData.value.map(
+ (item) => Math.abs(item.rechargeSumCoin) / 100
);
- middleFree.value = getMiddleBarData.value.map((item) =>
- Math.abs(item.freeSumCoin)
+ middleFree.value = getMiddleBarData.value.map(
+ (item) => Math.abs(item.freeSumCoin) / 100
);
- middleTask.value = getMiddleBarData.value.map((item) =>
- Math.abs(item.taskSumCoin)
+ middleTask.value = getMiddleBarData.value.map(
+ (item) => Math.abs(item.taskSumCoin) / 100
);
-
middleTotalRecharge.value = 0;
middleTotalFree.value = 0;
middleTotalTask.value = 0;
@@ -555,7 +577,7 @@ const getMiddleBar = async function () {
// 获取门店排名
const getAreaRank = async function () {
const result = await API.post(
- "/hwjb/statistics/getMee",
+ "http://54.251.137.151:10702/statistics/getMee",
getAreaRankObj.value
);
@@ -866,12 +888,21 @@ const changePlatform = function () {
// 计算属性
// 格式化数字
+// const formatNum = function (val) {
+// // console.log(val);
+// if (val === undefined) {
+// return ""; // 或者返回其他合适的默认值,避免调用toString报错
+// } else {
+// return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
+// }
+// };
const formatNum = function (val) {
- // console.log(val);
if (val === undefined) {
- return ""; // 或者返回其他合适的默认值,避免调用toString报错
+ return "";
} else {
- return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
+ // 四舍五入保留两位小数
+ const roundedVal = parseFloat(val).toFixed(2);
+ return roundedVal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
};
@@ -966,7 +997,9 @@ onMounted(async function () {
},
series: [
{
- name: "全年累计金币数(个)\n" + Math.abs(statistics.value.totalSumCoin),
+ name:
+ "全年累计金币数(个)\n" +
+ formatNum(Math.abs(statistics.value.totalSumCoin / 100)),
type: "pie",
radius: ["60%", "80%"],
avoidLabelOverlap: false,
@@ -1010,7 +1043,7 @@ onMounted(async function () {
{
name:
"全年累计消耗金币数(个)\n" +
- Math.abs(getYearConsumeCoin.value.yearsumCoin),
+ formatNum(Math.abs(getYearConsumeCoin.value.yearsumCoin / 100)),
type: "pie",
radius: ["60%", "80%"],
avoidLabelOverlap: false,
@@ -1062,7 +1095,9 @@ onMounted(async function () {
},
series: [
{
- name: "当前金币余量(个)\n" + Math.abs(getSumCoin.value.todayTotalCoin),
+ name:
+ "当前金币余量(个)\n" +
+ formatNum(Math.abs(getSumCoin.value.todayTotalCoin / 100)),
type: "pie",
radius: ["60%", "80%"],
avoidLabelOverlap: false,
@@ -1112,12 +1147,15 @@ onMounted(async function () {
当前金币余量
- {{ formatNum(getSumCoin.todayTotalCoin) }}
+ {{ formatNum(getSumCoin.todayTotalCoin / 100) }}
-
较前一天 {{ formatNum(getSumCoin.coinDifference) }}
+
较前一天
+ {{ formatNum(getSumCoin.coinDifference / 100) }}
-
较前一天 {{ formatNum(getSumCoin.coinDifference) }}
+
较前一天
+ {{ formatNum(getSumCoin.coinDifference / 100) }}
-
较前一天 {{ formatNum(getSumCoin.coinDifference) }}
+
较前一天
+ {{ formatNum(getSumCoin.coinDifference / 100) }}
永久{{ formatNum(getSumCoin.todayRecharge) }} 免费{{
+ >永久{{ formatNum(getSumCoin.todayRecharge / 100) }} 免费{{
formatNum(getSumCoin.todayFree)
}}
任务{{ formatNum(getSumCoin.todayTask) }}
- 免费金币:6月到期 | {{ formatNum(statistics.free6SumCoin) }} ;
- 12月到期 | {{ formatNum(statistics.free12SumCoin) }}
+ 免费金币:6月到期 |
+ {{ formatNum(statistics.free6SumCoin / 100) }} ; 12月到期 |
+ {{ formatNum(statistics.free12SumCoin / 100) }}
@@ -1161,35 +1206,43 @@ onMounted(async function () {
全年累计金币数
- {{ formatNum(Math.abs(statistics.totalSumCoin)) }}
+ {{ formatNum(Math.abs(statistics.totalSumCoin) / 100) }}
折合新币累计金额
- {{ formatNum(Math.abs(statistics.rechargeSumCoin)) }}
+ {{ formatNum(Math.abs(statistics.rechargeSumCoin) / 100) }}
昨日新增
- {{ formatNum(Math.abs(statistics.totalYesterdaySumCoin)) }}
- ,其中充值
- {{ formatNum(Math.abs(statistics.rechargeYesterdaySumCoin)) }}
-
+ {{ formatNum(Math.abs(statistics.totalYesterdaySumCoin) / 100) }}
+ ,其中充值{{
+ formatNum(Math.abs(statistics.rechargeYesterdaySumCoin) / 100)
+ }}
全年累计消耗金币数
- {{ formatNum(Math.abs(getYearConsumeCoin.yearsumCoin)) }}
+ {{ formatNum(Math.abs(getYearConsumeCoin.yearsumCoin) / 100) }}
- 消费 {{ formatNum(Math.abs(getYearConsumeCoin.yearConsumeCoin)) }};
- 退款 {{ formatNum(Math.abs(getYearConsumeCoin.yearRefundCoin)) }}
+ 消费
+ {{ formatNum(Math.abs(getYearConsumeCoin.yearConsumeCoin) / 100) }};
+ 退款
+ {{ formatNum(Math.abs(getYearConsumeCoin.yearRefundCoin) / 100) }}
昨日新增消耗
- {{ formatNum(Math.abs(getDayConsumeCoin.daysumCoin)) }} ; 消费
- {{ formatNum(Math.abs(getDayConsumeCoin.dayConsumeCoin)) }} ; 退款
- {{ formatNum(Math.abs(getDayConsumeCoin.dayRefundCoin)) }}昨日新增消耗{{
+ formatNum(Math.abs(getDayConsumeCoin.daysumCoin) / 100)
+ }}
+ ; 消费{{
+ formatNum(Math.abs(getDayConsumeCoin.dayConsumeCoin) / 100)
+ }}
+ ; 退款{{
+ formatNum(Math.abs(getDayConsumeCoin.dayRefundCoin) / 100)
+ }}
@@ -1257,11 +1310,12 @@ onMounted(async function () {
昨日充值人数
- {{ formatNum(Math.abs(statistics.rechargeCountYesterday)) }}
- ,其中首充
- {{ formatNum(Math.abs(statistics.firstRechargeCountYesterday)) }}
- 人昨日充值人数{{
+ formatNum(Math.abs(statistics.rechargeCountYesterday))
+ }}
+ ,其中首充{{
+ formatNum(Math.abs(statistics.firstRechargeCountYesterday))
+ }}人
@@ -1354,9 +1408,19 @@ onMounted(async function () {
@@ -1372,7 +1436,7 @@ onMounted(async function () {
}}
{{ item.name }}
{{
- formatNum(item.value)
+ formatNum(item.value / 100)
}}
@@ -1441,7 +1505,7 @@ onMounted(async function () {
}}
{{ item.name }}
{{
- formatNum(item.value)
+ formatNum(item.value / 100)
}}