Selection Editable Objects
This commit is contained in:
@@ -11,19 +11,19 @@
|
||||
<div>
|
||||
<el-row>
|
||||
<el-col :span="7">ICAO :</el-col>
|
||||
<el-col :span="15">{{ this.$store.state.Editable.data.properties.icao }}</el-col>
|
||||
<el-col :span="15">{{ this.$store.state.Editable.data.airports[this.$store.state.Editable.index].icao }}</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="7">Name :</el-col>
|
||||
<el-col :span="15">{{ this.$store.state.Editable.data.properties.name }}</el-col>
|
||||
<el-col :span="15">{{ this.$store.state.Editable.data.airports[this.$store.state.Editable.index].name }}</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="7">Flights :</el-col>
|
||||
<el-col :span="15">{{ this.$store.state.Editable.data.properties.flights }}</el-col>
|
||||
<el-col :span="15">{{ this.$store.state.Editable.data.airports[this.$store.state.Editable.index].flights }}</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="7">Airlines :</el-col>
|
||||
<el-col :span="15">{{ this.$store.state.Editable.data.properties.airlines }}</el-col>
|
||||
<el-col :span="15">{{ this.$store.state.Editable.data.airports[this.$store.state.Editable.index].airlines }}</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="7">Groundnet :</el-col>
|
||||
@@ -41,10 +41,7 @@
|
||||
return this.$store.state.Editable.type === 'airport'
|
||||
},
|
||||
groundnet: function () {
|
||||
return this.$store.state.Editable.data.properties.groundnet
|
||||
},
|
||||
airports_directory: function () {
|
||||
return this.$store.state.Settings.settings.airportsDirectory
|
||||
return this.$store.state.Editable.data.airports[this.$store.state.Editable.index].groundnet
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
},
|
||||
methods: {
|
||||
load (icao) {
|
||||
if (this.groundnet !== undefined) {
|
||||
this.groundnet.removeFrom(this.$parent.mapObject)
|
||||
}
|
||||
this.groundnet = readGroundnetXML(this.$store.state.Settings.settings.airportsDirectory, icao)
|
||||
this.groundnet.addTo(this.$parent.mapObject)
|
||||
this.groundnet.eachLayer(l => {
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
return ret && ret2
|
||||
},
|
||||
addEvent (event, item) {
|
||||
console.log(event, item)
|
||||
// console.log(event, item)
|
||||
if (item.properties.groundnet === 0) {
|
||||
event.target.setStyle({color: 'red', fillcolor: 'red'})
|
||||
} else if ((item.properties.flights / item.properties.parking) > 10) {
|
||||
@@ -93,7 +93,7 @@
|
||||
},
|
||||
onClick (item) {
|
||||
console.log(item)
|
||||
this.$store.commit('SET_EDIT_AIRPORT', item)
|
||||
this.$store.commit('SET_EDIT_AIRPORT', item.properties)
|
||||
},
|
||||
zoomUpdated (zoom) {
|
||||
this.$store.dispatch('setZoom', zoom)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
radius: 18
|
||||
type: "gate"
|
||||
-->
|
||||
{{this.$store.state.Editable.index}}
|
||||
<el-row>
|
||||
<el-col :span="7"><span class="demo-input-label">Name :</span></el-col>
|
||||
<el-col :span="15"><el-input placeholder="Please input" v-model="name"></el-input></el-col>
|
||||
@@ -35,7 +36,7 @@
|
||||
name: {
|
||||
// getter
|
||||
get: function () {
|
||||
return this.$store.state.Editable.data.name
|
||||
return this.$store.state.Editable.data.parking[this.$store.state.Editable.index].name
|
||||
},
|
||||
// setter
|
||||
set: function (newValue) {
|
||||
|
||||
Reference in New Issue
Block a user