diff --git a/src/views/modules/workSys/mapConfig.vue b/src/views/modules/workSys/mapConfig.vue index b350cbc6..6e53153d 100644 --- a/src/views/modules/workSys/mapConfig.vue +++ b/src/views/modules/workSys/mapConfig.vue @@ -102,17 +102,13 @@
中心点经度: - 中心点纬度: -
@@ -289,11 +285,13 @@ const vueGis = { xOffset: 0, yOffset: 0, - xOffset_customize: 0.0051, - yOffset_customize: 0.0002, + xOffset_customize: 0, + yOffset_customize: 0, + // xOffset_customize: 0.0051,//市北默认偏移 + // yOffset_customize: 0.0002,//市北默认偏移 - longitude: '', - latitude: '', + longitude: undefined, + latitude: undefined, } }, async mounted () { @@ -760,8 +758,16 @@ const vueGis = { handleManually () { this.dialogVisible = true this.polygonManullyString = '' - this.longitude = '' - this.latitude = '' + this.longitude = undefined + this.latitude = undefined + if (this.selAgency) { + if (this.selAgency.longitude) { + this.longitude = this.selAgency.longitude + } + if (this.selAgency.latitude) { + this.latitude = this.selAgency.latitude + } + } }, //点击【手动录入】 @@ -770,13 +776,16 @@ const vueGis = { }, handleManuallyOk () { + if (this.longitude || this.latitude) { if (!(this.longitude && this.latitude)) { this.$message({ type: "warning", message: "请同时填写中心点经纬度,或不填写" }); + return false } + } //转化成需要的格式 //120.54033616308595,36.53603370922851,120.69620469335939,36.5408402277832,120.63166001562502,36.46771248120117,120.52728989843752,36.458786089599606,120.54033616308595,36.53603370922851