|
@@ -112,6 +112,7 @@
|
|
|
punchDistance:0, //打卡距离
|
|
|
punchRange:0, //打卡范围
|
|
|
outwork:0, //是否外勤 0-否 1-是
|
|
|
+ punchAddress:'', //打卡地址
|
|
|
// 地图
|
|
|
covers: [],
|
|
|
circles:[{
|
|
@@ -150,14 +151,18 @@
|
|
|
let that = this;
|
|
|
uni.getLocation({
|
|
|
type:"gcj02",
|
|
|
+ geocode: true,
|
|
|
success : function (res) {
|
|
|
uni.hideLoading();
|
|
|
var dst = `${that.payeeinfo.latitude},${that.payeeinfo.longitude}`;
|
|
|
var src = res.latitude + ',' + res.longitude;
|
|
|
+ ALog?.info({msg: "返回数据:" + JSON.stringify(res)});
|
|
|
var locRet = location?.distance?.(src, dst);
|
|
|
that.positionInfo = true;
|
|
|
that.punchDistance = locRet.distance;
|
|
|
that.punchRange = that.payeeinfo.workDistance;
|
|
|
+ that.punchAddress = res?.address?.province + res?.address?.city
|
|
|
+ + res?.address?.district + res?.address?.street + res?.address?.streetNum;
|
|
|
if(locRet.distance <= that.payeeinfo.workDistance){//在打卡范围内
|
|
|
that.outPosition = false;
|
|
|
that.outwork = 0;
|
|
@@ -229,7 +234,8 @@
|
|
|
workType:that.workType,
|
|
|
punchDistance: that.punchDistance,
|
|
|
punchRange: that.punchRange,
|
|
|
- outwork: that.outwork
|
|
|
+ outwork: that.outwork,
|
|
|
+ punchAddress: that.punchAddress
|
|
|
}
|
|
|
that.$u.api.punchIn(param)
|
|
|
.then(res=>{
|