Browse Source

合并dev

zln
donghaolin 1 month ago
parent
commit
07ab46dcfa
  1. 34
      gold-system/src/views/audit/rechargeAudit.vue
  2. 8
      gold-system/src/views/audit/refundAudit.vue
  3. 11
      gold-system/src/views/consume/addConsume.vue
  4. 4
      gold-system/src/views/consume/allConsume.vue
  5. 76
      gold-system/src/views/login.vue
  6. 8
      gold-system/src/views/permissions/index.vue
  7. 6
      gold-system/src/views/recharge/addRecharge.vue
  8. 104
      gold-system/src/views/recharge/adminRecharge.vue
  9. 87
      gold-system/src/views/recharge/allRecharge.vue
  10. 6
      gold-system/src/views/refund/addRefund.vue
  11. 4
      gold-system/src/views/refund/allRefund.vue
  12. 515
      gold-system/src/views/usergold/index.vue
  13. 4
      gold-system/src/views/usergoldInfo/index.vue
  14. 100
      gold-system/src/views/workspace/index.vue

34
gold-system/src/views/audit/rechargeAudit.vue

@ -7,12 +7,6 @@ import axios from "axios";
import moment from "moment"; import moment from "moment";
import API from "../../api/index.js"; import API from "../../api/index.js";
// //
//
const admin = ref({
adminId: 1,
name: "赵刚",
area: "中国",
});
// //
const adminData = ref({}); const adminData = ref({});
@ -227,12 +221,12 @@ const search = function () {
}; };
// //
const reset = function () { const reset = function () {
rechargeVo.value.activityId = "";
rechargeVo.value.jwcode = "";
rechargeVo.value.payWay = "";
rechargeVo.value.area = "";
rechargeVo.value.startDate = "";
rechargeVo.value.endDate = "";
delete rechargeVo.value.activityId;
delete rechargeVo.value.jwcode;
delete rechargeVo.value.payWay;
delete rechargeVo.value.area;
delete rechargeVo.value.startDate;
delete rechargeVo.value.endDate;
getTime.value = {}; getTime.value = {};
}; };
// //
@ -419,6 +413,7 @@ const pass = function (row) {
passObj.value.paidGold = row.paidGold; passObj.value.paidGold = row.paidGold;
passObj.value.freeGold = row.freeGold; passObj.value.freeGold = row.freeGold;
passObj.value.adminName = adminData.value.adminName; passObj.value.adminName = adminData.value.adminName;
console.log("通过对象", passObj.value); console.log("通过对象", passObj.value);
}; };
@ -427,6 +422,7 @@ const passConfirm = async function () {
try { try {
console.log("通过对象", passObj.value); console.log("通过对象", passObj.value);
// POST // POST
// passObj.value.flag = 0;
const result = await API.post( const result = await API.post(
"http://54.251.137.151:10702/audit/audit/goldedit", "http://54.251.137.151:10702/audit/audit/goldedit",
passObj.value passObj.value
@ -657,11 +653,11 @@ const handleSortChange = (column) => {
<el-tab-pane label="已通过" name="pass"></el-tab-pane> <el-tab-pane label="已通过" name="pass"></el-tab-pane>
<el-tab-pane label="已驳回" name="reject"></el-tab-pane> <el-tab-pane label="已驳回" name="reject"></el-tab-pane>
<!-- <div>
<div>
总条数{{ trueCount }}总金币数{{ 总条数{{ trueCount }}总金币数{{
trueGold trueGold
}}金币永久金币{{ trueRGold }}金币免费金币{{ trueFGold }}金币 }}金币永久金币{{ trueRGold }}金币免费金币{{ trueFGold }}金币
</div> -->
</div>
</el-tabs> </el-tabs>
<div style="height: 540px; overflow-y: auto"> <div style="height: 540px; overflow-y: auto">
<el-table <el-table
@ -695,7 +691,11 @@ const handleSortChange = (column) => {
label="充值金额" label="充值金额"
sortable="“custom”" sortable="“custom”"
width="110px" width="110px"
/>
>
<template #default="scope">
{{ scope.row.rechargeGold }}
</template>
</el-table-column>
<el-table-column <el-table-column
prop="rechargeWay" prop="rechargeWay"
label="充值方式" label="充值方式"
@ -708,7 +708,7 @@ const handleSortChange = (column) => {
width="110px" width="110px"
> >
<template #default="scope"> <template #default="scope">
{{ scope.row.paidGold }}
{{ scope.row.paidGold / 100 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -718,7 +718,7 @@ const handleSortChange = (column) => {
width="110px" width="110px"
> >
<template #default="scope"> <template #default="scope">
{{ scope.row.freeGold }}
{{ scope.row.freeGold / 100 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column

8
gold-system/src/views/audit/refundAudit.vue

@ -63,8 +63,8 @@ const activeName = ref("all");
// 退 // 退
const refundType = [ const refundType = [
{ {
value: "退款金币",
label: "退款金币",
value: "退款商品",
label: "退款商品",
}, },
]; ];
@ -603,11 +603,11 @@ const handleSortChange = (column) => {
<el-tab-pane label="待审核" name="wait"></el-tab-pane> <el-tab-pane label="待审核" name="wait"></el-tab-pane>
<el-tab-pane label="已通过" name="pass"></el-tab-pane> <el-tab-pane label="已通过" name="pass"></el-tab-pane>
<el-tab-pane label="已驳回" name="reject"></el-tab-pane> <el-tab-pane label="已驳回" name="reject"></el-tab-pane>
<!-- <div>
<div>
退款记录条数{{ Math.abs(trueCount) }},退款金币总数{{ 退款记录条数{{ Math.abs(trueCount) }},退款金币总数{{
Math.abs(trueGold) Math.abs(trueGold)
}} }}
</div> -->
</div>
</el-tabs> </el-tabs>
<!-- 设置表格容器的高度和滚动样式 --> <!-- 设置表格容器的高度和滚动样式 -->
<div style="height: 540px; overflow-y: auto"> <div style="height: 540px; overflow-y: auto">

11
gold-system/src/views/consume/addConsume.vue

@ -120,7 +120,10 @@ const rules = reactive({
rechargeCoin: [ rechargeCoin: [
{ required: true, message: "请输入免费金币", trigger: "blur" }, { required: true, message: "请输入免费金币", trigger: "blur" },
], ],
allGold: [{ validator: checkFreeGoldRadio, trigger: "blur" }],
allGold: [
{ required: true, message: "消费金币总数不能为空", trigger: "blur" },
{ validator: checkFreeGoldRadio, trigger: "blur" },
],
}); });
// //
const delteConsume = function () { const delteConsume = function () {
@ -443,7 +446,7 @@ onMounted(async function () {
<el-form-item label="历史金币总数"> <el-form-item label="历史金币总数">
<!-- 检查 user.totalRechargeGold 是否为有效的数字 --> <!-- 检查 user.totalRechargeGold 是否为有效的数字 -->
<p v-if="!isNaN(Number(user.totalRechargeGold))"> <p v-if="!isNaN(Number(user.totalRechargeGold))">
{{ Number(user.totalRechargeGold) / 100 }}
{{ Number(user.totalRechargeGold / 100) }}
</p> </p>
<!-- 如果不是有效的数字显示默认值 --> <!-- 如果不是有效的数字显示默认值 -->
<p v-else></p> <p v-else></p>
@ -500,11 +503,11 @@ onMounted(async function () {
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-form-item label="待审核">
<!-- <el-form-item label="待审核">
<p style="color: #2fa1ff"> <p style="color: #2fa1ff">
{{ user.A }} {{ user.A }}
</p> </p>
</el-form-item>
</el-form-item> -->
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>

4
gold-system/src/views/consume/allConsume.vue

@ -413,13 +413,13 @@ const handleSortChange = (column) => {
<el-row> <el-row>
<el-col> <el-col>
<el-card> <el-card>
<!-- <div>
<div>
消费金币总数{{ Math.abs(totalCoin) }}永久金币{{ 消费金币总数{{ Math.abs(totalCoin) }}永久金币{{
Math.abs(rechargeCoin) Math.abs(rechargeCoin)
}}免费金币{{ Math.abs(freeCoin) }}任务金币{{ }}免费金币{{ Math.abs(freeCoin) }}任务金币{{
Math.abs(taskCoin) Math.abs(taskCoin)
}} }}
</div> -->
</div>
<!-- 设置表格容器的高度和滚动样式 --> <!-- 设置表格容器的高度和滚动样式 -->
<div style="height: 576px; overflow-y: auto"> <div style="height: 576px; overflow-y: auto">
<el-table <el-table

76
gold-system/src/views/login.vue

@ -1,72 +1,72 @@
<script setup> <script setup>
import { ref, onMounted, reactive, computed } from 'vue'
import { ElMessage } from 'element-plus'
import axios from 'axios'
import request from '@/util/http'
import { useRouter } from 'vue-router'
import { VscGlobe } from 'vue-icons-plus/vsc'
import { ref, onMounted, reactive, computed } from "vue";
import { ElMessage } from "element-plus";
import axios from "axios";
import request from "@/util/http";
import { useRouter } from "vue-router";
import { VscGlobe } from "vue-icons-plus/vsc";
// //
var url = window.location.href //
var url = window.location.href; //
//machineId= //machineId=
var machineId = null
var machineId = null;
// machineId // machineId
function getMachineId() { function getMachineId() {
var parts = url.split('machineId=')
var parts = url.split("machineId=");
if (parts.length > 1) { if (parts.length > 1) {
machineId = parts[1].split('&')[0] // &
machineId = parts[1].split("&")[0]; // &
} }
// machineId = decodeURIComponent(machineId); //machineId // machineId = decodeURIComponent(machineId); //machineId
console.log('MachineId字符串:', machineId) // machineId
console.log("MachineId字符串:", machineId); // machineId
// machineId // machineId
if (machineId) { if (machineId) {
localStorage.setItem('machineId', machineId)
localStorage.setItem("machineId", machineId);
} }
} }
getMachineId()
getMachineId();
const router = useRouter() //
let formData = new FormData()
const router = useRouter(); //
let formData = new FormData();
// FormData // FormData
// formData.append("jwcode", form.value.jwcode); // formData.append("jwcode", form.value.jwcode);
// formData.append("password", form.value.password); // formData.append("password", form.value.password);
const form = ref({ jwcode: '', password: '', token: '', machineId: machineId })
const form = ref({ jwcode: "", password: "", token: "", machineId: machineId });
// //
const login = async function () { const login = async function () {
try { try {
const result = await request({ const result = await request({
url: '/admin/login',
method: 'post',
data: form.value
})
console.log('resultresult', result)
url: "/admin/login",
method: "post",
data: form.value,
});
console.log("resultresult", result);
if (result.code == 200) { if (result.code == 200) {
localStorage.setItem('token', result.msg)
localStorage.setItem('permission', result.data.permission)
localStorage.setItem("token", result.msg);
localStorage.setItem("permission", result.data.permission);
if ( if (
result.data.permission == '5' ||
result.data.permission == '1' ||
result.data.permission == '2' ||
result.data.permission == '3'
result.data.permission == "5" ||
result.data.permission == "1" ||
result.data.permission == "2" ||
result.data.permission == "3"
) { ) {
router.push('/usergold')
} else if (result.data.permission == '4') {
router.push('/noPermission')
router.push("/workspace");
} else if (result.data.data.permission == "4") {
router.push("/noPermission");
} }
ElMessage.success('登录成功')
console.log('请求成功', result)
ElMessage.success("登录成功");
console.log("请求成功", result);
} else { } else {
form.value.password = ''
form.value.jwcode = ''
ElMessage.error(result.msg)
form.value.password = "";
form.value.jwcode = "";
ElMessage.error(result.msg);
} }
} catch (error) { } catch (error) {
console.log('请求失败', error)
ElMessage.error('登录失败,请检查账号密码')
console.log("请求失败", error);
ElMessage.error("登录失败,请检查账号密码");
// //
} }
}
};
</script> </script>
<template> <template>
<el-row class="login-page"> <el-row class="login-page">

8
gold-system/src/views/permissions/index.vue

@ -435,10 +435,10 @@ onMounted(async function () {
</div> </div>
<div class="head-card-element" style="margin-left: 50px"> <div class="head-card-element" style="margin-left: 50px">
<el-text class="mx-1" size="large">所属部门</el-text>
<el-text class="mx-1" size="large">职位名称</el-text>
<el-select <el-select
v-model="admin.store" v-model="admin.store"
placeholder="请选择部门"
placeholder="请选择职位名称"
style="width: 240px" style="width: 240px"
clearable clearable
> >
@ -489,7 +489,7 @@ onMounted(async function () {
<el-table-column prop="jwcode" label="精网号" /> <el-table-column prop="jwcode" label="精网号" />
<el-table-column prop="name" label="姓名" /> <el-table-column prop="name" label="姓名" />
<el-table-column prop="area" label="所属地区" /> <el-table-column prop="area" label="所属地区" />
<el-table-column prop="store" label="所属部门" />
<el-table-column prop="store" label="职位" />
<el-table-column prop="permission" label="部门权限"> <el-table-column prop="permission" label="部门权限">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.permission === '1'"> 总部管理员 </span> <span v-if="scope.row.permission === '1'"> 总部管理员 </span>
@ -660,7 +660,7 @@ onMounted(async function () {
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="store" label="所属部门:">
<el-form-item prop="store" label="职位:">
<el-input <el-input
v-model="addAdmin.store" v-model="addAdmin.store"
placeholder="请输入职称" placeholder="请输入职称"

6
gold-system/src/views/recharge/addRecharge.vue

@ -1065,7 +1065,7 @@ onMounted(async function () {
<el-form-item label="历史金币总数"> <el-form-item label="历史金币总数">
<!-- 检查 user.totalRechargeGold 是否为有效的数字 --> <!-- 检查 user.totalRechargeGold 是否为有效的数字 -->
<p v-if="!isNaN(Number(user.totalRechargeGold))"> <p v-if="!isNaN(Number(user.totalRechargeGold))">
{{ Number(user.totalRechargeGold) / 100 }}
{{ Number(user.totalRechargeGold/100) }}
</p> </p>
<!-- 如果不是有效的数字显示默认值 --> <!-- 如果不是有效的数字显示默认值 -->
<p v-else></p> <p v-else></p>
@ -1122,11 +1122,11 @@ onMounted(async function () {
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-form-item label="待审核">
<!-- <el-form-item label="待审核">
<p style="color: #2fa1ff"> <p style="color: #2fa1ff">
{{ user.A }} {{ user.A }}
</p> </p>
</el-form-item>
</el-form-item> -->
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>

104
gold-system/src/views/recharge/adminRecharge.vue

@ -85,14 +85,25 @@ const delObj = ref({});
// //
// //
const totalData = ref({
totalmoney: 0,
totalRcoin: 0,
totalFcoin: 0,
});
const trueGold = ref(0);
const trueRGold = ref(0);
const trueFGold = ref(0);
//
const totalmoney = ref(0); const totalmoney = ref(0);
const totalRcoin = ref(0); const totalRcoin = ref(0);
const totalFcoin = ref(0); const totalFcoin = ref(0);
//
const pendingGold = ref(0);
const pendingRGold = ref(0);
const pendingFGold = ref(0);
//
const approvedGold = ref(0);
const approvedRGold = ref(0);
const approvedFGold = ref(0);
//
const rejectedGold = ref(0);
const rejectedRGold = ref(0);
const rejectedFGold = ref(0);
// =========================================================================== // ===========================================================================
// //
const get = async function (val) { const get = async function (val) {
@ -148,18 +159,37 @@ const get = async function (val) {
totalmoney.value = 0; totalmoney.value = 0;
totalRcoin.value = 0; totalRcoin.value = 0;
totalFcoin.value = 0; totalFcoin.value = 0;
} else {
// result2.data[i].flag="" totalData.value = result2.data[i]0
for (let i = 0; i < result2.data.length; i++) {
if (result2.data[i].flag == "已通过") {
totalData.value = result2.data[i];
totalmoney.value = totalData.value.sumRaudit1;
totalRcoin.value = totalData.value.sumRaudit1;
totalFcoin.value = totalData.value.sumRaudit2;
break;
} }
if (result2.data) {
result2.data.forEach((item) => {
switch (item.flag) {
case "待审核":
// item.raudit 0
// item.sumRaudit 0
pendingGold.value = item.sumRaudit || 0;
pendingRGold.value = item.sumRaudit1 || 0;
pendingFGold.value = item.sumRaudit2 || 0;
break;
case "已通过":
approvedGold.value = item.sumRaudit || 0;
approvedRGold.value = item.sumRaudit1 || 0;
approvedFGold.value = item.sumRaudit2 || 0;
break;
case "已驳回":
rejectedGold.value = item.sumRaudit || 0;
rejectedRGold.value = item.sumRaudit1 || 0;
rejectedFGold.value = item.sumRaudit2 || 0;
break;
} }
});
} }
trueGold.value =
pendingGold.value + approvedGold.value + rejectedGold.value;
trueRGold.value =
pendingRGold.value + approvedRGold.value + rejectedRGold.value;
trueFGold.value =
pendingFGold.value + approvedFGold.value + rejectedFGold.value;
// //
console.log("请求成功", result); console.log("请求成功", result);
// //
@ -180,13 +210,13 @@ const search = function () {
}; };
// //
const reset = function () { const reset = function () {
rechargeVo.value.activityId = "";
rechargeVo.value.payWay = "";
rechargeVo.value.area = "";
rechargeVo.value.startDate = "";
rechargeVo.value.endDate = "";
sortField.value = "";
sortOrder.value = "";
delete rechargeVo.value.activityId;
delete rechargeVo.value.payWay;
delete rechargeVo.value.area;
delete rechargeVo.value.startDate;
delete rechargeVo.value.endDate;
delete sortField.value;
delete sortOrder.value;
getTime.value = {}; getTime.value = {};
}; };
// //
@ -249,25 +279,35 @@ const adminAll = function () {
get(); get();
}; };
// //
const adminWait = function () {
const adminWait = async function () {
rechargeVo.value.status = 0; rechargeVo.value.status = 0;
getObj.value.pageNum = 1; getObj.value.pageNum = 1;
get();
await get();
console.log("adminWait"); console.log("adminWait");
trueGold.value = pendingGold.value;
trueRGold.value = pendingRGold.value;
trueFGold.value = pendingFGold.value;
}; };
// //
const adminPass = function () {
const adminPass = async function () {
rechargeVo.value.status = 1; rechargeVo.value.status = 1;
getObj.value.pageNum = 1; getObj.value.pageNum = 1;
get();
await get();
trueGold.value = approvedGold.value;
trueRGold.value = approvedRGold.value;
trueFGold.value = approvedFGold.value;
console.log("adminPass"); console.log("adminPass");
}; };
// //
const adminReject = function () {
const adminReject = async function () {
rechargeVo.value.status = 2; rechargeVo.value.status = 2;
getObj.value.pageNum = 1; getObj.value.pageNum = 1;
get();
await get();
console.log("adminReject"); console.log("adminReject");
trueGold.value = rejectedGold.value;
trueRGold.value = rejectedRGold.value;
trueFGold.value = rejectedFGold.value;
}; };
// //
const handleClick = function (tab, event) { const handleClick = function (tab, event) {
@ -505,11 +545,11 @@ const handleSortChange = (column) => {
<el-tab-pane label="待审核" name="wait"></el-tab-pane> <el-tab-pane label="待审核" name="wait"></el-tab-pane>
<el-tab-pane label="已通过" name="pass"></el-tab-pane> <el-tab-pane label="已通过" name="pass"></el-tab-pane>
<el-tab-pane label="已驳回" name="reject"></el-tab-pane> <el-tab-pane label="已驳回" name="reject"></el-tab-pane>
<!-- <div>
充值金额{{ totalmoney }}新币永久金币{{
totalRcoin
}}金币免费金币{{ totalFcoin }}金币
</div> -->
<div>
充值金额{{ trueRGold }}新币永久金币{{
trueRGold
}}金币免费金币{{ trueFGold }}金币
</div>
</el-tabs> </el-tabs>
<!-- 设置表格容器的高度和滚动样式 --> <!-- 设置表格容器的高度和滚动样式 -->
<div style="height: 520px; overflow-y: auto"> <div style="height: 520px; overflow-y: auto">

87
gold-system/src/views/recharge/allRecharge.vue

@ -70,14 +70,26 @@ const getPayWay = async function () {
// //
// //
const totalData = ref({
totalmoney: 0,
totalRcoin: 0,
totalFcoin: 0,
});
//
const trueGold = ref(0);
const trueRGold = ref(0);
const trueFGold = ref(0);
//
const totalmoney = ref(0); const totalmoney = ref(0);
const totalRcoin = ref(0); const totalRcoin = ref(0);
const totalFcoin = ref(0); const totalFcoin = ref(0);
//
const pendingGold = ref(0);
const pendingRGold = ref(0);
const pendingFGold = ref(0);
//
const approvedGold = ref(0);
const approvedRGold = ref(0);
const approvedFGold = ref(0);
//
const rejectedGold = ref(0);
const rejectedRGold = ref(0);
const rejectedFGold = ref(0);
// ============================================================== // ==============================================================
// //
const get = async function (val) { const get = async function (val) {
@ -134,18 +146,36 @@ const get = async function (val) {
totalmoney.value = 0; totalmoney.value = 0;
totalRcoin.value = 0; totalRcoin.value = 0;
totalFcoin.value = 0; totalFcoin.value = 0;
} else {
// result2.data[i].flag="" totalData.value = result2.data[i]0
for (let i = 0; i < result2.data.length; i++) {
if (result2.data[i].flag == "已通过") {
totalData.value = result2.data[i];
totalmoney.value = totalData.value.sumRaudit1;
totalRcoin.value = totalData.value.sumRaudit1;
totalFcoin.value = totalData.value.sumRaudit2;
break;
} }
if (result2.data) {
result2.data.forEach((item) => {
switch (item.flag) {
case "待审核":
// item.raudit 0
// item.sumRaudit 0
pendingGold.value = item.sumRaudit || 0;
pendingRGold.value = item.sumRaudit1 || 0;
pendingFGold.value = item.sumRaudit2 || 0;
break;
case "已通过":
approvedGold.value = item.sumRaudit || 0;
approvedRGold.value = item.sumRaudit1 || 0;
approvedFGold.value = item.sumRaudit2 || 0;
break;
case "已驳回":
rejectedGold.value = item.sumRaudit || 0;
rejectedRGold.value = item.sumRaudit1 || 0;
rejectedFGold.value = item.sumRaudit2 || 0;
break;
} }
});
} }
trueGold.value =
pendingGold.value + approvedGold.value + rejectedGold.value;
trueRGold.value =
pendingRGold.value + approvedRGold.value + rejectedRGold.value;
trueFGold.value =
pendingFGold.value + approvedFGold.value + rejectedFGold.value;
// //
console.log("请求成功", result); console.log("请求成功", result);
@ -236,24 +266,33 @@ const adminAll = function () {
get(); get();
}; };
// //
const adminWait = function () {
const adminWait = async function () {
rechargeVo.value.status = 0; rechargeVo.value.status = 0;
getObj.value.pageNum = 1; getObj.value.pageNum = 1;
get();
await get();
console.log("adminWait"); console.log("adminWait");
trueGold.value = pendingGold.value;
trueRGold.value = pendingRGold.value;
trueFGold.value = pendingFGold.value;
}; };
// //
const adminPass = function () {
const adminPass = async function () {
rechargeVo.value.status = 1; rechargeVo.value.status = 1;
getObj.value.pageNum = 1; getObj.value.pageNum = 1;
get();
await get();
console.log("adminPass"); console.log("adminPass");
trueGold.value = approvedGold.value;
trueRGold.value = approvedRGold.value;
trueFGold.value = approvedFGold.value;
}; };
// //
const adminReject = function () {
const adminReject = async function () {
rechargeVo.value.status = 2; rechargeVo.value.status = 2;
getObj.value.pageNum = 1; getObj.value.pageNum = 1;
get();
await get();
trueGold.value = rejectedGold.value;
trueRGold.value = rejectedRGold.value;
trueFGold.value = rejectedFGold.value;
console.log("adminReject"); console.log("adminReject");
}; };
// //
@ -472,11 +511,11 @@ const handleSortChange = (column) => {
<el-tab-pane label="待审核" name="wait"></el-tab-pane> <el-tab-pane label="待审核" name="wait"></el-tab-pane>
<el-tab-pane label="已通过" name="pass"></el-tab-pane> <el-tab-pane label="已通过" name="pass"></el-tab-pane>
<el-tab-pane label="已驳回" name="reject"></el-tab-pane> <el-tab-pane label="已驳回" name="reject"></el-tab-pane>
<!-- <div>
充值金额{{ totalmoney / 100 }}新币永久金币{{
totalRcoin / 100
<div>
充值金额{{ trueRGold / 100 }}新币永久金币{{
trueRGold / 100
}}金币免费金币{{ totalFcoin / 100 }}金币 }}金币免费金币{{ totalFcoin / 100 }}金币
</div> -->
</div>
</el-tabs> </el-tabs>
<!-- 设置表格容器的高度和滚动样式 --> <!-- 设置表格容器的高度和滚动样式 -->
<div style="height: 520px; overflow-y: auto"> <div style="height: 520px; overflow-y: auto">

6
gold-system/src/views/refund/addRefund.vue

@ -414,7 +414,7 @@ onMounted(async function () {
<el-form-item label="历史金币总数"> <el-form-item label="历史金币总数">
<!-- 检查 user.totalRechargeGold 是否为有效的数字 --> <!-- 检查 user.totalRechargeGold 是否为有效的数字 -->
<p v-if="!isNaN(Number(user.totalRechargeGold))"> <p v-if="!isNaN(Number(user.totalRechargeGold))">
{{ Number(user.totalRechargeGold) / 100 }}
{{ Number(user.totalRechargeGold / 100) }}
</p> </p>
<!-- 如果不是有效的数字显示默认值 --> <!-- 如果不是有效的数字显示默认值 -->
<p v-else></p> <p v-else></p>
@ -471,11 +471,11 @@ onMounted(async function () {
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-form-item label="待审核">
<!-- <el-form-item label="待审核">
<p style="color: #2fa1ff"> <p style="color: #2fa1ff">
{{ user.A }} {{ user.A }}
</p> </p>
</el-form-item>
</el-form-item> -->
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>

4
gold-system/src/views/refund/allRefund.vue

@ -533,13 +533,13 @@ const handleSortChange = (column) => {
<el-tab-pane label="已驳回" name="reject"></el-tab-pane> <el-tab-pane label="已驳回" name="reject"></el-tab-pane>
</el-tabs> </el-tabs>
<!-- <div>
<div>
退款金币总数{{ Math.abs(trueGold) }}永久金币{{ 退款金币总数{{ Math.abs(trueGold) }}永久金币{{
Math.abs(trueRgold) Math.abs(trueRgold)
}}免费金币{{ Math.abs(trueFgold) }}任务金币{{ }}免费金币{{ Math.abs(trueFgold) }}任务金币{{
Math.abs(trueTgold) Math.abs(trueTgold)
}} }}
</div> -->
</div>
<!-- 设置表格容器的高度和滚动样式 --> <!-- 设置表格容器的高度和滚动样式 -->
<div style="height: 520px; overflow-y: auto"> <div style="height: 520px; overflow-y: auto">
<el-table <el-table

515
gold-system/src/views/usergold/index.vue

@ -1,64 +1,64 @@
<script setup> <script setup>
import { ref, onMounted, reactive, computed } from 'vue'
import ElementPlus from 'element-plus'
import { ElMessage, ElMessageBox } from 'element-plus'
import axios from 'axios'
import moment from 'moment'
import { ta } from 'element-plus/es/locales.mjs'
import API from '../../api/index.js'
import * as XLSX from 'xlsx'
import { ref, onMounted, reactive, computed } from "vue";
import ElementPlus from "element-plus";
import { ElMessage, ElMessageBox } from "element-plus";
import axios from "axios";
import moment from "moment";
import { ta } from "element-plus/es/locales.mjs";
import API from "../../api/index.js";
import * as XLSX from "xlsx";
// //
// //
const adminData = ref({})
const adminData = ref({});
const getAdminData = async function () { const getAdminData = async function () {
try { try {
const result = await API.post( const result = await API.post(
'http://54.251.137.151:10702/admin/userinfo',
"http://54.251.137.151:10702/admin/userinfo",
{} {}
)
adminData.value = result
console.log('请求成功', result)
console.log('用户信息', adminData.value)
);
adminData.value = result;
console.log("请求成功", result);
console.log("用户信息", adminData.value);
} catch (error) { } catch (error) {
console.log('请求失败', error)
}
console.log("请求失败", error);
} }
};
// //
const tableData = ref([])
const tableData = ref([]);
// //
const tableAllData = ref([])
// const tableAllData = ref([]);
// //
const rechargeCoin = ref(0)
const freeCoin = ref(0)
const taskCoin = ref(0)
const rechargeCoin = ref(0);
const freeCoin = ref(0);
const taskCoin = ref(0);
// =========================================== // ===========================================
// //
const total = ref(100)
const total = ref(100);
// //
const getTime = ref([])
const getTime = ref([]);
// detailY // detailY
const detailY = ref({})
const detailY = ref({});
// //
const getAllObj = ref({})
const getAllObj = ref({});
// //
const getObj = ref({ const getObj = ref({
pageNum: 1, pageNum: 1,
pageSize: 50
})
pageSize: 50,
});
//excel //excel
const getPutEX = ref(false)
const getPutEX = ref(false);
// //
const num = [ const num = [
{ {
value: '1',
label: '增加'
value: "1",
label: "增加",
}, },
{ {
value: '2',
label: '减少'
}
]
value: "2",
label: "减少",
},
];
// // // //
// const tableHeight = computed(function () { // const tableHeight = computed(function () {
@ -71,173 +71,180 @@ const num = [
const get = async function (val) { const get = async function (val) {
try { try {
// //
if (adminData.value.area === '泰国') {
detailY.value.areas = ['泰国', '越南']
} else if (adminData.value.area !== '总部') {
detailY.value.area = adminData.value.area
if (adminData.value.area === "泰国") {
detailY.value.areas = ["泰国", "越南"];
} else if (adminData.value.area !== "总部") {
detailY.value.area = adminData.value.area;
} }
// //
if (typeof val === 'number') {
getObj.value.pageNum = val
if (typeof val === "number") {
getObj.value.pageNum = val;
} }
// //
if (getTime.value != null) { if (getTime.value != null) {
if (getTime.value.startDate != '' && getTime.value.endDate != '') {
detailY.value.startDate = getTime.value[0]
detailY.value.endDate = getTime.value[1]
if (getTime.value.startDate != "" && getTime.value.endDate != "") {
detailY.value.startDate = getTime.value[0];
detailY.value.endDate = getTime.value[1];
} }
} else { } else {
detailY.value.startDate = ''
detailY.value.endDate = ''
detailY.value.startDate = "";
detailY.value.endDate = "";
} }
// //
detailY.value.sortField = sortField.value
detailY.value.sortOrder = sortOrder.value
console.log('搜索参数', getObj.value)
detailY.value.sortField = sortField.value;
detailY.value.sortOrder = sortOrder.value;
console.log("搜索参数", getObj.value);
// POST // POST
const result = await API.post('http://54.251.137.151:10702/detailY', {
const result = await API.post("http://54.251.137.151:10702/detailY", {
...getObj.value, ...getObj.value,
detailY: { ...detailY.value }
})
const result2 = await API.post('http://54.251.137.151:10702/detailY', {
...getAllObj.value,
detailY: { ...detailY.value }
})
detailY: { ...detailY.value },
});
// const result2 = await API.post("http://54.251.137.151:10702/detailY", {
// ...getAllObj.value,
// detailY: { ...detailY.value },
// });
// //
console.log('请求成功', result)
console.log('请求成功2', result2)
console.log("请求成功", result);
// console.log("2", result2);
// //
tableData.value = result.data.list
console.log('tableData', tableData.value)
tableAllData.value = result2.data
console.log('tableAllData', tableAllData.value)
tableData.value = result.data.list;
console.log("tableData", tableData.value);
// tableAllData.value = result2.data;
// console.log("tableAllData", tableAllData.value);
// //
total.value = result.data.total
console.log('total', total.value)
total.value = result.data.total;
console.log("total", total.value);
// 100 // 100
// 100 // 100
rechargeCoin.value = parseFloat((tableAllData.value.sumR / 100).toFixed(2))
freeCoin.value = parseFloat((tableAllData.value.sumF / 100).toFixed(2))
taskCoin.value = parseFloat((tableAllData.value.sumT / 100).toFixed(2))
// rechargeCoin.value = parseFloat((tableAllData.value.sumR / 100).toFixed(2));
// freeCoin.value = parseFloat((tableAllData.value.sumF / 100).toFixed(2));
// taskCoin.value = parseFloat((tableAllData.value.sumT / 100).toFixed(2));
// for (let i = 0; i < tableAllData.value.length; i++) { // for (let i = 0; i < tableAllData.value.length; i++) {
// rechargeCoin.value += tableAllData.value[i].rechargeCoin; // rechargeCoin.value += tableAllData.value[i].rechargeCoin;
// freeCoin.value += tableAllData.value[i].freeCoin; // freeCoin.value += tableAllData.value[i].freeCoin;
// taskCoin.value += tableAllData.value[i].taskCoin; // taskCoin.value += tableAllData.value[i].taskCoin;
// } // }
console.log(
'各金币总数',
rechargeCoin.value,
freeCoin.value,
taskCoin.value
)
// console.log(
// "",
// rechargeCoin.value,
// freeCoin.value,
// taskCoin.value
// );
} catch (error) { } catch (error) {
console.log('请求失败', error)
console.log("请求失败", error);
// //
} }
}
};
// //
const search = function () { const search = function () {
getObj.value.pageNum = 1
get()
}
getObj.value.pageNum = 1;
get();
};
// //
const reset = function () { const reset = function () {
detailY.value.jwcode = ''
detailY.value.num = ''
detailY.value.startDate = ''
detailY.value.endDate = ''
detailY.value.area = ''
sortField.value = ''
sortOrder.value = ''
getTime.value = {}
//
detailY.value.consumePlatform = ''
}
//
delete detailY.value.jwcode;
//
delete detailY.value.num;
//
delete detailY.value.startDate;
//
delete detailY.value.endDate;
//
delete detailY.value.area;
delete sortField.value;
delete sortOrder.value;
getTime.value = {};
//
delete detailY.value.consumePlatform;
};
// //
const getToday = function () { const getToday = function () {
const today = new Date()
const today = new Date();
const startDate = new Date( const startDate = new Date(
today.getFullYear(), today.getFullYear(),
today.getMonth(), today.getMonth(),
today.getDate() today.getDate()
)
);
const endDate = new Date( const endDate = new Date(
today.getFullYear(), today.getFullYear(),
today.getMonth(), today.getMonth(),
today.getDate() + 1 today.getDate() + 1
)
getTime.value = [startDate, endDate]
console.log('getTime', getTime.value)
get()
}
);
getTime.value = [startDate, endDate];
console.log("getTime", getTime.value);
get();
};
// //
const getYesterday = function () { const getYesterday = function () {
const yesterday = new Date()
yesterday.setDate(yesterday.getDate() - 1)
const yesterday = new Date();
yesterday.setDate(yesterday.getDate() - 1);
const startDate = new Date( const startDate = new Date(
yesterday.getFullYear(), yesterday.getFullYear(),
yesterday.getMonth(), yesterday.getMonth(),
yesterday.getDate() yesterday.getDate()
)
);
const endDate = new Date( const endDate = new Date(
yesterday.getFullYear(), yesterday.getFullYear(),
yesterday.getMonth(), yesterday.getMonth(),
yesterday.getDate() + 1 yesterday.getDate() + 1
)
getTime.value = [startDate, endDate]
console.log('getTime', getTime.value)
get()
}
);
getTime.value = [startDate, endDate];
console.log("getTime", getTime.value);
get();
};
// 7 // 7
const get7Days = function () { const get7Days = function () {
const today = new Date()
const today = new Date();
const startDate = new Date( const startDate = new Date(
today.getFullYear(), today.getFullYear(),
today.getMonth(), today.getMonth(),
today.getDate() - 6 today.getDate() - 6
)
);
const endDate = new Date( const endDate = new Date(
today.getFullYear(), today.getFullYear(),
today.getMonth(), today.getMonth(),
today.getDate() + 1 today.getDate() + 1
)
getTime.value = [startDate, endDate]
console.log('getTime', getTime.value)
get()
}
);
getTime.value = [startDate, endDate];
console.log("getTime", getTime.value);
get();
};
// //
const checkNumber = function () { const checkNumber = function () {
if (typeof parseInt(getObj.value.pageNum) === 'number') {
console.log('总共有多少页' + Math.ceil(total.value / getObj.value.pageSize))
if (typeof parseInt(getObj.value.pageNum) === "number") {
console.log(
"总共有多少页" + Math.ceil(total.value / getObj.value.pageSize)
);
if ( if (
getObj.value.pageNum > 0 && getObj.value.pageNum > 0 &&
getObj.value.pageNum <= Math.ceil(total.value / getObj.value.pageSize) getObj.value.pageNum <= Math.ceil(total.value / getObj.value.pageSize)
) { ) {
getObj.value.pageNum = parseInt(getObj.value.pageNum)
console.log('输入的数字合法')
get()
getObj.value.pageNum = parseInt(getObj.value.pageNum);
console.log("输入的数字合法");
get();
} else { } else {
// //
ElMessage({ ElMessage({
type: 'error',
message: '请检查输入内容'
})
type: "error",
message: "请检查输入内容",
});
} }
} else { } else {
// //
ElMessage({ ElMessage({
type: 'error',
message: '请检查输入内容'
})
}
type: "error",
message: "请检查输入内容",
});
} }
};
// //
onMounted(async function () { onMounted(async function () {
await getAdminData()
await get()
})
await getAdminData();
await get();
});
// excel // excel
// Excel // Excel
@ -247,251 +254,251 @@ const json_fields = (row) => {
row.jwcode, // row.jwcode, //
row.area, // row.area, //
row.platform, // row.platform, //
row.count, //
row.updateType, //
row.consumePlatform, //
row.gold, //
row.rechargeCoin, // row.rechargeCoin, //
row.freeCoin, // row.freeCoin, //
row.taskCoin, // row.taskCoin, //
row.createAdmin, // row.createAdmin, //
row.createTime, row.createTime,
row.name, row.name,
row.id
]
}
row.id,
];
};
// //
const json_meta = [ const json_meta = [
[ [
{ {
key: 'charset',
value: 'utf-8'
}
]
]
key: "charset",
value: "utf-8",
},
],
];
const headers = [ const headers = [
'精网号',
'地区',
'平台信息',
'数量',
'更新类型',
'永久金币',
'免费金币',
'任务金币',
'提交人',
'更新时间',
'用户名',
'id'
]
"精网号",
"地区",
"平台信息",
"数量",
"更新类型",
"永久金币",
"免费金币",
"任务金币",
"提交人",
"更新时间",
"用户名",
"id",
];
const exportExcel = () => { const exportExcel = () => {
// json_fields // json_fields
const data = excelInfo.value.map(json_fields)
const ws = XLSX.utils.aoa_to_sheet(data)
const data = excelInfo.value.map(json_fields);
const ws = XLSX.utils.aoa_to_sheet(data);
// //
XLSX.utils.sheet_add_aoa(ws, [headers], { origin: 'A1' })
const wb = XLSX.utils.book_new()
XLSX.utils.book_append_sheet(wb, ws, 'Sheet1')
XLSX.writeFile(wb, '客户金币明细.xlsx')
}
const today = new Date()
XLSX.utils.sheet_add_aoa(ws, [headers], { origin: "A1" });
const wb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
XLSX.writeFile(wb, "客户金币明细.xlsx");
};
const today = new Date();
const startDate = new Date( const startDate = new Date(
today.getFullYear(), today.getFullYear(),
today.getMonth(), today.getMonth(),
today.getDate() today.getDate()
)
);
const endDate = new Date( const endDate = new Date(
today.getFullYear(), today.getFullYear(),
today.getMonth(), today.getMonth(),
today.getDate() + 1 today.getDate() + 1
)
);
const putExcel = ref({ const putExcel = ref({
startDate: startDate, startDate: startDate,
endDate: endDate
})
const excelInfo = ref({})
const loading = ref(false)
endDate: endDate,
});
const excelInfo = ref({});
const loading = ref(false);
const areyour = async function () { const areyour = async function () {
try { try {
loading.value = true
loading.value = true;
const result = await API.post( const result = await API.post(
'http://54.251.137.151:10702/detailY/searchAll',
"http://54.251.137.151:10702/detailY/searchAll",
{ {
...putExcel.value
...putExcel.value,
} }
)
excelInfo.value = result.data
);
excelInfo.value = result.data;
// excelInfo // excelInfo
if (Array.isArray(excelInfo.value)) { if (Array.isArray(excelInfo.value)) {
excelInfo.value.forEach((item) => { excelInfo.value.forEach((item) => {
if (item.rechargeCoin) { if (item.rechargeCoin) {
item.rechargeCoin = item.rechargeCoin / 100
item.rechargeCoin = item.rechargeCoin / 100;
} }
if (item.freeCoin) { if (item.freeCoin) {
item.freeCoin = item.freeCoin / 100
item.freeCoin = item.freeCoin / 100;
} }
if (item.taskCoin) { if (item.taskCoin) {
item.taskCoin = item.taskCoin / 100
item.taskCoin = item.taskCoin / 100;
} }
})
});
} }
areyouright.value = true
areyouright.value = true;
ElMessage({ ElMessage({
type: 'success',
message: '查询成功'
})
loading.value = false
type: "success",
message: "查询成功",
});
loading.value = false;
} catch (error) { } catch (error) {
console.log('请求失败', error)
loading.value = false
}
console.log("请求失败", error);
loading.value = false;
} }
};
const areyouright = ref(false)
const areyouright = ref(false);
// //
const area = [ const area = [
{ {
value: '马来西亚',
label: '马来西亚'
value: "马来西亚",
label: "马来西亚",
}, },
{ {
value: '新加坡',
label: '新加坡'
value: "新加坡",
label: "新加坡",
}, },
{ {
value: '香港',
label: '香港'
value: "香港",
label: "香港",
}, },
{ {
value: '泰国',
label: '泰国'
value: "泰国",
label: "泰国",
}, },
{ {
value: '加拿大',
label: '加拿大'
value: "加拿大",
label: "加拿大",
}, },
{ {
value: '越南HCM',
label: '越南HCM'
}
]
value: "越南HCM",
label: "越南HCM",
},
];
// //
const platform = [ const platform = [
{ {
value: '4',
label: '金币系统'
value: "4",
label: "金币系统",
}, },
{ {
value: '1',
label: 'ERP系统'
value: "1",
label: "ERP系统",
}, },
{ {
value: '2',
label: 'Homily Chart'
value: "2",
label: "Homily Chart",
}, },
{ {
value: '3',
label: 'Homily Link'
value: "3",
label: "Homily Link",
}, },
{ {
value: '0',
label: '初始化金币'
}
]
const TimeGet = ref('1')
value: "0",
label: "初始化金币",
},
];
const TimeGet = ref("1");
// //
const getT = function () { const getT = function () {
const today = new Date()
const today = new Date();
const startDate = new Date( const startDate = new Date(
today.getFullYear(), today.getFullYear(),
today.getMonth(), today.getMonth(),
today.getDate() today.getDate()
)
);
const endDate = new Date( const endDate = new Date(
today.getFullYear(), today.getFullYear(),
today.getMonth(), today.getMonth(),
today.getDate() + 1 today.getDate() + 1
)
putExcel.value.startDate = startDate
putExcel.value.endDate = endDate
console.log('putExcel', putExcel.value)
}
);
putExcel.value.startDate = startDate;
putExcel.value.endDate = endDate;
console.log("putExcel", putExcel.value);
};
//3 //3
const get3 = function () { const get3 = function () {
const today = new Date()
const today = new Date();
const startDate = new Date( const startDate = new Date(
today.getFullYear(), today.getFullYear(),
today.getMonth(), today.getMonth(),
today.getDate() - 2 today.getDate() - 2
)
);
const endDate = new Date( const endDate = new Date(
today.getFullYear(), today.getFullYear(),
today.getMonth(), today.getMonth(),
today.getDate() + 1 today.getDate() + 1
)
putExcel.value.startDate = startDate
putExcel.value.endDate = endDate
console.log('putExcel', putExcel.value)
}
);
putExcel.value.startDate = startDate;
putExcel.value.endDate = endDate;
console.log("putExcel", putExcel.value);
};
// 7 // 7
const get7 = function () { const get7 = function () {
const today = new Date()
const today = new Date();
const startDate = new Date( const startDate = new Date(
today.getFullYear(), today.getFullYear(),
today.getMonth(), today.getMonth(),
today.getDate() - 6 today.getDate() - 6
)
);
const endDate = new Date( const endDate = new Date(
today.getFullYear(), today.getFullYear(),
today.getMonth(), today.getMonth(),
today.getDate() + 1 today.getDate() + 1
)
putExcel.value.startDate = startDate
putExcel.value.endDate = endDate
console.log('putExcel', putExcel.value)
}
);
putExcel.value.startDate = startDate;
putExcel.value.endDate = endDate;
console.log("putExcel", putExcel.value);
};
// 30 // 30
const get30 = function () { const get30 = function () {
const today = new Date()
const today = new Date();
const startDate = new Date( const startDate = new Date(
today.getFullYear(), today.getFullYear(),
today.getMonth() - 1, today.getMonth() - 1,
today.getDate() today.getDate()
)
);
const endDate = new Date( const endDate = new Date(
today.getFullYear(), today.getFullYear(),
today.getMonth(), today.getMonth(),
today.getDate() + 1 today.getDate() + 1
)
putExcel.value.startDate = startDate
putExcel.value.endDate = endDate
console.log('putExcel', putExcel.value)
}
);
putExcel.value.startDate = startDate;
putExcel.value.endDate = endDate;
console.log("putExcel", putExcel.value);
};
// //
const sortField = ref('')
const sortOrder = ref('')
const sortField = ref("");
const sortOrder = ref("");
// //
const handleSortChange = (column) => { const handleSortChange = (column) => {
console.log('排序字段:', column.prop)
console.log('排序方式:', column.order)
if (column.prop === 'rechargeCoin') {
sortField.value = 'recharge_coin'
} else if (column.prop === 'taskCoin') {
sortField.value = 'task_coin'
} else if (column.prop === 'freeCoin') {
sortField.value = 'free_coin'
} else if (column.prop === 'createTime') {
sortField.value = 'create_time'
} else if (column.prop === 'gold') {
sortField.value = 'gold'
}
sortOrder.value = column.order === 'ascending' ? 'ASC' : 'DESC'
get()
}
console.log("排序字段:", column.prop);
console.log("排序方式:", column.order);
if (column.prop === "rechargeCoin") {
sortField.value = "recharge_coin";
} else if (column.prop === "taskCoin") {
sortField.value = "task_coin";
} else if (column.prop === "freeCoin") {
sortField.value = "free_coin";
} else if (column.prop === "createTime") {
sortField.value = "create_time";
} else if (column.prop === "gold") {
sortField.value = "gold";
}
sortOrder.value = column.order === "ascending" ? "ASC" : "DESC";
get();
};
</script> </script>
<template> <template>
@ -778,7 +785,7 @@ const handleSortChange = (column) => {
> >
<template #default="scope"> <template #default="scope">
<span>{{ <span>{{
moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss')
moment(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss")
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>

4
gold-system/src/views/usergoldInfo/index.vue

@ -275,11 +275,11 @@ onMounted(async function () {
<el-row> <el-row>
<el-col> <el-col>
<el-card> <el-card>
<!-- <div>
<div>
现有金币永久金币{{ Math.abs(rechargeCoin) }}免费金币{{ 现有金币永久金币{{ Math.abs(rechargeCoin) }}免费金币{{
Math.abs(freeCoin) Math.abs(freeCoin)
}}任务金币{{ Math.abs(taskCoin) }} }}任务金币{{ Math.abs(taskCoin) }}
</div> -->
</div>
<!-- 设置表格容器的高度和滚动样式 --> <!-- 设置表格容器的高度和滚动样式 -->
<div style="height: 626px; overflow-y: auto"> <div style="height: 626px; overflow-y: auto">
<el-table <el-table

100
gold-system/src/views/workspace/index.vue

@ -16,8 +16,8 @@ const areaRankLoading = ref(true);
// //
const getSumCoin = ref({}); const getSumCoin = ref({});
const statistics = ref({}); const statistics = ref({});
const getYearConsumeCoin = ref({});
const getDayConsumeCoin = ref({});
// const getYearConsumeCoin = ref({});
// const getDayConsumeCoin = ref({});
// //
const changeTimeRatio = ref("allDays"); const changeTimeRatio = ref("allDays");
@ -95,22 +95,22 @@ const get = async function () {
getAreaRank(); getAreaRank();
getMiddleBar(); getMiddleBar();
// POST // POST
const result1 = await API.post(
"http://54.251.137.151:10702/statistics/getSumCoin",
{}
);
// const result1 = await API.post(
// "http://54.251.137.151:10702/statistics/getSumCoin",
// {}
// );
const result2 = await API.post( const result2 = await API.post(
"http://54.251.137.151:10702/statistics/a", "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 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( // const result5 = await API.post(
// "http://192.168.8.93:10010/statistics/getMediumAreaPay", // "http://192.168.8.93:10010/statistics/getMediumAreaPay",
// {} // {}
@ -151,71 +151,71 @@ const get = async function () {
console.log("oneData", oneData.value); console.log("oneData", oneData.value);
// //
getSumCoin.value = result1.data;
// getSumCoin.value = result1.data;
statistics.value = result2.data; statistics.value = result2.data;
getYearConsumeCoin.value = result3.data;
getDayConsumeCoin.value = result4.data;
// getYearConsumeCoin.value = result3.data;
// getDayConsumeCoin.value = result4.data;
platformData.value = result9.data; platformData.value = result9.data;
console.log("getSumCoin", getSumCoin.value);
// console.log("getSumCoin", getSumCoin.value);
console.log("statistics", statistics.value); console.log("statistics", statistics.value);
console.log("getYearConsumeCoin", getYearConsumeCoin.value);
console.log("getDayConsumeCoin", getDayConsumeCoin.value);
// console.log("getYearConsumeCoin", getYearConsumeCoin.value);
// console.log("getDayConsumeCoin", getDayConsumeCoin.value);
console.log("platformData", platformData.value); console.log("platformData", platformData.value);
option3Data.value = [ option3Data.value = [
{ {
value: Math.abs(statistics.value.rechargeSumCoin),
name: "永久金币" + " | " + formatNum(statistics.value.rechargeSumCoin),
value: Math.abs(twoData.value.rechargegold),
name: "永久金币" + " | " + formatNum(twoData.value.rechargegold / 100),
}, },
{ {
value: Math.abs(statistics.value.freeSumCoin),
name: "免费金币" + " | " + formatNum(statistics.value.freeSumCoin),
value: Math.abs(twoData.value.freegold),
name: "免费金币" + " | " + formatNum(twoData.value.freegold / 100),
}, },
{ {
value: Math.abs(statistics.value.taskSumCoin),
name: "任务金币" + " | " + formatNum(statistics.value.taskSumCoin),
value: Math.abs(twoData.value.taskgold),
name: "任务金币" + " | " + formatNum(twoData.value.taskgold / 100),
}, },
]; ];
option4Data.value = [ option4Data.value = [
{ {
value: Math.abs(getYearConsumeCoin.value.yearSumRechargeCoin),
value: Math.abs(threeData.value.rechargegold),
name: name:
"永久金币" + "永久金币" +
" | " + " | " +
formatNum(Math.abs(getYearConsumeCoin.value.yearSumRechargeCoin)),
formatNum(Math.abs(threeData.value.rechargegold / 100)),
}, },
{ {
value: Math.abs(getYearConsumeCoin.value.yearSumFreeCoin),
value: Math.abs(threeData.value.freegold),
name: name:
"免费金币" + "免费金币" +
" | " + " | " +
formatNum(Math.abs(getYearConsumeCoin.value.yearSumFreeCoin)),
formatNum(Math.abs(threeData.value.freegold / 100)),
}, },
{ {
value: Math.abs(getYearConsumeCoin.value.yearSumTaskCoin),
value: Math.abs(threeData.value.taskgold),
name: name:
"任务金币" + "任务金币" +
" | " + " | " +
formatNum(Math.abs(getYearConsumeCoin.value.yearSumTaskCoin)),
formatNum(Math.abs(threeData.value.taskgold / 100)),
}, },
]; ];
console.log("option4Data", option4Data.value); console.log("option4Data", option4Data.value);
option5Data.value = [ option5Data.value = [
{ {
value: Math.abs(getSumCoin.value.todayRecharge),
name: "永久金币" + " | " + formatNum(getSumCoin.value.todayRecharge),
value: Math.abs(oneData.value.rechargegold),
name: "永久金币" + " | " + formatNum(oneData.value.rechargegold / 100),
}, },
{ {
value: Math.abs(getSumCoin.value.todayFree),
name: "免费金币" + " | " + formatNum(getSumCoin.value.todayFree),
value: Math.abs(oneData.value.freegold),
name: "免费金币" + " | " + formatNum(oneData.value.freegold / 100),
}, },
{ {
value: Math.abs(getSumCoin.value.todayTask),
name: "任务金币" + " | " + formatNum(getSumCoin.value.todayTask),
value: Math.abs(oneData.value.taskgold),
name: "任务金币" + " | " + formatNum(oneData.value.taskgold / 100),
}, },
]; ];
console.log("option5Data", option5Data.value); console.log("option5Data", option5Data.value);
@ -1029,7 +1029,7 @@ onMounted(async function () {
{ {
name: name:
"全年累计金币数(个)\n" + "全年累计金币数(个)\n" +
formatNum(Math.abs(statistics.value.totalSumCoin)),
formatNum(Math.abs(twoData.value.totalgold / 100)),
type: "pie", type: "pie",
radius: ["60%", "80%"], radius: ["60%", "80%"],
avoidLabelOverlap: false, avoidLabelOverlap: false,
@ -1073,7 +1073,7 @@ onMounted(async function () {
{ {
name: name:
"全年累计消耗金币数(个)\n" + "全年累计消耗金币数(个)\n" +
formatNum(Math.abs(getYearConsumeCoin.value.yearsumCoin)),
formatNum(Math.abs(threeData.value.consumeGold / 100)),
type: "pie", type: "pie",
radius: ["60%", "80%"], radius: ["60%", "80%"],
avoidLabelOverlap: false, avoidLabelOverlap: false,
@ -1106,11 +1106,11 @@ onMounted(async function () {
params.seriesName + params.seriesName +
"<br/>" + "<br/>" +
params.name + params.name +
(params.value == getSumCoin.value.todayFree
(params.value == oneData.value.freegold
? "</br>6月到期 | " + ? "</br>6月到期 | " +
statistics.value.free6SumCoin +
oneData.value.sfreegold / 100 +
" ; 12月到期 | " + " ; 12月到期 | " +
statistics.value.free12SumCoin
oneData.value.dfreegold / 100
: "") : "")
); );
}, },
@ -1127,7 +1127,7 @@ onMounted(async function () {
{ {
name: name:
"当前金币余量(个)\n" + "当前金币余量(个)\n" +
formatNum(Math.abs(getSumCoin.value.todayTotalCoin)),
formatNum(Math.abs(oneData.value.sumgold / 100)),
type: "pie", type: "pie",
radius: ["60%", "80%"], radius: ["60%", "80%"],
avoidLabelOverlap: false, avoidLabelOverlap: false,
@ -1261,9 +1261,11 @@ onMounted(async function () {
>昨日新增消耗{{ >昨日新增消耗{{
formatNum( formatNum(
Math.abs( Math.abs(
threeData.yesterdayCoin !== undefined &&
threeData.yesterdayCoin !== null
? threeData.yesterdayCoin / 100
threeData.yesterdayGold + threeData.yesterdayrefund !==
undefined &&
threeData.yesterdayGold + threeData.yesterdayrefund !== null
? (threeData.yesterdayGold + threeData.yesterdayrefund) /
100
: 0 : 0
) )
) )
@ -1577,7 +1579,7 @@ onMounted(async function () {
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="8">
<!-- <el-col :span="8">
<el-card> <el-card>
<template #header> <template #header>
<div class="card-header" style="display: flex"> <div class="card-header" style="display: flex">
@ -1614,7 +1616,7 @@ onMounted(async function () {
<div id="gold" style="width: 500px; height: 400px"></div> <div id="gold" style="width: 500px; height: 400px"></div>
</span> </span>
</el-card> </el-card>
</el-col>
</el-col> -->
</el-row> </el-row>
</div> </div>
</template> </template>

Loading…
Cancel
Save