From 5ae9bbe3583384afab8eb95a134ccb74aee6487a Mon Sep 17 00:00:00 2001
From: 张世豪 <979909237@qq.com>
Date: 星期四, 25 十二月 2025 13:46:38 +0800
Subject: [PATCH] 曾加修改密码功能

---
 src/lujing/MowingPathGenerationPage.java |   31 ++++++++++++++++++++++++++++---
 1 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/src/lujing/MowingPathGenerationPage.java b/src/lujing/MowingPathGenerationPage.java
index ad0dcc4..bbbe001 100644
--- a/src/lujing/MowingPathGenerationPage.java
+++ b/src/lujing/MowingPathGenerationPage.java
@@ -125,11 +125,31 @@
         
         // 鍦板潡杈圭晫
         boundaryArea = createInfoTextArea(boundaryValue != null ? boundaryValue : "", true, 6);
-        contentPanel.add(createTextAreaSection("鍦板潡杈圭晫", boundaryArea));
+        String boundaryTitle = "鍦板潡杈圭晫";
+        if (boundaryValue != null && !boundaryValue.trim().isEmpty() && !"-1".equals(boundaryValue.trim())) {
+            int boundaryCount = boundaryValue.split(";").length;
+            boundaryTitle = "鍦板潡杈圭晫 (" + boundaryCount + "鐐�)";
+        }
+        contentPanel.add(createTextAreaSection(boundaryTitle, boundaryArea));
         
         // 闅滅鐗╁潗鏍�
         obstacleArea = createInfoTextArea(obstacleValue != null ? obstacleValue : "", true, 6);
-        contentPanel.add(createTextAreaSection("闅滅鐗╁潗鏍�", obstacleArea));
+        String obstacleTitle = "闅滅鐗╁潗鏍�";
+        if (obstacleValue != null && !obstacleValue.trim().isEmpty() && !"-1".equals(obstacleValue.trim())) {
+            // 闅滅鐗╁潗鏍囨牸寮忓彲鑳芥槸绌烘牸鍒嗛殧鐨勫涓殰纰嶇墿锛屾瘡涓殰纰嶇墿鐢ㄥ垎鍙峰垎闅斿潗鏍囩偣
+            // 璁$畻鎵�鏈夐殰纰嶇墿鐨勬�诲潗鏍囩偣鏁�
+            String[] obstacles = obstacleValue.trim().split("\\s+");
+            int totalObstaclePoints = 0;
+            for (String obstacle : obstacles) {
+                if (obstacle != null && !obstacle.trim().isEmpty()) {
+                    totalObstaclePoints += obstacle.split(";").length;
+                }
+            }
+            if (totalObstaclePoints > 0) {
+                obstacleTitle = "闅滅鐗╁潗鏍� (" + totalObstaclePoints + "鐐�)";
+            }
+        }
+        contentPanel.add(createTextAreaSection(obstacleTitle, obstacleArea));
         
         // 鍓茶崏瀹藉害
         widthField = createInfoTextField(widthValue != null ? widthValue : "", true);
@@ -175,7 +195,12 @@
         String existingPath = prepareCoordinateForEditor(dikuai.getPlannedPath());
         String pathSeed = initialGeneratedPath != null ? initialGeneratedPath : existingPath;
         pathArea = createInfoTextArea(pathSeed != null ? pathSeed : "", true, 10);
-        contentPanel.add(createTextAreaSection("鍓茶崏璺緞鍧愭爣", pathArea));
+        String pathTitle = "鍓茶崏璺緞鍧愭爣";
+        if (pathSeed != null && !pathSeed.trim().isEmpty() && !"-1".equals(pathSeed.trim())) {
+            int pathCount = pathSeed.split(";").length;
+            pathTitle = "鍓茶崏璺緞鍧愭爣 (" + pathCount + "鐐�)";
+        }
+        contentPanel.add(createTextAreaSection(pathTitle, pathArea));
         
         JScrollPane dialogScrollPane = new JScrollPane(contentPanel);
         dialogScrollPane.setBorder(BorderFactory.createEmptyBorder());

--
Gitblit v1.10.0