Message after Test copy
This commit is contained in:
parent
ead320bdb5
commit
0a112fe76a
@ -11,6 +11,7 @@
|
||||
import {writeGroundnetXML} from '../loaders/groundnet_writer'
|
||||
import L2 from 'leaflet-textpath'
|
||||
import Vue from 'vue'
|
||||
import { MessageBox } from 'element-ui';
|
||||
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
@ -677,6 +678,7 @@
|
||||
writeGroundnetXML(this.$store.state.Settings.settings.airportsDirectory, this.icao, xml)
|
||||
this.load(this.icao, false)
|
||||
},
|
||||
//Copy to test directory
|
||||
test() {
|
||||
var f = path.join(this.$store.state.Settings.settings.airportsDirectory, this.icao[0], this.icao[1], this.icao[2], this.icao + '.groundnet.new.xml');
|
||||
var fNew = path.join(this.$store.state.Settings.settings.testDirectory, 'Airports', this.icao[0], this.icao[1], this.icao[2], this.icao + '.groundnet.xml');
|
||||
@ -686,6 +688,10 @@
|
||||
try { fs.mkdirSync(path.join(this.$store.state.Settings.settings.testDirectory, 'Airports', this.icao[0], this.icao[1], this.icao[2]), { recursive: true })} catch (err) { }
|
||||
|
||||
fs.copyFileSync(f, fNew)
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: `Copied to ${f}`
|
||||
});
|
||||
},
|
||||
setVisible(visible) {
|
||||
if (this.layerGroup) {
|
||||
|
@ -1,80 +0,0 @@
|
||||
<template>
|
||||
<el-dialog title="Upload" :visible.sync="visible" width="30%" center>
|
||||
<form ref="request_form" method="post" enctype="multipart/form-data"
|
||||
action="http://groundweb.azurewebsites.net/groundnets/upload"
|
||||
target="result">
|
||||
<label>Email (not checked but used for commit)</label>
|
||||
<input name="user_email" type="text"/><BR/>
|
||||
<label>I agree to release my content under the GPL v2 </label> <input name="gpl" type="checkbox"/>
|
||||
<br/>
|
||||
<label>Your groundnet file (groundnet/rwyuse)
|
||||
<input name="groundnet" type="file" size="50" accept="text/*">
|
||||
</label>
|
||||
<el-button @click="upload">Ok</el-button>
|
||||
</form>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script lang="js">
|
||||
/* eslint-disable */
|
||||
import Vue from 'vue'
|
||||
export default {
|
||||
name: 'upload',
|
||||
props: [],
|
||||
mounted () {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
gplv2: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
upload () {
|
||||
this.$refs.request_form.$el.submit()
|
||||
Vue.set(this.$parent, 'uploadVisible', false)
|
||||
},
|
||||
upload2 () {
|
||||
var blob = new Blob([JSON.stringify(data)]);
|
||||
var url = URL.createObjectURL(blob);
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', 'myForm.php', true);
|
||||
|
||||
// define new form
|
||||
var formData = new FormData();
|
||||
formData.append('someUploadIdentifier', blob, 'someFileName.json');
|
||||
|
||||
// action after uploading happens
|
||||
xhr.onload = function(e) {
|
||||
console.log("File uploading completed!");
|
||||
};
|
||||
|
||||
// do the uploading
|
||||
console.log("File uploading started!");
|
||||
xhr.send(formData);
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
visible: {
|
||||
// getter
|
||||
get: function () {
|
||||
return this.$attrs.visible
|
||||
},
|
||||
// setter
|
||||
set: function (newValue) {
|
||||
Vue.set(this.$parent, 'uploadVisible', newValue)
|
||||
}
|
||||
},
|
||||
icao: {
|
||||
get: function () {
|
||||
return this.$parent.$parent.$parent.icao
|
||||
},
|
||||
set: function (newValue) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.center { text-align: center;}
|
||||
</style>
|
@ -83,6 +83,7 @@ exports.extendTaxiSegment = function (taxiwaySegment) {
|
||||
});
|
||||
this.on('editable:vertex:new', event => {
|
||||
console.log(event)
|
||||
// Find nearest node
|
||||
let closest = this.editLayer.closestLayerSnap(event.latlng, 5)
|
||||
let taxiwaySegment = event.latlng.__vertex.editor.feature;
|
||||
if(taxiwaySegment.options.attributes === undefined) {
|
||||
|
Loading…
Reference in New Issue
Block a user