| 
					
				 | 
			
			
				@@ -136,6 +136,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     <div class="layui-clear" style="margin-left: 15px"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         <button onclick="offset()" class="layui-btn layui-btn-normal layui-btn-sm">偏移(固定)</button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         <button onclick="offsetRandom()" class="layui-btn layui-btn-normal layui-btn-sm">偏移(随机) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        <button onclick="ProportionalScaling()" class="layui-btn layui-btn-normal layui-btn-sm">等比缩放 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         </button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <!--                        <button onclick="copyFrom()" class="layui-btn layui-btn-normal layui-btn-sm">复制到</button>--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         <button onclick="repair()" class="layui-btn layui-btn-normal layui-btn-sm">补漏</button> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -169,6 +170,20 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<div style="display: none;padding: 20px" id="ProportionalScaling"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <div class="layui-form"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <div class="layui-form-item"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            温度: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <input type="number" class="layui-input" lay-verify="number" placeholder="固定下调温度" id="Temperature" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                   value="0"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <div class="layui-form-item"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            湿度: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <input type="number" class="layui-input" lay-verify="number" placeholder="固定下调湿度" id="Humidity" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                   value="0"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <!--随机偏移--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <div style="display: none;padding: 20px;justify-content: center" id="offsetRand"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <div class="layui-form"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -677,6 +692,56 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //等比缩放 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    function ProportionalScaling() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (timeRange.length === 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            layui.layer.msg('请在图中选择要操作数据的区域!') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //2.layer 打开一个窗口设置要统一设置下移的数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        layui.layer.open({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            type: 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            area: ['300px', '270px'], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            content: $('#ProportionalScaling'), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            btn: '确定', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            btnAlign: 'c', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            yes: function (index, elem) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                let Temperature = $('#Temperature').val(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                let Humidity = $('#Humidity').val(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (Humidity === "" || Temperature === "") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    //提示消息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    layui.layer.msg("没有设置固定温湿度偏移") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //3.发送修改数据区域进行循环对值进行统一下调 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                let index2 = loading(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $.ajax({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    type: 'POST', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    url: '/Data/ProportionalScaling', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    data: JSON.stringify({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        fixTemperature: Temperature, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        fixHumidity: Humidity, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        sns: getSelectedSn(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        data: timeRange 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    }), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    contentType: 'application/json;charset=utf-8', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    processData: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    success: function (rlt) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        layui.layer.close(index2) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (rlt.Code === 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            //3.1判断是否处理成功 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            //3.1.1成功更新该设备的数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            timeRange = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            loadEcharts() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            layui.layer.close(index) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //提示消息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        layui.layer.msg(rlt.Msg) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //删除 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     function Delete() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (timeRange.length === 0) { 
			 |