fix(menu): modId 按真实 /base/GetUserMod 校正(1/2/3/4/21/89/91),撤销上版误值
build / build (push) Successful in 2m59s
build / build (push) Successful in 2m59s
- 上版(693aba9)照31ca694提交说明的假设值 1000/…/2100,与后端实际返回不符。 真实 modId:已收到1 已发送2 全部通知3 通知统计4 应用设置21 待审核89 抄送91。 - 深层页回到 parentId 2/2/3(发通知22 / 详情23 / 详情24),修正上版 parentId:2000/3000 造成的父菜单高亮失效。 - config/menu.ts、mock GetUserMod 同步真实值并补「抄送给我的」91。 - 说明:/approval 导航本就靠 page 精确匹配(后端 page "/approval " 尾空格已被 resolveMenuPage trim), 本次主要修 modId 契约与详情撞车/高亮,不改变可点击性。
This commit is contained in:
@@ -6,12 +6,13 @@ import type { IModule } from "@/store";
|
|||||||
*/
|
*/
|
||||||
export function getMenuList(): Promise<IModule[]> {
|
export function getMenuList(): Promise<IModule[]> {
|
||||||
const menu: IModule[] = [
|
const menu: IModule[] = [
|
||||||
{ id: 1000, modId: 1000, name: "已收到", page: "/" },
|
{ id: 1, modId: 1, name: "已收到", page: "/" },
|
||||||
{ id: 2000, modId: 2000, name: "已发送", page: "/list" },
|
{ id: 2, modId: 2, name: "已发送", page: "/list" },
|
||||||
{ id: 3000, modId: 3000, name: "全部通知", page: "/noticelist" },
|
{ id: 3, modId: 3, name: "全部通知", page: "/noticelist" },
|
||||||
{ id: 2100, modId: 2100, name: "待审核", page: "/approval" },
|
{ id: 89, modId: 89, name: "待审核", page: "/approval" },
|
||||||
{ id: 4000, modId: 4000, name: "通知统计", page: "/stats" },
|
{ id: 4, modId: 4, name: "通知统计", page: "/stats" },
|
||||||
{ id: 5000, modId: 5000, name: "应用设置", page: "/setting" },
|
{ id: 21, modId: 21, name: "应用设置", page: "/setting" },
|
||||||
|
{ id: 91, modId: 91, name: "抄送给我的", page: "/cc" },
|
||||||
];
|
];
|
||||||
return Promise.resolve(menu);
|
return Promise.resolve(menu);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -300,12 +300,13 @@ export default [
|
|||||||
ok([
|
ok([
|
||||||
// id/modId 对齐平台模块管理的「配置 ID」(对照 /base/GetUserMod 现行数据);
|
// id/modId 对齐平台模块管理的「配置 ID」(对照 /base/GetUserMod 现行数据);
|
||||||
// icon:YschIcons 图标名,layout 渲染为 iconfont icon-<名称>
|
// icon:YschIcons 图标名,layout 渲染为 iconfont icon-<名称>
|
||||||
{ id: 1000, modId: 1000, name: "已收到", parentId: 0, page: "/", icon: "sjx", orderNumber: 1, usable: true, children: [] },
|
{ id: 1, modId: 1, name: "已收到", parentId: 0, page: "/", icon: "sjx", orderNumber: 1, usable: true, children: [] },
|
||||||
{ id: 2000, modId: 2000, name: "已发送", parentId: 0, page: "/list", icon: "fasong", orderNumber: 2, usable: true, children: [] },
|
{ id: 2, modId: 2, name: "已发送", parentId: 0, page: "/list", icon: "fasong", orderNumber: 2, usable: true, children: [] },
|
||||||
{ id: 3000, modId: 3000, name: "全部通知", parentId: 0, page: "/noticelist", icon: "liebiao", orderNumber: 3, usable: true, children: [] },
|
{ id: 3, modId: 3, name: "全部通知", parentId: 0, page: "/noticelist", icon: "liebiao", orderNumber: 3, usable: true, children: [] },
|
||||||
{ id: 2100, modId: 2100, name: "待审核", parentId: 0, page: "/approval", icon: "shenpi", orderNumber: 4, usable: true, children: [] },
|
{ id: 89, modId: 89, name: "待审核", parentId: 0, page: "/approval", icon: "shenpi", orderNumber: 4, usable: true, children: [] },
|
||||||
{ id: 4000, modId: 4000, name: "通知统计", parentId: 0, page: "/stats", icon: "tongji", orderNumber: 5, usable: true, children: [] },
|
{ id: 4, modId: 4, name: "通知统计", parentId: 0, page: "/stats", icon: "tongji", orderNumber: 5, usable: true, children: [] },
|
||||||
{ id: 5000, modId: 5000, name: "应用设置", parentId: 0, page: "/setting", icon: "shezhi", orderNumber: 6, usable: true, children: [] },
|
{ id: 21, modId: 21, name: "应用设置", parentId: 0, page: "/setting", icon: "shezhi", orderNumber: 6, usable: true, children: [] },
|
||||||
|
{ id: 91, modId: 91, name: "抄送给我的", parentId: 0, page: "/cc", icon: "", orderNumber: 7, usable: true, children: [] },
|
||||||
]),
|
]),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+18
-19
@@ -9,12 +9,12 @@ import type { RouteRecordRaw } from "vue-router";
|
|||||||
* - /list/detail?serid=&type=、/noticelist/detail?serid=&type=
|
* - /list/detail?serid=&type=、/noticelist/detail?serid=&type=
|
||||||
* type: 0=编辑视角(不标读) 1=普通查看(标读)
|
* type: 0=编辑视角(不标读) 1=普通查看(标读)
|
||||||
*
|
*
|
||||||
* modId 是菜单 ↔ 路由的稳定契约(对照后端 /base/GetUserMod 现行数据,即用户中心
|
* modId 是菜单 ↔ 路由的稳定契约(严格对照后端 /base/GetUserMod 现行返回的 modId):
|
||||||
* 模块管理里的配置 ID):
|
* 1=已收到 2=已发送 3=全部通知 4=通知统计 21=应用设置 89=待审核 91=抄送给我的
|
||||||
* 1000=已收到 2000=已发送 3000=全部通知 2100=待审核 4000=通知统计 5000=应用设置
|
* (后两条平台已挂一级菜单,page 分别为 /approval、/cc)。
|
||||||
* 深层子页不在菜单树,编码沿用 UserBase 范式「父模块 ×10 + 序号」并靠 meta.parentId
|
* 深层子页不在菜单树,靠 meta.parentId 关联高亮父菜单:/list/new=22(父2)、
|
||||||
* 关联高亮:/list/new=20001、/list/detail=20002(父 2000),/noticelist/detail=30001(父 3000)。
|
* /list/detail=23(父2)、/noticelist/detail=24(父3)。深层页 modId 不得与任何
|
||||||
* 深层页编码不得与任何平台一级模块 ID 重复。
|
* 平台一级模块 ID(含 89/91)重复。
|
||||||
*/
|
*/
|
||||||
const routes: RouteRecordRaw[] = [
|
const routes: RouteRecordRaw[] = [
|
||||||
// 已收通知(收件箱):后端菜单 page 配置为 "/",即应用入口页
|
// 已收通知(收件箱):后端菜单 page 配置为 "/",即应用入口页
|
||||||
@@ -22,14 +22,14 @@ const routes: RouteRecordRaw[] = [
|
|||||||
path: "/",
|
path: "/",
|
||||||
name: "notice_accept",
|
name: "notice_accept",
|
||||||
component: () => import("@/views/notice/NoticeAccept.vue"),
|
component: () => import("@/views/notice/NoticeAccept.vue"),
|
||||||
meta: { title: "已收到", modId: 1000 },
|
meta: { title: "已收到", modId: 1 },
|
||||||
},
|
},
|
||||||
// 已发送
|
// 已发送
|
||||||
{
|
{
|
||||||
path: "/list",
|
path: "/list",
|
||||||
name: "notice_list",
|
name: "notice_list",
|
||||||
component: () => import("@/views/notice/NoticeList.vue"),
|
component: () => import("@/views/notice/NoticeList.vue"),
|
||||||
meta: { title: "已发送", modId: 2000 },
|
meta: { title: "已发送", modId: 2 },
|
||||||
},
|
},
|
||||||
// 发通知(新建/编辑/转发/模板):已发送的深层子页,不在菜单里,
|
// 发通知(新建/编辑/转发/模板):已发送的深层子页,不在菜单里,
|
||||||
// layout.vue 按.meta.parentId 推导面包屑「已发送>发通知」并高亮父菜单
|
// layout.vue 按.meta.parentId 推导面包屑「已发送>发通知」并高亮父菜单
|
||||||
@@ -37,14 +37,14 @@ const routes: RouteRecordRaw[] = [
|
|||||||
path: "/list/new",
|
path: "/list/new",
|
||||||
name: "new_notice",
|
name: "new_notice",
|
||||||
component: () => import("@/views/notice/NewNotice.vue"),
|
component: () => import("@/views/notice/NewNotice.vue"),
|
||||||
meta: { title: "发通知", modId: 20001, parentId: 2000 },
|
meta: { title: "发通知", modId: 22, parentId: 2 },
|
||||||
},
|
},
|
||||||
// 全部通知(管理端)
|
// 全部通知(管理端)
|
||||||
{
|
{
|
||||||
path: "/noticelist",
|
path: "/noticelist",
|
||||||
name: "notice_manage",
|
name: "notice_manage",
|
||||||
component: () => import("@/views/notice/NoticeList.vue"),
|
component: () => import("@/views/notice/NoticeList.vue"),
|
||||||
meta: { title: "全部通知", modId: 3000 },
|
meta: { title: "全部通知", modId: 3 },
|
||||||
},
|
},
|
||||||
// 通知详情(同一组件挂两个路由,面包屑/菜单高亮由 meta.parentId 确定父节点:
|
// 通知详情(同一组件挂两个路由,面包屑/菜单高亮由 meta.parentId 确定父节点:
|
||||||
// 已发送下 /list/detail,全部通知下 /noticelist/detail;type 区分是否标读)
|
// 已发送下 /list/detail,全部通知下 /noticelist/detail;type 区分是否标读)
|
||||||
@@ -52,43 +52,42 @@ const routes: RouteRecordRaw[] = [
|
|||||||
path: "/list/detail",
|
path: "/list/detail",
|
||||||
name: "notice_list_detail",
|
name: "notice_list_detail",
|
||||||
component: () => import("@/views/notice/NoticeDetails.vue"),
|
component: () => import("@/views/notice/NoticeDetails.vue"),
|
||||||
meta: { title: "通知详情", modId: 20002, parentId: 2000 },
|
meta: { title: "通知详情", modId: 23, parentId: 2 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/noticelist/detail",
|
path: "/noticelist/detail",
|
||||||
name: "notice_manage_detail",
|
name: "notice_manage_detail",
|
||||||
component: () => import("@/views/notice/NoticeDetails.vue"),
|
component: () => import("@/views/notice/NoticeDetails.vue"),
|
||||||
meta: { title: "通知详情", modId: 30001, parentId: 3000 },
|
meta: { title: "通知详情", modId: 24, parentId: 3 },
|
||||||
},
|
},
|
||||||
// 通知统计(旧版行为:整页跳转外部统计系统)
|
// 通知统计(旧版行为:整页跳转外部统计系统)
|
||||||
{
|
{
|
||||||
path: "/stats",
|
path: "/stats",
|
||||||
name: "notice_stats",
|
name: "notice_stats",
|
||||||
component: () => import("@/views/notice/NoticeStats.vue"),
|
component: () => import("@/views/notice/NoticeStats.vue"),
|
||||||
meta: { title: "通知统计", modId: 4000 },
|
meta: { title: "通知统计", modId: 4 },
|
||||||
},
|
},
|
||||||
// 应用设置(发文部门 + 自定义组)
|
// 应用设置(发文部门 + 自定义组)
|
||||||
{
|
{
|
||||||
path: "/setting",
|
path: "/setting",
|
||||||
name: "notice_setting",
|
name: "notice_setting",
|
||||||
component: () => import("@/views/notice/NoticeSetting.vue"),
|
component: () => import("@/views/notice/NoticeSetting.vue"),
|
||||||
meta: { title: "应用设置", modId: 5000 },
|
meta: { title: "应用设置", modId: 21 },
|
||||||
},
|
},
|
||||||
// 待审核(应用内审批;平台模块管理已挂一级菜单,配置 ID = 2100,path = /approval)
|
// 待审核(应用内审批;平台模块管理已挂一级菜单,配置 ID = 89,path = /approval)
|
||||||
{
|
{
|
||||||
path: "/approval",
|
path: "/approval",
|
||||||
name: "notice_approval",
|
name: "notice_approval",
|
||||||
component: () => import("@/views/notice/NoticeApproval.vue"),
|
component: () => import("@/views/notice/NoticeApproval.vue"),
|
||||||
meta: { title: "我的待审核", modId: 2100 },
|
meta: { title: "我的待审核", modId: 89 },
|
||||||
},
|
},
|
||||||
|
|
||||||
// 抄送给我的(流程 NOTIFY 知会;modId 25 深层页不在菜单树,菜单挂载待后端 GetUserMod 配置;
|
// 抄送给我的(流程 NOTIFY 知会;平台模块管理已挂一级菜单,配置 ID = 91,path = /cc)
|
||||||
// 勿复用 23——/list/detail 已占,modId 撞车会让菜单解析兜底到错误页面)
|
|
||||||
{
|
{
|
||||||
path: "/cc",
|
path: "/cc",
|
||||||
name: "notice_cc",
|
name: "notice_cc",
|
||||||
component: () => import("@/views/notice/NoticeCc.vue"),
|
component: () => import("@/views/notice/NoticeCc.vue"),
|
||||||
meta: { title: "抄送给我的", modId: 25, parentId: 1 },
|
meta: { title: "抄送给我的", modId: 91 },
|
||||||
},
|
},
|
||||||
|
|
||||||
/* ---- 旧版路径兼容重定向(书签、残留的平台模块配置) ---- */
|
/* ---- 旧版路径兼容重定向(书签、残留的平台模块配置) ---- */
|
||||||
|
|||||||
Reference in New Issue
Block a user