From efce7ce3e63712ecc8b4c3039a73b508fc3ea880 Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期一, 28 四月 2025 10:20:37 +0800
Subject: [PATCH] 修改

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

diff --git a/src/main/java/com/example/client/service/Level3View2Service.java b/src/main/java/com/example/client/service/Level3View2Service.java
index 548b587..803e1c5 100644
--- a/src/main/java/com/example/client/service/Level3View2Service.java
+++ b/src/main/java/com/example/client/service/Level3View2Service.java
@@ -2,26 +2,22 @@
 
 import com.example.client.dto.ColumnDto;
 import com.example.client.dto.JComboBoxItem;
-import com.example.client.model.TableButton;
 import com.example.client.utils.*;
 import com.example.server.cabin.service.CabinService;
 import com.example.server.progressTrack.Dto.TableNodeDto;
-import com.example.server.progressTrack.model.DjJdgzNetworkLevel1;
-import com.example.server.progressTrack.model.DjJdgzNetworkLevel3;
 import com.example.server.progressTrack.model.DjJdgzShip;
 import com.example.server.progressTrack.service.*;
 import com.example.server.teamGroup.service.SysTeamGroupClassService;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import javax.swing.*;
-import javax.swing.event.TableModelEvent;
-import javax.swing.table.DefaultTableCellRenderer;
-import javax.swing.table.DefaultTableModel;
 import java.awt.*;
 import java.awt.event.*;
 import java.util.List;
 import java.util.*;
+import java.util.stream.Collectors;
 
 
 @Service
@@ -43,19 +39,31 @@
     private List<ColumnDto> columnDto;
 
 
-    public JPanel createTable(Integer width, Integer height,JFrame frame) {
+    public JPanel createTable(Integer width, Integer height, JFrame frame) {
         JPanel panel = new JPanel(new BorderLayout());
 
-        JPanel topJpanel = new JPanel();
+        JPanel topJpanel1 = new JPanel(new BorderLayout());
+        topJpanel1.setPreferredSize(new Dimension(width, 150));
+        topJpanel1.setBackground(Color.WHITE);
+
+        JPanel topJpanel2 = new JPanel();
+
+        CustomPanel customPanel = new CustomPanel();
+        customPanel.setPreferredSize(new Dimension(width, 50));
+        customPanel.setBackground(Color.WHITE);
+
+        topJpanel1.add(topJpanel2, BorderLayout.CENTER);
+        topJpanel1.add(customPanel, BorderLayout.SOUTH);
+
         GridBagLayout layout = new GridBagLayout();
-        topJpanel.setLayout(layout);
-        topJpanel.setPreferredSize(new Dimension(width, 100));
-        topJpanel.setBackground(Color.WHITE);
+        topJpanel2.setLayout(layout);
+        topJpanel2.setPreferredSize(new Dimension(width, 100));
+        topJpanel2.setBackground(Color.WHITE);
 
         JPanel centerJpanel = new JPanel();
-        centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(95,frame)));
+        centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(145, frame)));
         centerJpanel.setBackground(Color.WHITE);
-        panel.add(topJpanel, BorderLayout.NORTH);
+        panel.add(topJpanel1, BorderLayout.NORTH);
         panel.add(centerJpanel, BorderLayout.CENTER);
 
         List<DjJdgzShip> shipList = djJdgzShipService.getList();
@@ -63,7 +71,13 @@
         JComboBoxItem[] cabinList = cabinService.getList();
         JComboBoxItem[] deptList = sysTeamGroupClassService.getDeptList();
         String[] typeList = new String[]{
-                "","鏀硅", "鍔犺", "鎹㈣", "淇悊","鏀硅繘鎬т慨鐞�"
+                "淇悊", "鏀规崲瑁�", "鏀硅繘鎬т慨鐞�", "涓嶅瑁呰澶�"
+        };
+
+        JComboBoxItem[] isealCabin = {
+                new JComboBoxItem(10000L, ""),
+                new JComboBoxItem(0L, "鍚�"),
+                new JComboBoxItem(1L, "鏄�"),
         };
 
         JLabel JLabel0 = new JLabel("宸ョ▼");
