From 308e2cc3b78e6f8351e4f3fb0ad1ca191ae0db48 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期二, 02 六月 2026 17:45:13 +0800
Subject: [PATCH] fix: 更新入库的源单号不显示问题

---
 src/views/systemArchitecture/index.vue |  309 ++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 291 insertions(+), 18 deletions(-)

diff --git a/src/views/systemArchitecture/index.vue b/src/views/systemArchitecture/index.vue
index 9f87a06..6ed31f6 100644
--- a/src/views/systemArchitecture/index.vue
+++ b/src/views/systemArchitecture/index.vue
@@ -1,16 +1,32 @@
 <template>
   <div class="scale-container">
-    <div class="architecture-scaling-container"
-         :style="{ transform: `scale(${scaleRatio})` }">
-      <div class="architecture-container">
-        <div class="header">
-          <span class="title-bar"></span>
-          <h1 class="title-text">绯荤粺鏋舵瀯鍥�</h1>
-        </div>
-        <div class="image-wrapper">
-          <img :src="architectureImg"
-               alt="绯荤粺鏋舵瀯鍥�"
-               class="architecture-img" />
+    <div class="scroll-content"
+         :style="{ 
+           height: `${designHeight * scaleRatio}px`,
+           width: `${designWidth * scaleRatio}px` 
+         }">
+      <div class="architecture-scaling-container"
+           :style="{ transform: `scale(${scaleRatio})` }">
+        <div class="architecture-container">
+          <div class="header">
+            <span class="title-bar"></span>
+            <h1 class="title-text">绯荤粺鏋舵瀯鍥�</h1>
+          </div>
+          <div class="image-wrapper">
+            <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>
     </div>
@@ -19,7 +35,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);
@@ -34,16 +261,18 @@
 
     // 鑾峰彇瀹瑰櫒鐨勫疄闄呭昂瀵�
     const containerWidth = container.clientWidth;
+    const containerHeight = container.clientHeight;
 
-    if (containerWidth === 0) {
+    if (containerWidth === 0 || containerHeight === 0) {
       // 濡傛灉杩樻病娓叉煋鍑烘潵锛屽欢杩熶竴涓嬪啀璁$畻
       setTimeout(calculateScale, 100);
       return;
     }
 
-    // 璁$畻瀹藉害缂╂斁姣斾緥锛屼娇鍏跺缁堝崰婊″搴�
+    // 璁$畻缂╂斁姣斾緥锛屽彇瀹介珮姣斾緥涓殑杈冨ぇ鍊硷紝纭繚濮嬬粓鎾戞弧鏁翠釜瀹瑰櫒
     const scaleX = containerWidth / designWidth;
-    scaleRatio.value = scaleX;
+    const scaleY = containerHeight / designHeight;
+    scaleRatio.value = Math.max(scaleX, scaleY);
   };
 
   // 绐楀彛澶у皬鍙樺寲澶勭悊
@@ -52,6 +281,7 @@
   };
 
   // 鐢熷懡鍛ㄦ湡
+  let resizeObserver = null;
   onMounted(() => {
     // 璁$畻鍒濆缂╂斁姣斾緥
     nextTick(() => {
@@ -60,10 +290,22 @@
 
     // 鐩戝惉绐楀彛澶у皬鍙樺寲
     window.addEventListener("resize", handleResize);
+
+    // 浣跨敤 ResizeObserver 鐩戝惉瀹瑰櫒灏哄鍙樺寲锛堣В鍐充晶杈规爮鍒囨崲闂锛�
+    const container = document.querySelector(".scale-container");
+    if (container && window.ResizeObserver) {
+      resizeObserver = new ResizeObserver(() => {
+        calculateScale();
+      });
+      resizeObserver.observe(container);
+    }
   });
 
   onBeforeUnmount(() => {
     window.removeEventListener("resize", handleResize);
+    if (resizeObserver) {
+      resizeObserver.disconnect();
+    }
   });
 </script>
 
@@ -73,11 +315,21 @@
     width: 100%;
     height: calc(100vh - 84px);
     background-color: #f5f7fa;
-    overflow: hidden;
+    overflow: auto;
+    display: flex;
+    justify-content: center;
+    align-items: flex-start;
+  }
+
+  .scroll-content {
+    position: relative;
+    flex-shrink: 0;
   }
 
   .architecture-scaling-container {
-    position: relative;
+    position: absolute;
+    top: 0;
+    left: 0;
     width: 1920px;
     height: 980px;
     transform-origin: left top;
@@ -127,10 +379,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