浏览代码

数据中心

hanfucheng 1 年之前
父节点
当前提交
68aad17af7
共有 1 个文件被更改,包括 8 次插入0 次删除
  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;