You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
446 lines
12 KiB
446 lines
12 KiB
import Vue from 'vue'
|
|
import Router from 'vue-router'
|
|
|
|
Vue.use(Router)
|
|
|
|
/* Layout */
|
|
import Layout from '@/layout'
|
|
/**
|
|
* Note: sub-menu only appear when route children.length >= 1
|
|
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
|
|
*
|
|
* hidden: true if set true, item will not show in the sidebar(default is false)
|
|
* alwaysShow: true if set true, will always show the root menu
|
|
* if not set alwaysShow, when item has more than one children route,
|
|
* it will becomes nested mode, otherwise not show the root menu
|
|
* redirect: noRedirect if set noRedirect will no redirect in the breadcrumb
|
|
* name:'router-name' the name is used by <keep-alive> (must set!!!)
|
|
* meta : {
|
|
roles: ['admin','editor'] control the page roles (you can set multiple roles)
|
|
title: 'title' the name show in sidebar and breadcrumb (recommend set)
|
|
icon: 'svg-name'/'el-icon-x' the icon show in the sidebar
|
|
breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
|
|
activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
|
|
}
|
|
*/
|
|
|
|
/**
|
|
* constantRoutes
|
|
* a base page that does not have permission requirements
|
|
* all roles can be accessed
|
|
*/
|
|
export const constantRoutes = [
|
|
{
|
|
path: '/',
|
|
component: Layout,
|
|
redirect: '/frontPage',
|
|
children: [{
|
|
path: 'frontPage',
|
|
name: 'frontPage',
|
|
component: () => import('@/views/frontPage/index'),
|
|
meta: { title: '首页'}
|
|
}]
|
|
},
|
|
{
|
|
path: '/login',
|
|
component: () => import('@/views/login/wxLogin'),
|
|
hidden: true
|
|
},
|
|
// 扫码登录中间件
|
|
{
|
|
path: '/ceshi',
|
|
component: () => import('@/views/ce/index'),
|
|
// hidden: true
|
|
},
|
|
{
|
|
path: '/lunbo',
|
|
component: () => import('@/views/lunbo/index'),
|
|
// hidden: true
|
|
},
|
|
|
|
{
|
|
path: '/approval',
|
|
component: () => import('@/views/approval/index'),
|
|
hidden: true
|
|
},
|
|
// {
|
|
// path: '/details',
|
|
// component: () => import('@/views/record/details'),
|
|
// hidden: true
|
|
// },
|
|
{
|
|
path: '/index',
|
|
component: () => import('@/views/index'),
|
|
hidden: true
|
|
},
|
|
{
|
|
path: '/404',
|
|
component: () => import('@/views/404'),
|
|
hidden: true
|
|
},
|
|
|
|
{
|
|
path: '/permissionSetting',
|
|
component: Layout,
|
|
redirect: '/permissionSetting',
|
|
children: [{
|
|
path: 'permissionSetting',
|
|
component: () => import('@/views/permission/permissionSetting'),
|
|
meta: { title: '权限配置'}
|
|
}]
|
|
},
|
|
// /setsystem/systemmenulist
|
|
{
|
|
path: '/setsystem',
|
|
component: Layout,
|
|
children: [
|
|
// 当 /user/:id 匹配成功
|
|
// UserHome 将被渲染到 User 的 <router-view> 内部
|
|
{
|
|
path: 'systemmenulist',
|
|
component: () => import('@/views/menuSettings/index'),
|
|
meta: { title: '菜单管理'}
|
|
},
|
|
],
|
|
},
|
|
// 考核数据
|
|
{
|
|
path: '/echarts',
|
|
component: Layout,
|
|
children: [
|
|
// 当 /user/:id 匹配成功
|
|
// UserHome 将被渲染到 User 的 <router-view> 内部
|
|
{
|
|
path: 'table',
|
|
component: () => import('@/views/echarts/table'),
|
|
meta: { title: '明细表'}
|
|
},
|
|
{
|
|
path: 'echarts',
|
|
component: () => import('@/views/echarts/echarts'),
|
|
meta: { title: '图表信息'}
|
|
},
|
|
{
|
|
path: 'total',
|
|
component: () => import('@/views/echarts/total'),
|
|
meta: { title: '成绩表'}
|
|
},
|
|
],
|
|
},
|
|
// hr设置
|
|
{
|
|
path: '/personnel',
|
|
component: Layout,
|
|
children: [
|
|
// 当 /user/:id 匹配成功
|
|
// UserHome 将被渲染到 User 的 <router-view> 内部
|
|
{
|
|
path: 'post',
|
|
component: () => import('@/views/personnel/post/index'),
|
|
meta: { title: '岗位管理'}
|
|
},
|
|
|
|
],
|
|
},
|
|
// hr设置
|
|
{
|
|
path: '/hr',
|
|
component: Layout,
|
|
children: [
|
|
// 当 /user/:id 匹配成功
|
|
// UserHome 将被渲染到 User 的 <router-view> 内部
|
|
{
|
|
path: 'personnel',
|
|
component: () => import('@/views/hr/personnel.vue'),
|
|
meta: { title: '人员管理'}
|
|
},
|
|
{
|
|
path: 'position',
|
|
component: () => import('@/views/hr/position.vue'),
|
|
meta: { title: '职务分类'}
|
|
},
|
|
{
|
|
path: 'jobTitle',
|
|
component: () => import('@/views/hr/jobTitle.vue'),
|
|
},
|
|
{
|
|
path: 'organizeType',
|
|
component: () => import('@/views/hr/organizeType.vue'),
|
|
},
|
|
{
|
|
path: 'organization',
|
|
component: () => import('@/views/hr/organization.vue'),
|
|
},
|
|
{
|
|
path: 'team',
|
|
component: () => import('@/views/hr/team.vue'),
|
|
meta: { title: '班组管理'}
|
|
},
|
|
],
|
|
},
|
|
// 数据提报
|
|
{
|
|
path: '/qualitative',
|
|
component: Layout,
|
|
children: [
|
|
// 当 /user/:id 匹配成功
|
|
// UserHome 将被渲染到 User 的 <router-view> 内部
|
|
{
|
|
path: 'qualitative',
|
|
component: () => import('@/views/qualitative/index'),
|
|
meta: { title: '定性考核'}
|
|
},
|
|
{
|
|
path: 'mete',
|
|
component: () => import('@/views/mete/index'),
|
|
meta: { title: '定量考核'}
|
|
},
|
|
],
|
|
},
|
|
// 荣誉档案
|
|
{
|
|
path: '/honer',
|
|
component: Layout,
|
|
children: [
|
|
// 当 /user/:id 匹配成功
|
|
// UserHome 将被渲染到 User 的 <router-view> 内部
|
|
{
|
|
path: 'index',
|
|
component: () => import('@/views/honor/index'),
|
|
meta: { title: '荣誉档案'}
|
|
},
|
|
{
|
|
path: 'type',
|
|
component: () => import('@/views/honor/type'),
|
|
meta: { title: '载体类型'}
|
|
},
|
|
],
|
|
},
|
|
// 审核记录
|
|
{
|
|
path: '/approvalData',
|
|
component: Layout,
|
|
children: [
|
|
// 当 /user/:id 匹配成功
|
|
// UserHome 将被渲染到 User 的 <router-view> 内部
|
|
{
|
|
path: 'approvalData',
|
|
component: () => import('@/views/approvalData/index'),
|
|
meta: { title: '审核记录'}
|
|
},
|
|
],
|
|
},
|
|
|
|
// 基础信息
|
|
{
|
|
path: '/basicInfo',
|
|
component: Layout,
|
|
children: [
|
|
// 当 /user/:id 匹配成功
|
|
// UserHome 将被渲染到 User 的 <router-view> 内部
|
|
{
|
|
path: 'assessmentDimension',
|
|
component: () => import('@/views/basicInfo/assessmentDimension.vue'),
|
|
meta: { title: '考核维度'}
|
|
},
|
|
{
|
|
path: 'project',
|
|
component: () => import('@/views/basicInfo/project'),
|
|
meta: { title: '考核指标'}
|
|
},
|
|
{
|
|
path: 'gwproject',
|
|
component: () => import('@/views/basicInfo/projectBase'),
|
|
meta: { title: '岗位指标'}
|
|
},
|
|
{
|
|
path: 'Target',
|
|
component: () => import('@/views/basicInfo/targetBase'),
|
|
meta: { title: '考核目标'}
|
|
},
|
|
],
|
|
},
|
|
// {
|
|
// path: '/',
|
|
// component: Layout,
|
|
// redirect: '/dashboard',
|
|
// children: [{
|
|
// path: 'dashboard',
|
|
// name: 'Dashboard',
|
|
// component: () => import('@/views/approval/index'),
|
|
// meta: { title: '测试'}
|
|
// }]
|
|
// },
|
|
// {
|
|
// path: '/aaa',
|
|
// component: Layout,
|
|
// redirect: '/aaa',
|
|
// children: [{
|
|
// path: 'aaa',
|
|
// name: 'aaa',
|
|
// component: () => import('@/views/approval/aaa'),
|
|
// meta: { title: '测试1'}
|
|
// }]
|
|
// },
|
|
// {
|
|
// path: '/bbb',
|
|
// component: Layout,
|
|
// redirect: '/bbb',
|
|
// children: [{
|
|
// path: 'bbb',
|
|
// name: 'bbb',
|
|
// component: () => import('@/views/approval/bbb'),
|
|
// meta: { title: 'table编辑测试'}
|
|
// }]
|
|
// },
|
|
// {
|
|
// path: '/bbb',
|
|
// component: Layout,
|
|
// redirect: '/bbb',
|
|
// children: [{
|
|
// path: 'bbb',
|
|
// name: 'bbb',
|
|
// component: () => import('@/views/basicInfo/assessmentDimension'),
|
|
// meta: { title: '测试b'}
|
|
// }]
|
|
// },
|
|
// {
|
|
// path: '/dataReporting',
|
|
// component: Layout,
|
|
// redirect: '/dataReporting/departmentKpi',
|
|
// name: 'Example',
|
|
// meta: { title: '数据提报', icon: 'el-icon-s-help' },
|
|
// children: [
|
|
// {
|
|
// path: 'departmentKpi',
|
|
// name: 'departmentKpi',
|
|
// component: () => import('@/views/dataReporting/departmentKpi'),
|
|
// meta: { title: '部门KPI', icon: 'table' }
|
|
// },
|
|
// {
|
|
// path: 'personalKpi',
|
|
// name: 'personalKpi',
|
|
// component: () => import('@/views/dataReporting/personalKpi'),
|
|
// meta: { title: '个人KPI', icon: 'tree' }
|
|
// },
|
|
// {
|
|
// path: 'operationalEvaluation',
|
|
// name: 'operationalEvaluation',
|
|
// component: () => import('@/views/dataReporting/operationalEvaluation'),
|
|
// meta: { title: '运营评价', icon: 'tree' }
|
|
// }
|
|
// ]
|
|
// },
|
|
// 考核方案
|
|
{
|
|
path: '/assessmentProgram',
|
|
component: Layout,
|
|
children: [
|
|
// 当 /user/:id 匹配成功
|
|
// UserHome 将被渲染到 User 的 <router-view> 内部
|
|
{
|
|
path: 'departmentalAssessment',
|
|
component: () => import('@/views/assessmentProgram/departmentBase'),
|
|
meta: { title: '部门考核'}
|
|
},
|
|
{
|
|
path: 'gwQualitativeIndicators',
|
|
component: () => import('@/views/assessmentProgram/qualitativeIndicatorsBase'),
|
|
meta: { title: '定性考核'}
|
|
},
|
|
{
|
|
path: 'qualitativeIndicators',
|
|
component: () => import('@/views/assessmentProgram/qualitativeIndicators'),
|
|
meta: { title: '定性考核'}
|
|
},
|
|
|
|
],
|
|
},
|
|
|
|
{
|
|
path: '/basicInfo',
|
|
component: Layout,
|
|
redirect: '/basicInfo/assessmentDimension',
|
|
name: 'Example',
|
|
meta: { title: '基础信息', icon: 'el-icon-s-help' },
|
|
children: [
|
|
{
|
|
path: 'assessmentDimension',
|
|
name: 'assessmentDimension',
|
|
component: () => import('@/views/basicInfo/assessmentDimension.vue'),
|
|
meta: { title: '考核维度', icon: 'table' }
|
|
},
|
|
// {
|
|
// path: 'quantitativeIndicators',
|
|
// name: 'quantitativeIndicators',
|
|
// component: () => import('@/views/basicInfo/quantitativeIndicators'),
|
|
// meta: { title: '定量指标', icon: 'tree' }
|
|
// },
|
|
// {
|
|
// path: 'qualitativeIndicators',
|
|
// name: 'qualitativeIndicators',
|
|
// component: () => import('@/views/basicInfo/qualitativeIndicators'),
|
|
// meta: { title: '定性指标', icon: 'tree' }
|
|
// },
|
|
{
|
|
path: 'project',
|
|
name: 'project',
|
|
component: () => import('@/views/basicInfo/project'),
|
|
meta: { title: '考核指标', icon: 'tree' }
|
|
},
|
|
{
|
|
path: 'Target',
|
|
name: 'Target',
|
|
component: () => import('@/views/basicInfo/targetBase'),
|
|
meta: { title: '考核目标', icon: 'tree' }
|
|
},
|
|
// {
|
|
// path: 'jobEntry',
|
|
// name: 'jobEntry',
|
|
// component: () => import('@/views/basicInfo/jobEntry'),
|
|
// meta: { title: '岗位录入', icon: 'tree' }
|
|
// }
|
|
]
|
|
},
|
|
// {
|
|
// path: '/record',
|
|
// component: Layout,
|
|
// redirect: '/record',
|
|
// children: [{
|
|
// path: 'record',
|
|
// name: 'Record',
|
|
// component: () => import('@/views/record/index'),
|
|
// meta: { title: '考核记录'}
|
|
// }]
|
|
// },
|
|
{
|
|
path: '/details',
|
|
component: Layout,
|
|
redirect: '/details',
|
|
children: [{
|
|
path: 'details',
|
|
name: 'Details',
|
|
component: () => import('@/views/record/details'),
|
|
// meta: { title: '考核记录详情'}
|
|
}]
|
|
},
|
|
|
|
// 404 page must be placed at the end !!!
|
|
{ path: '*', redirect: '/404', hidden: true }
|
|
]
|
|
|
|
const createRouter = () => new Router({
|
|
// mode: 'history', // require service support
|
|
scrollBehavior: () => ({ y: 0 }),
|
|
routes: constantRoutes
|
|
})
|
|
|
|
const router = createRouter()
|
|
|
|
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
|
|
export function resetRouter() {
|
|
const newRouter = createRouter()
|
|
router.matcher = newRouter.matcher // reset router
|
|
}
|
|
|
|
export default router
|
|
|