From c494da17f858407f6e086f55c6e978b5bf983168 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Mon, 14 Apr 2025 17:47:38 +0800
Subject: [PATCH] feat:调整空闲中和作业中颜色

---
 src/views/Home/HomeLeft/MachineNestList.vue                            |    4 ++--
 src/views/Home/HomeLeft/OverviewNext.vue                               |    4 ++--
 src/hooks/useMapAggregation/DevicePopUpBox.vue                         |    4 ++--
 src/views/SignMachineNest/MachineRight/MachineStatus/MachineStatus.vue |   11 +++++++++--
 src/views/SignMachineNest/SignMachineNest.vue                          |    1 +
 src/views/Home/HomeLeft/components/MachineNestTotal.vue                |    4 ++--
 6 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/src/hooks/useMapAggregation/DevicePopUpBox.vue b/src/hooks/useMapAggregation/DevicePopUpBox.vue
index be07f3a..6ac7641 100644
--- a/src/hooks/useMapAggregation/DevicePopUpBox.vue
+++ b/src/hooks/useMapAggregation/DevicePopUpBox.vue
@@ -39,8 +39,8 @@
 
 const props = defineProps(['data', 'removeLabel']);
 const list = ref([
-  { name: '空闲中', value: 0, color: '#FFA768' },
-  { name: '作业', value: 0, color: '#8EFFAC' },
+  { name: '空闲中', value: 0, color: '#8EFFAC' },
+  { name: '作业', value: 0, color: '#FFA768' },
   { name: '离线中', value: 0, color: '#FFFFFF' },
 ]);
 const loading = ref(true);
diff --git a/src/views/Home/HomeLeft/MachineNestList.vue b/src/views/Home/HomeLeft/MachineNestList.vue
index 5b12d6e..e9afa18 100644
--- a/src/views/Home/HomeLeft/MachineNestList.vue
+++ b/src/views/Home/HomeLeft/MachineNestList.vue
@@ -220,11 +220,11 @@
 			}
 			// 空闲中
 			.freetime {
-				color: #ffa768;
+				color: #04f020;
 			}
 			// 作业中
 			.atcive {
-				color: #04f020;
+				color: #ffa768;
 				background: linear-gradient(90deg, rgba(12, 45, 92, 1) 0%, #154671 50%, rgba(12, 45, 92, 1) 100%),
 					linear-gradient(90deg, rgba(12, 45, 92, 1) 0%, rgba(12, 45, 92, 1) 50%, rgba(12, 45, 92, 1) 100%);
 			}
diff --git a/src/views/Home/HomeLeft/OverviewNext.vue b/src/views/Home/HomeLeft/OverviewNext.vue
index da35cf6..916fc74 100644
--- a/src/views/Home/HomeLeft/OverviewNext.vue
+++ b/src/views/Home/HomeLeft/OverviewNext.vue
@@ -205,12 +205,12 @@
 				cursor: pointer;
 			}
 			.active {
-				color: #8effac;
+				color: #ffa768;
 				background: linear-gradient(90deg, rgba(12, 45, 92, 1) 0%, #154671 50%, rgba(12, 45, 92, 1) 100%),
 					linear-gradient(90deg, rgba(12, 45, 92, 1) 0%, rgba(12, 45, 92, 1) 50%, rgba(12, 45, 92, 1) 100%);
 			}
 			.idle-active {
-				color: #ffa768;
+				color: #8effac;
 			}
 			.imageicon {
 				object-fit: cover;
diff --git a/src/views/Home/HomeLeft/components/MachineNestTotal.vue b/src/views/Home/HomeLeft/components/MachineNestTotal.vue
index 7476dee..2a2430f 100644
--- a/src/views/Home/HomeLeft/components/MachineNestTotal.vue
+++ b/src/views/Home/HomeLeft/components/MachineNestTotal.vue
@@ -34,8 +34,8 @@
 let total = ref(0);
 // 机巢统计
 let listNum = ref([
-  { name: '空闲中', value: 0, color: '#FFA768' },
-  { name: '作业中', value: 0, color: '#8EFFAC' },
+  { name: '空闲中', value: 0, color: '#8EFFAC' },
+  { name: '作业中', value: 0, color: '#FFA768' },
   { name: '离线中', value: 0, color: '#FFFFFF' },
   // { name: '异常', value: 10, color: '#FF8E8E' },
 ]);
diff --git a/src/views/SignMachineNest/MachineRight/MachineStatus/MachineStatus.vue b/src/views/SignMachineNest/MachineRight/MachineStatus/MachineStatus.vue
index 1449a87..630fd73 100644
--- a/src/views/SignMachineNest/MachineRight/MachineStatus/MachineStatus.vue
+++ b/src/views/SignMachineNest/MachineRight/MachineStatus/MachineStatus.vue
@@ -81,6 +81,7 @@
 const store = useStore();
 // 获取机巢信息
 let osdVisible = computed(() => store.state.home.osdVisible);
+console.log('333',osdVisible)
 const singleUavHome = computed(() => store.state.home.singleUavHome);
 // 单个机巢统计数据
 const singleTotal = computed(() => store.state.home.singleTotal);
@@ -137,6 +138,10 @@
 });
 let mode_code = ref('已断开连接');
 
