diff --git a/jsowell-ui/src/views/pile/station/components/SiteInfo.vue b/jsowell-ui/src/views/pile/station/components/SiteInfo.vue index c6ff9d2b7..0f075a289 100644 --- a/jsowell-ui/src/views/pile/station/components/SiteInfo.vue +++ b/jsowell-ui/src/views/pile/station/components/SiteInfo.vue @@ -485,7 +485,7 @@ export default { // console.log("data", data); // data就是它传过来的值 // console.log("原始this.station", this.station); // 地址 - this.detailedAddress = data.address; + // this.detailedAddress = data.address; // console.log("详细地址", data.address); var adcode = data.adcode; var areaCode = []; @@ -498,14 +498,15 @@ export default { this.station.stationLng = String(data.pos[0]); this.station.stationLat = String(data.pos[1]); // console.log("修改后this.station", this.station); - + console.log(data.address,'data.address') + this.station.address = data.address.includes('区') ? data.address.replace(/区/, ' ').split(' ')[1] : data.address // 优化之后 - let newAddress2 = this.detailedAddress - .replace(/(?<=[省市区])/g, "$&,") - .split(","); - let end = newAddress2.pop(); - console.log("详细地址", end); - this.station.address = end; + // let newAddress2 = this.detailedAddress + // .replace(/(?<=[省市区])/g, "$&,") + // .split(","); + // let end = newAddress2.pop(); + // console.log("详细地址",this.station.areaCode,newAddress2); + // this.station.address = newAddress2; }); }, computed: {