Test Directory copy
This commit is contained in:
parent
41214581fd
commit
4c76d30010
@ -4,6 +4,7 @@
|
||||
<EditButton icon="fas fa-th" v-on:click="zoomin" :show="true" tooltip="Zoomin"></EditButton>
|
||||
<EditButton icon="fas fa-th-large" v-on:click="zoomout" :show="true" tooltip="Zoomout"></EditButton>
|
||||
<EditButton icon="fas fa-upload" v-on:click="upload" :show="!editing" tooltip="Upload"></EditButton>
|
||||
<EditButton icon="fas fa-plane" v-on:click="test" :show="!editing" tooltip="Test"></EditButton>
|
||||
<EditButton icon="fas fa-edit" v-on:click="edit" :show="!editing" tooltip="Edit"></EditButton>
|
||||
<EditButton
|
||||
icon="fas fa-undo"
|
||||
@ -53,6 +54,7 @@
|
||||
|
||||
import fileUrl from 'file-url'
|
||||
const path = require('path')
|
||||
const fs = require('fs');
|
||||
|
||||
export default {
|
||||
components: { EditButton, Upload },
|
||||
@ -112,7 +114,9 @@
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
|
||||
test() {
|
||||
this.$parent.$parent.$refs.editLayer.test()
|
||||
},
|
||||
check () {
|
||||
try {
|
||||
this.scanning = true
|
||||
|
@ -12,6 +12,9 @@
|
||||
import L2 from 'leaflet-textpath'
|
||||
import Vue from 'vue'
|
||||
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
|
||||
// import {LSymbol} from 'leaflet-polylinedecorator'
|
||||
|
||||
export default {
|
||||
@ -588,6 +591,19 @@
|
||||
writeGroundnetXML(this.$store.state.Settings.settings.airportsDirectory, this.icao, xml)
|
||||
this.load(this.icao, false)
|
||||
},
|
||||
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');
|
||||
try {
|
||||
fs.mkdirSync(path.join(this.$store.state.Settings.settings.testDirectory, 'Airports'), { recursive: true })
|
||||
fs.mkdirSync(path.join(this.$store.state.Settings.settings.testDirectory, 'Airports', this.icao[0]),{ recursive: true })
|
||||
fs.mkdirSync(path.join(this.$store.state.Settings.settings.testDirectory, 'Airports', this.icao[0], this.icao[1]), { recursive: true })
|
||||
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)
|
||||
},
|
||||
setVisible(visible) {
|
||||
if (this.layerGroup) {
|
||||
if (visible) {
|
||||
|
@ -8,23 +8,27 @@
|
||||
</h1>
|
||||
<div id="panel" width="100%">
|
||||
<el-row>
|
||||
<el-col :span="7" class="label">Airports Directory</el-col>
|
||||
<el-col :span="15">{{ airports_directory }}</el-col>
|
||||
<el-col :span="2">
|
||||
<el-col :span="22" class="label">Airports Directory</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="20" class="label">{{ airports_directory }}</el-col>
|
||||
<el-col :span="4">
|
||||
<directory-select @input="airportsDirectorySelect"></directory-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="7" class="label">Flightgear Directory</el-col>
|
||||
<el-col :span="15">{{ flightgear_directory }}</el-col>
|
||||
<el-col :span="2">
|
||||
<el-col :span="22" class="label">Flightgear Directory</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="20" class="label">{{ flightgear_directory }}</el-col>
|
||||
<el-col :span="4">
|
||||
<directory-select @input="flightgearDirectorySelect"></directory-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="7" class="label">AI Directory</el-col>
|
||||
<el-col :span="15">{{ AI_directory }}</el-col>
|
||||
<el-col :span="2">
|
||||
<el-col :span="15" class="label">{{ AI_directory }}</el-col>
|
||||
<el-col :span="2" class="label">
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@ -39,6 +43,13 @@
|
||||
<el-col :span="2">
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="7" class="label">Test Directory</el-col>
|
||||
<el-col :span="15">{{ test_directory }}</el-col>
|
||||
<el-col :span="2">
|
||||
<directory-select @input="testDirectorySelect"></directory-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="7" class="label">Author : </el-col>
|
||||
<el-col :span="17">
|
||||
@ -71,6 +82,10 @@
|
||||
airportsDirectorySelect: function (flightgearDirectory) {
|
||||
console.log(flightgearDirectory)
|
||||
this.$store.commit('AIPORTS_DIRECTORY', flightgearDirectory.path)
|
||||
},
|
||||
testDirectorySelect: function (testDirectory) {
|
||||
console.log(testDirectory)
|
||||
this.$store.commit('TEST_DIRECTORY', testDirectory.path)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -98,6 +113,9 @@
|
||||
},
|
||||
airports_directory: function () {
|
||||
return this.$store.state.Settings.settings.airportsDirectory
|
||||
},
|
||||
test_directory: function () {
|
||||
return this.$store.state.Settings.settings.testDirectory
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
const state = {
|
||||
settings: { flightgearDirectory: '.', email: 'x' },
|
||||
settings: { flightgearDirectory: '.', testDirectory: '.', email: 'x' },
|
||||
zoom: 14,
|
||||
center: [47.413220, -1.219482],
|
||||
bounds: undefined,
|
||||
@ -17,6 +17,9 @@ const mutations = {
|
||||
'AIPORTS_DIRECTORY' (state, airportsDirectory) {
|
||||
state.settings.airportsDirectory = airportsDirectory
|
||||
},
|
||||
'TEST_DIRECTORY' (state, testDirectory) {
|
||||
state.settings.testDirectory = testDirectory
|
||||
},
|
||||
'ZOOM' (state, zoom) {
|
||||
state.zoom = zoom
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user