+watch(() => store.state.home.osdVisible, (newValue) => {
+  console.log(newValue,'osdVisible222')
+});
+
 // 监听实时信息
 watch(
   () => store.state.home.wsMessage,
@@ -147,7 +152,6 @@
 		detailInfo.value.latitude = newValue?.latitude.toFixed(6) || '--';
     
     getLnglatAltitude(Number(detailInfo.value.longitude), Number(detailInfo.value.latitude),window.$viewer).then((res) => {
-      // console.log('333333333', res);
       const height = newValue?.height - res?.height;
       //针对西安实时高度进行降低
       const wId = localStorage.getItem('bs_workspace_id');
@@ -172,6 +176,7 @@
       // 机场状态
       mode_code.value = EDockModeText[newValue?.dockInfo[newValue.currentSn]?.basic_osd?.mode_code];
       // this.$emit('updateModeCode', mode_code.value);
+      // console.log('3333333',deviceInfo.value)
       // 舱内状态
       AircraftStatus.value =
         EModeText[newValue.deviceInfo[
@@ -180,7 +185,8 @@
           ]?.mode_code
         ];
       // 舱内关机时显示的电量
-      let child_sn = newValue?.dockInfo[newValue.currentSn].basic_osd.sub_device.device_sn;
+      // console.log('444',newValue.currentSn)
+      let child_sn = newValue?.dockInfo[newValue.currentSn].basic_osd.sub_device?.device_sn;
       // 飞机在线时取飞机中的电量
       if(newValue.deviceInfo[child_sn]) {
         drone_charge_state.value = {
@@ -193,6 +199,7 @@
           drone_charge_state.value = newValue.drone_charge_state_new;
         }
       }
+      // console.log('osdVisible',osdVisible.visible)
       if (osdVisible.visible && osdVisible.is_dock && osdVisible.gateway_sn !== '') {
         deviceInfo.value.dock = newValue.dockInfo[osdVisible.gateway_sn];
         deviceInfo.value.device =
diff --git a/src/views/SignMachineNest/SignMachineNest.vue b/src/views/SignMachineNest/SignMachineNest.vue
index bfec7ce..4a42185 100644
--- a/src/views/SignMachineNest/SignMachineNest.vue
+++ b/src/views/SignMachineNest/SignMachineNest.vue
@@ -71,6 +71,7 @@
     osdVisible.value.device_sub_type = child.sub_type || 1
     osdVisible.value.device_type = child.type || 0
     // osdVisible.value.latest_wayline_job = result?.latest_wayline_job || {}
+    console.log(osdVisible.value, '999')
     store.commit('setOsdVisibleInfo', osdVisible.value);
     store.commit('setSelectedWorkSpaceId', result.workspace_id);
     workspaceId.value = result.workspace_id;

--
Gitblit v1.9.3