| 
					
				 | 
			
			
				@@ -320,25 +320,18 @@ function initChart(row,list) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   const chart = echarts.init(chartRef.value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  // 模拟数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  // 使用实际数据,并将数据按时间正序排列 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   const xAxisData = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   const smokeData = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   const temperatureData = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   const humidityData = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  for (let i = 0; i < list.length; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  for (let i = list.length - 1; i >= 0; i--) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const item = list[i]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     xAxisData.push(item.createTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     smokeData.push(item.smoke); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     temperatureData.push(item.tmp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     humidityData.push(item.rh); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  for (let i = 0; i < 24; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    xAxisData.push(`${i}:00`); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 烟雾值只有0和1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    smokeData.push(Math.random() > 0.9 ? 1 : 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    temperatureData.push(Math.floor(Math.random() * 40)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    humidityData.push(Math.floor(Math.random() * 100)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   const option = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // title: { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -353,11 +346,11 @@ function initChart(row,list) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     dataZoom: [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         type: 'inside', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        start: 98, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        start: 80, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         end: 100 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        start: 98, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        start: 80, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         end: 100 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     ], 
			 |