提交 3b47cb94 作者: 翁进城

fix:

1. 修正航点动作参数
2. 右侧控制栏的窗口不随控制栏一起关闭
3. 视图库机载\视频\多选功能\转存\删除功能
4. MMC_Gimbal_ZT60R挂载适配文件更新
5. 键盘控制功能
上级 cb500af0
...@@ -66,6 +66,7 @@ export default { ...@@ -66,6 +66,7 @@ export default {
* 给父窗口发送消息 * 给父窗口发送消息
*/ */
postTop(data) { postTop(data) {
console.log('iframe postMessage', data);
window.top.postMessage( window.top.postMessage(
{ {
module: "MMCFlightControlCenter", module: "MMCFlightControlCenter",
......
...@@ -27,4 +27,12 @@ export default class ViewLibrary { ...@@ -27,4 +27,12 @@ export default class ViewLibrary {
params, params,
}); });
} }
static delete(params) {
return request({
url: "/admin-api/data/view-library/delete",
method: "delete",
params,
});
}
} }
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</div> </div>
<div class="rm-rp-btns"> <div class="rm-rp-btns">
<div class="rm-rp-btn" v-hover @click="$emit('close')">取消</div> <div class="rm-rp-btn" v-hover @click="$emit('close')">取消</div>
<div class="rm-rp-btn save" v-hover @click="$emit('save', selectActions1)">保存</div> <div class="rm-rp-btn save" v-hover @click="onSave">保存</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -133,9 +133,27 @@ export default { ...@@ -133,9 +133,27 @@ export default {
selectActions1: [], //选中的动作 selectActions1: [], //选中的动作
}; };
}, },
created(){ created() {
this.selectActions1 = JSON.parse(JSON.stringify(this.selectActions)); this.selectActions1 = JSON.parse(JSON.stringify(this.selectActions));
} this.selectActions1.some((item) => {
if (item.label === "悬停") {
item.param1 /= 1000; // 毫秒转秒
return true;
}
});
},
methods: {
onSave() {
let actions = JSON.parse(JSON.stringify(this.selectActions1));
actions.some((item) => {
if (item.label === "悬停") {
item.param1 *= 1000; // 秒转毫秒
return true;
}
});
this.$emit("save", actions);
},
},
}; };
</script> </script>
......
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
</div> </div>
</template> </template>
<script> <script>
import * as mountCtrlList from "../../../../../../../mount/utils.js"; import * as mountCtrlList from "../../../../../../../../../MMCMount/utils.js";
import { mapState } from "vuex"; import { mapState } from "vuex";
export default { export default {
data() { data() {
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</div> </div>
<div class="rm-rp-btns"> <div class="rm-rp-btns">
<div class="rm-rp-btn" v-hover @click="$emit('close')">取消</div> <div class="rm-rp-btn" v-hover @click="$emit('close')">取消</div>
<div class="rm-rp-btn save" v-hover @click="$emit('save', selectActions1)">保存</div> <div class="rm-rp-btn save" v-hover @click="onSave">保存</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -133,9 +133,27 @@ export default { ...@@ -133,9 +133,27 @@ export default {
selectActions1: [], //选中的动作 selectActions1: [], //选中的动作
}; };
}, },
created(){ created() {
this.selectActions1 = JSON.parse(JSON.stringify(this.selectActions)); this.selectActions1 = JSON.parse(JSON.stringify(this.selectActions));
} this.selectActions1.some((item) => {
if (item.label === "悬停") {
item.param1 /= 1000; // 毫秒转秒
return true;
}
});
},
methods: {
onSave() {
let actions = JSON.parse(JSON.stringify(this.selectActions1));
actions.some((item) => {
if (item.label === "悬停") {
item.param1 *= 1000; // 秒转毫秒
return true;
}
});
this.$emit("save", actions);
},
},
}; };
</script> </script>
......
...@@ -74,6 +74,7 @@ export default { ...@@ -74,6 +74,7 @@ export default {
polyline: airway, polyline: airway,
id: airway.id, id: airway.id,
}); });
console.log("选中的航线", this.selectedAirway);
} catch (e) { } catch (e) {
console.log("绘制航线失败", e); console.log("绘制航线失败", e);
} }
...@@ -137,7 +138,7 @@ export default { ...@@ -137,7 +138,7 @@ export default {
callback: (res) => { callback: (res) => {
this.airwayList = res?.records || []; this.airwayList = res?.records || [];
this.$nextTick(() => { this.$nextTick(() => {
if(id){ if (id) {
this.selectedAirwayId = id; this.selectedAirwayId = id;
} }
}); });
......
<template> <template>
<div class="nset_control_box dialog1027"> <div>
<div class="dialog-header"> <div class="nset_control_box dialog1027" v-if="show">
<img class="dialog-header__icon" src="../../assets/images/mount_head.png" /> <div class="dialog-header">
<div class="dialog-header__title">操作区域</div> <img class="dialog-header__icon" src="../../assets/images/mount_head.png" />
<div class="dialog-header__close" @click="$emit('exit')">关闭</div> <div class="dialog-header__title">操作区域</div>
</div> <div class="dialog-header__close" @click="$emit('exit')">关闭</div>
<div class="nset_control_box_area"> </div>
<div class="wrj"> <div class="nset_control_box_area">
<!-- <div class="w48 h48 item mb3 cf tc cp" @click="$emit('uav-location')"> <div class="wrj">
<!-- <div class="w48 h48 item mb3 cf tc cp" @click="$emit('uav-location')">
<SymbolIcon icon="dingwei" /> <SymbolIcon icon="dingwei" />
<span class="txt">定位</span> <span class="txt">定位</span>
</div>--> </div>-->
<div class="item" @click="onSwitchAirline"> <div class="item" @click="onSwitchAirline">
<SymbolIcon icon="guiji" /> <SymbolIcon icon="guiji" />
<span class="txt">轨迹</span> <span class="txt">轨迹</span>
</div> </div>
<div class="item" @click="onContinueFly"> <div class="item" @click="onContinueFly">
<SymbolIcon icon="jixufeihang1" /> <SymbolIcon icon="jixufeihang1" />
<span class="txt">继续飞行</span> <span class="txt">继续飞行</span>
</div> </div>
<div class="item" @click="onPauseFly"> <div class="item" @click="onPauseFly">
<SymbolIcon icon="zantingfeihang1" /> <SymbolIcon icon="zantingfeihang1" />
<span class="txt">暂停飞行</span> <span class="txt">暂停飞行</span>
</div> </div>
<div class="item" @click="safetyNotice = !safetyNotice"> <div class="item" @click="safetyNotice = !safetyNotice">
<SymbolIcon icon="anquanjiangla1" /> <SymbolIcon icon="anquanjiangla1" />
<span class="txt">紧急迫降</span> <span class="txt">紧急迫降</span>
</div> </div>
<div class="item" @click="showLogger = !showLogger"> <div class="item" @click="showLogger = !showLogger">
<SymbolIcon icon="yunhangrizhi2" /> <SymbolIcon icon="yunhangrizhi2" />
<span class="txt">运行日志</span> <span class="txt">运行日志</span>
</div> </div>
<div class="item" @click="guideFlight" v-if="uav && uav.network === 2"> <div class="item" @click="guideFlight" v-if="uav && uav.network === 2">
<SymbolIcon icon="tiaozhuandaozuobiao" /> <SymbolIcon icon="tiaozhuandaozuobiao" />
<span class="txt">指点飞行</span> <span class="txt">指点飞行</span>
</div> </div>
<div class="item" @click="onInfieldControl" v-if="uav && uav.network === 2"> <div class="item" @click="onInfieldControl" v-if="uav && uav.network === 2">
<img class="dib mt3" src="./assets/images/1.svg" alt /> <img class="dib mt3" src="./assets/images/1.svg" alt />
<span class="txt">内场控制</span> <span class="txt">内场控制</span>
</div>
</div> </div>
</div> </div>
</div> <!-- 飞控 无人机 安全降落 -->
<!-- 飞控 无人机 安全降落 --> <el-dialog
<el-dialog :visible.sync="safetyNotice"
:visible.sync="safetyNotice" width="30%"
width="30%" :append-to-body="true"
:append-to-body="true" style="margin-top: 20vh"
style="margin-top: 20vh" custom-class="mmc"
custom-class="mmc" >
> <div class="endrenwu">
<div class="endrenwu"> <div class="tishiyu">紧急迫降</div>
<div class="tishiyu">紧急迫降</div> <div class="queding">无人机即将原地降落,请确认无人机下方是否安全!</div>
<div class="queding">无人机即将原地降落,请确认无人机下方是否安全!</div> <div class="btn_kuang">
<div class="btn_kuang"> <div class="btn btn_lan" @click="safetyNotice = false">取消</div>
<div class="btn btn_lan" @click="safetyNotice = false">取消</div> <div style="width: 20px"></div>
<div style="width: 20px"></div> <div class="btn btn_lv" @click="onLand">确定</div>
<div class="btn btn_lv" @click="onLand">确定</div> </div>
</div> </div>
</div> </el-dialog>
</el-dialog> <!-- 强制切换外场权限 -->
<!-- 强制切换外场权限 --> <el-dialog
<el-dialog title
title :visible.sync="showInfieldControlDialog"
:visible.sync="showInfieldControlDialog" width="30%"
width="30%" :append-to-body="true"
:append-to-body="true" style="margin-top: 20vh"
style="margin-top: 20vh" >
> <div class="endrenwu">
<div class="endrenwu"> <div class="tishiyu">温馨提示</div>
<div class="tishiyu">温馨提示</div> <div class="queding" v-if="!isAcceleratorMedian">
<div class="queding" v-if="!isAcceleratorMedian"> 当前油门值为
当前油门值为 <span style="color:red">{{uavRealTimeData.rcChannelState.toFixed(2)||0}}</span>,请调到中位(470-530)
<span style="color:red">{{uavRealTimeData.rcChannelState.toFixed(2)||0}}</span>,请调到中位(470-530) </div>
</div> <div class="queding" v-if="isAcceleratorMedian">摇杆已处于中位,即将切换内场权限</div>
<div class="queding" v-if="isAcceleratorMedian">摇杆已处于中位,即将切换内场权限</div>
</div>
</el-dialog>
<el-dialog
title
:visible.sync="guideFlightShow"
width="30%"
:append-to-body="true"
:show-close="false"
:close-on-click-modal="false"
style="margin-top: 20vh"
custom-class="mmc"
>
<div class="endrenwu guideFlight">
<div class="tishiyu">引导飞行确认</div>
<div class="queding">位置获取成功,请确认是否进行指点模式飞行</div>
<div class="fleSpeed">
指点飞行速度:
<el-input oninput="value=value.replace(/[^0-9.]/g,'')" v-model="flySpeed"></el-input>
<span style="opacity: 0;">1</span>(米/秒)
</div> </div>
<div class="red" v-if="maxSpeed">指点飞行最大速度为8米/秒</div> </el-dialog>
<div class="btn_kuang"> <el-dialog
<div class="btn btn_lan" @click="onGuideFlightCancel">取消</div> title
<div style="width: 20px"></div> :visible.sync="guideFlightShow"
<div class="btn btn_lv" @click="onGuideFlightConfirm">确定</div> width="30%"
:append-to-body="true"
:show-close="false"
:close-on-click-modal="false"
style="margin-top: 20vh"
custom-class="mmc"
>
<div class="endrenwu guideFlight">
<div class="tishiyu">引导飞行确认</div>
<div class="queding">位置获取成功,请确认是否进行指点模式飞行</div>
<div class="fleSpeed">
指点飞行速度:
<el-input oninput="value=value.replace(/[^0-9.]/g,'')" v-model="flySpeed"></el-input>
<span style="opacity: 0;">1</span>(米/秒)
</div>
<div class="red" v-if="maxSpeed">指点飞行最大速度为8米/秒</div>
<div class="btn_kuang">
<div class="btn btn_lan" @click="onGuideFlightCancel">取消</div>
<div style="width: 20px"></div>
<div class="btn btn_lv" @click="onGuideFlightConfirm">确定</div>
</div>
</div> </div>
</div> </el-dialog>
</el-dialog> </div>
<Logger v-if="showLogger" @close="showLogger = false"></Logger> <Logger v-if="showLogger" @close="showLogger = false"></Logger>
</div> </div>
</template> </template>
...@@ -122,6 +124,10 @@ const Bus = new Vue(); ...@@ -122,6 +124,10 @@ const Bus = new Vue();
export default { export default {
components: { SymbolIcon, Logger }, components: { SymbolIcon, Logger },
props: { props: {
show: {
type: Boolean,
default: false,
},
ModeStatus: { ModeStatus: {
type: String, type: String,
default: () => "", default: () => "",
......
<template> <template>
<div class="mountBox"> <div class="mountBox">
<div v-if="mountList.length > 0" class="list"> <div class="main" v-if="show">
<div <div v-if="mountList.length > 0" class="list">
class="mount-item pr mt6" <div
:class="{ class="mount-item pr mt6"
:class="{
active: active:
(selectMount && selectMount.gimbalName) === item.gimbalName, (selectMount && selectMount.gimbalName) === item.gimbalName,
}" }"
v-for="(item, index) in mountList" v-for="(item, index) in mountList"
:key="index" :key="index"
> >
<div class="icon-box" @click="onSelectMount(item)"> <div class="icon-box" @click="onSelectMount(item)">
<img class :src="item.icon" /> <img class :src="item.icon" />
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -44,6 +46,10 @@ export default { ...@@ -44,6 +46,10 @@ export default {
...mountComponents, ...mountComponents,
}, },
props: { props: {
show: {
type: Boolean,
default: false,
},
uavMountsPayload: { uavMountsPayload: {
type: Array, type: Array,
default: () => [], default: () => [],
...@@ -62,11 +68,11 @@ export default { ...@@ -62,11 +68,11 @@ export default {
"mountList", "mountList",
"airlineId", "airlineId",
"selectMount", "selectMount",
"uavRealTimeData" "uavRealTimeData",
]), ]),
nxNormal(){ nxNormal() {
return this.uavRealTimeData?.healthData?.NX?.warningLevel === 'NORMAL'; return this.uavRealTimeData?.healthData?.NX?.warningLevel === "NORMAL";
} },
}, },
created() {}, created() {},
mounted() {}, mounted() {},
...@@ -107,16 +113,19 @@ export default { ...@@ -107,16 +113,19 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.mountBox { .mountBox {
background: #222222;
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
border-radius: 10px;
position: absolute; position: absolute;
// top: -152px; // top: -152px;
top: 63px; top: 63px;
right: 65px; right: 65px;
min-width: 142px;
height: 48px; .main {
padding: 0 5px; background: #222222;
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
border-radius: 10px;
min-width: 142px;
height: 48px;
padding: 0 5px;
}
.list { .list {
display: flex; display: flex;
...@@ -141,5 +150,11 @@ export default { ...@@ -141,5 +150,11 @@ export default {
} }
} }
} }
.mount-panel {
position: absolute;
top: 50px;
right: 0;
}
} }
</style> </style>
...@@ -2,11 +2,11 @@ export default [ ...@@ -2,11 +2,11 @@ export default [
{ {
date: '2024-8-13', date: '2024-8-13',
imgList: [ imgList: [
'http://gips3.baidu.com/it/u=3886271102,3123389489&fm=3028&app=3028&f=JPEG&fmt=auto?w=1280&h=960', 'https://live.mmcuav.cn/live/D_XIANGDAO.m3u8',
2, 'https://live.mmcuav.cn/live/D_XIANGDAO1.m3u8',
3, 'https://live.mmcuav.cn/live/D_XIANGDAO2.m3u8',
4, 'https://live.mmcuav.cn/live/D_XIANGDAO3.m3u8',
5 'https://live.mmcuav.cn/live/D_XIANGDAO4.m3u8'
] ]
} }
] ]
\ No newline at end of file
...@@ -51,11 +51,11 @@ ...@@ -51,11 +51,11 @@
@clearId="$emit('clearId')" @clearId="$emit('clearId')"
@closeIconShow="iconShow = false" @closeIconShow="iconShow = false"
@exit="showControlList = false" @exit="showControlList = false"
v-if="showControlList" :show="showControlList"
:isHangar="isHangar" :isHangar="isHangar"
></ControlList> ></ControlList>
<Health v-if="showHealth" @exit="showHealth = false"></Health> <Health v-if="showHealth" @exit="showHealth = false"></Health>
<Mount v-if="showMount"></Mount> <Mount :show="showMount"></Mount>
<!-- 喊话器 --> <!-- 喊话器 -->
<MMCGimbalP1 <MMCGimbalP1
class="PagerP1" class="PagerP1"
......
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
}, },
}, },
mounted() { mounted() {
window.player = this; // window.player = this;
}, },
methods: { methods: {
init(flag) { init(flag) {
......
...@@ -147,4 +147,4 @@ ...@@ -147,4 +147,4 @@
</g> </g>
</g> </g>
</g> </g>
</svg> </svg>
\ No newline at end of file
...@@ -1513,3 +1513,5 @@ export const MMC_Gimbal_Z33N = { ...@@ -1513,3 +1513,5 @@ export const MMC_Gimbal_Z33N = {
return buff; return buff;
} }
}; };
export * from './MMC_Gimbal_ZT60R/js/index.js';
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论