@@ -88,12 +102,21 @@
         JComboBox<String> comboBox4 = new JComboBox<>(typeList);
         comboBox4.setPreferredSize(new Dimension(185, 28));
 
+        JLabel JLabel5 = new JLabel("鏄惁褰卞搷灏佽埍");
+        JComboBox<JComboBoxItem> comboBox56 = new JComboBox<>(isealCabin);
+        comboBox56.setPreferredSize(new Dimension(185, 28));
+
+        JLabel JLabel6 = new JLabel("鏄惁鑱旇皟");
+        JComboBox<JComboBoxItem> comboBox6 = new JComboBox<>(isealCabin);
+        comboBox6.setPreferredSize(new Dimension(185, 28));
+
         JTextField sb = new JTextField(16);
         JButton query = new JButton("鏌ヨ");
 
         List<ColorDescription> colorDescriptions = new ArrayList<>();
+        colorDescriptions.add(new ColorDescription("", "鍏ㄩ儴"));
         colorDescriptions.add(new ColorDescription("#3498DB", "杩涜涓�"));
-        colorDescriptions.add(new ColorDescription("#F1C40F", "涓存湡"));
+        colorDescriptions.add(new ColorDescription("#F1C40F", "涓存湡(7澶�)"));
         colorDescriptions.add(new ColorDescription("#E74C3C", "閫炬湡"));
         colorDescriptions.add(new ColorDescription("#2ECC71", "姝e父瀹屾垚"));
         colorDescriptions.add(new ColorDescription("#006400", "瓒呮湡瀹屾垚"));
@@ -102,35 +125,31 @@
         ColorDescriptionComboBox comboBox5 = new ColorDescriptionComboBox(colorDescriptions);
         JButton btnTjz = new JButton("璁惧杩涘害缁熻鎬昏〃");
 
