|
@@ -78,10 +78,8 @@
|
|
|
},
|
|
|
init(sign, form,NB,type) {
|
|
|
const regex = /^\d+(\.\d+)?$/;
|
|
|
- if (this.$parent.form.latitude == null||this.$parent.form.longitude == null) {
|
|
|
-
|
|
|
- }else{
|
|
|
- if (!regex.test(form.longitude) && !regex.test(form.latitude)) {
|
|
|
+ if (this.$parent.form.longitude != null) {
|
|
|
+ if (!regex.test(form.longitude) ) {
|
|
|
this.$message.warning('无效字符');
|
|
|
this.visible = false;
|
|
|
this.$parent.ISuperMapvisible = false;
|
|
@@ -89,6 +87,15 @@
|
|
|
this.$parent.form.longitude = null;
|
|
|
}
|
|
|
}
|
|
|
+ if (this.$parent.form.latitude != null) {
|
|
|
+ if (!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;
|