| | |
| | | import com.example.server.progressTrack.service.DjJdgzNetworkLevel3ListService; |
| | | import com.example.server.progressTrack.service.NetWorkDiagramService; |
| | | import com.example.server.teamGroup.service.SysTeamGroupClassService; |
| | | import com.example.server.user.model.SysUser; |
| | | import com.example.server.utils.CacheUtils; |
| | | import com.mxgraph.swing.mxGraphComponent; |
| | | import com.mxgraph.view.mxGraph; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | mxGraphComponent graphComponent = new mxGraphComponent(graph); |
| | | graphComponent.setConnectable(false); |
| | | graphComponent.setDragEnabled(false); |
| | | graphComponent.zoomTo(2, true); |
| | | graphComponent.zoomTo(1, true); |
| | | diagram.add(graphComponent); |
| | | |
| | | mxGraph finalGraph = graph; |
| | |
| | | btnSave.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | SysUser user = (SysUser) CacheUtils.get("user","user"); |
| | | if (user==null){ |
| | | JOptionPane.showMessageDialog(null, "用户失效请退出并重新登录", "提示", JOptionPane.WARNING_MESSAGE); |
| | | return; |
| | | } |
| | | if (subTable.isEditing()) { |
| | | subTable.getCellEditor().stopCellEditing(); |
| | | } |
| | | CommonTable.saveTableList(finalList, subTable, columnDto); |
| | | level3ListService.save(finalList, data.getId(), diagram, finalGraph1); |
| | | JOptionPane.showMessageDialog(null, "保存成功", "提示", JOptionPane.WARNING_MESSAGE); |
| | | } |
| | | }); |
| | | |