|
|
|
@ -2,10 +2,11 @@
|
|
|
|
|
<el-card shadow="never">
|
|
|
|
|
<template #header>
|
|
|
|
|
<div class="flex flex-row items-center justify-between">
|
|
|
|
|
<CardTitle title="换电站信息统计" />
|
|
|
|
|
<CardTitle title="充换电站信息统计" />
|
|
|
|
|
<!-- 查询条件 -->
|
|
|
|
|
<div class="flex flex-row items-center gap-2">
|
|
|
|
|
<el-radio-group v-model="timeRangeType" @change="handleTimeRangeTypeChange">
|
|
|
|
|
<el-radio-group v-model="timeRangeType">
|
|
|
|
|
<!-- <el-radio-group v-model="timeRangeType" @change="handleTimeRangeTypeChange"> -->
|
|
|
|
|
<el-radio-button v-for="[key, value] in timeRange.entries()" :key="key" :label="key">
|
|
|
|
|
{{ value.name }}
|
|
|
|
|
</el-radio-button>
|
|
|
|
@ -49,6 +50,9 @@ const timeRange = new Map()
|
|
|
|
|
.set(TimeRangeTypeEnum.WEEK, {
|
|
|
|
|
name: '周',
|
|
|
|
|
series: [
|
|
|
|
|
// { name: '充换电营收', type: 'bar', smooth: true, data: [ 29792.40,18646.14,15153.60,14488.05,7735.55,6667.58,7035.60] },
|
|
|
|
|
// { name: '充换电量', type: 'line', smooth: true, data: [ 35636.84,18949.33,18126.32,16062.14,9609.38,7620.10,7680.79] }
|
|
|
|
|
// ]
|
|
|
|
|
{ name: '上周', type: 'bar', smooth: true, data: [] },
|
|
|
|
|
{ name: '本周', type: 'bar', smooth: true, data: [] },
|
|
|
|
|
{ name: '上周', type: 'line', smooth: true, data: [] },
|
|
|
|
@ -86,15 +90,15 @@ const eChartOptions = reactive<EChartsOption>({
|
|
|
|
|
trigger: 'axis'
|
|
|
|
|
},
|
|
|
|
|
legend: {
|
|
|
|
|
// data: ['换电营收', '换电量', '换电次数']
|
|
|
|
|
data: ['换电营收', '换电量']
|
|
|
|
|
// data: ['充换电营收', '充换电量', '换电次数']
|
|
|
|
|
data: ['充换电营收', '充换电量']
|
|
|
|
|
},
|
|
|
|
|
calculable: true,
|
|
|
|
|
xAxis: [
|
|
|
|
|
{
|
|
|
|
|
type: 'category',
|
|
|
|
|
// prettier-ignore
|
|
|
|
|
data: []
|
|
|
|
|
data: ['平泽仓储站','长沙站','合肥站','前兴石材厂站','南京站','海口站','石家庄站' ]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
yAxis: [
|
|
|
|
@ -104,13 +108,13 @@ const eChartOptions = reactive<EChartsOption>({
|
|
|
|
|
],
|
|
|
|
|
series: [
|
|
|
|
|
{
|
|
|
|
|
name: '换电营收',
|
|
|
|
|
name: '充换电营收',
|
|
|
|
|
type: 'bar',
|
|
|
|
|
data: [],
|
|
|
|
|
data: [ 29792.40, 18646.14, 15153.60,14488.05,7735.55,6667.58,7035.60],
|
|
|
|
|
markPoint: {
|
|
|
|
|
data: [
|
|
|
|
|
{ type: 'max', name: 'Max' },
|
|
|
|
|
{ type: 'min', name: 'Min' }
|
|
|
|
|
// { type: 'max', name: 'Max' },
|
|
|
|
|
// { type: 'min', name: 'Min' }
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
markLine: {
|
|
|
|
@ -118,13 +122,13 @@ const eChartOptions = reactive<EChartsOption>({
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '换电量',
|
|
|
|
|
name: '充换电量',
|
|
|
|
|
type: 'bar',
|
|
|
|
|
data: [],
|
|
|
|
|
data: [ 35636.84,18949.33,18126.32,16062.14,9609.38,7620.10,7680.79],
|
|
|
|
|
markPoint: {
|
|
|
|
|
data: [
|
|
|
|
|
{ name: 'Max', value: 182.2, xAxis: 7, yAxis: 183 },
|
|
|
|
|
{ name: 'Min', value: 2.3, xAxis: 11, yAxis: 3 }
|
|
|
|
|
// { name: 'Max', value: 182.2, xAxis: 7, yAxis: 183 },
|
|
|
|
|
// { name: 'Min', value: 2.3, xAxis: 11, yAxis: 3 }
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
markLine: {
|
|
|
|
@ -137,8 +141,8 @@ const eChartOptions = reactive<EChartsOption>({
|
|
|
|
|
data: [],
|
|
|
|
|
markPoint: {
|
|
|
|
|
data: [
|
|
|
|
|
{ name: 'Max', value: 182.2, xAxis: 7, yAxis: 183 },
|
|
|
|
|
{ name: 'Min', value: 2.3, xAxis: 11, yAxis: 3 }
|
|
|
|
|
// { name: 'Max', value: 182.2, xAxis: 7, yAxis: 183 },
|
|
|
|
|
// { name: 'Min', value: 2.3, xAxis: 11, yAxis: 3 }
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
markLine: {
|
|
|
|
@ -192,10 +196,11 @@ const getlist = async () => {
|
|
|
|
|
queryparams.value.endTime = convertToTimestamp(queryparams.value.endTime)
|
|
|
|
|
// 查询数据
|
|
|
|
|
const response = await MemberStatisticsApi.getHomeSwapInfo(queryparams.value)
|
|
|
|
|
console.log(response,"shuju")
|
|
|
|
|
let x_data = []
|
|
|
|
|
// 换电营收
|
|
|
|
|
// 充换电营收
|
|
|
|
|
let y_data_1 = []
|
|
|
|
|
// 换电量
|
|
|
|
|
// 充换电量
|
|
|
|
|
let y_data_2 = []
|
|
|
|
|
// 换电次数
|
|
|
|
|
// let y_data_3 = []
|
|
|
|
@ -326,8 +331,8 @@ const getCurrentDateTime = () => {
|
|
|
|
|
|
|
|
|
|
/** 初始化 **/
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
queryparams.value.startTime = getDatesFromStartOfMonthToToday(new Date())
|
|
|
|
|
queryparams.value.endTime = getCurrentDateTime()
|
|
|
|
|
getlist()
|
|
|
|
|
// queryparams.value.startTime = getDatesFromStartOfMonthToToday(new Date())
|
|
|
|
|
// queryparams.value.endTime = getCurrentDateTime()
|
|
|
|
|
// getlist()
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|