package com.example.client.service;
import com.example.client.Main;
import com.example.server.menu.model.Menu;
import com.example.server.menu.service.SysMenuService;
import com.example.server.utils.UserAndSiteUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;
import java.util.List;
import java.util.stream.Collectors;
@Service
public class MenuService {
@Autowired
private SysMenuService menuService;
@Autowired
private Level1ManageService level1ManageService;
@Autowired
private Level1ViewService level1ViewService;
@Autowired
private Level2ManageService level2ManageService;
@Autowired
private Level2ViewService level2ViewService;
@Autowired
private Level3ManageService level3ManageService;
@Autowired
private Level3ViewService level3ViewService;
@Autowired
private Level3View2Service level3View2Service;
@Autowired
private TrackRecordManageService trackRecordManageService;
@Autowired
private HandoverService handoverService;
@Autowired
private DataImportManageService dataImportManageService;
@Autowired
private DataExportManageService dataExportManageService;
@Autowired
private UserManageService userManageService;
@Autowired
private DismantTrackService dismantTrackService;
@Autowired
private SubunitService subunitService;
@Autowired
private TeamGroupManageService teamGroupManageService;
@Autowired
private ConfigManageService configManageService;
@Autowired
private Main main;
private Long nodeId;
public JTree createTree(Integer width,Integer height,JFrame frame) {
Menu node = new Menu();
node.setId(0L);
node.setMenuName("默认根节点");
DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(node);
String site = (String) UserAndSiteUtils.get("site", "site");
List