Selaa lähdekoodia

web 考勤规则优化

黑艺新账号
yxq 1 vuosi sitten
vanhempi
commit
d0b70d5ffe
2 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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)//设置圆


Ladataan…
Peruuta
Tallenna