提交 5ae30047 作者: 温凯

fix:无人机不在线时,打开健康管理,需添加灰色弹框提示“无人机不在线”

上级 c8a520f1
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2,72 +2,38 @@ ...@@ -2,72 +2,38 @@
<div class="control-right"> <div class="control-right">
<!-- 挂载-警灯-无人机 --> <!-- 挂载-警灯-无人机 -->
<div class="control-list" style="top: 13%"> <div class="control-list" style="top: 13%">
<div <div class="control-item" :class="showHealth ? 'active' : ''" @click="onSwitchShow('showHealth')">
class="control-item" <img :class="{ active: showHealth }" src="./assets/images/health.svg" />
:class="showHealth ? 'active' : ''"
@click="onSwitchShow('showHealth')"
>
<img :class="{active:showHealth}" src="./assets/images/health.svg" />
<span class="">健康管理</span> <span class="">健康管理</span>
</div> </div>
<!-- 机库信息 --> <!-- 机库信息 -->
<slot name="hangar"></slot> <slot name="hangar"></slot>
<div <div class="control-item" :class="showMount ? 'active' : ''" @click="onSwitchShow('showMount')">
class="control-item" <img :class="{ active: showMount }" src="./assets/images/mount.svg" />
:class="showMount ? 'active' : ''"
@click="onSwitchShow('showMount')"
>
<img :class="{active:showMount}" src="./assets/images/mount.svg" />
<span class="">挂载</span> <span class="">挂载</span>
</div> </div>
<div <div class="control-item" :class="showControlList ? 'active' : ''" @click="onSwitchShow('showControlList')">
class="control-item" <img :class="{ active: showControlList }" src="./assets/images/uav.svg" />
:class="showControlList ? 'active' : ''"
@click="onSwitchShow('showControlList')"
>
<img :class="{active:showControlList}" src="./assets/images/uav.svg" />
<span class="">无人机</span> <span class="">无人机</span>
</div> </div>
<div <div v-if="!isHangar && uav.network === 2" class="control-item" :class="showAlarmLamp ? 'active' : ''"
v-if="!isHangar && uav.network === 2" @click="onSwitchShow('showAlarmLamp')">
class="control-item" <img :class="{ active: showAlarmLamp }" src="./assets/images/lamp.svg" />
:class="showAlarmLamp ? 'active' : ''"
@click="onSwitchShow('showAlarmLamp')"
>
<img :class="{active:showAlarmLamp}" src="./assets/images/lamp.svg" />
<span class="">警灯</span> <span class="">警灯</span>
</div> </div>
<div <div class="control-item" :class="showViewLib ? 'active' : ''" @click="onSwitchShow('showViewLib')">
class="control-item" <img :class="{ active: showViewLib }" src="./assets/images/files.svg" />
:class="showViewLib ? 'active' : ''"
@click="onSwitchShow('showViewLib')"
>
<img :class="{active:showViewLib}" src="./assets/images/files.svg" />
<span class="">视图库</span> <span class="">视图库</span>
</div> </div>
<ViewLib v-if="showViewLib"></ViewLib> <ViewLib v-if="showViewLib"></ViewLib>
</div> </div>
<ControlList <ControlList @clearId="$emit('clearId')" @closeIconShow="iconShow = false" @exit="showControlList = false"
@clearId="$emit('clearId')" :show="showControlList" :isHangar="isHangar"></ControlList>
@closeIconShow="iconShow = false"
@exit="showControlList = false"
:show="showControlList"
:isHangar="isHangar"
></ControlList>
<Health v-if="showHealth" @exit="showHealth = false"></Health> <Health v-if="showHealth" @exit="showHealth = false"></Health>
<Mount v-if="showMount" :show="showMount"></Mount> <Mount v-if="showMount" :show="showMount"></Mount>
<!-- 喊话器 --> <!-- 喊话器 -->
<MMCGimbalP1 <MMCGimbalP1 class="PagerP1" v-show="showMMCGimbalP1" ref="MMCGimbalP1" @close="showMMCGimbalP1 = false" />
class="PagerP1" <MountController @webscoketFn="(data) => fun(data)" v-if="uav && uav.deviceId" ref="MountControllerRef" />
v-show="showMMCGimbalP1"
ref="MMCGimbalP1"
@close="showMMCGimbalP1 = false"
/>
<MountController
@webscoketFn="(data) => fun(data)"
v-if="uav && uav.deviceId"
ref="MountControllerRef"
/>
<AlarmLamp v-if="showAlarmLamp" :uav="uav" @close="showAlarmLamp = false" /> <AlarmLamp v-if="showAlarmLamp" :uav="uav" @close="showAlarmLamp = false" />
<slot name="dialog"></slot> <slot name="dialog"></slot>
</div> </div>
...@@ -118,8 +84,8 @@ export default { ...@@ -118,8 +84,8 @@ export default {
}, },
watch: { watch: {
// 打开航线编辑时关闭所有窗口 // 打开航线编辑时关闭所有窗口
showAirwayEdit(newVal){ showAirwayEdit(newVal) {
if(newVal){ if (newVal) {
this.showAlarmLamp = false; this.showAlarmLamp = false;
this.showHealth = false; this.showHealth = false;
this.showMMCGimbalP1 = false; this.showMMCGimbalP1 = false;
...@@ -149,6 +115,9 @@ export default { ...@@ -149,6 +115,9 @@ export default {
* 切换展示 * 切换展示
*/ */
onSwitchShow(key) { onSwitchShow(key) {
if (key == 'showHealth' && !this?.uav?.isOnline) {
return this.$message.info('无人机不在线!');
}
this.$emit("switchCallback"); this.$emit("switchCallback");
this.hideAll(key); this.hideAll(key);
this[key] = !this[key]; this[key] = !this[key];
...@@ -185,7 +154,7 @@ export default { ...@@ -185,7 +154,7 @@ export default {
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: hidden;
> img { >img {
width: 24px; width: 24px;
} }
...@@ -197,6 +166,7 @@ export default { ...@@ -197,6 +166,7 @@ export default {
border: 1px solid #3C3C3C; border: 1px solid #3C3C3C;
color: #3388ff; color: #3388ff;
} }
.active { .active {
filter: drop-shadow(#3388ff 100px 0); filter: drop-shadow(#3388ff 100px 0);
transform: translateX(-100px); transform: translateX(-100px);
......
# vue2 # vue2
# node版本 >= 18.12.0
## Project setup ## Project setup
``` ```
yarn install yarn install
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论