From d4e6820f6cc65ab6d7315abeff8360dbf5fd4a91 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期四, 19 三月 2026 16:32:08 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/stationPathPolicy/stationPathPolicy.js |   36 +++++++++++++++++++++++-------------
 1 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/src/main/webapp/static/js/stationPathPolicy/stationPathPolicy.js b/src/main/webapp/static/js/stationPathPolicy/stationPathPolicy.js
index 5918461..bfcb6b7 100644
--- a/src/main/webapp/static/js/stationPathPolicy/stationPathPolicy.js
+++ b/src/main/webapp/static/js/stationPathPolicy/stationPathPolicy.js
@@ -365,6 +365,17 @@
                 this.$message.warning('榛樿妯℃澘缂栫爜娌℃湁瀵瑰簲妯℃澘')
                 return
             }
+            var defaultProfile = null
+            for (var i = 0; i < this.profiles.length; i++) {
+                if (this.profiles[i].profileCode === this.defaultProfileCode) {
+                    defaultProfile = this.profiles[i]
+                    break
+                }
+            }
+            if (!defaultProfile || Number(defaultProfile.status) !== 1) {
+                this.$message.warning('榛樿妯℃澘蹇呴』鍚敤')
+                return
+            }
             var payload = {
                 defaultProfileCode: this.defaultProfileCode,
                 profiles: this.profiles.map(this.sanitizeProfileForSave),
@@ -772,7 +783,7 @@
             var scaleX = usableWidth / contentWidth
             var scaleY = usableHeight / contentHeight
             var scale = Math.min(scaleX, scaleY, 1.7)
-            var zoomPercent = Math.max(60, Math.min(220, Math.floor(scale * 100)))
+            var zoomPercent = Math.max(1, Math.min(220, Math.floor(scale * 100)))
             var centerX = (bounds.minX + bounds.maxX) / 2
             var centerY = (bounds.minY + bounds.maxY) / 2
             this.mapZoomPercent = zoomPercent
@@ -818,7 +829,7 @@
             if (zoomPercent == null) {
                 return
             }
-            zoomPercent = Math.max(60, Math.min(220, zoomPercent))
+            zoomPercent = Math.max(1, Math.min(220, zoomPercent))
             if (!wrap || !this.mapContext.width || !this.mapContext.height) {
                 this.mapZoomPercent = zoomPercent
                 return
@@ -847,19 +858,18 @@
             if (!this.mapContext.nodes.length) {
                 return
             }
-            if (event.ctrlKey || event.metaKey) {
-                var wrap = this.$refs.mapCanvasWrap
-                if (!wrap) {
-                    return
-                }
-                var rect = wrap.getBoundingClientRect()
-                var delta = event.deltaY < 0 ? 10 : -10
-                var nextPercent = Math.max(60, Math.min(220, this.mapZoomPercent + delta))
-                this.setMapZoomAroundPoint(nextPercent, event.clientX - rect.left, event.clientY - rect.top)
+            var wrap = this.$refs.mapCanvasWrap
+            if (!wrap) {
                 return
             }
-            this.mapPanX -= event.deltaX
-            this.mapPanY -= event.deltaY
+            var wheelDelta = Math.abs(event.deltaY) >= Math.abs(event.deltaX) ? event.deltaY : event.deltaX
+            if (!wheelDelta) {
+                return
+            }
+            var rect = wrap.getBoundingClientRect()
+            var delta = wheelDelta < 0 ? 10 : -10
+            var nextPercent = Math.max(1, Math.min(220, this.mapZoomPercent + delta))
+            this.setMapZoomAroundPoint(nextPercent, event.clientX - rect.left, event.clientY - rect.top)
         },
         beginMapDrag: function (event) {
             var wrap = this.$refs.mapCanvasWrap

--
Gitblit v1.9.1