【类 型】:feat 校准磁罗盘功能
【原 因】: 【过 程】:1 控制飞机模块增加校准磁罗盘功能 2删除飞状态不需要的经纬度 【影 响】:
This commit is contained in:
parent
0e231a5e91
commit
467c9bc6a0
@ -36,6 +36,20 @@
|
||||
<el-button size="medium" @click="dialogVisible = false">关闭</el-button>
|
||||
</span>
|
||||
</template>
|
||||
<!-- 校准磁罗盘 -->
|
||||
<template v-if="dialogItem === 'compassBox'">
|
||||
<div>
|
||||
<template v-if="reportCal === null">
|
||||
<el-progress :percentage="completionPct"></el-progress>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ reportCal === 'successful' ? '校准成功,重启飞机即可生效!' : '校准失败!' }}
|
||||
</template>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="medium" @click="handlerCloseCompassBox">关闭</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 底边 tab控件组 -->
|
||||
<div class="flex column mr mac tabContainer p-l-10 p-r-10">
|
||||
@ -239,7 +253,7 @@
|
||||
</div>
|
||||
<div class="butIconBox m-b-15 gap10 flex">
|
||||
<el-button size="medium" type="primary" class="flex1 butIcon"
|
||||
@click="publishFun('{setPlaneState:{bit:11,state:1}}'); speakText('校准磁罗盘')">
|
||||
@click="publishFun('{setPlaneState:{bit:11,state:1}}'); dialogVisible = true; dialogTitle = '校准磁罗盘'; dialogItem = 'compassBox'; speakText('校准磁罗盘')">
|
||||
<i class="iconfont icon-zhinanzhen f-s-24"></i>
|
||||
<div class="m-t-5">磁罗盘</div>
|
||||
</el-button>
|
||||
@ -298,7 +312,7 @@ export default {
|
||||
},
|
||||
props: {
|
||||
plane: {
|
||||
typeof: 'Object',
|
||||
type: Object,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
@ -363,10 +377,35 @@ export default {
|
||||
*/
|
||||
siteList () {
|
||||
return this.$store.state.siteList
|
||||
},
|
||||
/**
|
||||
* @description: 磁罗盘校准进度
|
||||
*/
|
||||
completionPct () {
|
||||
if (this.plane && this.plane.planeState) {
|
||||
return Number(this.plane.planeState.completionPct)
|
||||
}
|
||||
return null
|
||||
},
|
||||
/**
|
||||
* @description: 磁罗盘校准结果
|
||||
*/
|
||||
reportCal () {
|
||||
if (this.plane && this.plane.planeState) {
|
||||
return this.plane.planeState.reportCal
|
||||
}
|
||||
return null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
speakText,
|
||||
/**
|
||||
*关闭磁盘校准弹出窗口
|
||||
*/
|
||||
handlerCloseCompassBox () {
|
||||
this.dialogVisible = false
|
||||
this.plane.planeState.reportCal = null
|
||||
},
|
||||
/**
|
||||
* @description: 摄像头 滑动条松开
|
||||
* @param {string} item 项目
|
||||
|
@ -85,7 +85,7 @@ export default {
|
||||
},
|
||||
props: {
|
||||
plane: {
|
||||
typeof: 'Object',
|
||||
type: Object,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
@ -149,7 +149,7 @@ export default {
|
||||
},
|
||||
// 飞机高度
|
||||
positionAlt () {
|
||||
if (this.plane && this.plane.planeState) {
|
||||
if (this.plane && this.plane.planeState && this.plane.planeState.position.length > 0) {
|
||||
return this.plane.planeState.position[0][2]
|
||||
}
|
||||
return null
|
||||
@ -178,7 +178,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
heartRandom: {
|
||||
handler (val) {
|
||||
handler () {
|
||||
// 心跳动画
|
||||
this.heartAnimation = true
|
||||
setTimeout(() => {
|
||||
@ -201,8 +201,11 @@ export default {
|
||||
created () {
|
||||
},
|
||||
destroyed () {
|
||||
clearInterval(this.isOnlineSetTimeout)
|
||||
if (this.isOnlineSetTimeout) {
|
||||
clearInterval(this.isOnlineSetTimeout)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -270,16 +270,16 @@ const store = new Vuex.Store({
|
||||
res.data.airList.forEach(plane => {
|
||||
plane.planeState = { // 飞机状态初始化字段
|
||||
heartBeat: null, // 心跳
|
||||
heartRandom: 0, // 每次接收到心跳创建一个随机数 用于watch监听
|
||||
heartRandom: null, // 每次接收到心跳创建一个随机数 用于watch监听
|
||||
voltagBattery: null, // 电压信息
|
||||
currentBattery: null, // 电流信息
|
||||
batteryRemaining: null, // 电池电量
|
||||
positionAlt: null, // 海拔高度信息
|
||||
groundSpeed: null, // 对地速度
|
||||
satCount: null, // 卫星数量
|
||||
latitude: null, // 纬度
|
||||
longitude: null, // 经度
|
||||
fixType: null, // 定位状态
|
||||
completionPct: null, // 磁罗盘校准进度
|
||||
reportCal: null, // 磁罗盘校准结果
|
||||
state: 1, // 飞机状态 默认初始状态为1
|
||||
pingNet: null, // 网速测试
|
||||
getPlaneMode: null, // 飞机模式
|
||||
|
Loading…
Reference in New Issue
Block a user