diff --git a/src/components/ControllerTabs.vue b/src/components/ControllerTabs.vue index 78063ea..536d182 100644 --- a/src/components/ControllerTabs.vue +++ b/src/components/ControllerTabs.vue @@ -70,7 +70,7 @@ - 航线锁定 + 注册航线 @@ -639,6 +639,8 @@ export default { } }, created () { + // 初始化 + // 当站点列表 航线列表都载入之后 判断飞机的锁定状态airLock if (this.siteList && this.routeList) { this.airLock = this.siteList.some(item => { if (item.runing) { @@ -648,6 +650,8 @@ export default { return false }) } + // 主动获取飞机状态 + this.publishFun('{getPlaneState:1}') }, watch: { airLock (val) { @@ -674,6 +678,12 @@ export default { if (!found) { this.questForm.id = '' } + }, + plane (val) { + this.publishFun('{getPlaneState:1}') + }, + planeState (val) { + console.log(val) } } diff --git a/src/utils/index.js b/src/utils/index.js index 663e637..28addc1 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,3 +1,4 @@ + /** * Parse the time to string * @param {(Object|string|number)} time diff --git a/src/views/layout/components/main/route/add.vue b/src/views/layout/components/main/route/add.vue index 5c0401d..6469604 100644 --- a/src/views/layout/components/main/route/add.vue +++ b/src/views/layout/components/main/route/add.vue @@ -91,7 +91,7 @@ export default { this.form.upFile = '' }, handleUpSuccess (res) { - this.$refs.mapbox.makeRoute(res.content)// 绘出航线 + this.$refs.mapbox.makeRoute(res.content.questAss)// 绘出航线 if (res.status === 0) { this.fileList = [] this.$message.error(res.msg)