|
@ -23,17 +23,17 @@ |
|
|
{{ dailyChange / 100 }} |
|
|
{{ dailyChange / 100 }} |
|
|
<template v-if="dailyChange > 0"> |
|
|
<template v-if="dailyChange > 0"> |
|
|
<el-icon style="color:red"> |
|
|
<el-icon style="color:red"> |
|
|
<ArrowUpBold /> |
|
|
|
|
|
|
|
|
<ArrowUpBold/> |
|
|
</el-icon> |
|
|
</el-icon> |
|
|
</template> |
|
|
</template> |
|
|
<template v-else-if="dailyChange < 0"> |
|
|
<template v-else-if="dailyChange < 0"> |
|
|
<el-icon style="color:forestgreen"> |
|
|
<el-icon style="color:forestgreen"> |
|
|
<ArrowDownBold /> |
|
|
|
|
|
|
|
|
<ArrowDownBold/> |
|
|
</el-icon> |
|
|
</el-icon> |
|
|
</template> |
|
|
</template> |
|
|
<template v-else> |
|
|
<template v-else> |
|
|
<el-icon style="color:grey"> |
|
|
<el-icon style="color:grey"> |
|
|
<SemiSelect /> |
|
|
|
|
|
|
|
|
<SemiSelect/> |
|
|
</el-icon> |
|
|
</el-icon> |
|
|
</template> |
|
|
</template> |
|
|
</div> |
|
|
</div> |
|
@ -89,34 +89,34 @@ |
|
|
<el-col class="center-card">周同比:{{ sumWow }}% |
|
|
<el-col class="center-card">周同比:{{ sumWow }}% |
|
|
<template v-if="sumWow > 0"> |
|
|
<template v-if="sumWow > 0"> |
|
|
<el-icon style="color:red"> |
|
|
<el-icon style="color:red"> |
|
|
<ArrowUpBold /> |
|
|
|
|
|
|
|
|
<ArrowUpBold/> |
|
|
</el-icon> |
|
|
</el-icon> |
|
|
</template> |
|
|
</template> |
|
|
<template v-else-if="sumWow < 0"> |
|
|
<template v-else-if="sumWow < 0"> |
|
|
<el-icon style="color:forestgreen"> |
|
|
<el-icon style="color:forestgreen"> |
|
|
<ArrowDownBold /> |
|
|
|
|
|
|
|
|
<ArrowDownBold/> |
|
|
</el-icon> |
|
|
</el-icon> |
|
|
</template> |
|
|
</template> |
|
|
<template v-else> |
|
|
<template v-else> |
|
|
<el-icon style="color:grey"> |
|
|
<el-icon style="color:grey"> |
|
|
<SemiSelect /> |
|
|
|
|
|
|
|
|
<SemiSelect/> |
|
|
</el-icon> |
|
|
</el-icon> |
|
|
</template> |
|
|
</template> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col class="center-card">日环比:{{ sumDaily }}% |
|
|
<el-col class="center-card">日环比:{{ sumDaily }}% |
|
|
<template v-if="sumDaily > 0"> |
|
|
<template v-if="sumDaily > 0"> |
|
|
<el-icon style="color:red"> |
|
|
<el-icon style="color:red"> |
|
|
<ArrowUpBold /> |
|
|
|
|
|
|
|
|
<ArrowUpBold/> |
|
|
</el-icon> |
|
|
</el-icon> |
|
|
</template> |
|
|
</template> |
|
|
<template v-else-if="sumDaily < 0"> |
|
|
<template v-else-if="sumDaily < 0"> |
|
|
<el-icon style="color:forestgreen"> |
|
|
<el-icon style="color:forestgreen"> |
|
|
<ArrowDownBold /> |
|
|
|
|
|
|
|
|
<ArrowDownBold/> |
|
|
</el-icon> |
|
|
</el-icon> |
|
|
</template> |
|
|
</template> |
|
|
<template v-else> |
|
|
<template v-else> |
|
|
<el-icon style="color:grey"> |
|
|
<el-icon style="color:grey"> |
|
|
<SemiSelect /> |
|
|
|
|
|
|
|
|
<SemiSelect/> |
|
|
</el-icon> |
|
|
</el-icon> |
|
|
</template> |
|
|
</template> |
|
|
</el-col> |
|
|
</el-col> |
|
@ -154,8 +154,10 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div style="width:25vw"> |
|
|
<div style="width:25vw"> |
|
|
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="→" start-placeholder="开始时间" |
|
|
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="→" start-placeholder="开始时间" |
|
|
end-placeholder="结束时间" format="YYYY-MM-DD HH:mm:ss" style="width:20vw" |
|
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" :disabled-date="disabledDate" @change="handleDatePickerChange" /> |
|
|
|
|
|
|
|
|
end-placeholder="结束时间" format="YYYY-MM-DD HH:mm:ss" style="width:20vw" |
|
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
|
:default-time="defaultTime" |
|
|
|
|
|
/> |
|
|
<el-button type="primary" style="margin-left: 5px" @click="getChartData">查询</el-button> |
|
|
<el-button type="primary" style="margin-left: 5px" @click="getChartData">查询</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</el-row> |
|
|
</el-row> |
|
@ -198,16 +200,20 @@ |
|
|
|
|
|
|
|
|
<script setup> |
|
|
<script setup> |
|
|
import * as echarts from 'echarts' |
|
|
import * as echarts from 'echarts' |
|
|
import { ref, onMounted, nextTick, watch, onUnmounted } from 'vue' |
|
|
|
|
|
|
|
|
import {ref, onMounted, nextTick, watch, onUnmounted} from 'vue' |
|
|
import API from '@/util/http' |
|
|
import API from '@/util/http' |
|
|
import { ElMessage } from 'element-plus' |
|
|
|
|
|
|
|
|
import {ElMessage} from 'element-plus' |
|
|
import dayjs from 'dayjs'; |
|
|
import dayjs from 'dayjs'; |
|
|
import utc from 'dayjs-plugin-utc' |
|
|
import utc from 'dayjs-plugin-utc' |
|
|
|
|
|
|
|
|
dayjs.extend(utc) |
|
|
dayjs.extend(utc) |
|
|
import { ArrowUpBold, ArrowDownBold, SemiSelect } from '@element-plus/icons-vue' |
|
|
|
|
|
import { marketMapping } from "@/utils/marketMap.js"; |
|
|
|
|
|
|
|
|
import {ArrowUpBold, ArrowDownBold, SemiSelect} from '@element-plus/icons-vue' |
|
|
|
|
|
import {marketMapping} from "@/utils/marketMap.js"; |
|
|
|
|
|
|
|
|
|
|
|
const defaultTime = [ |
|
|
|
|
|
new Date(2000, 1, 1, 0, 0, 0), |
|
|
|
|
|
new Date(2000, 2, 1, 23, 59, 59), |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
// 地区数据 |
|
|
// 地区数据 |
|
|
const markets = ref([]) |
|
|
const markets = ref([]) |
|
@ -308,7 +314,7 @@ const getToday = function () { |
|
|
// 本周 |
|
|
// 本周 |
|
|
const getWeek = function () { |
|
|
const getWeek = function () { |
|
|
const today = dayjs() |
|
|
const today = dayjs() |
|
|
const startTime = (today.startOf('week').add(1, 'day')).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
|
|
|
|
|
const startTime = (today.startOf('week').format('YYYY-MM-DD HH:mm:ss')) |
|
|
const endTime = today.endOf('week').format('YYYY-MM-DD HH:mm:ss') |
|
|
const endTime = today.endOf('week').format('YYYY-MM-DD HH:mm:ss') |
|
|
// const endTime = today.add(1, 'week').startOf('week').add(1, 'day').format('YYYY-MM-DD HH:mm:ss') |
|
|
// const endTime = today.add(1, 'week').startOf('week').add(1, 'day').format('YYYY-MM-DD HH:mm:ss') |
|
|
dateRange.value = [startTime, endTime] |
|
|
dateRange.value = [startTime, endTime] |
|
@ -425,11 +431,6 @@ const processData = (data) => { |
|
|
ydayRechargeNum.value = summary.ydayRechargeNum |
|
|
ydayRechargeNum.value = summary.ydayRechargeNum |
|
|
firstRecharge.value = summary.firstRecharge |
|
|
firstRecharge.value = summary.firstRecharge |
|
|
} |
|
|
} |
|
|
//无法选择的时间 |
|
|
|
|
|
const disabledDate = (time) => { |
|
|
|
|
|
const limitDate = new Date(2025, 0, 1); |
|
|
|
|
|
return time.getTime() < limitDate.getTime(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 获取市场列表 |
|
|
// 获取市场列表 |
|
|
const getMarkets = async () => { |
|
|
const getMarkets = async () => { |
|
@ -610,7 +611,7 @@ const updateChart = (chartData) => { |
|
|
type: 'bar', |
|
|
type: 'bar', |
|
|
stack: 'recharge', |
|
|
stack: 'recharge', |
|
|
data: chartData.rechargePermanent, |
|
|
data: chartData.rechargePermanent, |
|
|
itemStyle: { color: '#5470c6' }, |
|
|
|
|
|
|
|
|
itemStyle: {color: '#5470c6'}, |
|
|
barWidth: 30 |
|
|
barWidth: 30 |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@ -618,7 +619,7 @@ const updateChart = (chartData) => { |
|
|
type: 'bar', |
|
|
type: 'bar', |
|
|
stack: 'recharge', |
|
|
stack: 'recharge', |
|
|
data: chartData.rechargeFree, |
|
|
data: chartData.rechargeFree, |
|
|
itemStyle: { color: '#91cc75' }, |
|
|
|
|
|
|
|
|
itemStyle: {color: '#91cc75'}, |
|
|
barWidth: 30 |
|
|
barWidth: 30 |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@ -626,7 +627,7 @@ const updateChart = (chartData) => { |
|
|
type: 'bar', |
|
|
type: 'bar', |
|
|
stack: 'recharge', |
|
|
stack: 'recharge', |
|
|
data: chartData.rechargeTask, |
|
|
data: chartData.rechargeTask, |
|
|
itemStyle: { color: '#fac858' }, |
|
|
|
|
|
|
|
|
itemStyle: {color: '#fac858'}, |
|
|
barWidth: 30 |
|
|
barWidth: 30 |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
@ -638,7 +639,7 @@ const updateChart = (chartData) => { |
|
|
type: 'bar', |
|
|
type: 'bar', |
|
|
stack: 'consume', |
|
|
stack: 'consume', |
|
|
data: chartData.consumePermanent, |
|
|
data: chartData.consumePermanent, |
|
|
itemStyle: { color: '#5470c6' }, |
|
|
|
|
|
|
|
|
itemStyle: {color: '#5470c6'}, |
|
|
barWidth: 30 |
|
|
barWidth: 30 |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@ -646,7 +647,7 @@ const updateChart = (chartData) => { |
|
|
type: 'bar', |
|
|
type: 'bar', |
|
|
stack: 'consume', |
|
|
stack: 'consume', |
|
|
data: chartData.consumeFree, |
|
|
data: chartData.consumeFree, |
|
|
itemStyle: { color: '#91cc75' }, |
|
|
|
|
|
|
|
|
itemStyle: {color: '#91cc75'}, |
|
|
barWidth: 30 |
|
|
barWidth: 30 |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@ -654,7 +655,7 @@ const updateChart = (chartData) => { |
|
|
type: 'bar', |
|
|
type: 'bar', |
|
|
stack: 'consume', |
|
|
stack: 'consume', |
|
|
data: chartData.consumeTask, |
|
|
data: chartData.consumeTask, |
|
|
itemStyle: { color: '#fac858' }, |
|
|
|
|
|
|
|
|
itemStyle: {color: '#fac858'}, |
|
|
barWidth: 30 |
|
|
barWidth: 30 |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
@ -735,7 +736,7 @@ const handleTabChange = () => { |
|
|
|
|
|
|
|
|
const getAdminData = async function () { |
|
|
const getAdminData = async function () { |
|
|
try { |
|
|
try { |
|
|
const result = await API({ url: '/admin/userinfo', data: {} }) |
|
|
|
|
|
|
|
|
const result = await API({url: '/admin/userinfo', data: {}}) |
|
|
adminData.value = result |
|
|
adminData.value = result |
|
|
console.log('用户信息', adminData.value) |
|
|
console.log('用户信息', adminData.value) |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
@ -745,7 +746,7 @@ const getAdminData = async function () { |
|
|
// 获取卡片数据 |
|
|
// 获取卡片数据 |
|
|
const getCardData = async () => { |
|
|
const getCardData = async () => { |
|
|
try { |
|
|
try { |
|
|
const response = await API({ url: '/workbench/getCard', data: {} }) |
|
|
|
|
|
|
|
|
const response = await API({url: '/workbench/getCard', data: {}}) |
|
|
workDataUpdateTime.value = response.updateTime |
|
|
workDataUpdateTime.value = response.updateTime |
|
|
// 周同比 |
|
|
// 周同比 |
|
|
sumWow.value = response.sumWow.toFixed(2) |
|
|
sumWow.value = response.sumWow.toFixed(2) |
|
|