getMaxLongitudeLatitude(res) {
let L = 0,
T = 0,
Max_L = 0,
Max_T = 0;
//公司地址范围限制
L = this.lng_current; //当前经度
T = this.lat_current; //当前纬度
Max_L = this.lng_In; //选择的位置 中心点
Max_T = this.lat_In; //选择的位置 中心点
let X_T = Max_T - T;
let X_L = Max_L - L;
let X_square = Math.pow(X_T, 2);
let Y_square = Math.pow(X_L, 2);
let XY_square = X_square + Y_square;
let Limit_R = Math.sqrt(XY_square);
if (Limit_R <= this.Distance_In) {
this.IS_Range = true;
this.IS_Range_Content = '已进入考勤范围';
} else {
this.IS_Range = false;
this.IS_Range_Content = '你已超出考勤范围';
}
// }
}
vue打卡范围
最新推荐文章于 2024-04-12 20:19:06 发布