提交 a502eb9e 作者: 翁进城

fix:

1.【机库】一键任务起飞后,飞行日志没有监控日志且没有机库无人机定位及飞行实时轨迹
2.【机库-健康管理】显示异常,功能未生效
3. 机库列表选中修正
上级 45236902
流水线 #9867 已失败 于阶段
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
> >
<el-checkbox <el-checkbox
:disabled="device.online !== 1" :disabled="device.online !== 1"
:value="device.isCheck" :value="hangar && device.hardId === hangar.hardId && device.isCheck"
@change="(e) => handClick(e, device)" @change="(e) => handClick(e, device)"
></el-checkbox> ></el-checkbox>
</el-tooltip> </el-tooltip>
...@@ -118,13 +118,7 @@ export default { ...@@ -118,13 +118,7 @@ export default {
}, },
handClick(isCheck, device) { handClick(isCheck, device) {
console.log("checkbox", isCheck, device); console.log("checkbox", isCheck, device);
device.isCheck = isCheck;
this.data.nests.forEach((item) => {
this.$set(item, "isCheck", false);
});
if (isCheck) {
device.isCheck = true;
}
// 切换订阅的机库, 需要先取消订阅旧机库, 再重新订阅新机库 // 切换订阅的机库, 需要先取消订阅旧机库, 再重新订阅新机库
this.hangar && this.hangar &&
......
...@@ -24,7 +24,6 @@ export default { ...@@ -24,7 +24,6 @@ export default {
}, },
computed: { computed: {
...mapState("MMCFlightControlCenter/hangar", ["showPanel", "hangar"]), ...mapState("MMCFlightControlCenter/hangar", ["showPanel", "hangar"]),
...mapState("MMCFlightControlCenter/uav", ["uav"]),
}, },
beforeDestroy() { beforeDestroy() {
this.$store.commit('MMCFlightControlCenter/setState', { this.$store.commit('MMCFlightControlCenter/setState', {
......
import { mapState } from 'vuex';
// 无人机实时数据各链路融合 // 无人机实时数据各链路融合
export default { export default {
computed: { computed: {
...mapState("MMCFlightControlCenter/hangar", ["hangar"]),
...mapState("MMCFlightControlCenter/uav", ["uav"]),
// mqtt实时数据 // mqtt实时数据
mqttDataSet() { mqttDataSetHangar() {
return this.$store.state.MMCMQTT?.dataSet?.[this.hangar?.hardId]; return this.$store.state.MMCMQTT?.dataSet?.[this.hangar?.hardId];
}, },
mqttDataSetUav() {
return this.$store.state.MMCMQTT?.dataSet?.[this.uav?.hardId];
},
mqttUrl() { mqttUrl() {
return this.$store.getters["MMCFlightControlCenter/mqttUrl"]; return this.$store.getters["MMCFlightControlCenter/mqttUrl"];
}, },
}, },
watch: { watch: {
mqttDataSet(newVal) { mqttDataSetHangar(newVal) {
if (newVal) { if (newVal) {
this.$store.dispatch( this.$store.dispatch(
"MMCFlightControlCenter/hangar/updateByMQTT", "MMCFlightControlCenter/hangar/updateByMQTT",
...@@ -18,6 +25,11 @@ export default { ...@@ -18,6 +25,11 @@ export default {
); );
} }
}, },
mqttDataSetUav(newVal) {
if (newVal) {
this.$store.dispatch("MMCFlightControlCenter/uav/updateByMQTT", newVal);
}
},
}, },
async mounted() { async mounted() {
// 启动mqtt服务 // 启动mqtt服务
...@@ -33,8 +45,8 @@ export default { ...@@ -33,8 +45,8 @@ export default {
console.log("mqtt失败", e); console.log("mqtt失败", e);
} }
}, },
beforeDestroy(){ beforeDestroy() {
console.log('断开mqtt连接'); console.log("断开mqtt连接");
if (this.uav) { if (this.uav) {
this.$store.dispatch("MMCFlightControlCenter/uav/unsubscribe"); this.$store.dispatch("MMCFlightControlCenter/uav/unsubscribe");
...@@ -42,6 +54,6 @@ export default { ...@@ -42,6 +54,6 @@ export default {
if (this.hangar) { if (this.hangar) {
this.$store.dispatch("MMCFlightControlCenter/hangar/unsubscribe"); this.$store.dispatch("MMCFlightControlCenter/hangar/unsubscribe");
} }
this.$store.dispatch('MMCFlightControlCenter/uav/end'); this.$store.dispatch("MMCFlightControlCenter/uav/end");
} },
}; };
...@@ -11,7 +11,12 @@ ...@@ -11,7 +11,12 @@
<div class="nset_control_box_area"> <div class="nset_control_box_area">
<div class="wrj"> <div class="wrj">
<div class="w97 h110 item" v-if="healthData.BAT"> <div class="w97 h110 item" v-if="healthData.BAT">
<img src="./assets/images/info.png" alt @click="infoDetail('智能电池','BAT')" style="cursor: pointer;" /> <img
src="./assets/images/info.png"
alt
@click="infoDetail('智能电池','BAT')"
style="cursor: pointer;"
/>
<div <div
class="iconfont icon-chuli" class="iconfont icon-chuli"
style="color: #ffe417;" style="color: #ffe417;"
...@@ -28,7 +33,12 @@ ...@@ -28,7 +33,12 @@
<div class="type" v-else>正常</div> <div class="type" v-else>正常</div>
</div> </div>
<div class="w97 h110 item cp" v-if="healthData.RTK"> <div class="w97 h110 item cp" v-if="healthData.RTK">
<img src="./assets/images/info.png" alt @click="infoDetail('RTK','RTK')" style="cursor: pointer;" /> <img
src="./assets/images/info.png"
alt
@click="infoDetail('RTK','RTK')"
style="cursor: pointer;"
/>
<div <div
class="iconfont icon-chuli" class="iconfont icon-chuli"
style="color: #ffe417;" style="color: #ffe417;"
...@@ -45,7 +55,12 @@ ...@@ -45,7 +55,12 @@
<div class="type" v-else>正常</div> <div class="type" v-else>正常</div>
</div> </div>
<div class="w97 h110 item cp" v-if="healthData.GPS"> <div class="w97 h110 item cp" v-if="healthData.GPS">
<img src="./assets/images/info.png" alt @click="infoDetail('GPS','GPS')" style="cursor: pointer;" /> <img
src="./assets/images/info.png"
alt
@click="infoDetail('GPS','GPS')"
style="cursor: pointer;"
/>
<div <div
class="iconfont icon-chuli" class="iconfont icon-chuli"
style="color: #ffe417;" style="color: #ffe417;"
...@@ -62,7 +77,12 @@ ...@@ -62,7 +77,12 @@
<div class="type" v-else>正常</div> <div class="type" v-else>正常</div>
</div> </div>
<div class="w97 h110 item cp" v-if="healthData.OBS"> <div class="w97 h110 item cp" v-if="healthData.OBS">
<img src="./assets/images/info.png" alt @click="infoDetail('避障','OBS')" style="cursor: pointer;" /> <img
src="./assets/images/info.png"
alt
@click="infoDetail('避障','OBS')"
style="cursor: pointer;"
/>
<div <div
class="iconfont icon-chuli" class="iconfont icon-chuli"
style="color: #ffe417;" style="color: #ffe417;"
...@@ -80,7 +100,12 @@ ...@@ -80,7 +100,12 @@
<div class="type" v-else>正常</div> <div class="type" v-else>正常</div>
</div> </div>
<div class="w97 h110 item cp" v-if="healthData.VPN"> <div class="w97 h110 item cp" v-if="healthData.VPN">
<img src="./assets/images/info.png" alt @click="infoDetail('公网','VPN')" style="cursor: pointer;" /> <img
src="./assets/images/info.png"
alt
@click="infoDetail('公网','VPN')"
style="cursor: pointer;"
/>
<div <div
class="iconfont icon-chuli" class="iconfont icon-chuli"
style="color: #ffe417;" style="color: #ffe417;"
...@@ -97,7 +122,12 @@ ...@@ -97,7 +122,12 @@
<div class="type" v-else>正常</div> <div class="type" v-else>正常</div>
</div> </div>
<div class="w97 h110 item cp" v-if="healthData.SPE"> <div class="w97 h110 item cp" v-if="healthData.SPE">
<img src="./assets/images/info.png" alt @click="infoDetail('专网','SPE')" style="cursor: pointer;" /> <img
src="./assets/images/info.png"
alt
@click="infoDetail('专网','SPE')"
style="cursor: pointer;"
/>
<div <div
class="iconfont icon-chuli" class="iconfont icon-chuli"
style="color: #ffe417;" style="color: #ffe417;"
...@@ -114,7 +144,12 @@ ...@@ -114,7 +144,12 @@
<div class="type" v-else>正常</div> <div class="type" v-else>正常</div>
</div> </div>
<div class="w97 h110 item cp" v-if="healthData.CHUTE"> <div class="w97 h110 item cp" v-if="healthData.CHUTE">
<img src="./assets/images/info.png" alt @click="infoDetail('降落伞','CHUTE')" style="cursor: pointer;" /> <img
src="./assets/images/info.png"
alt
@click="infoDetail('降落伞','CHUTE')"
style="cursor: pointer;"
/>
<div <div
class="iconfont icon-chuli" class="iconfont icon-chuli"
style="color: #ffe417;" style="color: #ffe417;"
...@@ -136,7 +171,12 @@ ...@@ -136,7 +171,12 @@
<div class="type" v-else>正常</div> <div class="type" v-else>正常</div>
</div> </div>
<div class="w97 h110 item cp" v-if="healthData.SPEAK"> <div class="w97 h110 item cp" v-if="healthData.SPEAK">
<img src="./assets/images/info.png" alt @click="infoDetail('喊话器','SPEAK')" style="cursor: pointer;" /> <img
src="./assets/images/info.png"
alt
@click="infoDetail('喊话器','SPEAK')"
style="cursor: pointer;"
/>
<div <div
class="iconfont icon-chuli" class="iconfont icon-chuli"
style="color: #ffe417;" style="color: #ffe417;"
...@@ -156,7 +196,12 @@ ...@@ -156,7 +196,12 @@
<div class="type" v-else>正常</div> <div class="type" v-else>正常</div>
</div> </div>
<div class="w97 h110 item cp" v-if="healthData.NX"> <div class="w97 h110 item cp" v-if="healthData.NX">
<img src="./assets/images/info.png" alt @click="infoDetail('NX','NX')" style="cursor: pointer;" /> <img
src="./assets/images/info.png"
alt
@click="infoDetail('NX','NX')"
style="cursor: pointer;"
/>
<div <div
class="iconfont icon-chuli" class="iconfont icon-chuli"
style="color: #ffe417;" style="color: #ffe417;"
...@@ -303,7 +348,9 @@ ...@@ -303,7 +348,9 @@
</div> </div>
<div class="item"> <div class="item">
<div class="title">是否触发:</div> <div class="title">是否触发:</div>
<div class="inpublic">{{uavRealTimeData.obstacles&&uavRealTimeData.obstacles.enable? '触发避障':'未触发'}}</div> <div
class="inpublic"
>{{uavRealTimeData.obstacles&&uavRealTimeData.obstacles.enable? '触发避障':'未触发'}}</div>
</div> </div>
</div> </div>
<div class="pr"> <div class="pr">
...@@ -619,6 +666,9 @@ export default { ...@@ -619,6 +666,9 @@ export default {
color: #fff; color: #fff;
border-radius: 0 0 4.5px 4.5px; border-radius: 0 0 4.5px 4.5px;
} }
.iconfont {
margin-top: 8px;
}
} }
.item:nth-of-type(4n) { .item:nth-of-type(4n) {
margin-right: 0; margin-right: 0;
......
...@@ -187,13 +187,13 @@ export default { ...@@ -187,13 +187,13 @@ export default {
// 监听窗口大小变化事件 // 监听窗口大小变化事件
window.addEventListener("resize", this.handResize); window.addEventListener("resize", this.handResize);
var canvas_qinliu = document.getElementById("qingliu_" + this.name); /* var canvas_qinliu = document.getElementById("qingliu_" + this.name);
var resizeObserver = new ResizeObserver((e) => { var resizeObserver = new ResizeObserver((e) => {
for (let i of e) { for (let i of e) {
window.kbt_player_resize("qingliu_" + this.name); window.kbt_player_resize("qingliu_" + this.name);
} }
}); });
resizeObserver.observe(canvas_qinliu); resizeObserver.observe(canvas_qinliu); */
// 旧 // 旧
// window.kbt_player_destroy(this.name); // window.kbt_player_destroy(this.name);
// setTimeout(() => {}, 1500); // setTimeout(() => {}, 1500);
......
...@@ -24,11 +24,13 @@ ...@@ -24,11 +24,13 @@
</el-form> </el-form>
<!-- http://localhost:9000/ --> <!-- http://localhost:9000/ -->
<!-- https://ctn.mmcuav.cn/tmj_fkzx --> <!-- https://ctn.mmcuav.cn/tmj_fkzx -->
<!-- https://tmj.mmcuav.cn -->
<iframe <iframe
id="iframe" id="iframe"
ref="iframe" ref="iframe"
src="http://localhost:9000/" src="https://localhost:9000/"
style="width: 1920px; height: 1000px;" style="width: 1920px; height: 1000px;"
anonymous
></iframe> ></iframe>
</div> </div>
</template> </template>
......
...@@ -15,14 +15,15 @@ module.exports = defineConfig({ ...@@ -15,14 +15,15 @@ module.exports = defineConfig({
], ],
}, },
devServer: { devServer: {
https: false, https: true,
client: { client: {
overlay: false, overlay: false,
}, },
/* headers: { headers: {
"Cross-Origin-Opener-Policy": "cross-origin", "Cross-Origin-Opener-Policy": "same-origin",
"Cross-Origin-Embedder-Policy": "require-corp", "Cross-Origin-Embedder-Policy": "require-corp",
}, */ "Cross-Origin-Resource-Policy": "cross-origin",
},
proxy: { proxy: {
"/crm": { "/crm": {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论