From 0d44769e1084fcc0ee148855f406ca4eea028aad Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期一, 01 六月 2026 09:59:39 +0800
Subject: [PATCH] 系统架构图增加点击事件

---
 src/views/systemArchitecture/index.vue |  252 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 247 insertions(+), 5 deletions(-)

diff --git a/src/views/systemArchitecture/index.vue b/src/views/systemArchitecture/index.vue
index 9f87a06..9bfcb76 100644
--- a/src/views/systemArchitecture/index.vue
+++ b/src/views/systemArchitecture/index.vue
@@ -8,9 +8,19 @@
           <h1 class="title-text">绯荤粺鏋舵瀯鍥�</h1>
         </div>
         <div class="image-wrapper">
-          <img :src="architectureImg"
-               alt="绯荤粺鏋舵瀯鍥�"
-               class="architecture-img" />
+          <div class="hotspot-container">
+            <img :src="architectureImg"
+                 alt="绯荤粺鏋舵瀯鍥�"
+                 class="architecture-img" />
+            <!-- 鐑偣鍖哄煙 -->
+            <div v-for="spot in hotspots"
+                 :key="spot.id"
+                 class="hotspot"
+                 :style="{ top: spot.top, left: spot.left, width: spot.width, height: spot.height }"
+                 @click="handleSpotClick(spot)"
+                 :title="'璺宠浆鑷�: ' + spot.name">
+            </div>
+          </div>
         </div>
       </div>
     </div>
@@ -19,7 +29,218 @@
 
 <script setup>
   import { ref, onMounted, onBeforeUnmount, nextTick } from "vue";
+  import { useRouter } from "vue-router";
   import architectureImg from "@/assets/images/xitongjiagou.svg";
