ソースを参照

能源中心调整

zhengkaixin 3 年 前
コミット
cada556ca9

+ 32 - 88
src/projects/business/views/Other/Energy/Info.vue

@@ -389,7 +389,7 @@
 					if(!this.setIntervalId){
 						this.setIntervalId=setInterval(()=>{
 							this.getEnergyCenterMap()
-						},30*1000)
+						},10*1000)
 					}
 					
 
@@ -414,17 +414,28 @@
 						type: 'gauge',
 						itemStyle: {
 
-							color: '#78f898',
+							color: '#78f898',
+							  
 						},
-						progress: {
+						progress: {
+							
+							itemStyle:{
+								borderCap :'round',
+								 borderWidth:5,
+								 borderColor :'#78f898'
+							},
 							show: true,
 							roundCap: true,
-							width: 18
+							width: 5
 						},
 						axisLine: {
 							roundCap: true,
 							lineStyle: {
-								width: 18
+								width: 7,
+								 color: [
+								          
+								            [1, '#6c99f8']
+								]
 							}
 						},
 						axisTick: {
@@ -451,9 +462,20 @@
 								borderWidth: 10
 							}
 						},
-						pointer: {
-							show: false
-						},
+						"pointer": {
+						                "icon": "circle",
+						                "length": "15%",
+						                "width": 20,
+						                    
+						                "offsetCenter": [
+						                    0,
+						                    "-90%"
+						                ],
+						                "itemStyle": {
+						                  "color": "#78f898",
+						                   
+						                }
+						            },
 						title: {
 							offsetCenter: [0, '-40%'],
 							fontSize: 16,
@@ -486,7 +508,8 @@
 							value: this.energyCenterMapObj.nowKw,
 						}]
 					}]
-				};
+				};
+				console.log(option)
 				myChart.setOption(option);
 
 
@@ -567,85 +590,6 @@
 
 				}
 
-			},
-			echarts(className, color, legenddata, seriesdata) {
-				var colorName = ""
-				if (color == '1') {
-					colorName = "#ECEDF0"
-				} else {
-					colorName = "#333"
-				}
-
-				var myChart = echarts.init(document.getElementById(className), 'light');
-				myChart.clear()
-				var option = {
-
-					tooltip: {
-						trigger: 'axis',
-						borderColor: "#F0F0F0",
-						borderWidth: 1,
-						backgroundColor: "#ffffff",
-						textStyle: {
-							color: "#333"
-						}
-					},
-					legend: {
-						data: legenddata,
-						textStyle: {
-							color: colorName
-						}
-					},
-					grid: {
-						left: '3%',
-						right: '4%',
-						bottom: '15%',
-						containLabel: true
-					},
-
-					xAxis: {
-						type: 'category',
-						boundaryGap: false,
-						data: this.timeList,
-						axisLabel: {
-							textStyle: {
-								color: colorName
-							}
-						},
-						axisLine: {
-							show: true,
-							lineStyle: {
-								color: colorName
-							}
-						},
-					},
-					yAxis: {
-						type: 'value',
-
-						axisLabel: {
-							textStyle: {
-								color: colorName
-							}
-						},
-						axisLine: {
-							show: true,
-							lineStyle: {
-								color: colorName
-							}
-						},
-					},
-					dataZoom: [{
-							type: 'inside',
-							start: 0,
-							end: 100
-						},
-						{
-							start: 0,
-							end: 100
-						}
-					],
-					series: seriesdata
-				};
-				myChart.setOption(option);
 			}
 		}
 	}

+ 17 - 29
src/projects/business/views/Other/Energy/Info2.vue

@@ -34,31 +34,26 @@
 					</tr>
 					<tr v-if="type=='P'">
 						<td class="tableft">总功率</td>
-						<td>{{currentMap.AL1}}</td>
+						<td>{{queryDate==nowDate?currentMap.AL1:'\\'}}</td>
 						<td>{{currentMap.AL2}}</td>
 						<td>{{currentMap.AL3}}</td>
 					</tr>
