index.js 8.2 KB

12
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/environment/index"],{807:function(e,t,i){"use strict";(function(e,t){var n=i(4);i(26);n(i(25));var a=n(i(808));e.__webpack_require_UNI_MP_PLUGIN__=i,t(a.default)}).call(this,i(1)["default"],i(2)["createPage"])},808:function(e,t,i){"use strict";i.r(t);var n=i(809),a=i(811);for(var s in a)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return a[e]}))}(s);i(813);var r,o=i(32),u=Object(o["default"])(a["default"],n["render"],n["staticRenderFns"],!1,null,null,null,!1,n["components"],r);u.options.__file="pages/environment/index.vue",t["default"]=u.exports},809:function(e,t,i){"use strict";i.r(t);var n=i(810);i.d(t,"render",(function(){return n["render"]})),i.d(t,"staticRenderFns",(function(){return n["staticRenderFns"]})),i.d(t,"recyclableRender",(function(){return n["recyclableRender"]})),i.d(t,"components",(function(){return n["components"]}))},810:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"render",(function(){return a})),i.d(t,"staticRenderFns",(function(){return r})),i.d(t,"recyclableRender",(function(){return s})),i.d(t,"components",(function(){return n}));try{n={uniNavBar:function(){return i.e("components/uni-nav-bar/uni-nav-bar").then(i.bind(null,1164))},uIcon:function(){return i.e("uview-ui/components/u-icon/u-icon").then(i.bind(null,1128))},uModal:function(){return i.e("uview-ui/components/u-modal/u-modal").then(i.bind(null,1171))}}}catch(o){if(-1===o.message.indexOf("Cannot find module")||-1===o.message.indexOf(".vue"))throw o;console.error(o.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var a=function(){var e=this,t=e.$createElement,i=(e._self._c,5==e.side_type?e.$QueryPermission(325):null),n=e.__map(e.eqlistdata,(function(t,i){var n=e.__get_orig(t),a=5==e.side_type?e._f("timeFormat")(t.uptime):null,s=15==e.side_type?e._f("timeFormat")(t.uptime):null,r=11==e.side_type||19==e.side_type||20==e.side_type?e._f("timeFormat")(t.uptime):null;return{$orig:n,f0:a,f1:s,f2:r}})),a={"text-align":"left","padding-left":"10px","font-weight":700};e.$mp.data=Object.assign({},{$root:{m0:i,l0:n,a0:a}})},s=!1,r=[];a._withStripped=!0},811:function(e,t,i){"use strict";i.r(t);var n=i(812),a=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(s);t["default"]=a.a},812:function(e,t,i){"use strict";(function(e){var n=i(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(i(41)),s=n(i(43)),r=i(86),o={data:function(){return{diseaseId:11,page:1,size:10,eqlistdata:[],isTop:!1,filtrateTF:!1,device_status:"",width:0,imports:"",loadingtf:!1,equipArr:[{name:"环境监测",type:5,list:[],pageIndex:1,tf:!1},{name:"管式墒情",type:15,list:[],pageIndex:1,tf:!1},{name:"小麦赤霉病",type:11,list:[],pageIndex:1,tf:!1},{name:"玉米大斑病",type:19,list:[],pageIndex:1,tf:!1},{name:"小麦条锈病",type:20,list:[],pageIndex:1,tf:!1}],active:0,side_type:5,show:!1,title:"",content:""}},methods:{eqlist:function(){var e=this;return(0,s.default)(a.default.mark((function t(){var i,n;return a.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return console.log("搜素字段s",e.imports),e.loadingtf=!0,t.next=4,e.$myRequest({url:"/api/api_gateway?method=weather.weather.qxz_page",data:{page:e.page,device_status:e.device_status,page_size:10,device_id:e.imports}});case 4:for(i=t.sent,e.loadingtf=!1,e.eqlistdata=e.eqlistdata.concat(i.ids),n=0;n<e.eqlistdata.length;n++)0==e.eqlistdata[n].device_expire?e.eqlistdata[n]["device_expiretext"]="未到期":1==e.eqlistdata[n].device_expire?e.eqlistdata[n]["device_expiretext"]="已到期":2==e.eqlistdata[n].device_expire&&(e.eqlistdata[n]["device_expiretext"]="即将到期");console.log(i.ids);case 9:case"end":return t.stop()}}),t)})))()},tubulareqlist:function(){var e=this;return(0,s.default)(a.default.mark((function t(){var i;return a.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loadingtf=!0,t.next=3,e.$myRequest({url:"/api/api_gateway?method=weather.weather.nd_qxz_page",data:{page:e.page,device_status:e.device_status,page_size:10,device_id:e.imports}});case 3:i=t.sent,e.loadingtf=!1,e.eqlistdata=e.eqlistdata.concat(i.ids);case 6:case"end":return t.stop()}}),t)})))()},getEquipList:function(){var e=this;return(0,s.default)(a.default.mark((function t(){var i;return a.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loadingtf=!0,t.next=3,e.$myRequest({method:"POST",url:"/api/api_gateway?method=wheat.wheat.wheat_list",data:{device_id:e.imports,device_name:"",page:e.page,device_type:e.diseaseId}});case 3:i=t.sent,e.loadingtf=!1,e.eqlistdata=e.eqlistdata.concat(i.ids);case 6:case"end":return t.stop()}}),t)})))()},clickRight:function(){e.navigateTo({url:"./search?type="+this.side_type})},clickLeft:function(){e.switchTab({url:"../index/index"})},eqdetails:function(t){console.log(t,this.side_type),5==this.side_type?e.navigateTo({url:"./equipment?shebei="+JSON.stringify(t)}):15==this.side_type?e.navigateTo({url:"./gsequipment?shebei="+JSON.stringify(t)}):11==this.side_type?e.navigateTo({url:"../disease/cmb?shebei="+JSON.stringify(t)+"&type=11"}):19==this.side_type?e.navigateTo({url:"../disease/cmb?shebei="+JSON.stringify(t)+"&type=19"}):20==this.side_type&&e.navigateTo({url:"../disease/cmb?shebei="+JSON.stringify(t)+"&type=20"})},filtrate:function(){this.filtrateTF=!this.filtrateTF},top:function(){e.pageScrollTo({scrollTop:0,duration:500})},online:function(){this.eqlistdata=[],this.page=1,this.device_status=1,this.eqlist(),this.filtrateTF=!this.filtrateTF},offline:function(){this.eqlistdata=[],this.page=1,this.device_status=0,this.eqlist(),this.filtrateTF=!this.filtrateTF},complete:function(){this.eqlistdata=[],this.page=1,this.device_status="",this.eqlist(),this.filtrateTF=!this.filtrateTF},search:function(){this.searchinp()},searchinp:function(){var e=this;(0,r.Debounce)((function(){e.page=1,5==e.side_type?(e.eqlistdata=[],e.eqlist()):15==e.side_type?(e.eqlistdata=[],e.tubulareqlist()):11!=e.side_type&&19!=e.side_type&&20!=e.side_type||(e.eqlistdata=[],e.getEquipList())}),1e3)()},tabClick:function(e,t){this.active=e,this.side_type=t,this.page=1,5==t?(this.eqlistdata=[],this.eqlist()):15==t?(this.eqlistdata=[],this.tubulareqlist()):(11==t||19==t||20==t)&&(this.diseaseId=t,this.eqlistdata=[],this.getEquipList())},examine:function(e){this.show=!0,this.title=e.device_expiretext,this.content='<p style="padding-left:10px;margin:10px 0;font-size:14px;">到期时间 '.concat(this.timezhuan(e.device_expire_time),'\n\t\t\t\t</p><p style="font-size:14px;text-align:right;color:#3C84FE;margin-bottom:10px;padding-right:10px">注:请前往PC端进行充值</p>')},timezhuan:function(e){function t(e){return 1==String(e).length?"0"+e:e}var i=new Date(1e3*e),n=i.getFullYear(),a=i.getMonth()+1,s=i.getDate(),r=i.getHours(),o=i.getMinutes(),u=i.getSeconds();return"".concat(n,"-").concat(t(a),"-").concat(t(s)," ").concat(t(r),":").concat(t(o),":").concat(t(u))}},onLoad:function(){var t=this;e.getStorage({key:"jurisdiction",success:function(e){var i=JSON.parse(e.data).filter((function(e){return 40==e.pur_id})),n=i[0].children;console.log(n);for(var a=0;a<n.length;a++)switch(n[a].pur_id){case 41:t.equipArr[0].tf=!0;break;case 170:t.equipArr[1].tf=!0;break;case 218:t.equipArr[2].tf=!0;break;case 219:t.equipArr[3].tf=!0;break;case 220:t.equipArr[4].tf=!0;break}for(a=0;a<t.equipArr.length;a++)if(t.equipArr[a].tf){0==a?t.eqlist():1==a?t.tubulareqlist():t.getEquipList(),t.active=a,t.side_type=t.equipArr[a].type;break}}})},onReachBottom:function(){this.page++,5==this.side_type?this.eqlist():15==this.side_type?this.tubulareqlist():11!=this.side_type&&19!=this.side_type&&20!=this.side_type||this.getEquipList()},onPageScroll:function(e){e.scrollTop>200?this.isTop=!0:this.isTop=!1}};t.default=o}).call(this,i(2)["default"])},813:function(e,t,i){"use strict";i.r(t);var n=i(814),a=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(s);t["default"]=a.a},814:function(e,t,i){}},[[807,"common/runtime","common/vendor"]]]);
  2. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/environment/index.js.map