Work in progress
This commit is contained in:
parent
70a0f5a7de
commit
a4baeee2ea
55
src/renderer/components/Airport.vue
Normal file
55
src/renderer/components/Airport.vue
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<span>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6" class='text'>
|
||||||
|
{{airport.icao}}
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10" class='text'>
|
||||||
|
{{date}}
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-button @click="goto">Goto</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang="js">
|
||||||
|
/* eslint-disable */
|
||||||
|
export default {
|
||||||
|
name: 'airport',
|
||||||
|
props: {airport: Object},
|
||||||
|
mounted () {
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
ok: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
goto() {
|
||||||
|
let airports = this.$store.state.Airports.airports
|
||||||
|
.filter(a => a.properties.icao.match(this.airport.icao))
|
||||||
|
if (airports.length > 0) {
|
||||||
|
this.$store.commit('CENTER', [airports[0].geometry.coordinates[1], airports[0].geometry.coordinates[0]])
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
date: function () {
|
||||||
|
var d = new Date(this.airport.time)
|
||||||
|
return d.toLocaleDateString() + ' ' + d.toLocaleTimeString()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.text {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -147,7 +147,7 @@
|
|||||||
l.bringToFront()
|
l.bringToFront()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
this.$store.dispatch('addWip', {icao: this.icao}); },
|
||||||
disableEdit () {
|
disableEdit () {
|
||||||
this.editable = false
|
this.editable = false
|
||||||
this.editing = false
|
this.editing = false
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
<li><a href="#parking" role="tab"><i class="fas fa-parking"></i></a></li>
|
<li><a href="#parking" role="tab"><i class="fas fa-parking"></i></a></li>
|
||||||
<li><a href="#search" role="tab"><i class="fa fa-search"></i></a></li>
|
<li><a href="#search" role="tab"><i class="fa fa-search"></i></a></li>
|
||||||
<li><a href="#check" role="tab"><i class="far fa-check-square"></i></a></li>
|
<li><a href="#check" role="tab"><i class="far fa-check-square"></i></a></li>
|
||||||
|
<li><a href="#wip" role="tab"><i class="fas fa-wrench"></i></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul role="tablist"> <!-- bottom aligned tabs -->
|
<ul role="tablist"> <!-- bottom aligned tabs -->
|
||||||
@ -44,6 +45,9 @@
|
|||||||
<div class="leaflet-sidebar-pane" id="check">
|
<div class="leaflet-sidebar-pane" id="check">
|
||||||
<CheckPanel></CheckPanel>
|
<CheckPanel></CheckPanel>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="leaflet-sidebar-pane" id="wip">
|
||||||
|
<WorkInProgress></WorkInProgress>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -64,10 +68,11 @@
|
|||||||
import RunScan from './RunScan'
|
import RunScan from './RunScan'
|
||||||
import SettingsPanel from './SettingsPanel'
|
import SettingsPanel from './SettingsPanel'
|
||||||
import Search from './Search'
|
import Search from './Search'
|
||||||
|
import WorkInProgress from './WorkInProgress'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'leaflet-sidebar',
|
name: 'leaflet-sidebar',
|
||||||
components: { Help, AirportEdit, ArcEdit, CheckPanel, NodeEdit, ParkingEdit, ParkingList, RunScan, FileSelect, SettingsPanel, Search },
|
components: { Help, AirportEdit, ArcEdit, CheckPanel, NodeEdit, ParkingEdit, ParkingList, RunScan, FileSelect, SettingsPanel, Search, WorkInProgress },
|
||||||
props: [],
|
props: [],
|
||||||
mounted () {
|
mounted () {
|
||||||
this.add()
|
this.add()
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
console.log("File uploading completed! ");
|
console.log("File uploading completed! ");
|
||||||
console.log(e);
|
console.log(e);
|
||||||
if (e.srcElement.status===500) {
|
if (e.srcElement.status===500) {
|
||||||
parent.$refs.upload.message == e.srcElement.statusMessage
|
parent.$refs.upload.message == e.srcElement.statusText
|
||||||
} else if(JSON.parse(e.srcElement.response).message.match('[A-Z0-9]* Imported Successfully')) {
|
} else if(JSON.parse(e.srcElement.response).message.match('[A-Z0-9]* Imported Successfully')) {
|
||||||
Vue.set(parent, 'uploadVisible', false)
|
Vue.set(parent, 'uploadVisible', false)
|
||||||
} else if(JSON.parse(e.srcElement.response).message === 'XML Errors') {
|
} else if(JSON.parse(e.srcElement.response).message === 'XML Errors') {
|
||||||
|
53
src/renderer/components/WorkInProgress.vue
Normal file
53
src/renderer/components/WorkInProgress.vue
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<section class="work-in-progress">
|
||||||
|
<h1 class="leaflet-sidebar-header">
|
||||||
|
Work in progress
|
||||||
|
<div class="leaflet-sidebar-close"><i class="fa fa-caret-left"></i></div>
|
||||||
|
</h1>
|
||||||
|
<div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6" class="text">
|
||||||
|
ICAO
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10" class="text">
|
||||||
|
Edited
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" class="text">
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row v-for="w in wip" :key="w.icao">
|
||||||
|
<Airport :airport="w"></Airport>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="js">
|
||||||
|
import Airport from './Airport'
|
||||||
|
export default {
|
||||||
|
name: 'work-in-progress',
|
||||||
|
props: [],
|
||||||
|
components: {Airport},
|
||||||
|
mounted () {
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
wip: function () {
|
||||||
|
return this.$store.state.Settings.wip
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.text {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -2,7 +2,8 @@ const state = {
|
|||||||
settings: { flightgearDirectory: '.', email: 'x' },
|
settings: { flightgearDirectory: '.', email: 'x' },
|
||||||
zoom: 14,
|
zoom: 14,
|
||||||
center: [47.413220, -1.219482],
|
center: [47.413220, -1.219482],
|
||||||
bounds: undefined
|
bounds: undefined,
|
||||||
|
wip: []
|
||||||
}
|
}
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
@ -27,6 +28,15 @@ const mutations = {
|
|||||||
},
|
},
|
||||||
'SET_EMAIL' (state, email) {
|
'SET_EMAIL' (state, email) {
|
||||||
state.settings.email = email
|
state.settings.email = email
|
||||||
|
},
|
||||||
|
'ADD_WIP' (state, airport) {
|
||||||
|
const item = state.wip.find((e) => e.icao === airport.icao)
|
||||||
|
airport.time = Date.now()
|
||||||
|
if (item === null) {
|
||||||
|
state.wip.push(airport)
|
||||||
|
} else {
|
||||||
|
Object.assign(item, airport);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,6 +51,9 @@ const actions = {
|
|||||||
},
|
},
|
||||||
async setBounds (context, bounds) {
|
async setBounds (context, bounds) {
|
||||||
context.commit('BOUNDS', bounds)
|
context.commit('BOUNDS', bounds)
|
||||||
|
},
|
||||||
|
async addWip (context, airport) {
|
||||||
|
context.commit('ADD_WIP', airport)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user