【类 型】:factor 校准加速度计
【原 因】: 【过 程】:弹出窗口 【影 响】:
This commit is contained in:
parent
63212c130b
commit
4e3acac032
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="w-100 h-100 mainBox">
|
||||
<!-- 弹出框 -->
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="320px" top="30vh">
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="320px" top="30vh" @close="closeCallback">
|
||||
<!-- 起飞设置弹出框 -->
|
||||
<template v-if="dialogItem == 'takeoffBox'">
|
||||
<el-slider class="w-100" v-model="takeoffValue" :show-tooltip="false" show-input :min="1" :max="100">
|
||||
@ -9,7 +9,7 @@
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="medium" @click="dialogVisible = false">关闭</el-button>
|
||||
<el-button size="medium" type="primary"
|
||||
@click="publishFun(`{setPlaneState:{bit:6,state:1,count:1,param:[${takeoffValue}]}}`); speakText('确认起飞')">确认起飞</el-button>
|
||||
@click="publishFun(`{guidedMode:{alt:${takeoffValue}}}`); speakText('确认起飞')">飞至</el-button>
|
||||
</span>
|
||||
</template>
|
||||
<!-- 摄像头弹出框 -->
|
||||
@ -50,6 +50,20 @@
|
||||
<el-button size="medium" @click="handlerCloseCompassBox">关闭</el-button>
|
||||
</span>
|
||||
</template>
|
||||
<!-- 校准加速度计 -->
|
||||
<template v-if="dialogItem === 'acceBox'">
|
||||
<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">
|
||||
@ -100,8 +114,7 @@
|
||||
<font class="m-l-5">航点写入中···</font>
|
||||
</el-button>
|
||||
<el-button size="mini" class="f-s-14" v-else-if="Number(plane.planeState.state) === 4" type="warning"
|
||||
icon="f-s-14 iconfont icon-jiesuo"
|
||||
@click="publishFun('{setPlaneState:{bit:3,state:1,count:2,param:[1,0]}}'); speakText('解锁飞机')">
|
||||
icon="f-s-14 iconfont icon-jiesuo" @click="publishFun('{unlock:1}'); speakText('解锁飞机')">
|
||||
<font class="m-l-5">解锁飞机</font>
|
||||
</el-button>
|
||||
<el-button size="mini" class="f-s-14" v-else-if="Number(plane.planeState.state) === 12" type="info"
|
||||
@ -141,26 +154,27 @@
|
||||
</div>
|
||||
<div class="butIconBox gap10 flex">
|
||||
<el-button size="medium" type="primary" class="flex1 butIcon"
|
||||
@click="publishFun('{setPlaneState:{bit:3,state:1,count:2,param:[1,0]}}'); speakText('解锁飞机')">
|
||||
@click="publishFun('{unlock:1}'); speakText('解锁飞机')">
|
||||
<i class="iconfont icon-jiesuo f-s-24"></i>
|
||||
<div class="m-t-5">解锁</div>
|
||||
</el-button>
|
||||
<el-button size="medium" type="primary" class="flex1 butIcon"
|
||||
@click="confirmation('飞机加锁,螺旋桨将停转,请谨慎操作!', '加锁操作', '{setPlaneState:{bit:3,state:0,count:2,param:[0,21196]}}'); speakText('加锁,请注意安全')">
|
||||
@click="confirmation('飞机加锁,螺旋桨将停转,请谨慎操作!', '加锁操作', '{lock:1}'); speakText('加锁,请注意安全')">
|
||||
<i class=" iconfont icon-suoding f-s-24"></i>
|
||||
<div class="m-t-5">加锁</div>
|
||||
</el-button>
|
||||
<el-button size="medium" type="primary" class="flex1 butIcon"
|
||||
@click="dialogVisible = true; dialogTitle = '起飞高度(米)设置'; dialogItem = 'takeoffBox'; speakText('设置起飞高度')">
|
||||
@click="dialogVisible = true; dialogTitle = '高度设置(米)'; dialogItem = 'takeoffBox'; speakText('设置起飞高度')">
|
||||
<i class="iconfont icon-yangshi_icon_tongyong_departure f-s-24"></i>
|
||||
<div class="m-t-5">起飞</div>
|
||||
</el-button>
|
||||
<el-button size="medium" type="primary" class="flex1 butIcon"
|
||||
@click="publishFun('{setPlaneState:{bit:7,state:1}}'); speakText('悬停')">
|
||||
@click="publishFun('{loiterMode:1}'); speakText('悬停')">
|
||||
<i class="iconfont icon-fengzheng1 f-s-24"></i>
|
||||
<div class="m-t-5">悬停</div>
|
||||
</el-button>
|
||||
<el-button size="medium" type="primary" class="flex1 butIcon" @click="speakText('继续执行航线')">
|
||||
<el-button size="medium" type="primary" class="flex1 butIcon"
|
||||
@click="publishFun('{autoMode:1}'); speakText('继续执行航线')">
|
||||
<i class="iconfont icon-duandianxufei f-s-24"></i>
|
||||
<div class="m-t-5">复航</div>
|
||||
</el-button>
|
||||
@ -257,11 +271,13 @@
|
||||
<i class="iconfont icon-zhinanzhen f-s-24"></i>
|
||||
<div class="m-t-5">磁罗盘</div>
|
||||
</el-button>
|
||||
<el-button size="medium" type="primary" class="flex1 butIcon" @click="speakText('校准加速度计')">
|
||||
<el-button size="medium" type="primary" class="flex1 butIcon"
|
||||
@click="publishFun(); speakText('校准加速度计');dialogVisible = true; dialogTitle = '校准加速度计';dialogItem = 'acceBox';">
|
||||
<i class="iconfont icon-zuobiaozhoupeizhixiang f-s-24"></i>
|
||||
<div class="m-t-5">加速度计</div>
|
||||
<div class="m-t-5">{{ acceState }}</div>
|
||||
</el-button>
|
||||
<el-button size="medium" type="primary" class="flex1 butIcon" @click="speakText('写入参数')">
|
||||
<el-button size="medium" type="primary" class="flex1 butIcon"
|
||||
@click="publishFun('{initAcce:2}'); speakText('写入参数')">
|
||||
<i class="iconfont icon-canshupeizhi f-s-24"></i>
|
||||
<div class="m-t-5">写入参数</div>
|
||||
</el-button>
|
||||
@ -395,6 +411,15 @@ export default {
|
||||
return this.plane.planeState.reportCal
|
||||
}
|
||||
return null
|
||||
},
|
||||
/**
|
||||
* @description:加速度计 状态
|
||||
*/
|
||||
acceState () {
|
||||
if (this.plane && this.plane.planeState && this.plane.planeState.acceState) {
|
||||
return this.plane.planeState.acceState
|
||||
}
|
||||
return '加速度计'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -406,6 +431,10 @@ export default {
|
||||
this.dialogVisible = false
|
||||
this.plane.planeState.reportCal = null
|
||||
},
|
||||
/** 弹出框 关闭事件回调 */
|
||||
closeCallback () {
|
||||
if (this.dialogItem === 'compassBox') { this.handlerCloseCompassBox() }
|
||||
},
|
||||
/**
|
||||
* @description: 摄像头 滑动条松开
|
||||
* @param {string} item 项目
|
||||
|
@ -281,7 +281,7 @@ const store = new Vuex.Store({
|
||||
completionPct: null, // 磁罗盘校准进度
|
||||
reportCal: null, // 磁罗盘校准结果
|
||||
state: 1, // 飞机状态 默认初始状态为1
|
||||
pingNet: null, // 网速测试
|
||||
acceState: null, // 加速度计校准状态
|
||||
getPlaneMode: null, // 飞机模式
|
||||
loadweight: null, // 重量
|
||||
hookstatus: null, // 钩子状态
|
||||
|
Loading…
Reference in New Issue
Block a user