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