-					<tr v-if="type=='P'">
-						<td class="tableft">三相总功率</td>
-						<td>{{currentMap.A1+currentMap.B1+currentMap.C1}}</td>
-						<td>\</td>
-						<td>\</td>
-					</tr>
+				 
 					<tr>
 						<td class="tableft">A相</td>
-						<td>{{currentMap.A1}}</td>
+						<td>{{queryDate==nowDate?currentMap.A1:'\\'}}</td>
 						<td>{{currentMap.A2}}</td>
 						<td>{{currentMap.A3}}</td>
 					</tr>
 					<tr>
 						<td class="tableft">B相</td>
-						<td>{{currentMap.B1}}</td>
+						<td>{{queryDate==nowDate?currentMap.B1:'\\'}}</td>
 						<td>{{currentMap.B2}}</td>
 						<td>{{currentMap.B3}}</td>
 					</tr>
 					<tr>
 						<td class="tableft">C相</td>
-						<td>{{currentMap.C1}}</td>
+						<td>{{queryDate==nowDate?currentMap.C1:'\\'}}</td>
 						<td>{{currentMap.C2}}</td>
 						<td>{{currentMap.C3}}</td>
 					</tr>
@@ -172,43 +167,36 @@
 									
 					this.timeList.push(i)
 				}
-				this.showlist1=['总功率','三相总功率','A相功率','B相功率','C相功率'];
+				this.showlist1=['总功率','A相功率','B相功率','C相功率'];
 							
 				this.showlist2=['A相电流','B相电流','C相电流'];
 				this.showlist3=['A相电压','B相电压','C相电压'];
 				
-				var sz1=['总功率','三相总功率','A相功率','B相功率','C相功率'];
+				var sz1=['总功率','A相功率','B相功率','C相功率'];
 				var sz2=['A相电流','B相电流','C相电流'];
 				var sz3=['A相电压','B相电压','C相电压'];
 				var list1=[];
 				var list2=[];
 				var list3=[];
-				this.setSz(sz2,['aa','ba','ca'],list2,this.graphMap,this.showlist2)
-				this.setSz(sz3,['av','bv','cv'],list3,this.graphMap,this.showlist3)
+		
 				
 				if(this.type=='P'){
 					this.typeName='功率'
-					var energyCenterMapObj=this.graphMap
-					for(var i in energyCenterMapObj){
-						var ap=parseInt(energyCenterMapObj[i].ap);
-						var bp=parseInt(energyCenterMapObj[i].bp);
-						var cp=parseInt(energyCenterMapObj[i].cp);
-						
-						energyCenterMapObj[i].allP=ap+bp+cp
-						 
-					}
-					this.energyCenterMapObj=energyCenterMapObj;
 					
-					this.setSz(sz1,['totalPower','allP','ap','bp','cp'],list1,this.graphMap,this.showlist1)
+					
+					this.setSz(sz1,['totalPower','ap','bp','cp'],list1,this.graphMap,this.showlist1)
 					
 					this.echarts('kwPicture',1,this.showlist1,list1);
 					
 				}else if(this.type=='A'){
 					this.typeName='电流'
+							this.setSz(sz2,['aa','ba','ca'],list2,this.graphMap,this.showlist2)
 					this.echarts('kwPicture',0,this.showlist2,list2);
 					
 				}else if(this.type=='V'){
 					this.typeName='电压'
+					this.setSz(sz3,['av','bv','cv'],list3,this.graphMap,this.showlist3)
+					
 					this.echarts('kwPicture',0,this.showlist3,list3);
 					
 				}
@@ -232,11 +220,11 @@
 					list.push(ap)
 					for(var i in energyCenterMapObj){
 						var obj=energyCenterMapObj[i][sz2[j]];
-						if(obj){
-							var time = new Date(this.nowDate+' '+i).getTime()
+						
+							var time = new Date(this.queryDate+' '+i).getTime()
 							
 							ap.data.push([time,parseInt(obj)]);
-						}
+						
 						
 					}
 				}
@@ -299,7 +287,7 @@
 							  },
 							  yAxis: {
 								type: 'value',
-								name: '单位('+this.typeN+')',
+								name: '单位('+this.typeN+')',
 								  axisLabel:{
 									
 								      textStyle:{