This commit is contained in:
JS-LM
2023-05-10 09:16:09 +08:00
parent d2eed9ad3a
commit e89a9ebba5
4 changed files with 109 additions and 61 deletions

View File

@@ -195,6 +195,7 @@ export default {
dicts: ["station_type", "match_cars", "construction_type"],
data() {
return {
dialogVisible:false,
headers: {
Authorization: "Bearer " + getToken()
},

View File

@@ -16,7 +16,7 @@
<el-tab-pane label="基本资料" name="stationInfo">
<div class="over">
<div id="map_wrap">
<MapContainer ref="map"/>
<MapContainer ref="map" :stationLat="stationLat" :stationLng="stationLng"/>
</div>
<div class="menu">
<site-info ref="stationInfo"/>
@@ -98,7 +98,9 @@ export default {
dialogFormVisible: false,
stationId: this.$route.params.id,
stationName: this.$route.params.stationName,
stationDetail: {}
stationDetail: {},
stationLat:null,
stationLng:null
};
},
created() {
@@ -128,7 +130,7 @@ export default {
} else if (name === "billing") {
this.$refs.billing.getStationBillingTemplateList();
} else if (name === "stationInfo") {
this.$refs.map.queryStationInfo();
this.$refs.map.initMap();
this.$refs.stationInfo.queryStationInfo();
} else if (name === "order") {
this.$refs.order.dataLoading();
@@ -137,8 +139,11 @@ export default {
queryStationInfo() {
console.log("stationId", this.stationId);
getStationInfo(this.stationId).then((res) => {
console.log(res);
// console.log(res);
this.stationDetail = res.data;
this.stationLat = res.data.stationLat
this.stationLng = res.data.stationLng
console.log(this.stationLat,this.stationLng,"父组件里面的经纬度")
});
console.log("queryStationInfo==", this.stationDetail);
},