jinlin
2025-03-21 77d58298d00c11ade8862ca8acb0fdef5a45322e
src/main/java/com/example/client/service/Level1ManageService.java
@@ -34,6 +34,8 @@
    @Autowired
    private DjJdgzShipService djJdgzShipService;
    @Autowired
    private ShipManageService shipManageService;
    @Autowired
    private Level1AddOrUpdate addOrUpdate; // 注入 AddOrupdate 实例
    private JTable table;
@@ -57,9 +59,11 @@
        List<DjJdgzShip> shipList = djJdgzShipService.getList();
        JComboBox comboBox = new JComboBox();
        JButton btnInsert = new JButton("新增");
        JButton btnShip = new JButton("X号管理");
        topJpanel.add(comboBox);
        topJpanel.add(btnInsert);
        topJpanel.add(btnShip);
        comboBox.setPreferredSize(new Dimension(300, 28));
@@ -114,6 +118,13 @@
                insert(jFrame);
            }
        });
        btnShip.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                jFrame.setEnabled(false);
                shipManageService.createTable(jFrame);
            }
        });
        JScrollPane scrollPane = new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        scrollPane.setViewportView(table);
@@ -158,7 +169,7 @@
                new JComboBoxItem(1L, "三级"),
        };
        JLabel JLabel1 = new JLabel("玄号");
        JLabel JLabel1 = new JLabel("X号");
        JComboBox<JComboBoxItem> comboBox0 = new JComboBox<>(shipList);
        comboBox0.setPreferredSize(new Dimension(185, 28));