|
|
|
@ -62,7 +62,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { onMounted, ref, onBeforeUnmount, reactive } from 'vue';
|
|
|
|
|
import { onMounted, ref, onBeforeUnmount, reactive, watch } from 'vue';
|
|
|
|
|
import {
|
|
|
|
|
SelectComponent,
|
|
|
|
|
AirportInformation,
|
|
|
|
@ -107,13 +107,23 @@
|
|
|
|
|
longitude: null,
|
|
|
|
|
});
|
|
|
|
|
const uavTrack = ref({});
|
|
|
|
|
const connected = ref(false)
|
|
|
|
|
const connectCallback = () => {
|
|
|
|
|
connected.value = true
|
|
|
|
|
}
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
destroyConnection();
|
|
|
|
|
createConnection();
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
changeSelect();
|
|
|
|
|
}, 1000);
|
|
|
|
|
createConnection(connectCallback);
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// changeSelect();
|
|
|
|
|
// }, 1000);
|
|
|
|
|
});
|
|
|
|
|
watch(() => connected.value, (value) => {
|
|
|
|
|
if(value){
|
|
|
|
|
console.log('start')
|
|
|
|
|
changeSelect()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
onBeforeUnmount(() => {
|
|
|
|
|
destroyConnection();
|
|
|
|
|
});
|
|
|
|
|