This commit is contained in:
		
							parent
							
								
									534baec75d
								
							
						
					
					
						commit
						ce846cc58f
					
				| 
						 | 
					@ -70,6 +70,7 @@ export default {
 | 
				
			||||||
  watch: {
 | 
					  watch: {
 | 
				
			||||||
    positionPoint: {
 | 
					    positionPoint: {
 | 
				
			||||||
      handler(newVal) {
 | 
					      handler(newVal) {
 | 
				
			||||||
 | 
					        if (newVal) {
 | 
				
			||||||
          if (newVal && this.latitude && this.longitude && window.olMap) {
 | 
					          if (newVal && this.latitude && this.longitude && window.olMap) {
 | 
				
			||||||
            const newLocation = fromLonLat(
 | 
					            const newLocation = fromLonLat(
 | 
				
			||||||
              [this.longitude, this.latitude],
 | 
					              [this.longitude, this.latitude],
 | 
				
			||||||
| 
						 | 
					@ -81,10 +82,12 @@ export default {
 | 
				
			||||||
              center: newLocation,
 | 
					              center: newLocation,
 | 
				
			||||||
              zoom: 13
 | 
					              zoom: 13
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
          this.$store.commit("SET_POSITIONPOINT", false);
 | 
					          }
 | 
				
			||||||
        } else {
 | 
					          if (this.latitude === "" && this.longitude === "") {
 | 
				
			||||||
            this.$message.error("定位失败,请稍后重试");
 | 
					            this.$message.error("定位失败,请稍后重试");
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
 | 
					          this.$store.commit("SET_POSITIONPOINT", false);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      deep: true
 | 
					      deep: true
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue