diff --git a/src/views/stationOperation/components/RealTimeDataChart.vue b/src/views/stationOperation/components/RealTimeDataChart.vue
index 37afcc8..357a78a 100644
--- a/src/views/stationOperation/components/RealTimeDataChart.vue
+++ b/src/views/stationOperation/components/RealTimeDataChart.vue
@@ -29,8 +29,10 @@
import CustomChart from '@/components/CustomChart/index.vue'
import * as echarts from 'echarts'
import dayjs from 'dayjs'
+import utc from 'dayjs/plugin/utc'
import { cloneDeep } from 'lodash'
+dayjs.extend(utc)
const typeList = ['MET', 'SOH', 'QC', 'PHD'] //
// 自定义图例列表
@@ -71,10 +73,15 @@ const legendList = [
const initialOption = {
tooltip: {
formatter: (params) => {
+ // return `
+ //
${params.marker}${params.name}
+ // START:${dayjs(new Date(params.value[4])).format('YYYY-MM-DD HH:mm:ss')}
+ // END:${dayjs(new Date(params.value[2])).format('YYYY-MM-DD HH:mm:ss')}
+ // `
return `
${params.marker}${params.name}
- START:${dayjs(new Date(params.value[4])).format('YYYY-MM-DD HH:mm:ss')}
- END:${dayjs(new Date(params.value[2])).format('YYYY-MM-DD HH:mm:ss')}
+ START:${dayjs.utc(params.value[4]).format('YYYY-MM-DD HH:mm:ss')}
+ END:${dayjs.utc(params.value[2]).format('YYYY-MM-DD HH:mm:ss')}
`
},
},
@@ -203,8 +210,9 @@ export default {
axisLabel: {
show: true,
formatter: (val) => {
- let dateTime = new Date(val)
- return dayjs(dateTime).format('HH:mm\nMM/DD')
+ // let dateTime = new Date(val)
+ // return dayjs.utc(dateTime).format('HH:mm\nMM/DD')
+ return dayjs.utc(val).format('HH:mm\nMM/DD')
},
color: '#ade6ee',
},