chunk-cd3c9910.a84e7485.js 11 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-cd3c9910"],{"1da1":function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));r("d3b7"),r("e6cf");function n(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(u){return void r(u)}c.done?e(s):Promise.resolve(s).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,s,"next",t)}function s(t){n(a,o,i,c,s,"throw",t)}c(void 0)}))}}},"420e":function(t,e,r){},"7abe":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"home"},[r("div",{staticClass:"header",staticStyle:{position:"relative"}},[t._v("巡检列表 "),r("van-button",{staticStyle:{position:"absolute",right:".1rem",top:".05rem"},attrs:{type:"warning",size:"small"},on:{click:t.punchCard}},[t._v("打卡")])],1),t.isRefresh?r("van-pull-refresh",{staticStyle:{height:"100vh"},on:{refresh:t.onRefresh},model:{value:t.isLoading,callback:function(e){t.isLoading=e},expression:"isLoading"}},[r("div",{ref:"content",staticClass:"homeContent",on:{scroll:t.handleScroll}},[r("ul",t._l(t.list,(function(e,n){return r("li",{key:n,staticClass:"item",on:{click:function(r){return t.itemAlert(e.startTime,e.endTime)}}},[r("div",[t._v("丨交叉巡检 "),r("span",[t._v(t._s(e.startTime)+" - "+t._s(e.endTime))])]),r("p",[t._v("巡检人:"+t._s(e.patrolPersons))]),r("p",[t._v(t._s(e.finishNumber)+"个点位已打卡 / "+t._s(e.totalNumber-e.finishNumber)+"个点位未打卡")]),r("p",[t._v("异常数:"+t._s(e.errorNumber)+"个")])])})),0)])]):r("div",{ref:"content",staticClass:"homeContent",on:{scroll:t.handleScroll}},[r("ul",t._l(t.list,(function(e,n){return r("li",{key:n,staticClass:"item",on:{click:function(r){return t.itemAlert(e.startTime,e.endTime)}}},[r("div",[t._v("丨交叉巡检 "),r("span",[t._v(t._s(e.startTime)+" - "+t._s(e.endTime))])]),r("p",[t._v("巡检人:"+t._s(e.patrolPersons))]),r("p",[t._v(t._s(e.finishNumber)+"个点位已打卡 / "+t._s(e.totalNumber-e.finishNumber)+"个点位未打卡")]),r("p",[t._v("异常数:"+t._s(e.errorNumber)+"个")])])})),0)]),r("van-overlay",{attrs:{show:t.loading}},[r("div",{staticClass:"wrapper",on:{click:function(t){t.stopPropagation()}}},[r("van-loading",{attrs:{size:"24px",color:"#0094ff",vertical:""}},[t._v("加载中...")])],1)])],1)},o=[],i=(r("4160"),r("d3b7"),r("3ca3"),r("159b"),r("ddb0"),r("e7e5"),r("d399")),a=(r("96cf"),r("1da1")),c=r("c761"),s={data:function(){return{platformId:"3F1E5858C6CC41E2BF4FFC4902797C08",list:[],isLoading:!1,isRefresh:!0,loading:!1}},components:{},mounted:function(){this.getPdaPatrolTimeList()},methods:{handleScroll:function(){this.$refs.content.scrollTop?this.isRefresh=!1:this.isRefresh=!0},seePunchCard:function(){var t=this;if(navigator.onLine){var e=localStorage.getItem("nfc")||null;if(e){var r=JSON.parse(e),n=[];r.forEach((function(t){var e=Object(c["l"])({date:t.date,nfcNo:t.nfcNo,userName:"lixl53"});n.push(e)})),Promise.all(n).then((function(e){t.$notify({type:"success",message:"无网打卡数据已上传!"}),localStorage.removeItem("nfc"),t.getPdaPatrolTimeList()}))}}},punchCard:function(){var t=this;window.suplink.nfc({type:1}).then((function(e){var r=(new Date).getHours()+":00";Object(c["l"])({date:r,nfcNo:e.data,userName:"lixl53"}).then((function(r){t.$notify({type:"success",message:"有网打卡成功,nfc为".concat(e.data)})})).catch((function(e){t.$notify({type:"success",message:"有网接口未调通,".concat(e.msg)})}))})).catch((function(e){t.$notify({type:"success",message:e.msg})}))},onRefresh:function(){var t=this;return Object(a["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.isRefresh){e.next=2;break}return e.abrupt("return");case 2:Object(c["f"])({username:"admin"}).then((function(e){200===e.status?(t.list=e.data[0].data,Object(i["a"])("刷新成功"),t.isLoading=!1):(Object(i["a"])("出错了,请稍后重试"),t.isLoading=!1)}));case 3:case"end":return e.stop()}}),e)})))()},getPdaPatrolTimeList:function(){var t=this,e=setTimeout((function(){t.loading=!0}),500);Object(c["f"])({username:"admin"}).then((function(r){200===r.status?(console.log(r),t.list=r.data[0].data,t.loading=!1,clearTimeout(e)):t.$notify({type:"danger",message:data.msg})})).catch((function(){t.loading=!1,clearTimeout(e),t.$notify({type:"danger",message:"出错了,请稍后重试"})}))},itemAlert:function(t,e){this.$router.push({name:"particulars",query:{platformId:this.platformId,startTime:t,endTime:e}})}}},u=s,l=(r("8d9a"),r("2877")),f=Object(l["a"])(u,n,o,!1,null,"2f602380",null);e["default"]=f.exports},"8d9a":function(t,e,r){"use strict";var n=r("420e"),o=r.n(n);o.a},"96cf":function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new O(n||[]);return i._invoke=E(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(n){return{type:"throw",arg:n}}}t.wrap=s;var l="suspendedStart",f="suspendedYield",h="executing",p="completed",d={};function v(){}function m(){}function y(){}var g={};g[i]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(j([])));b&&b!==r&&n.call(b,i)&&(g=b);var _=y.prototype=v.prototype=Object.create(g);function L(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function x(t,e){function r(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"===typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(s.arg)}var o;function i(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}this._invoke=i}function E(t,e,r){var n=l;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw i;return P()}r.method=o,r.arg=i;while(1){var a=r.delegate;if(a){var c=N(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var s=u(t,e,r);if("normal"===s.type){if(n=r.done?p:f,s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=p,r.method="throw",r.arg=s.arg)}}}function N(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator["return"]&&(r.method="return",r.arg=e,N(t,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=u(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function j(t){if(t){var r=t[i];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){while(++o<t.length)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:P}}function P(){return{value:e,done:!0}}return m.prototype=_.constructor=y,y.constructor=m,y[c]=m.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},L(x.prototype),x.prototype[a]=function(){return this},t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(_),_[c]="Generator",_[i]=function(){return this},_.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){while(e.length){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=j,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(k),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=n}catch(o){Function("r","regeneratorRuntime = r")(n)}}}]);