diff --git a/src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue b/src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue
index 8fd4d1c8..4365131b 100644
--- a/src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue
+++ b/src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue
@@ -200,9 +200,8 @@ export default {
};
},
},
- mounted() {
+ mounted() {
this.getFormInfo();
- this.initMap();
},
methods: {
closeSubmit(){
@@ -219,7 +218,8 @@ export default {
// 地图初始化函数,本例取名为init,开发者可根据实际情况定义
initMap() {
// 定义地图中心点坐标
- var center = new window.TMap.LatLng(36.0722275, 120.38945519);
+ let _this = this
+ var center = new window.TMap.LatLng(_this.dataForm.latitude, _this.dataForm.longitude);
// 定义map变量,调用 TMap.Map() 构造函数创建地图
map = new window.TMap.Map(document.getElementById("map_add"), {
center: center, // 设置地图中心点坐标
@@ -339,6 +339,10 @@ export default {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo();
+ }else{
+ this.dataForm.ongitude = "120.38945519"
+ this.dataForm.latitude = "36.0722275"
+ this.initMap();
}
});
},
@@ -355,6 +359,7 @@ export default {
...this.dataForm,
...res.data,
};
+ this.initMap();
})
.catch(() => {});
},
diff --git a/src/views/modules/plugins/point/icpointnucleicmonitoring.vue b/src/views/modules/plugins/point/icpointnucleicmonitoring.vue
index 85bb8543..dc4f1605 100644
--- a/src/views/modules/plugins/point/icpointnucleicmonitoring.vue
+++ b/src/views/modules/plugins/point/icpointnucleicmonitoring.vue
@@ -100,6 +100,13 @@
>导入核酸监测点数据
+