【类 型】:refactor
【主 题】:飞机状态组件 修改 【描 述】: [原因]:其他组件也是从父级拿 代码公用 [过程]:飞机状态 由父级已参数传过来 [影响]: 【结 束】 # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动
This commit is contained in:
parent
6f83434965
commit
244d70e6f2
@ -274,7 +274,8 @@ export default {
|
||||
id: ''
|
||||
},
|
||||
planesId: this.$route.params.id, // 飞机id
|
||||
airLock: false // 当前飞机是否被锁定
|
||||
airLock: false, // 当前飞机是否被锁定
|
||||
planeState: {}// 飞机状态
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@ -290,13 +291,6 @@ export default {
|
||||
isMobile () {
|
||||
return this.$store.state.app.isMobile
|
||||
},
|
||||
/**
|
||||
* @description: 飞机状态
|
||||
*/
|
||||
planeState () {
|
||||
const plane = this.plane
|
||||
return plane ? plane.planeState.state : null
|
||||
},
|
||||
/**
|
||||
* @description: 已付款 已接单 未发起退款 订单列表
|
||||
*/
|
||||
@ -679,11 +673,13 @@ export default {
|
||||
this.questForm.id = ''
|
||||
}
|
||||
},
|
||||
plane (val) {
|
||||
this.publishFun('{getPlaneState:1}')
|
||||
},
|
||||
planeState (val) {
|
||||
console.log(val)
|
||||
plane: {
|
||||
handler (val) {
|
||||
this.publishFun('{getPlaneState:1}')
|
||||
this.planeState = val.planeState
|
||||
console.log(this.planeState)
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,14 +43,17 @@ export default {
|
||||
planeState: {}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
plane: {
|
||||
typeof: 'Object',
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
components: {
|
||||
HeartTag,
|
||||
PublicTag
|
||||
},
|
||||
computed: {
|
||||
plane () {
|
||||
return this.$store.state.airList.find(plane => plane.id === this.planesId)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
plane: {
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="h-100">
|
||||
<map-box ref="mapbox" :key="mapBoxKey">
|
||||
<template #content>
|
||||
<PlaneStatus />
|
||||
<PlaneStatus :plane="plane" />
|
||||
<ControllerTabs :plane="plane" @mapXOffset="mapXOffset" @makeRoute="makeRoute" @clearRoute="clearRoute" />
|
||||
</template>
|
||||
</map-box>
|
||||
@ -103,7 +103,8 @@ export default {
|
||||
plane: {
|
||||
handler (val) {
|
||||
this.makePlane(val)
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
/**
|
||||
* @description: 更新飞机位置 并画出轨迹 跟随飞机
|
||||
|
Loading…
Reference in New Issue
Block a user