1 line
7.0 KiB
JavaScript
1 line
7.0 KiB
JavaScript
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/fertilizer_machine/fertilizer_machine"],{"0437":function(t,e,i){"use strict";i.r(e);var n=i("cc0a"),a=i.n(n);for(var r in n)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(r);e["default"]=a.a},6498:function(t,e,i){"use strict";i.r(e);var n=i("f8ee"),a=i("0437");for(var r in a)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(r);i("a3e9");var u=i("f0c5"),o=Object(u["a"])(a["default"],n["b"],n["c"],!1,null,"0c2173b6",null,!1,n["a"],void 0);e["default"]=o.exports},"991d":function(t,e,i){},a3e9:function(t,e,i){"use strict";var n=i("991d"),a=i.n(n);a.a},a653:function(t,e,i){"use strict";(function(t,e){var n=i("4ea4");i("d913");n(i("66fd"));var a=n(i("6498"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(a.default)}).call(this,i("bc2e")["default"],i("543d")["createPage"])},cc0a:function(t,e,i){"use strict";var n=i("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a,r=n(i("9523")),u={data:function(){return{background:{backgroundColor:"#24B383"},dataInfo2_list:[{image:"/static/icon_1.png",title:"灌溉剩余时长",timer:"0min"},{image:"/static/icon_2.png",title:"灌溉瞬时流量",timer:"0L/h"},{image:"/static/icon_3.png",title:"本次灌溉量",timer:"0L"},{image:"/static/icon_4.png",title:"启动方式",timer:"无"},{image:"/static/icon_5.png",title:"使用灌溉配方号",timer:"0"},{image:"/static/icon_6.png",title:"执行灌溉组号",timer:"0"}],signalCurrent:0,show:!1,rightList2:["外控信号2#","外控信号1#","外控信号3#","外控信号4#","高液位信号","中液位信号","低液位信号","电机信号"],irrigate_value1:0,irrigate_value2:0,irrigate_value3:0,deviceId:0,inputData:[],centerBottom:[],right2Index:[],openType:"",left1Act:-1,topActive:0,indexs:1,inputData1:[]}},watch:{},onLoad:function(t){this.deviceId=t.id,this.dataInit()},methods:(a={countData10:function(t){return t?t/10:0},dataInit:function(){var t=this,e=this,i=this.deviceId,n={equipmentId:i,pattern:0,regNum:71};this.$http({url:this.api.readFs_state,data:n}).then((function(i){200==i.code?(t.inputData=i.data,t.getData30(),t.getData29(),t.getDataInfo2(),t.getcenterBottom()):e.$refs.uToast.show({title:i.msg,type:"error"})}))},getReg:function(){var t=this,e=this,i={equipmentId:this.deviceId,pattern:this.indexs-1+10+"00",regNum:61};this.$http({url:this.api.readFs_reg,data:i}).then((function(i){console.log(i,11),200==i.code?(t.inputData1=i.data,t.getType00(),t.inputData1[t.indexs-1+10+"01"]=t.countData10(t.inputData1[t.indexs-1+10+"01"]),console.log(t.inputData1[t.indexs-1+10+"01"],111)):e.$refs.uToast.show({title:i.msg,type:"error"})}))},padString:function(t,e){return t.padStart(e,"0")},getType00:function(){var t=this.padString(this.inputData1[this.indexs-1+10+"00"].toString(2),3);console.log(t),Number(t[0])?this.topActive=1:Number(t[1])?this.topActive=2:Number(t[2])?this.topActive=3:this.topActive=0},change00:function(t){this.topActive=t;var e=["0","0","0"];e[0]=1==t?"1":"0",e[1]=2==t?"1":"0",e[2]=3==t?"1":"0";var i=e.join(""),n={target:{value:parseInt(i,2)}};this.change(this.indexs-1+10+"00",n)},getDataInfo2:function(){var t=this.inputData;this.dataInfo2_list[0].timer=this.countData(t["36"])+"min",this.dataInfo2_list[1].timer=this.countData(t["28"])+"L/h",this.dataInfo2_list[2].timer=this.countData(t["37"])+"L",this.dataInfo2_list[4].timer=this.countData(t["31"]),this.dataInfo2_list[5].timer=this.countData(t["38"])},getData29:function(){for(var t=this.padString(this.inputData["29"].toString(2),14),e=-1,i=0;i<6;i++)Number(t[i])&&(e=i);this.openType=this.getType29(e),this.dataInfo2_list[3].timer=this.getType29(e);for(var n=0;n<8;n++)Number(t[t.length-n])&&this.right2Index.push(n)},getData30:function(){var t=this.padString(this.inputData["30"].toString(2),2);Number(t[0])?this.left1Act=1:Number(t[1])?this.left1Act=0:this.left1Act=-1},changeData10:function(t,e){var i=10*e.target.value,n={target:{value:i}};this.change(t,n)},change:function(t,e){var i={equipmentId:this.deviceId,regAddress:t,num:e.target.value};this.del
|