+
+  const router = useRouter();
+
+  // 鐑偣鍖哄煙瀹氫箟
+  const hotspots = ref([
+    {
+      id: 1,
+      name: "瑙掕壊绠$悊",
+      top: "3%",
+      left: "19%",
+      width: "9%",
+      height: "11%",
+      path: "/system/role",
+    },
+    {
+      id: 2,
+      name: "鑱屼笟绠$悊",
+      top: "1.6%",
+      left: "36.5%",
+      width: "9%",
+      height: "11%",
+      path: "/system/user",
+    },
+    {
+      id: 3,
+      name: "宀椾綅绠$悊",
+      top: "1.6%",
+      left: "56%",
+      width: "9%",
+      height: "11%",
+      path: "/system/post",
+    },
+    {
+      id: 4,
+      name: "閮ㄩ棬绠$悊",
+      top: "3%",
+      left: "73%",
+      width: "9%",
+      height: "11%",
+      path: "/system/dept",
+    },
+    {
+      id: 5,
+      name: "瀹㈡埛妗f",
+      top: "42%",
+      left: "17%",
+      width: "9%",
+      height: "3%",
+      path: "/salesManagement/customerFileOpenSea",
+    },
+    {
+      id: 6,
+      name: "閿�鍞姤浠�",
+      top: "46%",
+      left: "17%",
+      width: "9%",
+      height: "3%",
+      path: "/salesManagement/salesQuotation",
+    },
+    {
+      id: 7,
+      name: "閿�鍞彴璐�",
+      top: "51%",
+      left: "17%",
+      width: "9%",
+      height: "3%",
+      path: "/salesManagement/salesLedger",
+    },
+    {
+      id: 8,
+      name: "鍙戣揣鍙拌处",
+      top: "55%",
+      left: "17%",
+      width: "9%",
+      height: "3%",
+      path: "/salesManagement/deliveryLedger",
+    },
+    {
+      id: 9,
+      name: "閿�鍞��璐�",
+      top: "59%",
+      left: "17%",
+      width: "9%",
+      height: "3%",
+      path: "/salesManagement/returnOrder",
+    },
+    {
+      id: 10,
+      name: "渚涘簲鍟嗘。妗�",
+      top: "42%",
+      left: "75%",
+      width: "9%",
+      height: "3%",
+      path: "/salesManagement/customerFileOpenSea",
+    },
+    {
+      id: 11,
+      name: "閲囪喘鍙拌处",
+      top: "47%",
+      left: "75%",
+      width: "9%",
+      height: "3%",
+      path: "/procurementManagement/procurementLedger",
+    },
+    {
+      id: 12,
+      name: "閲囪喘閫�璐�",
+      top: "51%",
+      left: "75%",
+      width: "9%",
+      height: "3%",
+      path: "/procurementManagement/purchaseReturnOrder",
+    },
+    {
+      id: 13,
+      name: "渚涘簲鍟嗗線鏉�",
+      top: "56%",
+      left: "75%",
+      width: "9%",
+      height: "3%",
+      path: "/procurementManagement/paymentLedger",
+    },
+    {
+      id: 14,
+      name: "閲囪喘鎶ヨ〃",
+      top: "60%",
+      left: "75%",
+      width: "9%",
+      height: "3%",
+      path: "/procurementManagement/procurementReport",
+    },
+    {
+      id: 15,
+      name: "鐢熶骇鎺掍骇",
+      top: "77%",
+      left: "19%",
+      width: "15%",
+      height: "3%",
+      path: "/productionManagement/productionManagement/workOrderEdit/index",
+    },
+    {
+      id: 16,
+      name: "鐢熶骇璁㈠崟",
+      top: "76%",
+      left: "43%",
+      width: "15%",
+      height: "3%",
+      path: "/productionManagement/productionOrder",
+    },
+    {
+      id: 17,
+      name: "bom",
+      top: "77%",
+      left: "70%",
+      width: "15%",
+      height: "3%",
+      path: "/processDesign/productionManagement/productStructure/index",
+    },
+    {
+      id: 18,
+      name: "鐢熶骇璁㈠崟",
+      top: "82%",
+      left: "32%",
+      width: "15%",
+      height: "3%",
+      path: "/productionManagement/productionOrder",
+    },
+    {
+      id: 19,
+      name: "宸ヨ壓璺嚎",
+      top: "82%",
+      left: "57%",
+      width: "15%",
+      height: "3%",
+      path: "/processDesign/processRoute",
+    },
+    {
+      id: 20,
+      name: "宸ュ簭",
+      top: "87%",
+      left: "17%",
+      width: "9%",
+      height: "4%",
+      path: "/processDesign/productionManagement/productionProcess/index",
+    },
+    {
+      id: 21,
+      name: "鐢熶骇鎶ュ伐",
+      top: "89%",
+      left: "32%",
+      width: "17%",
+      height: "4%",
+      path: "/productionManagement/workOrderManagement",
+    },
+    {
+      id: 22,
+      name: "鐢熶骇鏍哥畻",
+      top: "89%",
+      left: "56%",
+      width: "19%",
+      height: "4%",
+      path: "/productionManagement/productionCosting",
+    },
+  ]);
+
+  const handleSpotClick = spot => {
+    if (spot.path) {
+      router.push(spot.path);
+    }
+  };
 
   // 缂╂斁姣斾緥
   const scaleRatio = ref(1);
@@ -127,10 +348,31 @@
       overflow: hidden;
       box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
 
-      .architecture-img {
+      .hotspot-container {
+        position: relative;
+        display: inline-block;
         max-width: 100%;
         max-height: 100%;
-        object-fit: contain;
+
+        .architecture-img {
+          display: block;
+          max-width: 100%;
+          max-height: 100%;
+          object-fit: contain;
+        }
+
+        .hotspot {
+          position: absolute;
+          cursor: pointer;
+          background: rgba(64, 158, 255, 0);
+          transition: background 0.3s;
+          border-radius: 4px;
+
+          // &:hover {
+          //   background: rgba(64, 158, 255, 0.15);
+          //   box-shadow: 0 0 10px rgba(64, 158, 255, 0.3);
+          // }
+        }
       }
     }
   }

--
Gitblit v1.9.3