init: 迁移本地前端代码(Gitea 仓库重建后重新初始化)

This commit is contained in:
chenxing
2026-09-01 14:41:56 +08:00
commit 807ca07367
333 changed files with 27593 additions and 0 deletions
+84
View File
@@ -0,0 +1,84 @@
import type { RouteRecordRaw } from "vue-router";
/**
* 通知公告模块路由(扁平短路由,与基础平台模块 path 一致)。
* 页面间参数通过 query 传递:
* - /list/new?serid= (编辑)
* - /list/new?fid= (转发)
* - /list/new?tempid=(模板引用)
* - /details?serid=&type= type: 0=编辑视角(不标读) 1=普通查看(标读)
*
* modId 是菜单 ↔ 路由的稳定契约(对照后端 GetUserMod 现行数据):
* 1=已收到 2=已发送 3=全部通知 4=通知统计 21=应用设置
* 发通知为「已发送」的深层子页(modId 22 不在菜单树,meta.parentId=2 关联高亮),
* 与 UserBase「应用管理>应用类型管理」范式一致。
*/
const routes: RouteRecordRaw[] = [
// 已收通知(收件箱):后端菜单 page 配置为 "/",即应用入口页
{
path: "/",
name: "notice_accept",
component: () => import("@/views/notice/NoticeAccept.vue"),
meta: { title: "已收到", modId: 1 },
},
// 已发送
{
path: "/list",
name: "notice_list",
component: () => import("@/views/notice/NoticeList.vue"),
meta: { title: "已发送", modId: 2 },
},
// 发通知(新建/编辑/转发/模板):已发送的深层子页,不在菜单里,
// layout.vue 按.meta.parentId 推导面包屑「已发送>发通知」并高亮父菜单
{
path: "/list/new",
name: "new_notice",
component: () => import("@/views/notice/NewNotice.vue"),
meta: { title: "发通知", modId: 22, parentId: 2 },
},
// 全部通知(管理端)
{
path: "/noticelist",
name: "notice_manage",
component: () => import("@/views/notice/NoticeList.vue"),
meta: { title: "全部通知", modId: 3 },
},
// 通知详情(已发/已收共用,type 区分是否标读)
{
path: "/details",
name: "notice_details",
component: () => import("@/views/notice/NoticeDetails.vue"),
meta: { title: "通知详情", modId: 5 },
},
// 通知统计(旧版行为:整页跳转外部统计系统)
{
path: "/stats",
name: "notice_stats",
component: () => import("@/views/notice/NoticeStats.vue"),
meta: { title: "通知统计", modId: 4 },
},
// 应用设置(发文部门 + 自定义组)
{
path: "/setting",
name: "notice_setting",
component: () => import("@/views/notice/NoticeSetting.vue"),
meta: { title: "应用设置", modId: 21 },
},
/* ---- 旧版路径兼容重定向(书签、残留的平台模块配置) ---- */
{ path: "/accept", redirect: "/" },
{ path: "/newnotice", redirect: "/list/new" },
{ path: "/edit", redirect: "/list/new" },
{ path: "/manage", redirect: "/noticelist" },
{ path: "/notice", redirect: "/accept" },
{ path: "/notice/newnotice", redirect: "/list/new" },
{ path: "/notice/edit", redirect: "/list/new" },
{ path: "/notice/notice_accept", redirect: "/accept" },
{ path: "/notice/notice_list", redirect: "/list" },
{ path: "/notice/manage", redirect: "/noticelist" },
{ path: "/notice/notice_details", redirect: "/details" },
{ path: "/notice/statistics", redirect: "/stats" },
{ path: "/notice/setting", redirect: "/setting" },
];
export default routes;