diff --git a/src/assets/svg/civil.svg b/src/assets/svg/civil.svg
new file mode 100644
index 0000000..d6ff4f7
--- /dev/null
+++ b/src/assets/svg/civil.svg
@@ -0,0 +1,16 @@
+
+
+
diff --git a/src/components/ControllerTabs.vue b/src/components/ControllerTabs.vue
index 320ef09..bc14c75 100644
--- a/src/components/ControllerTabs.vue
+++ b/src/components/ControllerTabs.vue
@@ -976,8 +976,6 @@ export default {
* @param {*} item 对应下拉框的任务
*/
isWaring (item) {
- console.error('当前飞机ID:', item.total_weight)
-
const isOverWaight = Number(item.total_weight) >= Number(this.plane.weight_max)// 是否超重
const isQuestIng = (item.runing ?? '').split(',').some(i => i !== '') // 是否有飞机正在执行
return isOverWaight || isQuestIng
diff --git a/src/views/layout/components/main/home/set.vue b/src/views/layout/components/main/home/set.vue
index 4edb614..bca859a 100644
--- a/src/views/layout/components/main/home/set.vue
+++ b/src/views/layout/components/main/home/set.vue
@@ -1,74 +1,17 @@
-
diff --git a/src/views/layout/components/main/planes/index.vue b/src/views/layout/components/main/planes/index.vue
index c3ce0d7..55109f2 100644
--- a/src/views/layout/components/main/planes/index.vue
+++ b/src/views/layout/components/main/planes/index.vue
@@ -1,8 +1,8 @@
-
+
@@ -119,8 +119,8 @@ export default {
plane.lon = planeDefaultLonLat.lon
plane.lat = planeDefaultLonLat.lat
} else {
- plane.lon = 0
- plane.lat = 0
+ plane.lon = 100
+ plane.lat = 40
}
this.$refs.mapbox.removePlanes()// 先清除画布上现有的飞机
this.$refs.mapbox.makePlane(plane)// 创建飞机
@@ -165,7 +165,7 @@ export default {
},
watch: {
plane (val) {
- this.makePlane(val)// 有飞机数据之后 在地图上创建飞机
+ if (val) this.makePlane(val)// 有飞机数据之后 在地图上创建飞机
},
/**
* @description: 更新飞机位置 并画出轨迹 跟随飞机
@@ -185,24 +185,15 @@ export default {
},
deep: true
},
- noflyData: {
- deep: true,
- immediate: true,
- handler () {
- this.showMapbox = false
- this.$nextTick(() => {
- this.mapboxKey++
- this.showMapbox = true
- })
- }
- },
/**
* @description: 侧边栏缩进有变化时 地图重新自适应
*/
isCollapse: {
handler (val) {
if (val) {
- this.$refs.mapbox.handleResize()
+ this.$nextTick(() => {
+ this.$refs.mapbox.handleResize()
+ })
}
}
}
diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue
index 2447b53..52fc7ed 100644
--- a/src/views/layout/index.vue
+++ b/src/views/layout/index.vue
@@ -101,8 +101,6 @@ export default {
}
},
mounted () {
- /* mqtt */
- mqtt.mqttConf()// 连接mqtt
},
created () {
/* init */
@@ -126,6 +124,8 @@ export default {
* @param {*} res 飞机列表
*/
airList (res) {
+ /* mqtt */
+ mqtt.mqttConf()// 连接mqtt
// 订阅飞机信息
mqtt.doSubscribe('planeState/+', (mqttRes) => {
res.forEach(plane => {
@@ -208,6 +208,12 @@ export default {
}
})
})
+ // 订阅ADSB信息
+ mqtt.doSubscribe('ADSB/+', (res) => {
+ if (res.topic.indexOf('ADSB') > -1) {
+
+ }
+ })
// 订阅对频
mqtt.doSubscribe('crosFrequency/+', (res) => {
if (res.topic.indexOf('crosFrequency') > -1) {