| | |
| | | import com.example.server.progressTrack.service.DjJdgzNetworkLevel3Service; |
| | | import com.example.server.progressTrack.service.DjJdgzTrackRecordService; |
| | | import com.example.server.teamGroup.service.SysTeamGroupClassService; |
| | | import com.example.server.user.model.SysUser; |
| | | import com.example.server.utils.CacheUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | topJpanel.setBackground(Color.WHITE); |
| | | |
| | | JPanel centerJpanel = new JPanel(); |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(100,jFrame))); |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(105, jFrame))); |
| | | centerJpanel.setBackground(Color.WHITE); |
| | | panel.add(topJpanel, BorderLayout.NORTH); |
| | | panel.add(centerJpanel, BorderLayout.CENTER); |
| | |
| | | |
| | | JComboBoxItem[] teamList = sysTeamGroupClassService.getTeamList(null); |
| | | String[] typeList = new String[]{ |
| | | "改装", "加装", "换装", "改进性修理", "" |
| | | "","改装", "加装", "换装", "改进性修理" |
| | | }; |
| | | |
| | | JLabel JLabel0 = new JLabel("工程"); |
| | |
| | | btnImport.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | jFrame.setEnabled(false); |
| | | JComboBoxItem selectedItemNow = (JComboBoxItem) comboBox.getSelectedItem(); |
| | | importTrackRecordService.FileUpload(columnDto, table, jFrame); |
| | | } |
| | | }); |
| | | |
| | | list = djJdgzTrackRecordService.getList(projectList[0].getId(), deptList[0].getId(), teamList[0].getId(), cabinList[0].getId(), typeList[0], Math.toIntExact(statusList[0].getId()), null); |
| | | if (list == null || list.size() == 0) { |
| | | JOptionPane.showMessageDialog(null, "还未录入三级网络图数据", "提示", JOptionPane.WARNING_MESSAGE); |
| | | return null; |
| | | } |
| | | |
| | | List<TableButton> buttonList = new ArrayList<>(); |
| | | buttonList.add(new TableButton("edit", "编辑")); |
| | | |
| | |
| | | |
| | | String[] items = itemList.toArray(new String[0]); |
| | | columnModel = table.getColumnModel(); |
| | | MultiSelectComboBox2 mulcomboBox = new MultiSelectComboBox2(items,columnDto,columnModel); |
| | | MultiSelectComboBox2 mulcomboBox = new MultiSelectComboBox2(items, columnDto, columnModel); |
| | | |
| | | /* final Integer[] lastIndex = {-1}; |
| | | mulcomboBox.addItemListener(new ItemListener() { |
| | |
| | | Object cellValue = table.getValueAt(row, column); |
| | | Integer value = Integer.parseInt(cellValue.toString()); |
| | | if (value > 0) { |
| | | jFrame.setEnabled(false); |
| | | DjJdgzTrackRecord djJdgzTrackRecord = list.get(row); |
| | | history(jFrame, djJdgzTrackRecord.getLevel3NodeId()); |
| | | } |
| | |
| | | btnTj.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | jFrame.setEnabled(false); |
| | | JComboBoxItem selectedItemNow = (JComboBoxItem) comboBox.getSelectedItem(); |
| | | statistReportsService.createTable(jFrame, selectedItemNow.getId()); |
| | | } |
| | |
| | | btnJc.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | jFrame.setEnabled(false); |
| | | JComboBoxItem selectedItemNow = (JComboBoxItem) comboBox.getSelectedItem(); |
| | | progressPromptService.createTable(jFrame, selectedItemNow.getId()); |
| | | } |
| | |
| | | btnExport.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | jFrame.setEnabled(false); |
| | | exportTrackRecordService.openDialog(jFrame); |
| | | } |
| | | }); |
| | |
| | | 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(100,jFrame))); |
| | | scrollPane.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeightWithScroll(105, jFrame))); |
| | | centerJpanel.add(scrollPane); |
| | | jFrame.addComponentListener(new ComponentAdapter() { |
| | | @Override |
| | | public void componentResized(ComponentEvent e) { |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(100,jFrame))); |
| | | scrollPane.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeightWithScroll(100,jFrame))); |
| | | centerJpanel.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeight(105, jFrame))); |
| | | scrollPane.setPreferredSize(new Dimension(width - 20, Compute.ComputeHeightWithScroll(105, jFrame))); |
| | | centerJpanel.revalidate(); |
| | | centerJpanel.repaint(); |
| | | scrollPane.revalidate(); |
| | |
| | | Object newValue = table.getModel().getValueAt(row, column); |
| | | // 输出变化信息 |
| | | if (newValue.equals("edit")) { |
| | | jFrame.setEnabled(false); |
| | | DjJdgzTrackRecord data = recordList.get(row); |
| | | Long level1Id = data.getLevel1NetworkId(); |
| | | data.setProcessName(data.getLevel3NodeName()); |
| | |
| | | data.setRepairUnitContact(level3.getRepairUnitContact()); |
| | | } |
| | | addOrUpdate.openDialog(data, jFrame, level1Id, columnDto, table); |
| | | jFrame.setEnabled(false); |
| | | } else { |
| | | |
| | | } |
| | |
| | | int row = table.rowAtPoint(e.getPoint()); |
| | | int col = table.columnAtPoint(e.getPoint()); |
| | | DjJdgzTrackRecord djJdgzTrackRecord = list.get(row); |
| | | if (djJdgzTrackRecord.getCurrentStatus() == 1) { |
| | | String site = (String) CacheUtils.get("site", "site"); |
| | | |
| | | if (djJdgzTrackRecord.getCurrentStatus() == 1 && site.equals("工作组")) { |
| | | table.setRowSelectionInterval(row, row); |
| | | popupMenu.show(e.getComponent(), e.getX(), e.getY()); |
| | | menuItem1.addActionListener(ex -> { |