Parking Number

This commit is contained in:
portree_kid 2020-03-29 18:21:40 +02:00
parent 1e43d973b2
commit 4b564798ab
3 changed files with 66 additions and 9 deletions

View File

@ -12,18 +12,24 @@
type: "gate"
-->
<el-row>
<el-col :span="7">
<el-col :span="4">
<span class="demo-input-label">Name :</span>
</el-col>
<el-col :span="15">
<el-col :span="8">
<el-input placeholder="Please input" v-model="name"></el-input>
</el-col>
<el-col :span="4">
<span class="demo-input-label">Number :</span>
</el-col>
<el-col :span="8">
<el-input placeholder="Please input" v-model="number"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="7">
<span class="demo-input-label">Size :</span>
</el-col>
<el-col :span="15">
<el-col :span="17">
<el-radio-group v-model="wingspan">
<el-tooltip content="PIPER PA-31/CESSNA 404 Titan" placement="top" effect="light">
<el-radio :label="15">A</el-radio>
@ -54,17 +60,27 @@
</el-radio-group>
</el-col>
</el-row>
<!--
<el-row>
<el-col :span="7">
<span class="demo-input-label">Coordinates :</span>
</el-col>
<el-col :span="17">
<el-input placeholder="Please input" v-model="coordinates"></el-input>
</el-col>
</el-row>
-->
<el-row>
<el-col :span="7">
<span class="demo-input-label">Aircraft :</span>
</el-col>
<el-col :span="15">{{type}}</el-col>
<el-col :span="17">{{type}}</el-col>
</el-row>
<el-row>
<el-col :span="7">
<span class="demo-input-label">Parking Type :</span>
</el-col>
<el-col :span="15">
<el-col :span="17">
<el-select v-model="parking_type" placeholder="Select">
<el-option
v-for="type in options"
@ -79,7 +95,7 @@
<el-col :span="7">
<span class="demo-input-label">Airline :</span>
</el-col>
<el-col :span="15">
<el-col :span="17">
<el-select v-model="airlineCodes" multiple placeholder="Select">
<el-option
v-for="item in airlines"
@ -94,7 +110,7 @@
<el-col :span="7">
<span class="demo-input-label">Pushback Route End :</span>
</el-col>
<el-col :span="15">{{pushbackEnd}}</el-col>
<el-col :span="17">{{pushbackEnd}}</el-col>
</el-row>
</div>
</template>
@ -124,7 +140,7 @@
var codes = this.$store.state.Editable.data.parking.airlineCodes
if (Array.isArray(codes)) {
return codes
} else if (codes !== undefined) {
} else if (codes !== undefined && codes instanceof String) {
return codes.split(',')
} else {
return []
@ -146,6 +162,26 @@
this.$store.commit('SET_EDIT_PARKING_NAME', newValue)
}
},
number: {
// getter
get: function () {
return this.$store.state.Editable.data.parking.number
},
// setter
set: function (newValue) {
this.$store.commit('SET_EDIT_PARKING_NUMBER', newValue)
}
},
coordinates: {
// getter
get: function () {
return ''
},
// setter
set: function (newValue) {
}
},
wingspan: {
// getter
get: function () {
@ -204,3 +240,12 @@
}
}
</script>
<style>
.el-row {
margin: 1px;
}
.el-col {
padding-left: 10pt;
}
</style>

View File

@ -183,6 +183,10 @@ var mapParkings = function (o) {
console.log(o.options.attributes.airlineCodes);
parking['@airlineCodes'] = o.options.attributes.airlineCodes;
}
if( o.options.attributes.number) {
console.log(o.options.attributes.number);
parking['@number'] = o.options.attributes.number;
}
return parking;
}
@ -191,7 +195,12 @@ var mapParkings = function (o) {
var mapRunwayNodes = function (o) {
console.log(o);
if (o instanceof L.RunwayNode) {
return { '@index': String(o['glueindex']), '@lat': convertLat(o._latlng), '@lon': convertLon(o._latlng), '@isOnRunway': '1', '@holdPointType': 'none' };
var runwayNode = { '@index': String(o['glueindex']),
'@lat': convertLat(o._latlng),
'@lon': convertLon(o._latlng),
'@isOnRunway': '1',
'@holdPointType': 'none' };
return runwayNode;
}
if (o instanceof L.HoldNode) {
// return { '@index': String(o['glueindex']), '@lat': convertLat(o._latlng), '@lon': convertLon(o._latlng), '@isOnRunway': '0', '@holdPointType': o['holdPointType'] };

View File

@ -51,6 +51,9 @@ const mutations = {
'SET_EDIT_PARKING_NAME' (state, parkingName) {
Vue.set(state.data.parking, 'name', parkingName)
},
'SET_EDIT_PARKING_NUMBER' (state, parkingName) {
Vue.set(state.data.parking, 'number', parkingName)
},
'SET_EDIT_PARKING_AIRLINES' (state, airlineCodes) {
Vue.set(state.data.parking, 'airlineCodes', airlineCodes)
},