1 line
3.3 KiB
JavaScript
1 line
3.3 KiB
JavaScript
require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesA/punchclock/clockrules/addPosition"],{3240:function(t,e,n){},"58e7":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.$createElement;this._self._c},a=[]},"762e":function(t,e,n){"use strict";(function(t,e){var i=n("4ea4");n("8886");i(n("66fd"));var a=i(n("f574"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},c0dc:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("dc92"),a={data:function(){return{noClick:!0,address:"",address_detail:"",lat:"",lng:"",distance:0,distanceArr:[{name:"100米",distance:100},{name:"200米",distance:200},{name:"300米",distance:300},{name:"400米",distance:400},{name:"500米",distance:500},{name:"600米",distance:600},{name:"700米",distance:700},{name:"800米",distance:800},{name:"900米",distance:900},{name:"1000米",distance:1e3},{name:"1500米",distance:1500},{name:"2000米",distance:2e3},{name:"2500米",distance:2500},{name:"3000米",distance:3e3},{name:"3500米",distance:3500}],distanceIndex:2,position_id:""}},onLoad:function(t){t.id&&(this.position_id=t.id,this.getDetail())},methods:{getDetail:function(){var t=this;(0,i.netAddressDetail)({id:this.position_id}).then((function(e){e=e.data,t.address=e.address,t.address_detail=e.address_detail,t.lat=e.lat,t.lng=e.lng,t.distanceArr.forEach((function(n,i){n.distance==e.distance&&(t.distanceIndex=i)}))}))},changePosition:function(){var e=this;t.chooseLocation({success:function(t){e.lat=t.latitude,e.lng=t.longitude,e.address=t.name,e.address_detail=t.address}})},changeDistance:function(t){this.distanceIndex=t.detail.value},toSave:function(){if(this.address){var e={address:this.address,address_detail:this.address_detail,distance:this.distanceArr[this.distanceIndex].distance,lng:this.lng,lat:this.lat};this.position_id?(e.id=this.position_id,(0,i.netEditAddress)(e).then((function(e){t.showToast({title:e.msg,icon:"none"}),setTimeout((function(){t.navigateBack({delta:1})}),2e3)}))):(0,i.netAddAddress)(e).then((function(e){t.showToast({title:e.msg,icon:"none"}),setTimeout((function(){t.navigateBack({delta:1})}),2e3)}))}else t.showToast({title:"请选择打卡位置",icon:"none"})},sureDel:function(){var e=this;t.showModal({title:"提示",content:"请确认是否删除?",complete:function(n){n.confirm&&(0,i.netDelAddress)({id:e.position_id}).then((function(e){t.showToast({title:e.msg,icon:"none"}),setTimeout((function(){t.navigateBack({delta:1})}),2e3)}))}})}}};e.default=a}).call(this,n("543d")["default"])},d4e5:function(t,e,n){"use strict";n.r(e);var i=n("c0dc"),a=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=a.a},f574:function(t,e,n){"use strict";n.r(e);var i=n("58e7"),a=n("d4e5");for(var s in a)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(s);n("fa78");var d=n("f0c5"),c=Object(d["a"])(a["default"],i["b"],i["c"],!1,null,"1a24dfab",null,!1,i["a"],void 0);e["default"]=c.exports},fa78:function(t,e,n){"use strict";var i=n("3240"),a=n.n(i);a.a}},[["762e","common/runtime","common/vendor"]]]); |