donghaolin 5 months ago
parent
commit
141e922ebb
  1. 26
      vue/gold-system/src/views/recharge/adminRecharge.vue
  2. 250
      vue/gold-system/src/views/workspace/index.vue

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

@ -6,20 +6,29 @@ import { AiFillRead } from "vue-icons-plus/ai";
import axios from "axios";
import moment from "moment";
import API from "../../api/index.js";
//
const adminData = ref({});
const getAdminData = async function () {
try {
const result = await API.post(
"http://192.168.8.93:10010/admin/userinfo",
{}
);
adminData.value = result;
rechargeVo.value.adminId = adminData.value.adminId;
console.log("请求成功", result);
console.log("用户信息", adminData.value);
} catch (error) {
console.log("请求失败", error);
}
};
//
//
const admin = ref({
adminId: 1,
name: "赵刚",
area: "中国",
});
//
const tableData = ref([]);
// ===========================================
// recharge
const rechargeVo = ref({
adminId: admin.value.adminId,
adminId: adminData.value.adminId,
});
//
const getObj = ref({
@ -313,6 +322,7 @@ const checkNumber = function () {
//
onMounted(async function () {
await getAdminData();
await get();
getActivity();
await getArea();

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

@ -17,6 +17,7 @@ const getYearConsumeCoin = ref({});
const getDayConsumeCoin = ref({});
//
const changeTimeRatio=ref("allDays");
const searchTime = ref([]);
//
@ -210,13 +211,13 @@ const get = async function () {
ERPData.value.forEach((item, index) =>
item == ""
? (ERPData.value[index] = {
value: 0,
name: "第" + (index + 1) + "学科" + 0,
})
value: 0,
name: "第" + (index + 1) + "学科" + 0,
})
: (ERPData.value[index] = {
value: item[0],
name: "第" + (index + 1) + "学科" + item[0],
})
value: item[0],
name: "第" + (index + 1) + "学科" + item[0],
})
);
console.log("ERPData", ERPData.value);
HCData.value = [
@ -236,13 +237,13 @@ const get = async function () {
HCData.value.forEach((item, index) =>
item == ""
? (HCData.value[index] = {
value: 0,
name: "第" + (index + 1) + "学科" + 0,
})
value: 0,
name: "第" + (index + 1) + "学科" + 0,
})
: (HCData.value[index] = {
value: item[0],
name: "第" + (index + 1) + "学科" + item[0],
})
value: item[0],
name: "第" + (index + 1) + "学科" + item[0],
})
);
console.log("HCData", HCData.value);
LinkData.value = [
@ -262,13 +263,13 @@ const get = async function () {
LinkData.value.forEach((item, index) =>
item == ""
? (LinkData.value[index] = {
value: 0,
name: "第" + (index + 1) + "学科" + 0,
})
value: 0,
name: "第" + (index + 1) + "学科" + 0,
})
: (LinkData.value[index] = {
value: item[0],
name: "第" + (index + 1) + "学科" + item[0],
})
value: item[0],
name: "第" + (index + 1) + "学科" + item[0],
})
);
console.log("LinkData", LinkData.value);
goldData.value = [
@ -288,13 +289,13 @@ const get = async function () {
goldData.value.forEach((item, index) =>
item == ""
? (goldData.value[index] = {
value: 0,
name: "第" + (index + 1) + "学科" + 0,
})
value: 0,
name: "第" + (index + 1) + "学科" + 0,
})
: (goldData.value[index] = {
value: item[0],
name: "第" + (index + 1) + "学科" + item[0],
})
value: item[0],
name: "第" + (index + 1) + "学科" + item[0],
})
);
console.log("goldData", goldData.value);
allData.value = [
@ -436,7 +437,7 @@ const getMiddleBar = async function () {
type: "bar",
stack: "total",
label: {
show: false,
show: true,
},
emphasis: {
focus: "series",
@ -449,7 +450,7 @@ const getMiddleBar = async function () {
type: "bar",
stack: "total",
label: {
show: false,
show: true,
},
emphasis: {
focus: "series",
@ -462,7 +463,7 @@ const getMiddleBar = async function () {
type: "bar",
stack: "total",
label: {
show: false,
show: true,
},
emphasis: {
focus: "series",
@ -508,7 +509,7 @@ const getMiddleBar = async function () {
type: "bar",
stack: "total",
label: {
show: false,
show: true,
},
emphasis: {
focus: "series",
@ -521,7 +522,7 @@ const getMiddleBar = async function () {
type: "bar",
stack: "total",
label: {
show: false,
show: true,
},
emphasis: {
focus: "series",
@ -534,7 +535,7 @@ const getMiddleBar = async function () {
type: "bar",
stack: "total",
label: {
show: false,
show: true,
},
emphasis: {
focus: "series",
@ -687,17 +688,34 @@ const thisYear = function () {
search();
// console.log("searchTime", moment(searchTime.value[0]).format("YYYY-MM-DD") + "" + moment(searchTime.value[1]).format("YYYY-MM-DD"))
};
//
const allTime = function () {
searchTime.value = ["", ""];
search();
};
//
const changeTime=function(){
console.log("changeTimeRatio",changeTimeRatio.value);
if(changeTimeRatio.value=="allDays"){
allTime();
}else if(changeTimeRatio.value=="week"){
thisWeek();
}else if(changeTimeRatio.value=="month"){
thisMonth();
}else if(changeTimeRatio.value=="year"){
thisYear();
}else if(changeTimeRatio.value=="day"){
today();
}
}
//
const search = function () {
console.log(
"searchTime",
moment(searchTime.value[0]).format("YYYY-MM-DD") +
"至" +
moment(searchTime.value[1]).format("YYYY-MM-DD")
"至" +
moment(searchTime.value[1]).format("YYYY-MM-DD")
);
getMiddleBarObj.value.searchStartTime = moment(searchTime.value[0]).format(
@ -879,7 +897,7 @@ onMounted(async function () {
type: "bar",
stack: "total",
label: {
show: false,
show: true,
},
emphasis: {
focus: "series",
@ -892,7 +910,7 @@ onMounted(async function () {
type: "bar",
stack: "total",
label: {
show: false,
show: true,
},
emphasis: {
focus: "series",
@ -905,7 +923,7 @@ onMounted(async function () {
type: "bar",
stack: "total",
label: {
show: false,
show: true,
},
emphasis: {
focus: "series",
@ -1067,37 +1085,26 @@ onMounted(async function () {
<span v-if="getSumCoin.coinDifference > 0">
<div class="comparedWithYesterday">
<span>较前一天 {{ formatNum(getSumCoin.coinDifference) }}</span>
<span
class="red-triangle"
style="margin: 6px 0px 0px 7px"
></span>
<span class="red-triangle" style="margin: 6px 0px 0px 7px"></span>
</div>
</span>
<span v-if="getSumCoin.coinDifference < 0">
<div class="comparedWithYesterday">
<span>较前一天 {{ formatNum(getSumCoin.coinDifference) }}</span>
<span
class="green-triangle"
style="margin: 6px 0px 0px 7px"
></span>
<span class="green-triangle" style="margin: 6px 0px 0px 7px"></span>
</div>
</span>
<span v-if="getSumCoin.coinDifference == 0">
<div class="comparedWithYesterday">
<span>较前一天 {{ formatNum(getSumCoin.coinDifference) }}</span>
<span
class="grey-triangle"
style="margin: 6px 0px 0px 7px"
></span>
<span class="grey-triangle" style="margin: 6px 0px 0px 7px"></span>
</div>
</span>
</p>
<template #footer
>充值{{ formatNum(getSumCoin.todayRecharge) }} 免费{{
formatNum(getSumCoin.todayFree)
}}
任务{{ formatNum(getSumCoin.todayTask) }}</template
>
<template #footer>充值{{ formatNum(getSumCoin.todayRecharge) }} 免费{{
formatNum(getSumCoin.todayFree)
}}
任务{{ formatNum(getSumCoin.todayTask) }}</template>
</el-card>
</el-col>
<el-col :span="6">
@ -1109,8 +1116,7 @@ onMounted(async function () {
<p>
折合新币累计金额 {{ formatNum(Math.abs(statistics.totalSumCoin)) }}
</p>
<template #footer
>昨日新增
<template #footer>昨日新增
{{ formatNum(Math.abs(statistics.totalYesterdaySumCoin)) }}
其中充值
{{ formatNum(Math.abs(statistics.rechargeYesterdaySumCoin)) }}
@ -1127,12 +1133,10 @@ onMounted(async function () {
消费 {{ formatNum(Math.abs(getYearConsumeCoin.yearConsumeCoin)) }};
退款 {{ formatNum(Math.abs(getYearConsumeCoin.yearRefundCoin)) }}
</p>
<template #footer
>昨日新增消耗
<template #footer>昨日新增消耗
{{ formatNum(Math.abs(getDayConsumeCoin.daysumCoin)) }} ; 消费
{{ formatNum(Math.abs(getDayConsumeCoin.dayConsumeCoin)) }} ; 退款
{{ formatNum(Math.abs(getDayConsumeCoin.dayRefundCoin)) }}</template
>
{{ formatNum(Math.abs(getDayConsumeCoin.dayRefundCoin)) }}</template>
</el-card>
</el-col>
<el-col :span="6">
@ -1145,66 +1149,46 @@ onMounted(async function () {
<span v-if="statistics.weekOverWeekRate > 0">
<div class="comparedWithYesterday">
<span>周同比 {{ statistics.weekOverWeekRate }}%</span>
<span
class="red-triangle"
style="margin: 6px 0px 0px 7px"
></span>
<span class="red-triangle" style="margin: 6px 0px 0px 7px"></span>
</div>
</span>
<span v-if="statistics.weekOverWeekRate < 0">
<div class="comparedWithYesterday">
<span>周同比 {{ statistics.weekOverWeekRate }}%</span>
<span
class="green-triangle"
style="margin: 6px 0px 0px 7px"
></span>
<span class="green-triangle" style="margin: 6px 0px 0px 7px"></span>
</div>
</span>
<span v-if="statistics.weekOverWeekRate == 0">
<div class="comparedWithYesterday">
<span>周同比 {{ statistics.weekOverWeekRate }}%</span>
<span
class="grey-triangle"
style="margin: 6px 0px 0px 7px"
></span>
<span class="grey-triangle" style="margin: 6px 0px 0px 7px"></span>
</div>
</span>
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span v-if="statistics.dayOverDayRate > 0">
<div class="comparedWithYesterday">
<span> 日环比{{ statistics.dayOverDayRate }}%</span>
<span
class="red-triangle"
style="margin: 6px 0px 0px 7px"
></span>
<span class="red-triangle" style="margin: 6px 0px 0px 7px"></span>
</div>
</span>
<span v-if="statistics.dayOverDayRate < 0">
<div class="comparedWithYesterday">
<span> 日环比{{ statistics.dayOverDayRate }}%</span>
<span
class="green-triangle"
style="margin: 6px 0px 0px 7px"
></span>
<span class="green-triangle" style="margin: 6px 0px 0px 7px"></span>
</div>
</span>
<span v-if="statistics.dayOverDayRate == 0">
<div class="comparedWithYesterday">
<span> 日环比{{ statistics.dayOverDayRate }}%</span>
<span
class="grey-triangle"
style="margin: 6px 0px 0px 7px"
></span>
<span class="grey-triangle" style="margin: 6px 0px 0px 7px"></span>
</div>
</span>
</p>
<template #footer
>昨日充值人数
<template #footer>昨日充值人数
{{ formatNum(Math.abs(statistics.rechargeCountYesterday)) }}
其中首充
{{ formatNum(Math.abs(statistics.firstRechargeCountYesterday)) }}
</template
>
</template>
</el-card>
</el-col>
</el-row>
@ -1212,28 +1196,23 @@ onMounted(async function () {
<el-col>
<el-card>
<div style="margin-right: auto; text-align: right">
<el-button text @click="allTime()">全部</el-button>
<el-radio-group v-model="changeTimeRatio" style="margin-right: 10px;" @change="changeTime()">
<el-radio-button label="全部" value="allDays" style="border-color: white;"/>
<el-radio-button label="本日" value="day" style="border-color: white;"/>
<el-radio-button label="本周" value="week" style="border-color: white;"/>
<el-radio-button label="本月" value="month" style="border-color: white;"/>
<el-radio-button label="本年" value="year" style="border-color: white;"/>
</el-radio-group>
<!-- <el-button text @click="allTime()" dark=true>全部</el-button>
<el-button text @click="today()">今日</el-button>
<el-button text @click="thisWeek()">本周</el-button>
<el-button text @click="thisMonth()">本月</el-button>
<el-button text @click="thisYear()">本年</el-button>
<el-date-picker
v-model="searchTime"
type="daterange"
range-separator="→"
start-placeholder="开始时间"
end-placeholder="结束时间"
style="width: 200px"
:disabled-date="disabledDate"
@change="search"
/>
<el-button text @click="thisYear()">本年</el-button> -->
<el-date-picker v-model="searchTime" type="daterange" range-separator="" start-placeholder="开始时间"
end-placeholder="结束时间" style="width: 200px" :disabled-date="disabledDate" @change="search" />
</div>
<el-tabs
v-model="activeName"
class="demo-tabs"
@tab-change="handleChange"
>
<el-tabs v-model="activeName" class="demo-tabs" @tab-change="handleChange">
<el-tab-pane label="金币充值" name="recharge">
<div>
合计充值金币
@ -1270,31 +1249,15 @@ onMounted(async function () {
</div>
<div style="width: 310px">
<div class="ranking-header">
<span style="margin-right: 90px; width: 150px"
>门店金币充值排名</span
>
<el-select
v-model="goldType"
placeholder="请选择金币类型"
size="small"
style="width: 90px"
@change="changeGoldType"
>
<el-option
v-for="item in gold"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<span style="margin-right: 90px; width: 150px">门店金币充值排名</span>
<el-select v-model="goldType" placeholder="请选择金币类型" size="small" style="width: 90px"
@change="changeGoldType">
<el-option v-for="item in gold" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
<div>
<el-scrollbar height="360px">
<div
v-for="(item, index) in areaRank"
:key="item"
class="ranking-item"
>
<div v-for="(item, index) in areaRank" :key="item" class="ranking-item">
<!-- <component :is="findBsComponent(index)" /> -->
<span style="width: 15px; text-align: center">{{
index + 1
@ -1345,31 +1308,15 @@ onMounted(async function () {
</div>
<div style="width: 310px">
<div class="ranking-header">
<span style="margin-right: 90px; width: 150px"
>门店金币消费排名</span
>
<el-select
v-model="goldType"
placeholder="请选择金币类型"
size="small"
style="width: 90px"
@change="changeGoldType"
>
<el-option
v-for="item in gold"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<span style="margin-right: 90px; width: 150px">门店金币消费排名</span>
<el-select v-model="goldType" placeholder="请选择金币类型" size="small" style="width: 90px"
@change="changeGoldType">
<el-option v-for="item in gold" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
<div>
<el-scrollbar height="360px">
<div
v-for="(item, index) in areaRank"
:key="item"
class="ranking-item"
>
<div v-for="(item, index) in areaRank" :key="item" class="ranking-item">
<!-- <component :is="findBsComponent(index)" /> -->
<span style="width: 15px; text-align: center">{{
index + 1
@ -1408,14 +1355,8 @@ onMounted(async function () {
<template #header>
<div class="card-header" style="display: flex">
<span class="tail-head">四大学科类别占比</span>
<el-radio-group
v-model="platform"
fill="#ffffff"
text-color="#409eff"
size="small"
@change="changePlatform"
style="margin-left: auto"
>
<el-radio-group v-model="platform" fill="#ffffff" text-color="#409eff" size="small"
@change="changePlatform" style="margin-left: auto">
<el-radio-button label="全部平台" value="全部平台" />
<el-radio-button label="ERP" value="ERP" />
<el-radio-button label="HC" value="HC" />
@ -1449,6 +1390,7 @@ onMounted(async function () {
.medium-button {
display: flex;
}
.head-mid-font {
font-size: 20px;
font-weight: bold;

Loading…
Cancel
Save