From c498385fb7e372d13e2ee76d7b54ae2381728082 Mon Sep 17 00:00:00 2001
From: 张世豪 <979909237@qq.com>
Date: 星期三, 17 十二月 2025 19:35:57 +0800
Subject: [PATCH] 新增了测量模式

---
 src/dikuai/Dikuaiguanli.java |   28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/src/dikuai/Dikuaiguanli.java b/src/dikuai/Dikuaiguanli.java
index 5adb9c5..c84eecb 100644
--- a/src/dikuai/Dikuaiguanli.java
+++ b/src/dikuai/Dikuaiguanli.java
@@ -213,8 +213,27 @@
 
 		headerPanel.add(nameLabel, BorderLayout.WEST);
 
+		// 鍙充晶鍖哄煙锛氱姸鎬佹枃瀛� + 鎸夐挳
+		JPanel rightPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 5, 0));
+		rightPanel.setBackground(CARD_BACKGROUND);
+		rightPanel.setOpaque(false);
+		
+		// 鐘舵�佹枃瀛楁爣绛撅紙鏍规嵁鏄惁閫変腑鏄剧ず/闅愯棌锛�
+		JLabel statusLabel = new JLabel("宸茶缃负褰撳墠鍦板潡");
+		statusLabel.setFont(new Font("寰蒋闆呴粦", Font.PLAIN, 13));
+		statusLabel.setForeground(PRIMARY_COLOR);
+		boolean isCurrent = dikuai.getLandNumber() != null && dikuai.getLandNumber().equals(currentWorkLandNumber);
+		statusLabel.setVisible(isCurrent);
+		
 		JButton workToggleBtn = createWorkToggleButton(dikuai);
-		headerPanel.add(workToggleBtn, BorderLayout.EAST);
+		
+		// 灏嗙姸鎬佹爣绛惧拰鎸夐挳鍏宠仈锛屼互渚垮湪鎸夐挳鐘舵�佸彉鍖栨椂鏇存柊鏍囩
+		workToggleBtn.putClientProperty("statusLabel", statusLabel);
+		
+		rightPanel.add(statusLabel);
+		rightPanel.add(workToggleBtn);
+		
+		headerPanel.add(rightPanel, BorderLayout.EAST);
 		
 		card.add(headerPanel, BorderLayout.NORTH);
 		
@@ -1440,6 +1459,13 @@
 			button.setText(isCurrent ? "褰撳墠鍦板潡" : "璁句负褰撳墠");
 		}
 		button.setToolTipText(isCurrent ? "鍙栨秷褰撳墠浣滀笟鍦板潡" : "璁句负褰撳墠浣滀笟鍦板潡");
+		
+		// 鏇存柊鐘舵�佹枃瀛楁爣绛剧殑鏄剧ず/闅愯棌
+		Object statusLabelObj = button.getClientProperty("statusLabel");
+		if (statusLabelObj instanceof JLabel) {
+			JLabel statusLabel = (JLabel) statusLabelObj;
+			statusLabel.setVisible(isCurrent);
+		}
 	}
 
 	private void ensureWorkIconsLoaded() {

--
Gitblit v1.10.0