|
@@ -18,7 +18,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="mui-input-row">
|
|
<div class="mui-input-row">
|
|
<label><span class="colorfe616c">*</span>定位</label>
|
|
<label><span class="colorfe616c">*</span>定位</label>
|
|
- <div class="vongi-yidi-location mui-ellipsis">
|
|
|
|
|
|
+ <div class="vongi-yidi-location mui-ellipsis" style="width: 80%;">
|
|
<button class="mui-btn mui-btn-block" type='button' v-text="positionName"></button>
|
|
<button class="mui-btn mui-btn-block" type='button' v-text="positionName"></button>
|
|
<span class="mui-icon mui-icon-location"></span>
|
|
<span class="mui-icon mui-icon-location"></span>
|
|
</div>
|
|
</div>
|
|
@@ -81,6 +81,7 @@
|
|
workAttendanceId: ''
|
|
workAttendanceId: ''
|
|
},
|
|
},
|
|
tjForm: {
|
|
tjForm: {
|
|
|
|
+ alarmConfigId: '',
|
|
workAttendanceDate: '',
|
|
workAttendanceDate: '',
|
|
workAttendanceTime: '',
|
|
workAttendanceTime: '',
|
|
type: '1', //外勤打卡/补卡(1/2)
|
|
type: '1', //外勤打卡/补卡(1/2)
|
|
@@ -88,8 +89,8 @@
|
|
approvalPersonId: '',
|
|
approvalPersonId: '',
|
|
workAttendanceId: '',
|
|
workAttendanceId: '',
|
|
photoFile: '',
|
|
photoFile: '',
|
|
- longitude: '',
|
|
|
|
- latitude: '',
|
|
|
|
|
|
+ longitude: 112.198305,
|
|
|
|
+ latitude: 30.347599,
|
|
},
|
|
},
|
|
//typeName: '',
|
|
//typeName: '',
|
|
approvalPersonName: '',
|
|
approvalPersonName: '',
|
|
@@ -109,6 +110,7 @@
|
|
|
|
|
|
this.tjForm.workAttendanceDate = response.workAttendanceDate;
|
|
this.tjForm.workAttendanceDate = response.workAttendanceDate;
|
|
this.tjForm.workAttendanceTime = response.workAttendanceTime;
|
|
this.tjForm.workAttendanceTime = response.workAttendanceTime;
|
|
|
|
+ this.tjForm.alarmConfigId = response.alarmConfigId;
|
|
|
|
|
|
this.isLoading = false;
|
|
this.isLoading = false;
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
@@ -212,19 +214,26 @@
|
|
},
|
|
},
|
|
//获取经纬度
|
|
//获取经纬度
|
|
getPoint() {
|
|
getPoint() {
|
|
|
|
+ this.isLoading = true;
|
|
WxJsApi.getLocation().then((res) => {
|
|
WxJsApi.getLocation().then((res) => {
|
|
|
|
+ this.isLoading = false;
|
|
this.tjForm.latitude = res.latitude;
|
|
this.tjForm.latitude = res.latitude;
|
|
this.tjForm.longitude = res.longitude;
|
|
this.tjForm.longitude = res.longitude;
|
|
|
|
+
|
|
|
|
+ //获取定位地址
|
|
|
|
+ this.getPositionByLonLats()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
//获取定位地址
|
|
//获取定位地址
|
|
- getPositionByLonLats(lng, lat) {
|
|
|
|
|
|
+ getPositionByLonLats() {
|
|
var _this = this;
|
|
var _this = this;
|
|
MapLoader().then(AMap => {
|
|
MapLoader().then(AMap => {
|
|
- var lnglatXY = [lng, lat];
|
|
|
|
|
|
+ var lnglatXY = [_this.tjForm.longitude, _this.tjForm.latitude];
|
|
AMap.service('AMap.Geocoder', function() {
|
|
AMap.service('AMap.Geocoder', function() {
|
|
- geocoder = new AMap.Geocoder({});
|
|
|
|
|
|
+ let geocoder = new AMap.Geocoder({});
|
|
geocoder.getAddress(lnglatXY, function(status, result) {
|
|
geocoder.getAddress(lnglatXY, function(status, result) {
|
|
|
|
+ console.log(lnglatXY);
|
|
|
|
+ console.log(status, result);
|
|
if (status === 'complete' && result.info === 'OK') {
|
|
if (status === 'complete' && result.info === 'OK') {
|
|
var address = result.regeocode.formattedAddress;
|
|
var address = result.regeocode.formattedAddress;
|
|
console.log(address);
|
|
console.log(address);
|
|
@@ -234,6 +243,8 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ console.log(error)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
asynCallBack() {
|
|
asynCallBack() {
|
|
@@ -292,5 +303,6 @@
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped src="$project/assets/css/xpwyfyy.css"></style>
|
|
<style scoped src="$project/assets/css/xpwyfyy.css"></style>
|
|
-<style>
|
|
|
|
|
|
+<style src="$project/assets/css/mui.picker.min.css"></style>
|
|
|
|
+<style scoped>
|
|
</style>
|
|
</style>
|