From a3fe79e605b07a5a908599aaa830a0860e9423d2 Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期三, 14 五月 2025 17:34:27 +0800
Subject: [PATCH] 修改

---
 src/main/java/com/example/client/service/Level3View2Service.java |   82 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 81 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/example/client/service/Level3View2Service.java b/src/main/java/com/example/client/service/Level3View2Service.java
index d941c42..154c509 100644
--- a/src/main/java/com/example/client/service/Level3View2Service.java
+++ b/src/main/java/com/example/client/service/Level3View2Service.java
@@ -7,6 +7,7 @@
 import com.example.server.cabin.service.CabinService;
 import com.example.server.progressTrack.Dto.TableNodeDto;
 import com.example.server.progressTrack.model.DjJdgzShip;
+import com.example.server.progressTrack.model.DjJdgzTrackRecord;
 import com.example.server.progressTrack.service.*;
 import com.example.server.teamGroup.service.SysTeamGroupClassService;
 import org.apache.commons.lang3.StringUtils;
@@ -28,6 +29,8 @@
     private DjJdgzNetworkLevel3Service level3Service;
     @Autowired
     private DjJdgzShipService djJdgzShipService;
+    @Autowired
+    private DjJdgzTrackRecordService djJdgzTrackRecordService;
     @Autowired
     private SysTeamGroupClassService sysTeamGroupClassService;
     @Autowired
@@ -165,8 +168,8 @@
         MouseMotionListener mouseMotionListener = new MouseMotionListener() {
             @Override
             public void mouseDragged(MouseEvent e) {
-                // 涓嶉渶瑕佸鐞嗛紶鏍囨嫋鍔ㄤ簨浠�
             }
+
 
             @Override
             public void mouseMoved(MouseEvent e) {
@@ -201,8 +204,26 @@
                 }
             }
         };
+        MouseAdapter mouseAdapter = new MouseAdapter(){
+            @Override
+            public void mouseClicked(MouseEvent e) {
+                // if (historyCalled[0]) return;
+                // 鑾峰彇鐐瑰嚮鐨勮鍜屽垪
+                int row = table.rowAtPoint(e.getPoint());
+
+                // 妫�鏌ユ槸鍚︾偣鍑讳簡鏈夋晥鍗曞厓鏍�
+                if (row >= 0) {
+                    Long id = list.get(row).getNetworkId();
+                    if (id != null) {
+                      getRecordById(frame,id);
+                    }
+                }
+            }
+
+        };
 
         table.addMouseMotionListener(mouseMotionListener);
+        table.addMouseListener(mouseAdapter);
 
         comboBox.addItemListener(new ItemListener() {
             public void itemStateChanged(final ItemEvent event) {
@@ -460,6 +481,65 @@
         return panel;
     }
 
+    private void getRecordById(JFrame jFrame, Long id) {
+        jFrame.setEnabled(false);
+        JFrame frame1 = new JFrame("璺熻釜璁板綍");
+        frame1.setSize(2000, 800);
+        frame1.setResizable(true);
+        frame1.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
+        frame1.setLocationRelativeTo(null);
+        frame1.addWindowListener(new WindowAdapter() {
+            //娣诲姞绗簩涓晫闈㈢殑鍏抽棴浜嬩欢:
+            public void windowClosing(WindowEvent e) {
+                //娣诲姞浜嬩欢:
+                jFrame.setEnabled(true);//灏嗕富鐣岄潰鍐嶈缃负鍙搷浣滅殑
+            }
+        });
+
+        List<ColumnDto> columnDto = new ArrayList<>();
+        List<DjJdgzTrackRecord> list = djJdgzTrackRecordService.getRecordById(id);
+        JComboBoxItem[] trackList = {
+                new JComboBoxItem(0L, "绾夸笅"),
+                new JComboBoxItem(1L, "鐢佃瘽"),
+        };
+
+        JComboBoxItem[] statusList = {
+                new JComboBoxItem(0L, "杩涜涓�"),
+                new JComboBoxItem(1L, "宸插畬鎴�"),
+        };
+        JComboBoxItem[] hasDelayRiskList = {
+                new JComboBoxItem(0L, "鏃�"),
+                new JComboBoxItem(1L, "鏈�"),
+        };
+
+        columnDto.add(new ColumnDto("搴忓彿", "", 80, "autoCreate", false, null, null));
+        columnDto.add(new ColumnDto("鑺傜偣鍚嶇О", "processName", 120, null, false, null, null));
+        columnDto.add(new ColumnDto("璺熻釜鏂瑰紡", "trackMethod", 120, "dict", false, null, trackList));
+        columnDto.add(new ColumnDto("璺熻釜鍦扮偣", "trackLocation", 120, null, false, null, null));
+        columnDto.add(new ColumnDto("鍔╀慨浜�", "trackPerson", 180, null, false, null, null));
+        columnDto.add(new ColumnDto("鍘傛柟", "trackedPerson", 180, null, false, null, null));
+        columnDto.add(new ColumnDto("鎬绘壙淇崟浣�", "generalRepair", 180, null, false, null, null));
+        columnDto.add(new ColumnDto("鍒嗘壙淇崟浣�", "repair", 180, null, false, null, null));
+        columnDto.add(new ColumnDto("鑺傜偣杩涘睍", "currentStatus", 120, "dict", false, null, statusList));
+        columnDto.add(new ColumnDto("鑴辨湡椋庨櫓", "hasDelayRisk", 120, "dict", false, null, hasDelayRiskList));
+        columnDto.add(new ColumnDto("棰勮瀹屾垚鏃堕棿", "estimatedCompletionTime", 200, "selectDate", false, null, null));
+        columnDto.add(new ColumnDto("瀛樺湪闂", "problem", 160, null, false, null, null));
+        columnDto.add(new ColumnDto("鍚庣画璁″垝", "followupPlan", 160, null, false, null, null));
+        columnDto.add(new ColumnDto("澶囨敞", "remark", 160, null, false, null, null));
+
+        JTable subTable = CommonTable.createCommonTable(list, columnDto);
+        subTable.setRowHeight(25);
+        subTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
+        JScrollPane scrollPane = new JScrollPane(subTable, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
+        scrollPane.setViewportView(subTable);
+        scrollPane.getViewport().setBackground(Color.WHITE);
+        //scrollPane.setPreferredSize(new Dimension(width - 20, height - 100));
+
+        frame1.add(scrollPane);
+        frame1.setVisible(true);
+
+    }
+
     private void export(JFrame jFrame) {
         JFrame frame1 = new JFrame("瀵煎嚭涓夌骇缃戠粶鍥剧姸鎬�");
         frame1.setSize(300, 400);

--
Gitblit v1.9.1