1 line
3.2 KiB
JavaScript
1 line
3.2 KiB
JavaScript
require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesA/punchclock/normalClock"],{"27d9":function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var c,i=e("dc92"),a=e("0c59"),o={components:{updateClock:function(){e.e("pagesA/punchclock/updateClock").then(function(){return resolve(e("d805"))}.bind(null,e)).catch(e.oe)}},props:{lat:{type:String/Number,default:""},lng:{type:String/Number,default:""}},data:function(){return{BASE_IMG_URL:a.BASE_IMG_URL,info:{},hour:"00",branch:"00",address:"",clockTime:"",isClock:!1,clockInfo:{}}},onLoad:function(){},created:function(){this.getTime(),this.checkIsPunch()},onUnload:function(){},methods:{clear:function(){clearInterval(c)},_locationChangeFn:function(t){this.lng=t.longitude,this.lat=t.latitude,this.checkIsPunch()},checkIsPunch:function(){var t=this,n={lng:this.lng,lat:this.lat};(0,i.netIsPunch)(n).then((function(n){if(t.info=n.data,2==n.data.is_card){var e=n.data.attendance.time;t.clockTime=e.substring(e.length-8,e.length)}}))},getTime:function(){var t=this;c=setInterval((function(){var n=new Date,e=n.getHours(),c=n.getMinutes();t.hour=t.handleTime(e),t.branch=t.handleTime(c)}),1e3)},toClock:function(){var n=this;if(1==this.info.is_card){var e={id:this.info.intime.id,type:0,type_name:this.info.intime.type_name,lng:this.lng,lat:this.lat};(0,i.netPunchClock)(e).then((function(e){t.showToast({title:e.msg,icon:"none"}),n.clockInfo=e.data;var c=e.data.time;n.clockTime=c.substring(c.length-8,c.length),setTimeout((function(){n.isClock=!0}),2e3)}))}},toSubmitColck:function(){var n;0==this.clockInfo.type_name&&1==this.clockInfo.late?n=2:1==this.clockInfo.type_name&&1==this.clockInfo.leaver&&(n=1),t.navigateTo({url:"/pagesA/punchclock/punchstatis/supplementaryCard?id="+this.clockInfo.statisc_id+"&type="+n+"&time="+this.clockInfo.time})},toLeave:function(){t.navigateTo({url:"/pagesA/punchclock/punchstatis/leave"})},toUpdate:function(){var t={id:this.info.attendance.statisc_id,type:0,type_name:this.info.attendance.type_name,lng:this.lng,lat:this.lat};this.$refs.clockChild.init(t)},toSetClock:function(){t.navigateTo({url:"/pagesA/punchclock/clockrules/index"})}}};n.default=o}).call(this,e("543d")["default"])},2859:function(t,n,e){"use strict";e.d(n,"b",(function(){return c})),e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){}));var c=function(){var t=this.$createElement;this._self._c},i=[]},"490a":function(t,n,e){"use strict";var c=e("b1df"),i=e.n(c);i.a},"624c":function(t,n,e){"use strict";e.r(n);var c=e("2859"),i=e("676a");for(var a in i)["default"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(a);e("490a");var o=e("f0c5"),l=Object(o["a"])(i["default"],c["b"],c["c"],!1,null,"32c6badc",null,!1,c["a"],void 0);n["default"]=l.exports},"676a":function(t,n,e){"use strict";e.r(n);var c=e("27d9"),i=e.n(c);for(var a in c)["default"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return c[t]}))}(a);n["default"]=i.a},b1df:function(t,n,e){},cc01:function(t,n,e){"use strict";(function(t,n){var c=e("4ea4");e("8886");c(e("66fd"));var i=c(e("624c"));t.__webpack_require_UNI_MP_PLUGIN__=e,n(i.default)}).call(this,e("bc2e")["default"],e("543d")["createPage"])}},[["cc01","common/runtime","common/vendor"]]]); |