Edit/View Airport
This commit is contained in:
parent
a06e6eab48
commit
77bb7c5ba6
@ -3,19 +3,19 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="7">ICAO :</el-col>
|
<el-col :span="7">ICAO :</el-col>
|
||||||
<el-col :span="15">{{ this.$store.state.Editable.data.airports[this.$store.state.Editable.index].icao }}</el-col>
|
<el-col :span="15">{{ icao }}</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="7">Name :</el-col>
|
<el-col :span="7">Name :</el-col>
|
||||||
<el-col :span="15">{{ this.$store.state.Editable.data.airports[this.$store.state.Editable.index].name }}</el-col>
|
<el-col :span="15">{{ name }}</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="7">Flights :</el-col>
|
<el-col :span="7">Flights :</el-col>
|
||||||
<el-col :span="15">{{ this.$store.state.Editable.data.airports[this.$store.state.Editable.index].flights }}</el-col>
|
<el-col :span="15">{{ flights }}</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="7">Airlines :</el-col>
|
<el-col :span="7">Airlines :</el-col>
|
||||||
<el-col :span="15">{{ this.$store.state.Editable.data.airports[this.$store.state.Editable.index].airlines }}</el-col>
|
<el-col :span="15">{{ airlines }}</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="7">Groundnet :</el-col>
|
<el-col :span="7">Groundnet :</el-col>
|
||||||
@ -23,7 +23,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="7">Parking Positions :</el-col>
|
<el-col :span="7">Parking Positions :</el-col>
|
||||||
<el-col :span="15">{{ this.$store.state.Editable.data.airports[this.$store.state.Editable.index].parking }}</el-col>
|
<el-col :span="15">{{ parking }}</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -32,11 +32,26 @@
|
|||||||
<script lang="js">
|
<script lang="js">
|
||||||
export default {
|
export default {
|
||||||
computed: {
|
computed: {
|
||||||
airport: function () {
|
icao: function () {
|
||||||
return this.$store.state.Editable.type === 'airport'
|
return this.$store.state.Editable.data.airport.icao
|
||||||
|
},
|
||||||
|
name: function () {
|
||||||
|
return this.$store.state.Editable.data.airport.name
|
||||||
|
},
|
||||||
|
flights: function () {
|
||||||
|
return this.$store.state.Editable.data.airport.flights
|
||||||
|
},
|
||||||
|
airlines: function () {
|
||||||
|
return this.$store.state.Editable.data.airport.airlines
|
||||||
},
|
},
|
||||||
groundnet: function () {
|
groundnet: function () {
|
||||||
return this.$store.state.Editable.data.airports[this.$store.state.Editable.index].groundnet
|
return this.$store.state.Editable.data.airport.groundnet
|
||||||
|
},
|
||||||
|
parking: function () {
|
||||||
|
return this.$store.state.Editable.data.airport.parking
|
||||||
|
},
|
||||||
|
airport: function () {
|
||||||
|
return this.$store.state.Editable.type === 'airport'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ const SET_EDIT_ARC = 'SET_EDIT_ARC'
|
|||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
SET_EDIT_AIRPORT (state, airport) {
|
SET_EDIT_AIRPORT (state, airport) {
|
||||||
state.data.airports[airport.icao] = airport
|
Vue.set(state.data, 'airport', airport)
|
||||||
state.index = airport.icao
|
state.index = airport.icao
|
||||||
state.type = 'airport'
|
state.type = 'airport'
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user