11 lines
8.2 KiB
JavaScript
11 lines
8.2 KiB
JavaScript
require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesA/punchclock/punchClock"],{"17a3":function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){}));var i=function(){var t=this.$createElement;this._self._c},a=[]},"27d9":function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i,a=e("dc92"),c=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:c.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(i)},_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,a.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;i=setInterval((function(){var n=new Date,e=n.getHours(),i=n.getMinutes();t.hour=t.handleTime(e),t.branch=t.handleTime(i)}),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,a.netPunchClock)(e).then((function(e){t.showToast({title:e.msg,icon:"none"}),n.clockInfo=e.data;var i=e.data.time;n.clockTime=i.substring(i.length-8,i.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 i})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){}));var i=function(){var t=this.$createElement;this._self._c},a=[]},"2c0c":function(t,n,e){"use strict";e.r(n);var i=e("17a3"),a=e("5915");for(var c in a)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return a[t]}))}(c);e("9440");var o=e("f0c5"),u=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"5b2a8a96",null,!1,i["a"],void 0);n["default"]=u.exports},"490a":function(t,n,e){"use strict";var i=e("b1df"),a=e.n(i);a.a},"4aa7":function(t,n,e){"use strict";e.r(n);var i=e("e12c"),a=e.n(i);for(var c in i)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(c);n["default"]=a.a},5915:function(t,n,e){"use strict";e.r(n);var i=e("9ed1"),a=e.n(i);for(var c in i)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(c);n["default"]=a.a},"624c":function(t,n,e){"use strict";e.r(n);var i=e("2859"),a=e("676a");for(var c in a)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return a[t]}))}(c);e("490a");var o=e("f0c5"),u=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"32c6badc",null,!1,i["a"],void 0);n["default"]=u.exports},"676a":function(t,n,e){"use strict";e.r(n);var i=e("27d9"),a=e.n(i);for(var c in i)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(c);n["default"]=a.a},"6b5d":function(t,n,e){"use strict";var i=e("fd4e"),a=e.n(i);a.a},9440:function(t,n,e){"use strict";var i=e("f736"),a=e.n(i);a.a},"9ed1":function(t,n,e){"use strict";var i=e("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=i(e("624c")),c=i(e("9f16")),o={components:{normalClock:a.default,punchOut:c.default},props:{lat:{type:String/Number,default:""},lng:{type:String/Number,default:""}},data:function(){return{current:0}},onUnload:function(){},methods:{changeCurrent:function(t){this.current=t.detail.current},chanCur:function(t){this.current=t},close:function(){this.$refs.nomalChild.clear(),this.$refs.punchChild.clear()}}};n.default=o},"9f16":function(t,n,e){"use strict";e.r(n);var i=e("ab3e"),a=e("4aa7");for(var c in a)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return a[t]}))}(c);e("6b5d");var o=e("f0c5"),u=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"335cde3f",null,!1,i["a"],void 0);n["default"]=u.exports},ab3e:function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){}));var i=function(){var t=this,n=t.$createElement,e=(t._self._c,t.isClock?t.obj.remarks||0!=t.obj.imgList.length:null),i=t.isClock&&e?t.obj.imgList.length:null,a=t.isClock?null:t.obj.remarks||0!=t.obj.imgList.length,c=!t.isClock&&a?t.obj.imgList.length:null;t.$mp.data=Object.assign({},{$root:{g0:e,g1:i,g2:a,g3:c}})},a=[]},b1df:function(t,n,e){},e12c:function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i,a,c,o=e("0c59"),u=e("f785"),l=e("dc92"),s={components:{addRemark:function(){e.e("pagesA/punchclock/addRemark").then(function(){return resolve(e("eeca"))}.bind(null,e)).catch(e.oe)}},props:{lat:{type:String/Number,default:""},lng:{type:String/Number,default:""}},data:function(){return{BASE_IMG_URL:o.BASE_IMG_URL,latitude:null,longitude:null,markers:[],address:"",hour:"00",branch:"00",isClock:!0,obj:{remarks:"",imgList:[]},info:{},clockTime:"",mapKey:""}},onLoad:function(){},created:function(){this.getKey(),this.getTime()},onUnload:function(){},methods:{clear:function(){clearInterval(c)},_locationChangeFn:function(t){var n=this;this.longitude=t.longitude,this.latitude=t.latitude,this.markers=[{id:1,latitude:t.latitude,longitude:t.longitude,iconPath:o.BASE_IMG_URL+"weizhi.png",width:30,height:30}],a.reverseGeocoder({location:{longitude:t.longitude,latitude:t.latitude},success:function(t){n.address=t.result.address}})},getKey:function(){var n=this;(0,u.netMapKey)().then((function(c){c.data.map_key?(n.mapKey=c.data.map_key,i=e("cb23"),a=new i({key:c.data.map_key}),n.getAddress()):t.showToast({title:"请在后台配置地图key",icon:"none"})}))},getAddress:function(){var t=this;this.markers=[{id:1,latitude:this.lat,longitude:this.lng,iconPath:o.BASE_IMG_URL+"weizhi.png",width:30,height:30}],a.reverseGeocoder({location:{longitude:this.lng,latitude:this.lat},success:function(n){t.address=n.result.address}})},getAddressinfo:function(){var n=this;t.getLocation({type:"gcj02",success:function(t){n.longitude=t.longitude,n.latitude=t.latitude,n.markers=[{id:1,latitude:t.latitude,longitude:t.longitude,iconPath:o.BASE_IMG_URL+"weizhi.png",width:30,height:30}],a.reverseGeocoder({location:{longitude:t.longitude,latitude:t.latitude},success:function(t){console.log(t,"获取地址"),n.address=t.result.address}})},fail:function(n){console.log(n,"错误"),t.showToast({title:"次数频繁,请稍后再试",icon:"none"})}})},getTime:function(){var t=this;c=setInterval((function(){var n=new Date,e=n.getHours(),i=n.getMinutes();t.hour=t.handleTime(e),t.branch=t.handleTime(i)}),1e3)},addContent:function(){this.$refs.remarkChild.init(this.obj)},addSuccess:function(t){this.obj=t},toClock:function(){var t=this,n=[],e=this.obj.imgList;e.forEach((function(t){n.push(t.id)}));var i={type:1,address:this.address,type_name:2,lng:this.lng,lat:this.lat,remarks:this.obj.remarks,file_ids:n.join(",")};(0,l.netOutClock)(i).then((function(n){t.isClock=!1,t.info=n.data;var e=n.data.time;t.clockTime=e.substring(e.length-8,e.length)}))}}};n.default=s}).call(this,e("543d")["default"])},f736:function(t,n,e){},fd4e:function(t,n,e){}}]);
|
|
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
|
'pagesA/punchclock/punchClock-create-component',
|
|
{
|
|
'pagesA/punchclock/punchClock-create-component':(function(module, exports, __webpack_require__){
|
|
__webpack_require__('543d')['createComponent'](__webpack_require__("2c0c"))
|
|
})
|
|
},
|
|
[['pagesA/punchclock/punchClock-create-component']]
|
|
]);
|