PmWiki http://www.allwiki.com/wiki/PmWiki

PmWiki是一款基于PHP的轻量级wiki引擎,以其简洁性和易用性著称。该程序无需数据库支持,直接使用文件存储内容。PmWiki拥有丰富的功能扩展插件,并支持中文,适合小型团队和项目使用。

PmWiki

天下维客,你可以修改的网络知识库

跳转到: 导航, 搜索
<!-- start content -->


常见中文wiki程序:



MediaWiki是最流行的Wiki程序,支持多语种。用它做的网站数以十万计。



MoinMoin平实稳重,支持中文和多语种,插件丰富。Python环境。


  • 'PmWiki':无需数据库的小巧程序。架设简单,权限控制、插件扩展都不错。PHP环境。


PmWiki是一个基于PHPwiki引擎,其主要特点是小巧易用,各项wiki比较完善。PmWiki在2.0.6版本之後已经较好的支持了中文。



PmWiki由Patrick Michaud开发,目前最新版本是2.0.13(2005-11-10)和2.1.beta17(2005-12-29)。这个软件在 GNU 通用公共许可证(GPL)下发布。在文档索引中可以找到相关文档。



PmWiki 是 Patrick R. Michaud (http://www.pmichaud.com") 的注册商标。



目录

[隐藏]
if (window.showTocToggle) { var tocShowText = "显示"; var tocHideText = "隐藏"; showTocToggle(); }
[ 编辑]

PmWiki的特点

  • 小巧易用,使用文件存放所有内容,不使用数据库。
  • 超过200个功能扩展插件
  • 较为完善的权限及密码功能:可以针对页面或组设定密码,以及指定浏览、修改权限。
  • 允许页面分组,并允许页面内容被其他页面调用(include)
[ 编辑]

其他特性

  • 支持页面编辑、版本记录
  • 支持Wiki Words功能自动产生相关链接
  • 支持分类属性
  • 支持InterMap的跨站点链接缩写
  • 支持RSS、邮件提醒等功能


Image:Allwiki notice.png现存的网站实例表明:数千文章对PmWiki并不构成压力,但目前没有更多资料能证明PmWiki适合大规模网站。


[ 编辑]

PmWiki的安装

[ 编辑]

系统需求

PHP 4.1.x以上版本。


[ 编辑]

PmWiki 2.x版本的中文化方法

PmWiki的中文化使用UTF-8 编码实现,官方提供的i18n解决方案即包括中文语言设置。在2.0.6版本之前,UTF-8编码的处理文件xlpage-utf-8.php依赖于 mbstring模块,但是大多数主机空间都没有提供mbstring模块支持,造成了在PmWiki2上使用中文的困难。从2.0.6版本开始,pm先生重写了xlpage-utf-8.php模块,使之不再依赖mbstring模块,如果主机提供了mbstring支持,那么xlpage-utf- 8.php仍然使用mbstring中的函数,否则使用xlpage-utf-8.php中带有的纯php实现。基本配置过程为:


  • 必须使用2.0.6以上版本的PmWiki;
  • 按照官方提示的安装步骤部署PmWiki;
  • 按照官方给出的i18n使用说明部署,要注意i18n包中的xlpage-utf-8.php文件,在pmwiki包中也有这个文件,使用i18n包和pmwiki包中附带的较新的一个。
  • 在config.php中加入“XLPage('ZhCn','PmWikiZhCn.XLPage');”


PmWiki2中文化已经部署完成,可以正常输入、显示、搜索中文,用中文链接的形式可以实现中文WikiWord,能够正常编辑和访问。


[ 编辑]

参见

[ 编辑]

官方站点资料

[ 编辑]

PmWiki中文文档

[ 编辑]

PmWiki相关文章

[ 编辑]

截图

下图是PmWiki的标准风格截图,更多图片见PmWiki的各种皮肤PmWiki的标准风格截图

<!-- Saved in parser cache with key yxtiger1-allwiki_:pcache:idhash:9638-0!1!0!!zh-cn!2!zh-cn and timestamp 20070815084005 -->
import { createWebHistory, createRouter } from "vue-router"; /* Layout */ import Layout from "@/layout"; import { deepClone, flattenTreeList } from "@/utils"; import BasicRoute from "./routeBasic"; const modules = import.meta.glob("@/views/**"); import emitter from "@/utils/eventBus"; /** * Note: 路由配置项 * * hidden: true // 当设置 true 的时候该路由不会再侧边栏出现 如401,login等页面,或者如一些编辑页面/edit/1 * alwaysShow: true // 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面 * // 只有一个时,会将那个子路由当做根路由显示在侧边栏--如引导页面 * // 若你想不管路由下面的 children 声明的个数都显示你的根路由 * // 你可以设置 alwaysShow: true,这样它就会忽略之前定义的规则,一直显示根路由 * redirect: noRedirect // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击 * name:'router-name' // 设定路由的名字,一定要填写不然使用<keep-alive>时会出现各种问题 * query: '{"id": 1, "name": "ry"}' // 访问路由的默认传递参数 * roles: ['admin', 'common'] // 访问路由的角色权限 * permissions: ['a:a:a', 'b:b:b'] // 访问路由的菜单权限 * meta : { noCache: true // 如果设置为true,则不会被 <keep-alive> 缓存(默认 false) title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字 icon: 'svg-name' // 设置该路由的图标,对应路径src/assets/icons/svg breadcrumb: false // 如果设置为false,则不会在breadcrumb面包屑中显示 activeMenu: '/system/user' // 当路由设置了该属性,则会高亮相对应的侧边栏。 } */ // 公共路由 export const constantRoutes = [ { path: "/", redirect: "/myWorkbench", }, { path: "/login", name: "login", component: () => import("@/views/login"), hidden: true, }, { path: "/register", component: () => import("@/views/register"), hidden: true, }, { path: "/:pathMatch(.*)*", component: () => import("@/views/error/404"), hidden: true, }, { path: "/401", component: () => import("@/views/error/401"), hidden: true, }, ]; // 动态路由,基于用户权限动态去加载 export const dynamicRoutes = [ { path: "/search", component: Layout, redirect: "search", meta: { docTitle: "搜索", parentActive: "search", }, children: [ { name: "search", path: "/search", component: () => import("@/views/search"), }, ], }, { path: "/notice", component: Layout, redirect: "/notice", meta: { docTitle: "通知", }, children: [ { name: "notice", path: "/notice", redirect: "/notify", component: () => import("@/views/notice"), children: [ { name: "notify", path: "/notify", title: "通知", meta: { parentActive: "notice", }, component: () => import("@/views/notice/notify"), }, ], }, ], }, { path: "/myWork", component: Layout, redirect: "/dashboard", meta: { docTitle: "工作台", }, children: [ { name: "myWorkbench", path: "/myWorkbench", redirect: "/dashboard", component: () => import("@/views/myWorkbench"), children: [ { name: "dashboard", path: "/dashboard", title: "仪表盘", meta: { parentActive: "myWorkbench", }, component: () => import("@/views/myWorkbench/dashboard"), }, { name: "todoTasks", path: "/todoTasks", title: "待办任务", meta: { parentActive: "myWorkbench", }, component: () => import("@/views/myWorkbench/todoTasks"), }, { name: "reviewCenter", path: "/reviewCenter", title: "流程中心", meta: { parentActive: "myWorkbench", }, component: () => import("@/views/myWorkbench/reviewCenter"), }, ], }, ], }, { path: "/ComponentiInProject", component: Layout, redirect: "ComponentiInProject", children: [ { name: "workItems", path: "/workItems", meta: { parentActive: "ComponentiInProject", }, component: () => import("@/views/workitem"), }, { name: "projectPageSetting", path: "/projectPageSetting/:projectId", meta: { parentActive: "ProjectManagements", }, component: () => import("@/views/pm/pmpm"), props: (route) => ({ projectId: route.params.projectId, }), // redirect: "/projectPageSetting/overview", // 添加默认重定向 children: [ { name: "baseline", path: "baseline", component: () => import("@/views/pm/pmpm/components/baseLine/index.vue"), }, { name: "changeManager", path: "changeManager", title: "变更管理", // redirect: { name: "change-manager-list" }, component: () => import("@/views/changeManager/index.vue"), children: [ { name: "change-manager-list", path: "manager", component: () => import("@/views/changeManager/components/manage.vue"), }, { name: "change-ledger-list", path: "ledger", component: () => import("@/views/changeManager/components/ledger.vue"), }, ] }, { name: "workItem", path: "work-item", component: () => import("@/views/workitem/index.vue"), }, { name: "testManager", path: "test-manager", component: () => import("@/views/pm/pmpm/components/testManager"), redirect: { name: "testOverview" }, children: [ { name: "testOverview", path: "overview", component: () => import( "@/views/pm/pmpm/components/testManager/overview/index" ), }, { name: "testCase", path: "case", component: () => import("@/views/pm/pmpm/components/testManager/case/index"), redirect: { name: "testCaseLibrary" }, children: [ { name: "testCaseLibrary", path: "library", component: () => import( "@/views/pm/pmpm/components/testManager/case/libraryList" ), }, { name: "testCaseList", path: "list/:libraryId", component: () => import( "@/views/pm/pmpm/components/testManager/case/case" ), }, { name: "testCaseList2", path: "list2/:libraryId", component: () => import( "@/views/pm/pmpm/components/testManager/case/caseList/caselist" ), }, ], }, { name: "testPlan", path: "plan", component: () => import("@/views/pm/pmpm/components/testManager/plan/index"), redirect: { name: "planList" }, children: [ { name: "planList", path: "list", component: () => import( "@/views/pm/pmpm/components/testManager/plan/planList" ), }, { name: "planDetail", path: "detail/:planId", component: () => import( "@/views/pm/pmpm/components/testManager/plan/planLibrary" ), }, ], }, { name: "testReport", path: "report", component: () => import( "@/views/pm/pmpm/components/testManager/report/reportList" ), }, ], }, { name: "overview", path: "overview", component: () => import("@/views/pm/pmpm/components/overview/index.vue"), }, { name: "member", path: "member", component: () => import("@/views/pm/pmpm/components/member/index.vue"), }, { name: "communicationDesign", path: "communication-design", component: () => import("@/views/pm/pmpm/components/communicationDesign/index.vue"), }, { name: "checklist", path: "software-inventory", component: () => import("@/views/pm/pmpm/components/softwareInventory/index.vue"), }, { name: "funcSecurity", path: "funcSecurity", redirect: { name: "hara" }, component: () => import("@/views/pm/pmpm/components/funcSecurity/index.vue"), children: [ { name: "hara", path: "hara", component: () => import("@/views/pm/pmpm/components/funcSecurity/component/hara.vue"), }, { name: "func-sec-fault", path: "fault", component: () => import("@/views/pm/pmpm/components/funcSecurity/component/fault.vue"), }, { name: "func-sec-hazard", path: "hazard", component: () => import("@/views/pm/pmpm/components/funcSecurity/component/hazard.vue"), }, { name: "func-sec-scene", path: "scene", component: () => import("@/views/pm/pmpm/components/funcSecurity/component/scene.vue"), }, { name: "func-sec-event", path: "event", component: () => import("@/views/pm/pmpm/components/funcSecurity/component/event.vue"), }, { name: "func-sec-target", path: "target", component: () => import("@/views/pm/pmpm/components/funcSecurity/component/target.vue"), }, ] }, // { // name: "projectPlan", // path: "project-plan", // title: "项目计划", // redirect: { name: "plan-list" }, // component: () => // import("@/views/pm/pmpm/components/projectPlan/index.vue"), // children: [ // { // name: "plan-list", // path: "plan", // component: () => import("@/views/pm/pmpm/components/projectPlan/plan/index.vue"), // }, // { // name: "milestone-list", // path: "milestone", // component: () => import("@/views/pm/pmpm/components/projectPlan/milestone/index.vue"), // }, // ] // }, { name: "bugManager", path: "bugManager", component: () => import("@/views/pm/pmpm/components/bugManager/index.vue"), }, { name: "iteration", path: "iteration", component: () => import("@/views/pm/pmpm/components/iteration/index.vue"), }, { name: "knowledgeBase", path: "knowledge-base", component: () => import("@/views/pm/pmpm/components/pmpmWiki/index.vue"), redirect: { name: 'pmRecently'}, children: [ { name: "pmRecently", path: "recently", title: "最近", icon: "time", meta: { parentActive: "pmWiki", }, component: () => import("@/views/wiki/recently"), }, { name: "pMycollectiton", path: "mycollectiton", title: "我的收藏", icon: "rate", meta: { parentActive: "pmWiki", }, component: () => import("@/views/wiki/mycollectiton"), }, { name: "pmShare", path: "share", title: "与我共享", icon: "redo", meta: { parentActive: "pmWiki", }, component: () => import("@/views/wiki/share"), }, // { // path: "shareManage", // redirect: "/shareManage/:knowledgeGroupId", // children: [ // { // path: "/shareManage/:knowledgeGroupId", // name: "pmShareManage", // component: () => import("@/views/wiki/shareManage"), // meta: { // parentActive: "pmWiki", // topActive: "share" // }, // }, // ], // }, { path: "shareManage/:knowledgeGroupId", name: "pmShareManage", component: () => import("@/views/wiki/shareManage"), meta: { parentActive: "pmWiki", topActive: "pmShare" }, }, { name: "pmPageGroup", path: "pageGroup", title: "知识库", icon: "space", meta: { parentActive: "pmWiki", }, component: () => import("@/views/wiki/pageGroup"), }, { name: "pmInsightOverview", path: "insightOverview", title: "数据统计", icon: "monitor", meta: { parentActive: "pmWiki", }, component: () => import("@/views/wiki/insightOverview"), }, // { // path: "pageGroupManage", // redirect: "pageGroupManage", // children: [ // { // path: "pageGroupManage/:knowledgeGroupId", // name: "pmPageGroupManage", // component: () => import("@/views/wiki/pageGroupManage"), // meta: { // parentActive: "pmWiki", // topActive: "pageGroup" // }, // }, // ], // }, { path: "pageGroupManage/:knowledgeGroupId", name: "pmPageGroupManage", component: () => import("@/views/wiki/pageGroupManage"), meta: { parentActive: "pmWiki", topActive: "pmPageGroup" }, }, // { // path: "archiveManage", // redirect: "archiveManage/:knowledgeGroupId", // children: [ // { // path: "archiveManage/:knowledgeGroupId", // name: "pmArchiveManage", // component: () => import("@/views/wiki/archiveManage"), // meta: { // parentActive: "pmWiki", // topActive: "pageGroup" // }, // }, // ], // }, { path: "archiveManage/:knowledgeGroupId", name: "pmArchiveManage", component: () => import("@/views/wiki/archiveManage"), meta: { parentActive: "pmWiki", topActive: "pmPageGroup" }, }, // { // path: "pageGroupSet", // redirect: "pageGroupSet/:knowledgeGroupId", // children: [ // { // path: "pageGroupSet/:knowledgeGroupId", // name: "pmPageGroupSet", // component: () => import("@/views/wiki/pageGroupSet"), // meta: { // parentActive: "pmWiki", // topActive: "pageGroup" // }, // }, // ], // }, { path: "pageGroupSet/:knowledgeGroupId", name: "pmPageGroupSet", component: () => import("@/views/wiki/pageGroupSet"), meta: { parentActive: "pmWiki", topActive: "pmPageGroup" }, }, // { // path: "wikiHistory", // redirect: "wikiHistory/:knowledgeGroupId", // children: [ // { // path: "wikiHistory/:knowledgeGroupId", // name: "pmSikiHistory", // component: () => import("@/views/wiki/history"), // meta: { // parentActive: "pmWiki", // topActive: "pageGroup" // }, // }, // ], // }, { path: "wikiHistory/:knowledgeGroupId", name: "pmWikiHistory", component: () => import("@/views/wiki/history"), meta: { parentActive: "pmWiki", topActive: "pmPageGroup" }, }, ], }, { name: "projectPlan", path: "project-plan", title: "项目计划", redirect: { name: "plan-list" }, component: () => import("@/views/pm/pmpm/components/projectPlan/index.vue"), children: [ { name: "plan-list", path: "plan", component: () => import("@/views/pm/pmpm/components/projectPlan/plan/index.vue"), }, { name: "milestone-list", path: "milestone", component: () => import("@/views/pm/pmpm/components/projectPlan/milestone/index.vue"), }, ] }, { name: "projectSetting", path: "project-setting", component: () => import("@/views/pm/pmpm/components/setTab.vue"), }, { name: "fileManager", path: "fileManager", title: "文件管理", component: () => import("_f/views/File.vue"), }, { path: "onlyoffice", name: "Onlyoffice", meta: { title: "在线编辑预览", content: { description: "onlyoffice 文档在线编辑预览,支持 Word Excel PowerPoint", }, }, component: () => import("@/views/QWFile/views/OnlyOffice.vue"), }, { name: 'softwareManager', path: 'software-management', title: '软件管理', component: () => import("@/views/pm/pmpm/components/softwareManagement/index.vue"), children: [ // { // name: "software-board", // path: "board", // component: () => import("@/views/pm/pmpm/components/softwareManagement/board"), // }, { name: "software-train", path: "train", component: () => import("@/views/pm/pmpm/components/softwareManagement/train"), }, { name: "software-ecu", path: "ecu", component: () => import("@/views/pm/pmpm/components/softwareManagement/ECUList"), }, { name: "software-ecu-version", path: "ecu-version", component: () => import("@/views/pm/pmpm/components/softwareManagement/ECUVersionList"), }, { name: "software-delivery", path: "delivery", component: () => import("@/views/pm/pmpm/components/softwareManagement/delivery"), }, { name: "software-ecu-base-version-list", path: "ecu-base", component: () => import("@/views/pm/pmpm/components/softwareManagement/ECUBaseVersionList"), }, { name: "software-delivery-list", path: "delivery-list", component: () => import("@/views/pm/pmpm/components/softwareManagement/deliveryList"), }, { name: "efficiency-board", path: "efficiency", component: () => import("@/views/pm/pmpm/components/softwareManagement/efficiency"), }, ] }, { name: "projectTask", path: "task", title: "任务", redirect: { name: "task-list" }, component: () => import("@/views/pm/pmpm/components/taskManagement/index.vue"), children: [ { name: "task-list", path: "list", title: "任务列表", component: () => import("@/views/pm/pmpm/components/taskManagement/list.vue"), }, { name: "task-test", path: "test", title: "任务测试", component: () => import("@/views/pm/pmpm/components/taskManagement/test.vue"), } ] } ], }, ], }, { path: "/wiki", component: Layout, redirect: "/recently", meta: { docTitle: "知识库", }, children: [ { name: "wiki", path: "/wiki", redirect: "/recently", component: () => import("@/views/wiki"), children: [ { name: "recently", path: "/recently", title: "最近", icon: "time", meta: { parentActive: "wiki", }, component: () => import("@/views/wiki/recently"), }, { name: "mycollectiton", path: "/mycollectiton", title: "我的收藏", icon: "rate", meta: { parentActive: "wiki", }, component: () => import("@/views/wiki/mycollectiton"), }, { name: "share", path: "/share", title: "与我共享", icon: "redo", meta: { parentActive: "wiki", }, component: () => import("@/views/wiki/share"), }, { path: "/shareManage", redirect: "/shareManage/:knowledgeGroupId", children: [ { path: "/shareManage/:knowledgeGroupId", name: "shareManage", component: () => import("@/views/wiki/shareManage"), meta: { parentActive: "wiki", topActive: "share", }, }, ], }, { name: "pageGroup", path: "/pageGroup", title: "知识库", icon: "space", meta: { parentActive: "wiki", }, component: () => import("@/views/wiki/pageGroup"), }, { name: "insightOverview", path: "/insightOverview", title: "数据统计", icon: "monitor", meta: { parentActive: "wiki", }, component: () => import("@/views/wiki/insightOverview"), }, { path: "/pageGroupManage", redirect: "pageGroupManage", children: [ { path: "/pageGroupManage/:knowledgeGroupId", name: "pageGroupManage", component: () => import("@/views/wiki/pageGroupManage"), meta: { parentActive: "wiki", topActive: "pageGroup", }, }, ], }, { path: "/archiveManage", redirect: "/archiveManage/:knowledgeGroupId", children: [ { path: "/archiveManage/:knowledgeGroupId", name: "archiveManage", component: () => import("@/views/wiki/archiveManage"), meta: { parentActive: "wiki", topActive: "pageGroup", }, }, ], }, { path: "/pageGroupSet", redirect: "/pageGroupSet/:knowledgeGroupId", children: [ { path: "/pageGroupSet/:knowledgeGroupId", name: "pageGroupSet", component: () => import("@/views/wiki/pageGroupSet"), meta: { parentActive: "wiki", topActive: "pageGroup", }, }, ], }, { path: "/wikiHistory", redirect: "/wikiHistory/:knowledgeGroupId", children: [ { path: "/wikiHistory/:knowledgeGroupId", name: "wikiHistory", component: () => import("@/views/wiki/history"), meta: { parentActive: "wiki", topActive: "pageGroup", }, }, ], }, ], }, ], }, { path: "/rdLibrary", component: Layout, redirect: "/library", meta: { docTitle: "研发库", }, children: [ { name: "rdLibrary", path: "/rdLibrary", redirect: "/library", component: () => import("@/views/RdLibrary/index.vue"), children: [ { name: "library", path: "/library", component: () => import("@/views/RdLibrary/library/index.vue"), }, { name: "libraryContents", path: "/libraryContents", component: () => import("@/views/RdLibrary/library/contents.vue"), }, { name: "demandPoolLadger", path: "/demandPoolLadger", component: () => import("@/views/RdLibrary/components/demandPoolLadger.vue"), }, { name: "librarySettings", path: "/librarySettings", component: () => import("@/views/RdLibrary/library/librarySettings.vue"), }, ] } ], }, { path:"/Architecture", component: Layout, redirect: "/architecture", meta: { docTitle: "架构设计", }, children: [ { name: "architectureDesign", path: "/architectureDesign", component: () => import("@/views/architecture"), } ] }, { path: "/baselineManagements", component: Layout, redirect: "/baselinesManagement", meta: { docTitle: "基线管理", }, children: [ { name: "baselinesManagement", path: "/baselinesManagement", component: () => import("@/views/baselineManagement/index.vue"), } ], }, { path: "/HelpCenters", component: Layout, redirect: "/updateLog", meta: { docTitle: "帮助", }, children: [ { name: "HelpCenters", path: "/HelpCenters", redirect: "/updateLog", component: () => import("@/views/HelpCenters"), children: [ { name: "updateLog", path: "/updateLog", title: "更新日志", meta: { parentActive: "HelpCenters", }, component: () => import("@/views/HelpCenters/updateLog"), }, ], }, ], }, { path: "/configurationCenter", component: Layout, redirect: "/projectGroupMag", meta: { docTitle: "配置", }, children: [ { name: "configurationCenter", path: "/configurationCenter", redirect: "/projectGroupMag", component: () => import("@/views/configurationCenter"), children: [ { name: "MenuManagement", path: "/MenuManagement", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/configurationCenter/MenuManagement"), }, { name: "UserManagement", path: "/UserManagement", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/configurationCenter/UserManagement"), }, { name: "/userGroup", path: "/userGroup", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/ugm"), }, { name: "departManagement", path: "/departManageMent", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/dgm"), }, { name: "RoleManagement", path: "/RoleManagement", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/configurationCenter/RoleManagement"), }, { name: "functionalSafety", path: "/functionalSafety", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/securityConfig/functionalSafety"), }, { name: "WorkitemType", path: "/WorkitemType", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/workitemConfig/workType"), }, { name: "Notification", path: "/WorkitemType/Notification", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/workitemConfig/notification"), }, { name: "jiraSetting", path: "/jiraSetting", component: () => import("@/views/jiraSetting"), meta: { parentActive: "configurationCenter", }, }, { name: "WindowConfig", path: "/WindowConfig", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/workitemConfig/workFrame"), }, { name: "ProcessDesign", path: "/ProcessDesign", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/workitemConfig/workFlow"), }, { name: "ProjectM", path: "/ProjectM", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/proManaConfig/components/projectMag.vue"), }, { name: "projectGroupMag", path: "/projectGroupMag", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/proManaConfig/components/projectGroupMag"), }, { name: "projectAttribute", path: "/projectAttribute", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/proManaConfig/components/projectAttribute"), }, { name: "projectStatus", path: "/projectStatus", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/proManaConfig/components/projectStatus"), }, { name: "projectRole", path: "/projectRole", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/proManaConfig/components/projectRole"), }, { path: "/aclmanager", name: "aclmanager", props: (route) => ({ projectId: route.query.projectId || "-1" }), meta: { parentActive: "configurationCenter", }, component: () => import("@/views/workitemConfig/acl/index.vue"), // children: [{ // name: "aclmanager", // path: "/aclmanager", // component: () => import('@/views/workitemConfig/acl/index.vue') // }] }, { name: "TestPlanAttribute", path: "/TestPlanAttribute", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/TestManagementConfig/TestPlanAttribute"), }, { name: "FileSizeConfig", path: "/FileSizeConfig", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/fileConfig/fileInfoManage"), }, { name: "LoginLogs", path: "/LoginLogs", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/logManagement/loginlogs"), }, { name: "ActionLogs", path: "/ActionLogs", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/logManagement/actionlogs"), }, { name: "InterfaceLogs", path: "/InterfaceLogs", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/logManagement/interfacelogs"), }, { name: "iterationAttribute", path: "/iterationAttribute", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/iterationAttributeConfig/iterationAttribute"), }, { name: "wikiPermissConfig", path: "/wikiPermissConfig", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/wiki/wikiManaConfig/wikiPermissConfig"), }, { name: "wikiPageManage", path: "/wikiPageManage", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/wiki/wikiManaConfig/wikiPageManage"), }, { name: "wikiInfoManage", path: "/wikiInfoManage", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/wiki/wikiManaConfig/wikiInfoManage"), }, { name: "wikiTemplateManage", path: "/wikiTemplateManage", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/wiki/wikiManaConfig/wikiTemplateManage"), }, { name: "templateList", path: "/templateList", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/reviewCenter/templateList"), }, { name: "formFlowEdit", path: "/formFlowEdit", meta: { parentActive: "configurationCenter", }, component: () => import( "@/views/pm/reviewCenter/formFlowEdit/FormProcessDesigner" ), }, { name: "componentManage", path: "/componentManage", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/reviewCenter/componentManage"), }, { name: "dataManage", path: "/dataManage", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/reviewCenter/dataManage"), }, { name: "dataStatistics", path: "/dataStatistics", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/reviewCenter/dataStatistics"), }, { name: "baseLineAttribute", path: "/baseLineAttribute", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/baseLineM/attribute.vue"), }, { name: "baseLineStatus", path: "/baseLineStatus", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/baseLineM/status.vue"), }, { name: "applicableCarType", // 适用车型 path: "/applicableCarType", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/reviewCenter/applicableConfig/applicableCarType"), }, { name: "applicableStage", // 适用阶段 path: "/applicableStage", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/reviewCenter/applicableConfig/applicableStage"), }, { name: "approvalSet", // 审批设置 path: "/approvalSet", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/reviewCenter/approvalSet"), }, { name: "ECUDataSet", // ECU主数据 path: "/ECUDataSet", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/reviewCenter/ECUDataSet"), }, { name: "ECUDataSet", // ECU主数据 path: "/ECUDataSet", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/reviewCenter/ECUDataSet"), }, { name: "ecuConfig", // data dictionary-ecu配置 path: "/ecuConfig", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/dataDictionary/ecu"), }, { name: "systemConfig", // 数据字典-系统配置 path: "/systemConfig", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/dataDictionary/system"), }, { name: "stageConfig", // 数据字典-阶段配置 path: "/stageConfig", meta: { parentActive: "configurationCenter", }, component: () => import("@/views/pm/dataDictionary/stage"), }, ], }, ], }, { path: "/workitem", component: Layout, redirect: "workitem", children: [ { name: "workitem", path: "/workitem", component: () => import("@/views/workitem"), }, ], }, { path: "/pm", component: Layout, redirect: "/projectManagement", meta: { docTitle: "项目", }, children: [ { name: "ProjectManagements", path: "/pm", redirect: "/projectManagement", //重定向的目标路径 component: () => import("@/views/pm/home"), children: [ { name: "ProjectManagements", path: "/projectManagement", title: "项目列表", // meta: { // parentActive: "myWorkbench", // }, component: () => import("@/views/pm/home/conmponents/projectManagement.vue"), }, ], }, ], }, { path: "/fileManagement", component: Layout, redirect: "/File", meta: { docTitle: "文件管理", }, children: [ { name: "File", path: "/File", title: "文件管理", component: () => import("_f/views/File.vue"), }, ], }, { path: "/office", name: "office", meta: { title: "在线编辑预览", content: { description: "onlyoffice 文档在线编辑预览,支持 Word Excel PowerPoint", }, }, component: () => import("@/views/QWFile/views/OnlyOffice.vue"), }, ]; const router = createRouter({ history: createWebHistory(), routes: [...constantRoutes, ...dynamicRoutes], scrollBehavior(to, from, savedPosition) { if (savedPosition) { return savedPosition; } return { top: 0 }; }, }); // 添加路由 export const resetRouter = (params) => { const dashboardRoute = router.options.routes.filter((el) => el?.path.indexOf("/dashboard") > -1) ?? []; const param = [...params, ...BasicRoute, ...dashboardRoute]; router.options.routes = []; router.options.routes.push(...param); // param.forEach((item) => { // router.addRoute(item); // }); }; // 生成路由 export const filterRoute = (rou) => { const permission = []; if (rou && Array.isArray(rou)) { rou.sort((a, b) => a.displayOrder - b.displayOrder); const forFn = (arr, val) => { // eslint-disable-next-line array-callback-return for (let i = 0; i < arr.length; i++) { // 跳过第一层非目录的数据 const item = arr[i]; if (item?.resourceType === 1 && item?.pid === "0") { continue; } item.name = item.routerName; item.path = item.routerAddress; try { // eslint-disable-next-line no-eval item.meta = JSON.parse(item.meta); item.meta.resourceName = item.resourceName; item.meta.resourceCode = item.resourceCode; } catch (e) { console.log(e); } // 处理菜单 if (item.resourceType !== 2) { item.meta.icon = item.icon || ""; item.meta.btncontent = []; if (item.meta.permission) { permission.push(item); } if (item.fileAddress) { item.component = modules[`/src/${item.fileAddress}/index.vue`]; item.componentString = `@/${item.fileAddress}`; } } if (item.resourceType === 2) { permission.push(item); val?.meta?.btncontent?.push({ icon: item.icon, btnName: item.resourceName, btnCode: item.resourceCode, }); if (val.meta?.list) { const child = val?.children?.find( (el) => el.resourceCode === item.resourceCode ); if (child) { child.meta.btncontent = []; child.meta.btncontent.push({ icon: item.icon, btnName: item.resourceName, btnCode: item.resourceCode, }); } } arr.splice(i--, 1); } if (item.children && Array.isArray(item.children)) { if (item.children.length > 0) { item.children.sort((a, b) => a.displayOrder - b.displayOrder); item.redirect = item.children.filter( (el) => el.resourceType === 1 )?.[0]?.routerAddress; forFn(item.children, item); } } } }; forFn(rou); } return { rou, permission }; }; router.beforeEach((to, from) => { // 如果是从 fileManager 页面离开 if (from.path.includes("/fileManager")) { emitter.emit("routeChange", { to, from }); } }); export default router;
最新发布
09-05
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值