| 12 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/cb/index/index"],{177:function(t,e,i){"use strict";(function(t,e){var n=i(4);i(26);n(i(25));var r=n(i(178));t.__webpack_require_UNI_MP_PLUGIN__=i,e(r.default)}).call(this,i(1)["default"],i(2)["createPage"])},178:function(t,e,i){"use strict";i.r(e);var n=i(179),r=i(181);for(var a in r)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(a);i(183);var s,u=i(32),c=Object(u["default"])(r["default"],n["render"],n["staticRenderFns"],!1,null,null,null,!1,n["components"],s);c.options.__file="pages/cb/index/index.vue",e["default"]=c.exports},179:function(t,e,i){"use strict";i.r(e);var n=i(180);i.d(e,"render",(function(){return n["render"]})),i.d(e,"staticRenderFns",(function(){return n["staticRenderFns"]})),i.d(e,"recyclableRender",(function(){return n["recyclableRender"]})),i.d(e,"components",(function(){return n["components"]}))},180:function(t,e,i){"use strict";var n;i.r(e),i.d(e,"render",(function(){return r})),i.d(e,"staticRenderFns",(function(){return s})),i.d(e,"recyclableRender",(function(){return a})),i.d(e,"components",(function(){return n}));try{n={uniNavBar:function(){return i.e("components/uni-nav-bar/uni-nav-bar").then(i.bind(null,1236))},uIcon:function(){return i.e("uview-ui/components/u-icon/u-icon").then(i.bind(null,1200))},uModal:function(){return i.e("uview-ui/components/u-modal/u-modal").then(i.bind(null,1243))}}}catch(u){if(-1===u.message.indexOf("Cannot find module")||-1===u.message.indexOf(".vue"))throw u;console.error(u.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var r=function(){var t=this,e=t.$createElement,i=(t._self._c,(3==t.device_type||7==t.device_type)&&t.$QueryPermission(325)),n=t.__map(t.equipArr[t.active].list,(function(e,i){var n=t.__get_orig(e),r=t._f("timeFormat")(e.uptime);return{$orig:n,f0:r}})),r={"text-align":"left","padding-left":"10px","font-weight":700};t.$mp.data=Object.assign({},{$root:{m0:i,l0:n,a0:r}})},a=!1,s=[];r._withStripped=!0},181:function(t,e,i){"use strict";i.r(e);var n=i(182),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=r.a},182:function(t,e,i){"use strict";(function(t){var n=i(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(i(41)),a=n(i(18)),s=n(i(43)),u=function(){i.e("components/equip-item/equip-item").then(function(){return resolve(i(1322))}.bind(null,i)).catch(i.oe)},c=function(){i.e("components/uni-nav-bar/uni-nav-bar").then(function(){return resolve(i(1236))}.bind(null,i)).catch(i.oe)},o={data:function(){return{active:0,equipArr:[{name:"虫情测报",type:3,list:[],pageIndex:1,tf:!1},{name:"孢子仪",type:7,list:[],pageIndex:1,tf:!1},{name:"性诱测报",type:4,list:[],pageIndex:1,tf:!1,device_model:1},{name:"性诱2.0",type:10,list:[],pageIndex:1,tf:!1},{name:"性诱3.0",type:8,list:[],pageIndex:1,tf:!1},{name:"吸虫塔",type:12,list:[],pageIndex:1,tf:!1},{name:"病虫害可视监测",type:14,list:[],pageIndex:1,tf:!1}],device_id:"3",isTop:!1,filtrateTF:!1,device_status:"",loadingtf:!1,device_type:"3",show:!1,title:"",content:""}},onLoad:function(){var e=this;t.getStorage({key:"jurisdiction",success:function(t){for(var i=JSON.parse(t.data).filter((function(t){return 36==t.pur_id})),n=i[0].children,r=0;r<n.length;r++)switch(n[r].pur_id){case 37:e.equipArr[0].tf=!0,e.getEquipList(0);break;case 38:e.equipArr[2].tf=!0,e.getEquipList(2);break;case 39:e.equipArr[1].tf=!0,e.getEquipList(1);break;case 161:e.equipArr[3].tf=!0,e.getxyEquipList(3);break;case 198:e.equipArr[4].tf=!0,e.getthxyEquipList(4);break;case 171:e.equipArr[5].tf=!0,e.getxctEquipList(5);break;case 167:e.equipArr[6].tf=!0,e.getEquipList(6);break}for(r=0;r<e.equipArr.length;r++)if(e.equipArr[r].tf){e.active=r,e.device_type=e.equipArr[r].type;break}}})},onShow:function(){},onHide:function(){},onUnload:function(){},onPullDownRefresh:function(){this.equipArr[this.active].pageIndex=1,this.equipArr[this.active].list=[],4==this.active?this.getthxyEquipList(4):5==this.active?this.getxctEquipList(5):3==this.active?this.getxyEquipList(3):this.getEquipList(this.active),setTimeout((function(){t.stopPullDownRefresh()}),1e3)},onReachBottom:function(){var t=this.active;if(this.equipArr[t].list.length<10*this.equipArr[t].pageIndex)return!1;this.equipArr[t].pageIndex++,4==this.active?this.getthxyEquipList(4):5==this.active?this.getxctEquipList(5):3==this.active?this.getxyEquipList(3):this.getEquipList(this.active)},onPageScroll:function(t){t.scrollTop>200?this.isTop=!0:this.isTop=!1},onBackPress:function(t){return"navigateBack"!==t.from&&(this.clickLeft(),!0)},methods:{getEquipList:function(t){var e=this;return(0,s.default)(r.default.mark((function i(){var n,s;return r.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return e.loadingtf=!0,i.next=3,e.$myRequest({url:"/api/api_gateway?method=forecast.worm_lamp.lamp_list",data:{device_type_id:e.equipArr[t].type,page:e.equipArr[t].pageIndex,page_size:10,device_status:e.device_status,device_model:e.equipArr[t].device_model?e.equipArr[t].device_model:0}});case 3:for(n=i.sent,e.loadingtf=!1,console.log(n),e.equipArr[t].list=[].concat((0,a.default)(e.equipArr[t].list),(0,a.default)(n.data)),e.equipArr[t].list.forEach((function(t){t.uptime=t.addtime})),s=0;s<e.equipArr[t].list.length;s++)0==e.equipArr[t].list[s].device_expire?e.equipArr[t].list[s]["device_expiretext"]="未到期":1==e.equipArr[t].list[s].device_expire?e.equipArr[t].list[s]["device_expiretext"]="已到期":2==e.equipArr[t].list[s].device_expire&&(e.equipArr[t].list[s]["device_expiretext"]="即将到期");console.log(e.equipArr[t].list);case 10:case"end":return i.stop()}}),i)})))()},getxyEquipList:function(t){var e=this;return(0,s.default)(r.default.mark((function i(){var n;return r.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return e.loadingtf=!0,i.next=3,e.$myRequest({url:"/api/api_gateway?method=sex_lure_nl.sex_lure.nl_device_list",data:{device_type_id:e.equipArr[t].type,page:e.equipArr[t].pageIndex,page_size:10,device_status:e.device_status}});case 3:n=i.sent,e.loadingtf=!1,console.log(n),e.equipArr[t].list=[].concat((0,a.default)(e.equipArr[t].list),(0,a.default)(n.data)),console.log(e.equipArr[t].list);case 8:case"end":return i.stop()}}),i)})))()},getthxyEquipList:function(t){var e=this;return(0,s.default)(r.default.mark((function i(){var n;return r.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return e.loadingtf=!0,i.next=3,e.$myRequest({url:"/api/api_gateway?method=forecast.worm_lamp.xy_three_list",data:{device_type_id:e.equipArr[t].type,page:e.equipArr[t].pageIndex,page_size:10,device_status:e.device_status}});case 3:n=i.sent,e.loadingtf=!1,console.log(n),e.equipArr[t].list=[].concat((0,a.default)(e.equipArr[t].list),(0,a.default)(n.data)),console.log(e.equipArr[t].list);case 8:case"end":return i.stop()}}),i)})))()},getxctEquipList:function(t){var e=this;return(0,s.default)(r.default.mark((function i(){var n;return r.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return e.loadingtf=!0,i.next=3,e.$myRequest({url:"/api/api_gateway?method=forecast.worm_lamp.xct_list",data:{device_type_id:e.equipArr[t].type,page:e.equipArr[t].pageIndex,page_size:10,device_status:e.device_status}});case 3:n=i.sent,e.loadingtf=!1,console.log(n),e.equipArr[t].list=[].concat((0,a.default)(e.equipArr[t].list),(0,a.default)(n.data)),console.log(e.equipArr[t].list);case 8:case"end":return i.stop()}}),i)})))()},tabClick:function(t){this.active=t,this.device_id=this.equipArr[t].type,this.device_type=this.equipArr[t].type},clickRight:function(){t.navigateTo({url:"./search?device_id="+this.device_id})},itemClick:function(e){var i=JSON.parse(JSON.stringify(e));i.type=this.equipArr[this.active].type;var n=JSON.stringify(i);10==i.type?t.navigateTo({url:"/pages/cb/xy2.0/particulars?info="+n}):8==i.type?(console.log(n),t.navigateTo({url:"/pages/cb/thxydetail/thxydetail?imei="+i.imei})):12==i.type?t.navigateTo({url:"/pages/cb/xctdetail/xctdetail?info="+n}):14==i.type?t.navigateTo({url:"/pages/cb/sy/detail?detail="+n}):t.navigateTo({url:"/pages/cb/equip-detail/equip-detail?info="+n})},clickLeft:function(){t.switchTab({url:"../../index/index"})},filtrate:function(){this.filtrateTF=!this.filtrateTF},top:function(){t.pageScrollTo({scrollTop:0,duration:500})},online:function(){this.equipArr[this.active].pageIndex=1,this.equipArr[this.active].list=[],this.device_status=1,4==this.active?this.getthxyEquipList(4):5==this.active?this.getxctEquipList(5):3==this.active?this.getxyEquipList(3):this.getEquipList(this.active),this.filtrateTF=!this.filtrateTF},offline:function(){this.equipArr[this.active].pageIndex=1,this.equipArr[this.active].list=[],this.device_status=0,4==this.active?this.getthxyEquipList(4):5==this.active?this.getxctEquipList(5):3==this.active?this.getxyEquipList(3):this.getEquipList(this.active),this.filtrateTF=!this.filtrateTF},complete:function(){this.equipArr[this.active].pageIndex=1,this.equipArr[this.active].list=[],this.device_status="",4==this.active?this.getthxyEquipList(4):5==this.active?this.getxctEquipList(5):3==this.active?this.getxyEquipList(3):this.getEquipList(this.active),this.filtrateTF=!this.filtrateTF},examine:function(t){this.show=!0,this.title=t.device_expiretext,this.content='<p style="padding-left:10px;margin:10px 0;font-size:14px;">到期时间 '.concat(this.timezhuan(t.device_expire_time),'\n\t\t\t</p><p style="font-size:14px;text-align:right;color:#3C84FE;margin-bottom:10px;padding-right:10px">注:请前往PC端进行充值</p>')},timezhuan:function(t){function e(t){return 1==String(t).length?"0"+t:t}var i=new Date(1e3*t),n=i.getFullYear(),r=i.getMonth()+1,a=i.getDate(),s=i.getHours(),u=i.getMinutes(),c=i.getSeconds();return"".concat(n,"-").concat(e(r),"-").concat(e(a)," ").concat(e(s),":").concat(e(u),":").concat(e(c))}},components:{equipItem:u,uniNavBar:c}};e.default=o}).call(this,i(2)["default"])},183:function(t,e,i){"use strict";i.r(e);var n=i(184),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=r.a},184:function(t,e,i){}},[[177,"common/runtime","common/vendor"]]]);
- //# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/cb/index/index.js.map
|