feat: menu display follow NE installed

This commit is contained in:
zhangsz
2025-07-17 17:43:35 +08:00
parent 990070df2c
commit 74003786a9
4 changed files with 22 additions and 16 deletions

View File

@@ -218,13 +218,13 @@ INSERT INTO `sys_menu` VALUES (2166, 'menu.dashboard.overview.smfUeNum', 2087, 2
INSERT INTO `sys_menu` VALUES (2167, 'menu.dashboard.overview.imsUeNum', 2087, 4, '#', '', '1', '1', 'B', '1', '1', 'dashboard:overview:imsUeNum', '#', 'supervisor', 1721902269805, '', 0, '');
INSERT INTO `sys_menu` VALUES (2168, 'menu.dashboard.overview.gnbBase', 2087, 6, '#', '', '1', '1', 'B', '1', '1', 'dashboard:overview:gnbBase', '#', 'supervisor', 1721902269805, '', 0, '');
INSERT INTO `sys_menu` VALUES (2169, 'menu.dashboard.overview.enbBase', 2087, 8, '#', '', '1', '1', 'B', '1', '1', 'dashboard:overview:enbBase', '#', 'supervisor', 1721902269805, '', 0, '');
INSERT INTO `sys_menu` VALUES (20000, 'menu.psap.agent', 0, 5, 'psapAgent', '', '1', '0', 'D', '1', '1', '', 'icon-tubiaoku', 'supervisor', 1711352709786, 'admin', 1744623120667, '');
INSERT INTO `sys_menu` VALUES (20001, 'menu.psap.agent.callings', 20000, 1, 'callings', 'agentManage/callings/index', '1', '0', 'M', '1', '1', 'agentManage:callings:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747795951448, '');
INSERT INTO `sys_menu` VALUES (20002, 'menu.psap.agent.callback', 20000, 4, 'callback', 'agentManage/callback/index', '1', '0', 'M', '1', '1', 'agentManage:callback:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
INSERT INTO `sys_menu` VALUES (20000, 'menu.psap.agent', 0, 5, 'psapAgent', '', '1', '0', 'D', '1', '1', 'mf#agentManage', 'icon-tubiaoku', 'supervisor', 1711352709786, 'admin', 1744623120667, '');
INSERT INTO `sys_menu` VALUES (20001, 'menu.psap.agent.callings', 20000, 1, 'callings', 'agentManage/callings/index', '1', '0', 'M', '1', '1', 'mf#agentManage:callings:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747795951448, '');
INSERT INTO `sys_menu` VALUES (20002, 'menu.psap.agent.callback', 20000, 4, 'callback', 'agentManage/callback/index', '1', '0', 'M', '1', '1', 'mf#agentManage:callback:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
INSERT INTO `sys_menu` VALUES (20003, 'menu.psap.cdr', 0, 7, 'psapCDR', '', '1', '0', 'D', '1', '1', '', 'icon-tubiaoku', 'supervisor', 1711352709786, 'admin', 1744623120667, '');
INSERT INTO `sys_menu` VALUES (20004, 'menu.psap.cdr.mf', 20003, 1, 'mfCDR', 'dashboard/mfCDR/index', '1', '0', 'M', '1', '1', 'dashboard:cdr:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
INSERT INTO `sys_menu` VALUES (20005, 'menu.psap.cdr.crbt', 20003, 5, 'imsCDR', 'dashboard/imsCDR/index', '1', '0', 'M', '1', '1', 'dashboard:cdr:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
INSERT INTO `sys_menu` VALUES (20006, 'menu.psap.cdr.mms', 20003, 9, 'smscCDR', 'dashboard/smscCDR/index', '1', '0', 'M', '1', '1', 'dashboard:cdr:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
INSERT INTO `sys_menu` VALUES (20007, 'menu.psap.cbc.cbe', 0, 6, 'cbe', 'cbc/cbe/index', '1', '0', 'M', '1', '1', 'dashboard:cdr:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
INSERT INTO `sys_menu` VALUES (20004, 'menu.psap.cdr.mf', 20003, 1, 'mfCDR', 'dashboard/mfCDR/index', '1', '0', 'M', '1', '1', 'mf#dashboard:cdr:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
INSERT INTO `sys_menu` VALUES (20005, 'menu.psap.cdr.crbt', 20003, 5, 'imsCDR', 'dashboard/imsCDR/index', '1', '0', 'M', '1', '1', 'ims#dashboard:cdr:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
INSERT INTO `sys_menu` VALUES (20006, 'menu.psap.cdr.mms', 20003, 9, 'smscCDR', 'dashboard/smscCDR/index', '1', '0', 'M', '1', '1', 'smsc#dashboard:cdr:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
INSERT INTO `sys_menu` VALUES (20007, 'menu.psap.cbc.cbe', 0, 6, 'cbe', 'cbc/cbe/index', '1', '0', 'M', '1', '1', 'cbc#dashboard:cdr:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
SET FOREIGN_KEY_CHECKS = 1;

View File

@@ -2,20 +2,19 @@ SET FOREIGN_KEY_CHECKS=0;
UPDATE `sys_menu` SET `visible` = '1', `status` = '1', `update_by` = 'supervisor', `update_time` = (UNIX_TIMESTAMP(NOW(3)) * 1000) WHERE `menu_id` = 2143;
REPLACE INTO `sys_menu` VALUES (20000, 'menu.psap.agent', 0, 5, 'psapAgent', '', '1', '0', 'D', '1', '1', '', 'icon-tubiaoku', 'supervisor', 1711352709786, 'admin', 1744623120667, '');
REPLACE INTO `sys_menu` VALUES (20001, 'menu.psap.agent.callings', 20000, 1, 'callings', 'agentManage/callings/index', '1', '0', 'M', '1', '1', 'agentManage:callings:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747795951448, '');
REPLACE INTO `sys_menu` VALUES (20002, 'menu.psap.agent.callback', 20000, 4, 'callback', 'agentManage/callback/index', '1', '0', 'M', '1', '1', 'agentManage:callback:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
REPLACE INTO `sys_menu` VALUES (20000, 'menu.psap.agent', 0, 5, 'psapAgent', '', '1', '0', 'D', '1', '1', 'mf#agentManage', 'icon-tubiaoku', 'supervisor', 1711352709786, 'admin', 1744623120667, '');
REPLACE INTO `sys_menu` VALUES (20001, 'menu.psap.agent.callings', 20000, 1, 'callings', 'agentManage/callings/index', '1', '0', 'M', '1', '1', 'mf#agentManage:callings:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747795951448, '');
REPLACE INTO `sys_menu` VALUES (20002, 'menu.psap.agent.callback', 20000, 4, 'callback', 'agentManage/callback/index', '1', '0', 'M', '1', '1', 'mf#agentManage:callback:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
REPLACE INTO `sys_menu` VALUES (20003, 'menu.psap.cdr', 0, 7, 'psapCDR', '', '1', '0', 'D', '1', '1', '', 'icon-tubiaoku', 'supervisor', 1711352709786, 'admin', 1744623120667, '');
REPLACE INTO `sys_menu` VALUES (20004, 'menu.psap.cdr.mf', 20003, 1, 'mfCDR', 'dashboard/mfCDR/index', '1', '0', 'M', '1', '1', 'dashboard:cdr:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
REPLACE INTO `sys_menu` VALUES (20005, 'menu.psap.cdr.crbt', 20003, 5, 'imsCDR', 'dashboard/imsCDR/index', '1', '0', 'M', '1', '1', 'dashboard:cdr:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
REPLACE INTO `sys_menu` VALUES (20006, 'menu.psap.cdr.mms', 20003, 9, 'smscCDR', 'dashboard/smscCDR/index', '1', '0', 'M', '1', '1', 'dashboard:cdr:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
REPLACE INTO `sys_menu` VALUES (20004, 'menu.psap.cdr.mf', 20003, 1, 'mfCDR', 'dashboard/mfCDR/index', '1', '0', 'M', '1', '1', 'mf#dashboard:cdr:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
REPLACE INTO `sys_menu` VALUES (20005, 'menu.psap.cdr.crbt', 20003, 5, 'imsCDR', 'dashboard/imsCDR/index', '1', '0', 'M', '1', '1', 'ims#dashboard:cdr:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
REPLACE INTO `sys_menu` VALUES (20006, 'menu.psap.cdr.mms', 20003, 9, 'smscCDR', 'dashboard/smscCDR/index', '1', '0', 'M', '1', '1', 'smsc#dashboard:cdr:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
REPLACE INTO `sys_menu` VALUES (20007, 'menu.psap.cbc.cbe', 0, 6, 'cbe', 'cbc/cbe/index', '1', '0', 'M', '1', '1', 'cbc#dashboard:cdr:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
UPDATE `sys_menu` SET `menu_name` = 'menu.dashboard.imsCDR', `parent_id` = 0, `menu_sort` = 4, `path` = 'mfCDR', `component` = 'dashboard/mfCDR/index', `is_frame` = '1', `is_cache` = '0', `menu_type` = 'M', `visible` = '0', `status` = '1', `perms` = 'dashboard:cdr:index', `icon` = 'icon-paixu', `create_by` = 'supervisor', `create_time` = 1705550000000, `update_by` = 'supervisor', `update_time` = 1744706214818, `remark` = '' WHERE `menu_id` = 2133;
UPDATE `sys_menu` SET `menu_name` = 'menu.psap.cdr', `parent_id` = 0, `menu_sort` = 10, `path` = 'psapCDR', `component` = '', `is_frame` = '1', `is_cache` = '0', `menu_type` = 'D', `visible` = '1', `status` = '1', `perms` = '', `icon` = 'icon-tubiaoku', `create_by` = 'supervisor', `create_time` = 1711352709786, `update_by` = 'admin', `update_time` = 1744623120667, `remark` = '' WHERE `menu_id` = 2140;
REPLACE INTO `sys_menu` VALUES (20007, 'menu.psap.cbc.cbe', 0, 6, 'cbe', 'cbc/cbe/index', '1', '0', 'M', '1', '1', 'dashboard:cdr:index', 'icon-tubiaoku', 'supervisor', 1711352709786, 'supervisor', 1747796007372, '');
UPDATE `sys_menu` SET `menu_name` = 'menu.tools', `parent_id` = 0, `menu_sort` = 60, `path` = 'tool', `component` = '', `is_frame` = '1', `is_cache` = '1', `menu_type` = 'D', `visible` = '1', `status` = '1', `perms` = '', `icon` = 'icon-wenjian', `create_by` = 'supervisor', `create_time` = 1700000000000, `update_by` = 'supervisor', `update_time` = 1752564026249, `remark` = 'menu.toolsRemark' WHERE `menu_id` = 60;
UPDATE `sys_menu` SET `menu_name` = 'menu.log.login', `parent_id` = 2089, `menu_sort` = 26, `path` = 'login', `component` = 'system/log/login/index', `is_frame` = '1', `is_cache` = '1', `menu_type` = 'M', `visible` = '1', `status` = '1', `perms` = 'system:log:login:list', `icon` = 'icon-fuzhidaima', `create_by` = 'supervisor', `create_time` = 1700000000000, `update_by` = 'supervisor', `update_time` = 1752477698857, `remark` = 'menu.log.loginRemark' WHERE `menu_id` = 501;

View File

@@ -13,5 +13,6 @@ type RouterMeta struct {
// 在菜单中隐藏子节点
HideChildInMenu bool `json:"hideChildInMenu"`
// 在菜单中隐藏自己和子节点
HideInMenu bool `json:"hideInMenu"`
HideInMenu bool `json:"hideInMenu"`
NeType []string `json:"neType,omitempty"` // 网元类型,默认全部,有指定类型的,需要添加网元才会显示
}

View File

@@ -283,6 +283,12 @@ func (r *SysMenuImpl) getRouteMeta(sysMenu model.SysMenu) vo.RouterMeta {
meta.Target = "_blank"
}
// 网元类型菜单显示权限
if strings.Contains(sysMenu.Perms, "#") {
firstIndex := strings.Index(sysMenu.Perms, "#")
meta.NeType = strings.Split(strings.ToUpper(sysMenu.Perms[:firstIndex]), ",")
}
return meta
}