From efab54d762db66fa208be819ec73c667ad0efc4c Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Sat, 29 Mar 2025 13:42:04 +0800
Subject: [PATCH] feat:增加单个机巢页面

---
 src/views/Home/components/HomeLeft/OverviewNext.vue |   25 ++++++++++++++++++++++++-
 1 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/src/views/Home/components/HomeLeft/OverviewNext.vue b/src/views/Home/components/HomeLeft/OverviewNext.vue
index 74e0a61..583864a 100644
--- a/src/views/Home/components/HomeLeft/OverviewNext.vue
+++ b/src/views/Home/components/HomeLeft/OverviewNext.vue
@@ -32,7 +32,7 @@
           <img width="13" height="15" src="@/assets/images/home/homeLeft/table-icon.png" alt="" />
           {{ item.name }}
         </div>
-        <div class="status">{{ item.status }}</div>
+        <div class="status" @click="signMachineNestClick">{{ item.status }}</div>
       </div>
     </div>
   </div>
@@ -41,6 +41,8 @@
 import { pxToRem } from '@/utils/rem';
 import { Search } from '@element-plus/icons-vue';
 import CommonTitle from '@/components/CommonTitle.vue';
+import { getDeviceInfoNum } from '@/api/home/machineNest.js'
+import router from '@/router/';
 
 const list = ref([
   { name: '执行中', value: 89, color: '#FFA768' },
@@ -56,9 +58,29 @@
   { name: '小兰工业园3号', status: '预计执行' },
 ]);
 
+// 获取机巢列表
+const getList = () => {
+  getDeviceInfoNum().then((res) => {
+    console.log(res);
+  });
+}
+// 单个机巢详情
+const signMachineNestClick = () => {
+  router.push({
+    path: '/signMachineNest',
+    query: {
+      id: '123'  // 这里可以传递你需要的参数
+    }
+  });
+}
+
 const detailsFun = () => {
   console.log('details');
 };
+
+onMounted(() => {
+  getList();
+});
 </script>
 <style scoped lang="scss">
 .overview-next {
@@ -163,6 +185,7 @@
       }
       .status {
         color: #6fc3ff;
+        cursor: pointer;
       }
       .atcive {
         color: #04f020;

--
Gitblit v1.9.3