hanfucheng 1 rok temu
rodzic
commit
68aad17af7
1 zmienionych plików z 8 dodań i 0 usunięć
  1. 8 0
      data-ui/src/views/data/common/ISuperMap.vue

+ 8 - 0
data-ui/src/views/data/common/ISuperMap.vue

@@ -77,6 +77,14 @@
         this.obj.longitude = lng;
       },
       init(sign, form,NB,type) {
+        const regex = /^\d+(\.\d+)?$/;
+        if (!regex.test(form.longitude)&& !regex.test(form.latitude)){
+           this.$message.warning('无效字符');
+           this.visible = false;
+           this.$parent.ISuperMapvisible = false;
+           this.$parent.form.latitude = null;
+           this.$parent.form.longitude = null;
+        }
         if(NB=='NB'){
           getConfigKey('supermapKey').then(response => {
             let isN = response.msg;