Selection Editable Objects

This commit is contained in:
portree_kid
2020-01-05 20:22:45 +01:00
parent 0a0e2574e5
commit cd501175f5
6 changed files with 36 additions and 36 deletions
+5 -8
View File
@@ -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
}
}
}
+3
View File
@@ -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 => {
+2 -2
View File
@@ -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)
+2 -1
View File
@@ -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) {