This commit is contained in:
portree_kid 2020-09-28 22:39:19 +02:00
parent bf8f7002ae
commit 300d243ef8

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog :title="title" :visible.sync="visible" width="30%" center> <el-dialog :title.sync="title" :visible.sync="visible" width="30%" center>
<span v-if="max>0"> <span v-if="max>0">
<el-progress :percentage="Number(((progress / max)*100).toPrecision(3))" v-if="max>0"></el-progress> <el-progress :percentage="Number(((progress / max)*100).toPrecision(3))" v-if="max>0"></el-progress>
</span> </span>
@ -232,7 +232,6 @@
this.max = 4 this.max = 4
} else if (e.data[0] === 'DONE') { } else if (e.data[0] === 'DONE') {
console.log('DONE') console.log('DONE')
store.dispatch('setResults', e.data[1])
worker.terminate() worker.terminate()
worker.view.max = 0 worker.view.max = 0
worker.view.checkDialogVisible = false worker.view.checkDialogVisible = false
@ -254,18 +253,20 @@
}, },
editLayer () { editLayer () {
var parent = this.$parent; var parent = this.$parent;
while (!parent.icao) { while (!parent.icao||parent.$refs.editLayer==undefined) {
parent = this.$parent; parent = parent.$parent;
if (parent.icao) { if (parent.icao&&parent.$refs.editLayer!==undefined) {
return parent.$refs.editLayer; return parent.$refs.editLayer;
} }
} }
}, },
pavementLayer () { pavementLayer () {
if(this.$parent.$parent.$parent.icao) { var parent = this.$parent;
return this.$parent.$parent.$parent.$refs.pavementLayer while (!parent.icao||parent.$refs.pavementLayer==undefined) {
} else { parent = parent.$parent;
return this.$parent.$parent.$parent.$parent.$parent.$parent.$refs.pavementLayer if (parent.icao&&parent.$refs.pavementLayer!==undefined) {
return parent.$refs.pavementLayer;
}
} }
} }
}, },
@ -284,17 +285,21 @@
return !this.error?'center':'error' return !this.error?'center':'error'
}, },
title: function () { title: function () {
if(this.$parent.$parent.$parent.icao !== undefined) { return `Upload ${this.icao} to groundweb.`
return `Upload ${this.$parent.$parent.$parent.icao} to groundweb.`
} else if (this.$parent.$parent.$parent.$refs.editLayer !== undefined) {
return `Upload ${this.$parent.$parent.$parent.$refs.editLayer.icao} to groundweb.`
}
}, },
icao: { icao: {
get: function () { get: function () {
return this.$parent.$parent.$parent.icao var parent = this.$parent;
while (!parent.icao) {
parent = parent.$parent;
if (parent.icao) {
return parent.icao;
}
}
return this.$store.state.Airports.currentAirport.icao
}, },
set: function (newValue) { set: function (newValue) {
console.error('ICAO being set ' + newValue);
} }
}, },
comittable: function () { comittable: function () {