wangzhe 2 роки тому
батько
коміт
b41f56ad56
1 змінених файлів з 6 додано та 0 видалено
  1. 6 0
      src/components/eventLocation.vue

+ 6 - 0
src/components/eventLocation.vue

@@ -308,6 +308,9 @@ export default {
       if (this.longitude == null || this.longitude == '' || this.latitude == null || this.latitude == '') {
         this.$modal.msgError('请输入经纬度!')
         return
+      } else if (this.longitude >180 || this.longitude < -180 || this.latitude > 90 || this.latitude < -90) {
+        this.$modal.msgError('请输入正确经纬度!')
+        return
       }
       this.activeName = 'event'
       let marker = [{
@@ -430,6 +433,9 @@ export default {
         if (that.longitude == null || that.longitude == '' || that.latitude == null || that.latitude == '') {
           that.$modal.msgError('请输入经纬度!')
           return
+        } else if (this.longitude >180 || this.longitude < -180 || this.latitude > 90 || this.latitude < -90) {
+          that.$modal.msgError('请输入正确经纬度!')
+          return
         }
         that.cameraMarkersList = []
         that.cameraList = []