Browse Source

解决y轴绑定错误 曲线图数据问题

zhaomiao 4 years ago
parent
commit
586e7becb8
2 changed files with 15 additions and 12 deletions
  1. 6 5
      components/windFarmcard/WindFarmcard.vue
  2. 9 7
      pages/index/Index.vue

+ 6 - 5
components/windFarmcard/WindFarmcard.vue

@@ -163,7 +163,7 @@
 							format: val => {
 								return val + 'kwh';
 							},
-							index: 0,
+							index: 1,
 							legendShape: 'circle'
 						},
 						{
@@ -175,7 +175,7 @@
 							format: val => {
 								return val + 'm/s';
 							},
-							index: 1,
+							index: 0,
 							legendShape: 'circle'
 						},
 						{
@@ -187,7 +187,7 @@
 							format: val => {
 								return val + 'kwh';
 							},
-							index: 0,
+							index: 1,
 							legendShape: 'circle'
 						},
 						{
@@ -210,7 +210,8 @@
 				LineC.series[1].data = [];
 				LineC.series[2].data = [];
 				LineC.series[3].data = [];
-				//console.log( _this.lineChartdata)
+				console.log("======");
+				console.log( _this.lineChartdata);
 				for (var i = 0; i < _this.lineChartdata.length; i++) {
 					LineC.categories.push(_this.uchartTime[i]);
 					// console.log(LineC.categories)
@@ -287,7 +288,7 @@
 						],
 						disabled: false,
 						gridColor: '#2E2E2E',
-						splitNumber: 4,
+						splitNumber: 5,
 						gridType: 'solid',
 						dashLength: 8,
 						showTitle: 'true',

+ 9 - 7
pages/index/Index.vue

@@ -713,7 +713,7 @@ export default {
 			// }
 
 			this.windStationCardContainerwidth = 260 * this.plusDrawerList.length - 260 + 'px';
-			console.log(this.windStationCardContainerwidth);
+			
 		},
 		judgeWindfield: function() {
 			this.plusDrawerList = uni.getStorageSync('plusList');
@@ -1064,13 +1064,13 @@ export default {
 									return val + 'kwh';
 								},
 
-								index: 0,
+								index: 1,
 
 								legendShape: 'circle'
 							},
 
 							{
-								name: '实际功率',
+								name: '风速',
 
 								data: [],
 
@@ -1084,7 +1084,7 @@ export default {
 									return val + 'm/s';
 								},
 
-								index: 1,
+								index: 0,
 
 								legendShape: 'circle'
 							},
@@ -1104,13 +1104,13 @@ export default {
 									return val + 'kwh';
 								},
 
-								index: 0,
+								index: 1,
 
 								legendShape: 'circle'
 							},
 
 							{
-								name: '风速',
+								name: '实际功率',
 
 								data: [],
 
@@ -1145,7 +1145,8 @@ export default {
 						Line.series[2].data.push(_this.linedata[i].value3);
 						Line.series[3].data.push(_this.linedata[i].value4);
 					}
-
+						console.log("===");
+						console.log(Line);
 					_this.showLineA('canvasLineA', Line);
 
 					/* 
@@ -1351,6 +1352,7 @@ export default {
 				this.socketTask_index_target_basic_indicators.onMessage(res => {
 					//console.log("收到服务器内容:" + res.data);
 					_this.windpowerstationdetail.index_target_basic_indicators = JSON.parse(res.data)[_this.FDC];
+					console.log(_this.windpowerstationdetail);
 				});
 			});
 			// 这里仅是事件监听【如果socket关闭了会执行】