Files
dy_web/src/router/index.js

1036 lines
26 KiB
JavaScript
Raw Normal View History

2025-09-04 16:27:57 +08:00
import {
createRouter,
createWebHashHistory
} from "vue-router";
import layout from "@/layout/index"; //layout直接引用 其他使用路由懒加载
import store from "@/store";
/**
* 关于路由配置描述
* 1.meta && meta.title && meta.icon 则在菜单栏显示
* 2.如果存在children , 则以el-sub-menu子菜单显示
* 否则不在menu菜单显示
* 如果只展示单级别菜单 需要像developer这样配置
*/
/**
* 私有路由表
*/
export const privateRoutes = [{
path: "/systemConfig",
component: layout,
name: "systemConfigModel",
redirect: "/dict/index",
meta: {
title: "系统管理",
icon: "personnel"
},
children: [
{
path: "/user/department-ist",
name: "departmentList",
component: () => import("@/views/backOfficeSystem/systemConfig/department-list/index"),
meta: {
title: "部门管理",
icon: "personnel-manage"
}
},
{
path: "/user/userList",
name: "userList",
component: () => import("@/views/backOfficeSystem/systemConfig/user-list/index"),
meta: {
title: "用户管理",
icon: "role"
}
},
{
path: "/user/role",
name: "userRoleIndex",
component: () => import("@/views/backOfficeSystem/systemConfig/role-list/index"),
meta: {
title: "角色列表",
icon: "role"
}
},
{
path: "/user/menuList",
name: "menuList",
component: () => import("@/views/backOfficeSystem/systemConfig/menu-list/index"),
meta: {
title: "菜单管理",
icon: "personnel-manage"
}
},
{
path: "/user/publicSecurity",
name: "publicSecurity",
component: () => import("@/views/backOfficeSystem/systemConfig/publicSecurity/index"),
meta: {
title: "公安机关要素",
icon: "personnel-manage"
}
},
{
path: "/dict/detail",
name: "dictDetail",
component: () => import("@/views/backOfficeSystem/systemConfig/dict/detail"),
meta: {
title: "字典数据"
}
},
{
path: "/dict/index",
name: "dictIndex",
component: () => import("@/views/backOfficeSystem/systemConfig/dict/index"),
meta: {
title: "字典列表",
icon: "article-ranking"
}
},
{
path: "/user/job",
name: "userJob",
component: () => import("@/views/backOfficeSystem/systemConfig/job-list/index"),
meta: {
title: "岗位列表",
icon: "personnel-manage"
}
},
{
path: "/user/deptAllocationUser/:id",
name: "deptAllocationUser",
component: () =>
import("@/views/backOfficeSystem/systemConfig/department-list/deptAllocationUser"),
meta: {
title: "管理用户"
}
},
{
path: "/user/allocationUser/:id",
name: "allocationUser",
component: () =>
import("@/views/backOfficeSystem/systemConfig/role-list/allocationUser"),
meta: {
title: "分配用户"
}
},
{
path: "/user/systemConfig",
name: "systemConfig",
component: () =>
import("@/views/backOfficeSystem/systemConfig/system-config-list/index"),
meta: {
title: "系统配置",
icon: "personnel-manage"
}
},
{
path: "/user/log",
name: "/user/log",
redirect: "/user/operateLog",
meta: {
title: "日志",
icon: "article"
},
children: [{
path: "/user/operateLog",
name: "/user/operateLog",
component: () =>
import("@/views/backOfficeSystem/systemConfig/log-manage/operateLog/index"),
meta: {
title: "操作日志",
icon: "article-ranking"
}
},
{
path: "/user/loginLog",
name: "/user/loginLog",
component: () =>
import("@/views/backOfficeSystem/systemConfig/log-manage/loginLog/index"),
meta: {
title: "登录日志",
icon: "article-ranking"
}
}
]
},
{
//如果三级 需要把路由注册出来
path: "/user/operateLog",
name: "/user/operateLog",
component: () =>
import("@/views/backOfficeSystem/systemConfig/log-manage/operateLog/index")
},
{
path: "/user/loginLog",
name: "/user/loginLog",
component: () =>
import("@/views/backOfficeSystem/systemConfig/log-manage/loginLog/index")
},
{
path: "/tool/gen-edit/index/:tableId",
name: "gen-edit",
component: () => import("@/views/backOfficeSystem/systemConfig/gen/editTable"),
meta: {
title: "代码生成编辑"
}
}
]
},
{
path: "/basicsmanage",
component: layout,
redirect: "/watchman-ll",
name: "/basicsmanage",
meta: {
title: "基础管理",
icon: "personnel"
},
children: [{
path: "/watchman-ll",
component: () => import("@/views/backOfficeSystem/basicsmanage/watchman-ll/auxiliary-police/index"),
name: "watchman-ll",
meta: {
title: "巡防力量管理",
icon: "article-ranking"
},
children: [{
path: "/patrol-police",
name: "patrol-police",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/watchman-ll/patrol-police/index"),
meta: {
title: "巡防民警",
icon: "article-ranking"
}
},
{
path: "/auxiliary-police",
name: "auxiliary-police",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/watchman-ll/auxiliary-police/index"),
meta: {
title: "巡防辅警",
icon: "article-ranking"
}
},
{
path: "/professional-skills",
name: "professional-skills",
component: () =>
import(
"@/views/backOfficeSystem/basicsmanage/watchman-ll/professional-skills/index"
),
meta: {
title: "专业技能",
icon: "article-ranking"
}
},
{
path: "/experience",
name: "experience",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/watchman-ll/experience/index"),
meta: {
title: "经验管理",
icon: "article-ranking"
}
}
]
},
{
path: "/watchman-zb",
component: () => import("@/views/backOfficeSystem/basicsmanage/watchman-zb/intelligence/index"),
name: "/watchman-zb",
meta: {
title: "巡防装备管理",
icon: "article-ranking"
},
children: [{
path: "/intelligence",
name: "intelligence-zb",
component: () => import("@/views/backOfficeSystem/basicsmanage/watchman-zb/intelligence/index"),
meta: {
title: "智能装备管理",
icon: "article-ranking"
}
},
{
path: "/police-equipment",
name: "police-equipment",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/watchman-zb/police-equipment/index"),
meta: {
title: "警用器械管理",
icon: "article-ranking"
}
},
{
path: "/watchman-car",
name: "watchman-car",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/watchman-zb/watchman-car/index"),
meta: {
title: "巡防车辆管理",
icon: "article-ranking"
}
},
{
path: "/watchman-zbgl",
name: "watchman-zbgl",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/watchman-zb/watchman-zbgl/index"),
meta: {
title: "巡防装备分类管理",
icon: "article-ranking"
}
},
{
path: "/watchman-zbtx-dell",
name: "watchman-zbtx-dell",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/watchman-zb/watchman-zbtx/index"),
meta: {
title: "巡防装备到期提醒",
icon: "article-ranking"
}
},
{
path: "/day-streetzb",
name: "day-streetzb",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/watchman-zb/day-streetzb/index"),
meta: {
title: "每日街面装备",
icon: "article-ranking"
}
}
]
},
{
path: "/service-jz",
component: () => import("@/views/backOfficeSystem/basicsmanage/service-jz/index"),
name: "service-jz",
meta: {
title: "勤务警组管理",
icon: "article-ranking"
}
},
{
path: "/police-station",
component: () => import("@/views/backOfficeSystem/basicsmanage/police-station/index"),
name: "police-station",
meta: {
title: "检查站管理",
icon: "article-ranking"
}
},
{
path: "/quick-rebate",
component: () => import("@/views/backOfficeSystem/basicsmanage/quick-rebate/index"),
name: "quick-rebate",
meta: {
title: "快反点管理",
icon: "article-ranking"
}
},
{
path: "/patrol-area",
component: () => import("@/views/backOfficeSystem/basicsmanage/patrol-area/index"),
name: "patrol-area",
meta: {
title: "巡防区管理",
icon: "article-ranking"
}
},
{
path: "/patrol-route",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/patrol-route/mandatory-patrol/index"),
name: "patrol-route",
meta: {
title: "巡逻路线管理",
icon: "article-ranking"
},
children: [{
path: "/mandatory-patrol",
name: "mandatory-patrol",
component: () =>
import(
"@/views/backOfficeSystem/basicsmanage/patrol-route/mandatory-patrol/index"
),
meta: {
title: "必巡点管理",
icon: "article-ranking"
}
},
{
path: "/patrol-line",
name: "patrol-line",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/patrol-route/patrol-line/index"),
meta: {
title: "必巡线管理",
icon: "article-ranking"
}
}
]
},
{
path: "/socialSecurity",
component: () => import("@/views/backOfficeSystem/basicsmanage/socialSecurity/index"),
name: "socialSecurity",
meta: {
title: "社会安保力量",
icon: "article-ranking"
}
},
{
path: "/expertBase",
component: () => import("@/views/backOfficeSystem/basicsmanage/expertBase/index"),
name: "expertBase",
meta: {
title: "专家库管理",
icon: "article-ranking"
}
},
{
path: "/thirdParty",
component: () => import("@/views/backOfficeSystem/basicsmanage/thirdParty/index"),
name: "thirdParty",
meta: {
title: "第三方管理",
icon: "article-ranking"
}
},
{
path: "/fzyc",
component: () => import("@/views/backOfficeSystem/basicsmanage/fzyc/index"),
name: "fzyc",
meta: {
title: "犯罪预测管理",
icon: "article-ranking"
}
},
//三级路由
{
path: "/intelligence",
name: "intelligence-zb",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/watchman-zb/intelligence/index"),
meta: {
title: "智能装备管理"
// icon: "article-ranking"
}
},
{
path: "/police-equipment",
name: "police-equipment",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/watchman-zb/police-equipment/index"),
meta: {
title: "警用器械管理"
// icon: "article-ranking"
}
},
{
path: "/day-streetzb",
name: "day-streetzb",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/watchman-zb/day-streetzb/index"),
meta: {
title: "每日街面装备"
// icon: "article-ranking"
}
},
{
path: "/watchman-zbtx-dell",
name: "watchman-zbtx-dell",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/watchman-zb/watchman-zbtx/index"),
meta: {
title: "巡防装备到期提醒"
// icon: "article-ranking"
}
},
{
path: "/watchman-zbgl",
name: "watchman-zbgl",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/watchman-zb/watchman-zbgl/index"),
meta: {
title: "巡防装备分类管理"
// icon: "article-ranking"
}
},
{
path: "/watchman-car",
name: "watchman-car",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/watchman-zb/watchman-car/index"),
meta: {
title: "巡防车辆管理"
// icon: "article-ranking"
}
},
{
path: "/patrol-police",
name: "patrol-police",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/watchman-ll/patrol-police/index"),
meta: {
title: "巡防民警"
// icon: "article-ranking"
}
},
{
path: "/auxiliary-police",
name: "auxiliary-police",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/watchman-ll/auxiliary-police/index"),
meta: {
title: "巡防辅警"
// icon: "article-ranking"
}
},
{
path: "/professional-skills",
name: "professional-skills",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/watchman-ll/professional-skills/index"),
meta: {
title: "专业技能"
// icon: "article-ranking"
}
},
{
path: "/experience",
name: "experience",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/watchman-ll/experience/index"),
meta: {
title: "经验管理"
// icon: "article-ranking"
}
},
{
path: "/mandatory-patrol",
name: "mandatory-patrol",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/patrol-route/mandatory-patrol/index"),
meta: {
title: "必巡点管理"
// icon: "article-ranking"
}
},
{
path: "/patrol-line",
name: "patrol-line",
component: () =>
import("@/views/backOfficeSystem/basicsmanage/patrol-route/patrol-line/index"),
meta: {
title: "必巡线管理"
// icon: "article-ranking"
}
}
]
},
{
path: "/service",
component: layout,
redirect: "/service/grade",
name: "service",
meta: {
title: "勤务中心",
icon: "personnel"
},
children: [{
path: "/service/grade",
component: () => import("@/views/backOfficeSystem/service/grade/index"),
name: "grade",
meta: {
title: "勤务等级管理",
icon: "article-ranking"
}
},
{
path: "/service/taskPage",
component: () => import("@/views/backOfficeSystem/service/taskPage/dailyTaskPackage/index"),
name: "taskPage",
meta: {
title: '任务清单',
icon: "article-ranking"
},
children: [
{
path: "/taskPageIndex",
component: () => import("@/views/backOfficeSystem/service/taskPage/dailyTaskPackage/index"),
name: "taskPageIndex",
meta: {
title: '日常任务包',
icon: "article-ranking"
},
}
]
},
2025-09-04 16:27:57 +08:00
{
path: "/service/statutoryHolidays",
component: () => import("@/views/backOfficeSystem/service/statutoryHolidays/index"),
name: "statutoryHolidays",
meta: {
title: "法定假日设置",
icon: "article-ranking"
}
},
{
path: "/service/shift",
component: () => import("@/views/backOfficeSystem/service/shift/index"),
name: "shift1",
meta: {
title: "勤务班次管理",
icon: "article-ranking"
}
},
{
path: "/service/shifTscheduling",
component: () => import("@/views/backOfficeSystem/service/shifTscheduling/index/index"),
name: "shifTscheduling",
meta: {
title: "值班排班管理",
icon: "article-ranking"
},
children: [{
path: "/shifTscheduling/index",
component: () =>
import("@/views/backOfficeSystem/service/shifTscheduling/index/index"),
name: "shifTschedulingIndex",
meta: {
title: "值班排班",
icon: "article-ranking"
}
},
{
path: "/shifTscheduling/wholecounty",
component: () =>
import("@/views/backOfficeSystem/service/shifTscheduling/wholecounty/index"),
name: "wholecounty",
meta: {
title: "全县值班记录",
icon: "article-ranking"
}
},
{
path: "/shifTscheduling/department",
component: () =>
import("@/views/backOfficeSystem/service/shifTscheduling/department/index"),
name: "department",
meta: {
title: "部门值班记录",
icon: "article-ranking"
}
},
{
path: "/shifTscheduling/my",
component: () => import("@/views/backOfficeSystem/service/shifTscheduling/my/index"),
name: "my",
meta: {
title: "我的值班记录",
icon: "article-ranking"
}
}
]
},
{
path: "/watchmanScheduling",
component: () =>
import("@/views/backOfficeSystem/service/watchmanScheduling/qxxfpb/index"),
name: "watchmanScheduling",
meta: {
title: "巡防排班管理",
icon: "article-ranking"
},
children: [{
path: "/watchmanScheduling/pbjl",
component: () =>
import("@/views/backOfficeSystem/service/watchmanScheduling/pbjl/index"),
name: "pbjl",
meta: {
title: "巡逻方案",
icon: "article-ranking"
}
},
{
path: "/watchmanScheduling/pbrl",
component: () =>
import("@/views/backOfficeSystem/service/watchmanScheduling/pbrl/index.vue"),
name: "pbrl",
meta: {
title: "排班日历",
icon: "article-ranking"
}
},
{
path: "/watchmanScheduling/myPbjl",
component: () =>
import("@/views/backOfficeSystem/service/watchmanScheduling/myPbjl/index"),
name: "mypbjl",
meta: {
title: "我的巡防排班",
icon: "article-ranking"
}
},
{
path: "/watchmanScheduling/qxxfpb",
component: () =>
import("@/views/backOfficeSystem/service/watchmanScheduling/qxxfpb/index"),
name: "qxxfpb",
meta: {
title: "全县巡防排班",
icon: "article-ranking"
}
},
{
path: "/watchmanScheduling/deptxfpb",
component: () =>
import("@/views/backOfficeSystem/service/watchmanScheduling/deptxfpb/index"),
name: "deptxfpb",
meta: {
title: "部门巡防排班",
icon: "article-ranking"
}
}
]
},
{
path: "/service/applicationApproval",
component: () =>
import("@/views/backOfficeSystem/service/applicationApproval/application/index"),
name: "applicationApproval",
meta: {
title: "不巡防申请审批",
icon: "article-ranking"
},
children: [{
path: "/service/applicationApproval/application/index",
component: () =>
import("@/views/backOfficeSystem/service/applicationApproval/application/index"),
name: "application",
meta: {
title: "不巡防申请",
icon: "article-ranking"
}
},
{
path: "/service/applicationApproval/approval/index",
component: () =>
import("@/views/backOfficeSystem/service/applicationApproval/approval/index"),
name: "approval",
meta: {
title: "不巡防审批",
icon: "article-ranking"
}
}
]
},
{
path: "/service/policeForceReport",
component: () => import("@/views/backOfficeSystem/service/policeForceReport/index"),
name: "policeForceReport",
meta: {
title: "警力报备",
icon: "article-ranking"
}
},
{
path: "/service/watchmanFiling",
component: () => import("@/views/backOfficeSystem/service/watchmanFiling/index"),
name: "watchmanFiling",
meta: {
title: "巡防报备",
icon: "article-ranking"
}
},
{
path: "/service/pleaseTakeAVacation",
component: () => import("@/views/backOfficeSystem/service/pleaseTakeAVacation/index"),
name: "pleaseTakeAVacation",
meta: {
title: "人员请休假",
icon: "article-ranking"
}
},
{
path: "/service/clockPage",
component: () => import("@/views/backOfficeSystem/service/clockPage/index"),
name: "clockPage",
meta: {
title: "打卡记录",
icon: "article-ranking"
}
},
{
path: "/service/wokingReport",
component: () => import("@/views/backOfficeSystem/service/wokingReport/index"),
name: "wokingReport",
meta: {
title: "值班报备",
icon: "article-ranking"
}
},
{
path: "/service/setBannerPic",
component: () => import("@/views/backOfficeSystem/service/setBannerPic/index"),
name: "setBannerPic",
meta: {
title: "Banner管理",
icon: "article-ranking"
}
},
//三级路由
{
path: "/watchmanScheduling/pbrl",
component: () =>
import("@/views/backOfficeSystem/service/watchmanScheduling/pbrl/index.vue"),
name: "pbrl",
meta: {
title: "排班日历",
}
},
{
path: "/shifTscheduling/index",
component: () => import("@/views/backOfficeSystem/service/shifTscheduling/index/index"),
name: "shifTschedulingIndex",
meta: {
title: "值班排班"
}
},
{
path: "/shifTscheduling/wholecounty",
component: () =>
import("@/views/backOfficeSystem/service/shifTscheduling/wholecounty/index"),
name: "wholecounty",
meta: {
title: "全县值班记录"
}
},
{
path: "/shifTscheduling/department",
component: () =>
import("@/views/backOfficeSystem/service/shifTscheduling/department/index"),
name: "department",
meta: {
title: "部门值班记录"
}
},
{
path: "/watchmanScheduling/pbjl",
component: () =>
import("@/views/backOfficeSystem/service/watchmanScheduling/pbjl/index"),
name: "pbjl",
meta: {
title: "巡防排班"
}
},
{
path: "/watchmanScheduling/myPbjl",
component: () =>
import("@/views/backOfficeSystem/service/watchmanScheduling/myPbjl/index"),
name: "mypbjl",
meta: {
title: "我的巡防排班"
}
},
{
path: "/watchmanScheduling/qxxfpb",
component: () =>
import("@/views/backOfficeSystem/service/watchmanScheduling/qxxfpb/index"),
name: "qxxfpb",
meta: {
title: "全县巡防排班"
}
},
{
path: "/watchmanScheduling/deptxfpb",
component: () =>
import("@/views/backOfficeSystem/service/watchmanScheduling/deptxfpb/index"),
name: "deptxfpb",
meta: {
title: "部门巡防排班"
}
},
{
path: "/service/applicationApproval/application/index",
component: () =>
import("@/views/backOfficeSystem/service/applicationApproval/application/index"),
name: "application",
meta: {
title: "不巡防申请"
}
},
{
path: "/service/applicationApproval/approval/index",
component: () =>
import("@/views/backOfficeSystem/service/applicationApproval/approval/index"),
name: "approval",
meta: {
title: "不巡防审批"
}
},
{
path: "/shifTscheduling/my",
component: () => import("@/views/backOfficeSystem/service/shifTscheduling/my/index"),
name: "my",
meta: {
title: "我的值班记录"
}
}
]
},
{
path: "/patrolResults",
component: layout,
redirect: "/patrolResults/personnelVerification",
name: 'patrolResults',
meta: {
title: "巡防战果",
icon: "personnel"
},
children: [{
path: "/patrolResults/personnelVerification",
component: () => import("@/views/backOfficeSystem/patrolResults/personnelVerificationLog/index"),
name: "personnelVerificationLog",
meta: {
title: '人员核查日志',
icon: "article-ranking"
}
},
{
path: "/patrolResults/vehicleVerificationLog",
component: () => import("@/views/backOfficeSystem/patrolResults/vehicleVerificationLog/index"),
name: "vehicleVerificationLog",
meta: {
title: '车辆核查日志',
icon: "article-ranking"
}
},
{
path: "/patrolResults/mediumPersonnelRatioLog",
component: () => import("@/views/backOfficeSystem/patrolResults/mediumPersonnelRatioLog/index"),
name: "mediumPersonnelRatioLog",
meta: {
title: '人员比中日志',
icon: "article-ranking"
}
},
{
path: "/patrolResults/mediumVehicleRatio",
component: () => import("@/views/backOfficeSystem/patrolResults/mediumVehicleRatio/index"),
name: "mediumVehicleRatio",
meta: {
title: '车辆比中日志',
icon: "article-ranking"
}
},
{
path: "/patrolResults/serviceReportLog",
component: () => import("@/views/backOfficeSystem/patrolResults/serviceReportLog/index"),
name: "serviceReportLog",
meta: {
title: '勤务报备日志',
icon: "article-ranking"
}
},
]
},
];
/**
* 公开路由表
*/
export const publicRoutes = [{
path: "/oatuh_login",
component: () => import("@/views/login/oatuh_login") //统一登录
},
{
path: "/login",
name: 'login',
component: () => import("@/views/login/index") //系统登录
},
{
path: "/wsVideoSenior",
component: () => import("@/components/wsVideoSenior/wsPlayOne/index") //高级视频
},
{
path: "/ninePointScreen",
component: () => import("@/components/wsVideoSenior/ninePointScreen/index"),
name: "ninePointScreen",
meta: {
title: "九分屏"
}
},
{
path: "/edit",
// 注意:带有路径“/”的记录中的组件“默认”是一个不返回 Promise 的函数
component: layout,
redirect: "/editPassword",
children: [{
path: "/editPassword",
name: "editPassword",
component: () => import("@/views/backOfficeSystem/editPassword/index"),
meta: {
title: "个人中心",
icon: "article"
}
},
{
path: "/404",
name: "404",
component: () => import("@/views/error-page/404")
},
{
path: "/401",
name: "401",
component: () => import("@/views/error-page/401")
}
],
},
{
path: "/",
name: "lz/home",
component: () => import("@/views/largeScreen/home/index"),
meta: {
},
},
{
path: "/rhtx",
component: () => import("@/views/rhtx/index"),
name: "rhtx",
meta: {
icon: "personnel-manage"
}
},
];
const router = createRouter({
history: createWebHashHistory(),
routes: publicRoutes
});
//初始化路由表
export function resetRouter() {
if (store.getters?.routeReady && store.getters?.userInfo?.permission?.menus) {
const menus = store.getters.userInfo.permission.menus;
menus.forEach((menu) => {
router.removeRoute(menu);
});
}
}
export default router;