crm_second_opening_mini/pagesA/punchclock/punchOut.js

1 line
4.0 KiB
JavaScript

require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesA/punchclock/punchOut"],{"4aa7":function(t,e,n){"use strict";n.r(e);var i=n("e12c"),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=a.a},"6b5d":function(t,e,n){"use strict";var i=n("fd4e"),a=n.n(i);a.a},8361:function(t,e,n){"use strict";(function(t,e){var i=n("4ea4");n("8886");i(n("66fd"));var a=i(n("9f16"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},"9f16":function(t,e,n){"use strict";n.r(e);var i=n("ab3e"),a=n("4aa7");for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);n("6b5d");var s=n("f0c5"),u=Object(s["a"])(a["default"],i["b"],i["c"],!1,null,"335cde3f",null,!1,i["a"],void 0);e["default"]=u.exports},ab3e:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.isClock?t.obj.remarks||0!=t.obj.imgList.length:null),i=t.isClock&&n?t.obj.imgList.length:null,a=t.isClock?null:t.obj.remarks||0!=t.obj.imgList.length,o=!t.isClock&&a?t.obj.imgList.length:null;t.$mp.data=Object.assign({},{$root:{g0:n,g1:i,g2:a,g3:o}})},a=[]},e12c:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i,a,o,s=n("0c59"),u=n("f785"),c=n("dc92"),l={components:{addRemark:function(){n.e("pagesA/punchclock/addRemark").then(function(){return resolve(n("eeca"))}.bind(null,n)).catch(n.oe)}},props:{lat:{type:String/Number,default:""},lng:{type:String/Number,default:""}},data:function(){return{BASE_IMG_URL:s.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(o)},_locationChangeFn:function(t){var e=this;this.longitude=t.longitude,this.latitude=t.latitude,this.markers=[{id:1,latitude:t.latitude,longitude:t.longitude,iconPath:s.BASE_IMG_URL+"weizhi.png",width:30,height:30}],a.reverseGeocoder({location:{longitude:t.longitude,latitude:t.latitude},success:function(t){e.address=t.result.address}})},getKey:function(){var e=this;(0,u.netMapKey)().then((function(o){o.data.map_key?(e.mapKey=o.data.map_key,i=n("cb23"),a=new i({key:o.data.map_key}),e.getAddress()):t.showToast({title:"请在后台配置地图key",icon:"none"})}))},getAddress:function(){var t=this;this.markers=[{id:1,latitude:this.lat,longitude:this.lng,iconPath:s.BASE_IMG_URL+"weizhi.png",width:30,height:30}],a.reverseGeocoder({location:{longitude:this.lng,latitude:this.lat},success:function(e){t.address=e.result.address}})},getAddressinfo:function(){var e=this;t.getLocation({type:"gcj02",success:function(t){e.longitude=t.longitude,e.latitude=t.latitude,e.markers=[{id:1,latitude:t.latitude,longitude:t.longitude,iconPath:s.BASE_IMG_URL+"weizhi.png",width:30,height:30}],a.reverseGeocoder({location:{longitude:t.longitude,latitude:t.latitude},success:function(t){console.log(t,"获取地址"),e.address=t.result.address}})},fail:function(e){console.log(e,"错误"),t.showToast({title:"次数频繁,请稍后再试",icon:"none"})}})},getTime:function(){var t=this;o=setInterval((function(){var e=new Date,n=e.getHours(),i=e.getMinutes();t.hour=t.handleTime(n),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,e=[],n=this.obj.imgList;n.forEach((function(t){e.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:e.join(",")};(0,c.netOutClock)(i).then((function(e){t.isClock=!1,t.info=e.data;var n=e.data.time;t.clockTime=n.substring(n.length-8,n.length)}))}}};e.default=l}).call(this,n("543d")["default"])},fd4e:function(t,e,n){}},[["8361","common/runtime","common/vendor"]]]);