This commit is contained in:
portree_kid 2020-03-31 13:58:52 +02:00
parent 5be00f012f
commit ffc8d76d1f
2 changed files with 25 additions and 19 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "flightgear-airports", "name": "flightgear-airports",
"version": "0.0.3", "version": "0.0.4",
"author": "portree_kid <keith.paterson@gmx.de>", "author": "portree_kid <keith.paterson@gmx.de>",
"description": "An software to design Flightgear groundnets", "description": "An software to design Flightgear groundnets",
"license": "GPL v3", "license": "GPL v3",

View File

@ -3,28 +3,28 @@
<div width="100%" v-if="airport"> <div width="100%" v-if="airport">
<el-row> <el-row>
<el-col :span="7">ICAO :</el-col> <el-col :span="7">ICAO :</el-col>
<el-col :span="15">{{ icao }}</el-col> <el-col :span="17">{{ 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">{{ name }}</el-col> <el-col :span="17">{{ name }}</el-col>
</el-row>
<el-row>
<el-col :span="7">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">{{ airlines }}</el-col> <el-col :span="15">
<el-tag v-for="item in airlines" :key="item.value">{{item.value}}</el-tag>
</el-col>
</el-row>
<el-row>
<el-col :span="5">Flights :</el-col>
<el-col :span="7">{{ flights }}</el-col>
<el-col :span="5">Parking :</el-col>
<el-col :span="7">{{ parking }}</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="7">Groundnet :</el-col> <el-col :span="7">Groundnet :</el-col>
<el-col :span="15">{{groundnet}}</el-col> <el-col :span="15">{{groundnet}}</el-col>
</el-row> </el-row>
<el-row>
<el-col :span="7">Parking Positions :</el-col>
<el-col :span="15">{{ parking }}</el-col>
</el-row>
</div> </div>
<el-divider v-if="airport"></el-divider> <el-divider v-if="airport"></el-divider>
<h3 v-if="airport">Frequencies</h3> <h3 v-if="airport">Frequencies</h3>
@ -32,8 +32,8 @@
<el-row v-for="f in Frequencies" :key="f.index"> <el-row v-for="f in Frequencies" :key="f.index">
<Frequency :frequency="f"></Frequency> <Frequency :frequency="f"></Frequency>
</el-row> </el-row>
<el-button @click="addFrequency" v-if="editing" >Add</el-button>
</div> </div>
<el-button @click="addFrequency" v-if="editing" >Add</el-button>
</div> </div>
</template> </template>
@ -52,10 +52,10 @@
} }
}, },
computed: { computed: {
editing: function () { editing: {
return this.$parent.$parent.$parent.$refs.editLayer !== undefined && get: function () {
this.$parent.$parent.$parent.$refs.editLayer.editing && return this.$parent.$parent.$parent.$refs.editLayer.editing
this.$store.state.Editable.type === 'airport' }
}, },
icao: function () { icao: function () {
return this.$store.state.Editable.data.airport.icao return this.$store.state.Editable.data.airport.icao
@ -67,7 +67,12 @@
return this.$store.state.Editable.data.airport.flights return this.$store.state.Editable.data.airport.flights
}, },
airlines: function () { airlines: function () {
return this.$store.state.Editable.data.airport.airlines var airlineCodes = []
var storedairlineCodes = this.$store.state.Airports.currentAirport.airlines
storedairlineCodes.forEach(element => {
airlineCodes.push({value: element, label: element})
})
return airlineCodes
}, },
groundnet: function () { groundnet: function () {
return this.$store.state.Editable.data.airport.groundnet return this.$store.state.Editable.data.airport.groundnet
@ -90,6 +95,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.el-row { .el-row {
padding: 0em padding: 0em;
margin-bottom: 10px;
} }
</style> </style>