You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
4.9 KiB

  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/mine/equipment/index"],{186:function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return i}));try{i={uSearch:function(){return n.e("uview-ui/components/u-search/u-search").then(n.bind(null,588))},uTabsSwiper:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-tabs-swiper/u-tabs-swiper")]).then(n.bind(null,586))}}}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 t=this,e=t.$createElement,n=(t._self._c,t.__map(t.newListdata,(function(e,n){var i=t.__get_orig(e),a=1==t.activeClass?t._f("formatDate")(e.updateTime):null;return{$orig:i,f0:a}})));t.$mp.data=Object.assign({},{$root:{l0:n}})},r=[];a._withStripped=!0},344:function(t,e,n){"use strict";(function(t){n(3);i(n(2));var e=i(n(345));function i(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=n,t(e.default)}).call(this,n(0)["createPage"])},345:function(t,e,n){"use strict";n.r(e);var i=n(186),a=n(79);for(var r in a)"default"!==r&&function(t){n.d(e,t,(function(){return a[t]}))}(r);n(346);var o,s=n(1),u=Object(s["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],o);u.options.__file="pages/mine/equipment/index.vue",e["default"]=u.exports},346:function(t,e,n){"use strict";var i=n(81),a=n.n(i);a.a},79:function(t,e,n){"use strict";n.r(e);var i=n(80),a=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=a.a},80:function(t,e,n){"use strict";(function(t){function i(t){return s(t)||o(t)||r(t)||a()}function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(t,e){if(t){if("string"===typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function o(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function s(t){if(Array.isArray(t))return u(t)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;n(6);var c={data:function(){return{tablist:[{name:"全部(0)"},{name:"在线(0)"},{name:"低电量(0)"},{name:"今日活跃(0)"},{name:"离线(0)"}],activeClass:0,pageNum:1,pageSize:20,imei:"",orgcode:"",newListdata:[],buildingID:"",jump:""}},onReachBottom:function(){this.pageNum+=1,this.init()},onLoad:function(t){t.active?this.activeClass=t.active:this.activeClass=0,this.newListdata=[],this.pageNum=1,this.pageSize=20,this.init()},filters:{formatDate:function(t){var e=new Date(t.replace(/-/g,"/")).getTime(),n=6e4,i=60*n,a=24*i,r=(new Date).getTime(),o=r-e;if(!(o<0)){var s=o/(7*a),u=o/a,c=o/i,l=o/n,f="";return f=s>=1?"1周前":u>=1?parseInt(u)+"天前":c>=1?parseInt(c)+"小时前":l>=1?parseInt(l)+"分钟前":"刚刚",f}}},methods:{shecs:function(){this.newListdata=[],this.pageNum=1,this.pageSize=20,this.init()},clocktab:function(t){this.activeClass=t,this.newListdata=[],this.pageNum=1,this.pageSize=20,this.init()},init:function(){var e=this;this.buildingID=t.getStorageSync("buildingID").id;var n={pageNum:this.pageNum,pageSize:this.pageSize,query:{imei:this.imei,onLine:this.activeClass,propertyId:this.buildingID,orderType:1}};0==this.activeClass&&(n.query.onLine=null),this.$u.post("/equipment/apiFindByPage",n).then((function(n){if(e.tablist[0].name="全部("+n.allCount+")",e.tablist[1].name="在线("+n.eqOnLineCount+")",e.tablist[2].name="低电量("+n.lowElectricityCount+")",e.tablist[3].name="今日活跃("+n.activeCount+")",e.tablist[4].name="离线("+n.eqOffLineCount+")",null==n.obj.list.results){if(1==e.pageNum)return;t.showToast({title:"已经到底了!",duration:2e3})}else n.obj.list.results.forEach((function(t){0==t.onLine&&(t.signalDevice=0),""==t.electricity&&(t.electricity=0),t.electricity>100&&(t.electricity=100);var n=e.ascformatDate(t.updateTime);n>12&&(t.electricity=0)})),1==e.pageNum?e.newListdata=n.obj.list.results:e.newListdata=[].concat(i(e.newListdata),i(n.obj.list.results))}))},ascformatDate:function(t){var e=new Date(t.replace(/-/g,"/")).getTime(),n=6e4,i=60*n,a=(new Date).getTime(),r=a-e,o=r/i;return o}}};e.default=c}).call(this,n(0)["default"])},81:function(t,e,n){}},[[344,"common/runtime","common/vendor"]]]);
  2. //# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/mine/equipment/index.js.map