Browse Source

调整 尖峰平谷

zhengkaixin 1 năm trước cách đây
mục cha
commit
f5d616a761
1 tập tin đã thay đổi với 19 bổ sung6 xóa
  1. 19 6
      pages/mine/electronicMonitoring.vue

+ 19 - 6
pages/mine/electronicMonitoring.vue

@@ -431,7 +431,7 @@
 				})
 			},
 			getPle(list,interval){
-				 
+				
 				if (!this.myChart) {
 					this.myChart = echarts.init(document.getElementById('pieEcharts'),null,{
 						width:uni.upx2px(700),height:uni.upx2px(480)
@@ -459,6 +459,7 @@
 				}
 				
 				if(data1.length<8){
+					
 					axisLabel={
 					
 					interval:0,
@@ -474,10 +475,23 @@
 					 tooltip: {
 					    trigger: 'axis',
 						 formatter: (value) => {
-							 //var dataIndex = value[0].dataIndex;
+							var dataIndex = value[0].dataIndex;
+							
+							var name2=''
+							
+							if(dataIndex+1==data1.length){
+								name2="24:00"
+							}else{
+								name2=data1[dataIndex+1];
+							}
 							 var name = value[0].name;
+							 
 							 var obj=this.hourMap[name]
-							var text= `<p>${name}</p>`
+							 var text= `<p>${name}</p>`
+							 if(data1.length<8){
+								  text= `<p>${name}-${name2}</p>`
+							 }
+							
 							if(obj.electricityPrice!=undefined){
 								text+=`<p>电价:${obj.electricityPrice}元/度</p>`
 							}
@@ -493,8 +507,8 @@
 					  },
 					grid: {
 						top: '6%',
-						left: '3%',
-						right: '8%',
+						left: 0,
+						right: 40,
 						bottom: '8%',
 						containLabel: true
 					},
@@ -506,7 +520,6 @@
 					  },
 					  yAxis: {
 					    type: 'value',
-						
 					  },
 					  series: [
 					    {