Browse Source

web 考勤规则优化

黑艺新账号
yxq 1 year ago
parent
commit
d0b70d5ffe
2 changed files with 7 additions and 1 deletions
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Form.cshtml
  2. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Form.js

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Form.cshtml View File

@@ -107,7 +107,7 @@
id="suggestId"
class="form-control"
size="20"
value="百度"
value=""
style="width: 150px" />
</div>
<div id="container" style="flex:1;height:400px"></div>


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Form.js View File

@@ -74,6 +74,8 @@ var bootstrap = function ($, learun) {
}
async function initMap() {
let defaultPoint = await local()

var geoc = new BMapGL.Geocoder();
var currentPoint = $('#GPSLon').val() && $('#GPSLat').val() ? { lng: $('#GPSLon').val(), lat: $('#GPSLat').val() } : defaultPoint, //经纬度 {lng,lat}
radius = $('#GPSRange').val() || 30, //打卡距离(m)
map = new BMapGL.Map("container", {
@@ -172,6 +174,10 @@ var bootstrap = function ($, learun) {
var point = new BMapGL.Point(e.latlng.lng, e.latlng.lat);
var marker = new BMapGL.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中
geoc.getLocation(point, function (rs) {
var addComp = rs.addressComponents;
$('#GPSAddr').val(addComp.province + addComp.city + addComp.district + addComp.street + addComp.streetNumber)// 输出地点名字信息
});
currentPoint = point;
setPointVal(point)
setCircle(point)//设置圆


Loading…
Cancel
Save