-        topJpanel.add(JLabel0, new GBC(0, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
-        topJpanel.add(comboBox, new GBC(1, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
-        topJpanel.add(JLabel1, new GBC(2, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
-        topJpanel.add(comboBox1, new GBC(3, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
-        topJpanel.add(JLabel2, new GBC(4, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
-        topJpanel.add(comboBox2, new GBC(5, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
-        topJpanel.add(JLabel3, new GBC(6, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
-        topJpanel.add(comboBox3, new GBC(7, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
-        topJpanel.add(JLabel4, new GBC(8, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
-        topJpanel.add(comboBox4, new GBC(9, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
+        topJpanel2.add(JLabel0, new GBC(0, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
+        topJpanel2.add(comboBox, new GBC(1, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
+        topJpanel2.add(JLabel1, new GBC(2, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
+        topJpanel2.add(comboBox1, new GBC(3, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
+        topJpanel2.add(JLabel2, new GBC(4, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
+        topJpanel2.add(comboBox2, new GBC(5, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
+        topJpanel2.add(JLabel3, new GBC(6, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
+        topJpanel2.add(comboBox3, new GBC(7, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
+        topJpanel2.add(JLabel4, new GBC(8, 0, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
+        topJpanel2.add(comboBox4, new GBC(9, 0, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
 
-        topJpanel.add(sb, new GBC(0, 1, 2, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
-        topJpanel.add(query, new GBC(2, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
-        topJpanel.add(comboBox5, new GBC(3, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
-        topJpanel.add(btnTjz, new GBC(5, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
+        topJpanel2.add(JLabel5, new GBC(0, 1, 1, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
+        topJpanel2.add(comboBox56, new GBC(1, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
+        topJpanel2.add(JLabel6, new GBC(2, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
+        topJpanel2.add(comboBox6, new GBC(3, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
+        topJpanel2.add(sb, new GBC(4, 1, 2, 1).setAnchor(GBC.SOUTHEAST).setInsets(5));
+        topJpanel2.add(query, new GBC(6, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
+        topJpanel2.add(comboBox5, new GBC(7, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
+        topJpanel2.add(btnTjz, new GBC(9, 1, 1, 1).setAnchor(GBC.SOUTHWEST).setInsets(5));
 
-        list = level3Service.getNodeList(shipList.get(0).getId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0], null);
+        list = level3Service.getNodeList(shipList.get(0).getId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0], Math.toIntExact(isealCabin[0].getId()), Math.toIntExact(isealCabin[0].getId()), null);
 
         columnDto = new ArrayList<>();
         //columnDto.add(new ColumnDto("ID", "id", -1, null,false));
-        columnDto.add(new ColumnDto("搴忓彿", "", 227, "autoCreate", false, null, null));
-        //columnDto.add(new ColumnDto("宸ョ▼", "ProjectName", 150, null, false, null, null));
-        columnDto.add(new ColumnDto("璁惧鍚嶇О", "name", 227, null, true, null, null));
-        columnDto.add(new ColumnDto("璁惧鎷嗗嵏鍑鸿埍", "time1Color", 227, "Circle", true, null, null));
-        columnDto.add(new ColumnDto("璁惧鍒嗕氦", "time2Color", 227, "Circle", true, null, null));
-        columnDto.add(new ColumnDto("鎷嗘閴村畾", "time3Color", 227, "Circle", true, null, null));
-        columnDto.add(new ColumnDto("璁惧杩斿巶", "time4Color", 227, "Circle", true, null, null));
-        columnDto.add(new ColumnDto("鍥炶", "time5Color", 227, "Circle", true, null, null));
-
+        columnDto = getColumnDtoByType(typeList[0]);
         table = CommonTable.createCommonTable(list, columnDto);
         table.setRowHeight(25);
 
@@ -148,9 +167,27 @@
                 int row = table.rowAtPoint(point);
                 int column = table.columnAtPoint(point);
 
-                if (row <= list.size() && column > 1) {
+                if (row <= list.size() && column > 3) {
+                    List<TableNodeDto> filteredData = list;
+                    if (comboBox5.getSelectedItem() instanceof String) {
+
+                    } else {
+                        ColorDescription selectedColorDescription = (ColorDescription) comboBox5.getSelectedItem();
+                        if (selectedColorDescription != null) {
+                            String selectedHexColor = selectedColorDescription.getHexColor();
+                            if (StringUtils.isNotBlank(selectedHexColor)) {
+                                filteredData = list.stream()
+                                        .filter(dto -> dto.getTime1Color() != null && dto.getTime1Color().equals(selectedHexColor) ||
+                                                dto.getTime2Color() != null && dto.getTime2Color().equals(selectedHexColor) ||
+                                                dto.getTime3Color() != null && dto.getTime3Color().equals(selectedHexColor) ||
+                                                dto.getTime4Color() != null && dto.getTime4Color().equals(selectedHexColor) ||
+                                                dto.getTime5Color() != null && dto.getTime5Color().equals(selectedHexColor))
+                                        .collect(Collectors.toList());
+                            }
+                        }
+                    }
                     String hexColor = (String) table.getValueAt(row, column);
-                    String tooltip = getTooltipText(hexColor);
+                    String tooltip = getTooltipText(hexColor, filteredData.get(row));
                     table.setToolTipText(tooltip);
                 } else {
                     table.setToolTipText(null);
@@ -167,15 +204,16 @@
                 JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem();
                 JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem();
                 String type = comboBox4.getSelectedItem().toString();
+                JComboBoxItem isCabin = (JComboBoxItem) comboBox56.getSelectedItem();
+                JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem();
 
                 Long shipId = shipMap.get(content);
-                list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, null);
-
+                list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()), Math.toIntExact(isLt.getId()), null);
+                columnDto = getColumnDtoByType(type);
                 CommonTable.refreshTable(list, columnDto, table);
                 table.setRowHeight(25);
 
                 table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
-
             }
         });
         comboBox1.addItemListener(new ItemListener() {
@@ -195,8 +233,12 @@
                         JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem();
                         String type = comboBox4.getSelectedItem().toString();
 
+                        JComboBoxItem isCabin = (JComboBoxItem) comboBox56.getSelectedItem();
+                        JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem();
+
                         Long shipId = shipMap.get(content);
-                        list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, null);
+                        list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()), Math.toIntExact(isLt.getId()), null);
+                        columnDto = getColumnDtoByType(type);
                         CommonTable.refreshTable(list, columnDto, table);
                         table.setRowHeight(25);
 
@@ -215,10 +257,13 @@
                 JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem();
                 JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem();
                 String type = comboBox4.getSelectedItem().toString();
+                JComboBoxItem isCabin = (JComboBoxItem) comboBox56.getSelectedItem();
+                JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem();
 
                 Long shipId = shipMap.get(content);
-                list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, null);
+                list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()), Math.toIntExact(isLt.getId()), null);
 
+                columnDto = getColumnDtoByType(type);
                 CommonTable.refreshTable(list, columnDto, table);
                 table.setRowHeight(25);
 
@@ -234,8 +279,12 @@
                 JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem();
                 String type = comboBox4.getSelectedItem().toString();
 
+                JComboBoxItem isCabin = (JComboBoxItem) comboBox56.getSelectedItem();
+                JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem();
+
                 Long shipId = shipMap.get(content);
-                list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, null);
+                list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()), Math.toIntExact(isLt.getId()), null);
+                columnDto = getColumnDtoByType(type);
 
                 CommonTable.refreshTable(list, columnDto, table);
                 table.setRowHeight(25);
@@ -252,9 +301,58 @@
                 JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem();
                 String type = comboBox4.getSelectedItem().toString();
 
-                Long shipId = shipMap.get(content);
-                list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, null);
+                JComboBoxItem isCabin = (JComboBoxItem) comboBox56.getSelectedItem();
+                JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem();
 
+                Long shipId = shipMap.get(content);
+                list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()), Math.toIntExact(isLt.getId()), null);
+
+                columnDto = getColumnDtoByType(type);
+                CommonTable.refreshTable(list, columnDto, table);
+                table.setRowHeight(25);
+
+                table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+
+            }
+        });
+
+        comboBox56.addItemListener(new ItemListener() {
+            public void itemStateChanged(final ItemEvent event) {
+                String content = comboBox.getSelectedItem().toString();
+                JComboBoxItem dept = (JComboBoxItem) comboBox1.getSelectedItem();
+                JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem();
+                JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem();
+                String type = comboBox4.getSelectedItem().toString();
+
+                JComboBoxItem isCabin = (JComboBoxItem) comboBox56.getSelectedItem();
+                JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem();
+
+                Long shipId = shipMap.get(content);
+                list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()), Math.toIntExact(isLt.getId()), null);
+
+                columnDto = getColumnDtoByType(type);
+                CommonTable.refreshTable(list, columnDto, table);
+                table.setRowHeight(25);
+
+                table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+
+            }
+        });
+        comboBox6.addItemListener(new ItemListener() {
+            public void itemStateChanged(final ItemEvent event) {
+                String content = comboBox.getSelectedItem().toString();
+                JComboBoxItem dept = (JComboBoxItem) comboBox1.getSelectedItem();
+                JComboBoxItem team = (JComboBoxItem) comboBox2.getSelectedItem();
+                JComboBoxItem cabin = (JComboBoxItem) comboBox3.getSelectedItem();
+                String type = comboBox4.getSelectedItem().toString();
+
+                JComboBoxItem isCabin = (JComboBoxItem) comboBox56.getSelectedItem();
+                JComboBoxItem isLt = (JComboBoxItem) comboBox6.getSelectedItem();
+
+                Long shipId = shipMap.get(content);
+                list = level3Service.getNodeList(shipId, dept.getId(), team.getId(), cabin.getId(), type, Math.toIntExact(isCabin.getId()), Math.toIntExact(isLt.getId()), null);
+
+                columnDto = getColumnDtoByType(type);
                 CommonTable.refreshTable(list, columnDto, table);
                 table.setRowHeight(25);
 
@@ -266,8 +364,9 @@
         query.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
-                list = level3Service.getNodeList(null, null, null, null, null, sb.getText());
-
+                String type = comboBox4.getSelectedItem().toString();
+                list = level3Service.getNodeList(null, null, null, null, type, null, null, sb.getText());
+                columnDto = getColumnDtoByType(type);
                 CommonTable.refreshTable(list, columnDto, table);
                 table.setRowHeight(25);
 
@@ -287,7 +386,42 @@
             public void actionPerformed(ActionEvent e) {
                 String content = comboBox.getSelectedItem().toString();
                 Long shipId = shipMap.get(content);
-                statisProductService.createTable(frame,shipId);
+                String type = comboBox4.getSelectedItem().toString();
+                statisProductService.createTable(frame, shipId, type);
+            }
+        });
+
+        comboBox5.addItemListener(new ItemListener() {
+            @Override
+            public void itemStateChanged(ItemEvent e) {
+                if (e.getStateChange() == ItemEvent.SELECTED) {
+                    if (comboBox5.getSelectedItem() instanceof String) {
+                        return;
+                    }
+                    ColorDescription selectedColorDescription = (ColorDescription) comboBox5.getSelectedItem();
+                    if (selectedColorDescription != null) {
+                        String selectedHexColor = selectedColorDescription.getHexColor();
+                        if (StringUtils.isNotBlank(selectedHexColor)) {
+                            List<TableNodeDto> filteredData = list.stream()
+                                    .filter(dto -> dto.getTime1Color() != null && dto.getTime1Color().equals(selectedHexColor) ||
+                                            dto.getTime2Color() != null && dto.getTime2Color().equals(selectedHexColor) ||
+                                            dto.getTime3Color() != null && dto.getTime3Color().equals(selectedHexColor) ||
+                                            dto.getTime4Color() != null && dto.getTime4Color().equals(selectedHexColor) ||
+                                            dto.getTime5Color() != null && dto.getTime5Color().equals(selectedHexColor))
+                                    .collect(Collectors.toList());
+                            CommonTable.refreshTable(filteredData, columnDto, table);
+                        }else{
+                            String type = comboBox4.getSelectedItem().toString();
+                            list = level3Service.getNodeList(null, null, null, null, type, null, null, sb.getText());
+                            columnDto = getColumnDtoByType(type);
+                            CommonTable.refreshTable(list, columnDto, table);
+                            table.setRowHeight(25);
+
+                            table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+
+                        }
+                    }
+                }
             }
         });
 
@@ -295,13 +429,13 @@
         JScrollPane scrollPane = new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
         scrollPane.setViewportView(table);
         scrollPane.getViewport().setBackground(Color.WHITE);
-        scrollPane.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeightWithScroll(95,frame)));
+        scrollPane.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeightWithScroll(145, frame)));
         centerJpanel.add(scrollPane);
         frame.addComponentListener(new ComponentAdapter() {
             @Override
             public void componentResized(ComponentEvent e) {
-                centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(95,frame)));
-                scrollPane.setPreferredSize(new Dimension(width - 20,Compute.ComputeHeightWithScroll(95,frame)));
+                centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(145, frame)));
+                scrollPane.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeightWithScroll(145, frame)));
                 centerJpanel.revalidate();
                 centerJpanel.repaint();
                 scrollPane.revalidate();
@@ -311,24 +445,65 @@
 
         return panel;
     }
+    private JComboBoxItem[] createIsealCabinItems() {
+        return new JComboBoxItem[]{
+                new JComboBoxItem(10000L, ""),
+                new JComboBoxItem(0L, "鍚�"),
+                new JComboBoxItem(1L, "鏄�")
+        };
+    }
 
-    private static String getTooltipText(String hexColor) {
+    private List<ColumnDto> getColumnDtoByType(String type) {
+        List<ColumnDto> columns = new ArrayList<>();
+        if ("淇悊".equals(type)) {
+            columns.add(new ColumnDto("搴忓彿", "", 100, "autoCreate", false, null, null));
+            columns.add(new ColumnDto("璁惧鍚嶇О", "name", 327, null, true, null, null));
+            columns.add(new ColumnDto("鏄惁褰卞搷灏佽埍", "isealCabin", 160, "dict", false, null, createIsealCabinItems()));
+            columns.add(new ColumnDto("鏄惁鑱旇皟", "islt", 100, "dict", false, null, createIsealCabinItems()));
+            columns.add(new ColumnDto("璁惧鎷嗗嵏鍑鸿埍", "time1Color", 187, "Circle", true, null, null));
+            columns.add(new ColumnDto("璁惧鍒嗕氦", "time2Color", 187, "Circle", true, null, null));
+            columns.add(new ColumnDto("鎷嗘閴村畾", "time3Color", 187, "Circle", true, null, null));
+            columns.add(new ColumnDto("璁惧杩斿巶", "time4Color", 187, "Circle", true, null, null));
+            columns.add(new ColumnDto("鍥炶", "time5Color", 187, "Circle", true, null, null));
+        } else if ("鏀规崲瑁�".equals(type) || "鏀硅繘鎬т慨鐞�".equals(type)) {
+            columns.add(new ColumnDto("搴忓彿", "", 144, "autoCreate", false, null, null));
+            columns.add(new ColumnDto("璁惧鍚嶇О", "name", 320, null, true, null, null));
+            columns.add(new ColumnDto("鏄惁褰卞搷灏佽埍", "isealCabin", 320, "dict", false, null, createIsealCabinItems()));
+            columns.add(new ColumnDto("鏄惁鑱旇皟", "islt", 144, "dict", false, null, createIsealCabinItems()));
+            columns.add(new ColumnDto("璁惧鍒板巶", "time1Color", 320, "Circle", true, null, null));
+            columns.add(new ColumnDto("璁惧瀹夎", "time2Color", 320, "Circle", true, null, null));
+        } else if ("涓嶅瑁呰澶�".equals(type)) {
+            columns.add(new ColumnDto("搴忓彿", "", 100, "autoCreate", false, null, null));
+            columns.add(new ColumnDto("璁惧鍚嶇О", "name", 320, null, true, null, null));
+            columns.add(new ColumnDto("鏄惁褰卞搷灏佽埍", "isealCabin", 160, "dict", false, null, createIsealCabinItems()));
+            columns.add(new ColumnDto("鏄惁鑱旇皟", "islt", 100, "dict", false, null, createIsealCabinItems()));
+            columns.add(new ColumnDto("鎷嗗嵏鍑鸿埍", "time1Color", 155, "Circle", true, null, null));
+            columns.add(new ColumnDto("鍏ュ簱", "time2Color", 155, "Circle", true, null, null));
+            columns.add(new ColumnDto("瀛樻斁浣嶇疆", "time3Color", 155, "Circle", true, null, null));
+            columns.add(new ColumnDto("绉讳氦T闃�", "time4Color", 155, "Circle", true, null, null));
+            columns.add(new ColumnDto("澶囨敞", "remark", 300, null, false, null, null));
+        }
+        return columns;
+    }
+
+    private static String getTooltipText(String hexColor, TableNodeDto tableNodeDto) {
         switch (hexColor) {
             case "#3498DB":
                 return "杩涜涓�";
             case "#F1C40F":
-                return "涓存湡";
+                return tableNodeDto.getLqText();
             case "#E74C3C":
-                return "閫炬湡";
+                return tableNodeDto.getYqText();
             case "#2ECC71":
                 return "姝e父瀹屾垚";
             case "#006400":
-                return "瓒呮湡瀹屾垚";
+                return tableNodeDto.getCqText();
             default:
                 return "鏈紑濮�";
         }
     }
 
+
 }
 
 

--
Gitblit v1.9.1