123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444 |
- import Vue from 'vue'
- import Router from 'vue-router'
- Vue.use(Router)
- /* Layout */
- import Layout from '@/layout'
- /* Home */
- import Home from '@/views/home/index'
- /**
- * 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' 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: '/login',
- component: () => import('@/views/login/index'),
- hidden: true
- },
- {
- path: '/404',
- component: () => import('@/views/404'),
- hidden: true
- },
- {
- path: '/',
- component: Home,
- hidden: true
- },
- {
- path: '/home',
- component: Home,
- name: '首页',
- hidden: true
- },
- // {
- // path: '/home',
- // component: Layout,
- // redirect: '/dashboard',
- // children: [{
- // path: 'dashboard',
- // name: 'Dashboard',
- // component: () => import('@/views/dashboard/index'),
- // meta: { title: 'Dashboard', icon: 'dashboard' }
- // }]
- // },
- {
- path: '/Platform',
- component: Layout,
- redirect: '/Platform/workbench',
- name: '流程管控',
- meta: { title: '流程管控', icon: 'env' },
- children: [
- {
- path: 'workbench',
- name: 'workbench',
- // hidden: true,
- component: () => import('@/views/Platform/workbench'),
- meta: { title: '我的工作台' }
- },
- {
- path: 'projectPage',
- name: 'projectPage',
- component: () => import('@/views/Platform/projectPage'),
- meta: { title: '项目管理' }
- },
- {
- path: 'useCasePage',
- name: 'useCasePage',
- hidden: true,
- component: () => import('@/views/Platform/useCasePage'),
- meta: { title: '用例管理' }
- },
- {
- path: '/Platform/presentation',
- name: '测试管理',
- component: () => import('@/views/Platform/presentation/testa'),
- meta: { title: '测试管理' },
- children: [
- {
- path: 'testPageData',
- name: '测试计划管理',
- hidden: true,
- component: () => import('@/views/Platform/presentation/testPage.vue'),
- meta: { title: '测试计划管理' }
- },
- {
- path: 'testPresentation',
- name: '日报报告',
- component: () => import('@/views/Platform/presentation/testPresentation'),
- meta: { title: '日报报告' }
- },
- {
- path: 'ResultPage',
- name: '准出报告',
- component: () => import('@/views/Platform/presentation/ResultPage'),
- meta: { title: '准出报告' }
- },
- {
- path: 'Assumptions',
- name: '提测报告',
- component: () => import('@/views/Platform/presentation/Assumptions'),
- meta: { title: '提测报告' }
- },
- {
- path: 'DailyNewsAdded',
- name: '日报报告',
- hidden: true,
- component: () => import('@/views/Platform/presentation/DailyNewsAdded'),
- meta: { title: '新增日报报告' }
- },
- {
- path: 'presentationReport',
- name: '提测报告',
- hidden: true,
- component: () => import('@/views/Platform/presentation/presentationReport'),
- meta: { title: '新增服务器提测报告' }
- },
- {
- path: 'acceptTheReport',
- name: '提测预览',
- hidden: true,
- component: () => import('@/views/Platform/presentation/acceptTheReport'),
- meta: { title: '提测预览' }
- },
- {
- path: 'testPresenyL',
- name: '日报预览',
- hidden: true,
- component: () => import('@/views/Platform/presentation/testPresenyL'),
- meta: { title: '日报预览' }
- },
- {
- path: 'ResultPageyL',
- name: '准出预览',
- hidden: true,
- component: () => import('@/views/Platform/presentation/ResultPageyL'),
- meta: { title: '准出预览' }
- },
- {
- path: 'Acceptance',
- name: '准出报告',
- hidden: true,
- component: () => import('@/views/Platform/presentation/Acceptance'),
- meta: { title: '准出报告,新增服务器端报告' }
- },
- {
- path: 'ClientAcceptance',
- name: '准出报告',
- hidden: true,
- component: () => import('@/views/Platform/presentation/ClientAcceptance'),
- meta: { title: '准出报告,新增客户端报告' }
- },
- {
- path: 'PresentReport',
- name: '提测报告,新增报告',
- hidden: true,
- component: () => import('@/views/Platform/presentation/PresentReport'),
- meta: { title: '新增客户端提测报告' }
- },
- {
- path: 'projectQuery',
- name: '项目查看编辑',
- hidden: true,
- component: () => import('@/views/Platform/projectQuery/projectQuery.vue'),
- meta: { title: '项目查看编辑' }
- },
- {
- path: 'taskQuery',
- name: '任务查看编辑',
- hidden: true,
- component: () => import('@/views/Platform/projectQuery/taskQuery.vue'),
- meta: { title: '任务查看编辑' }
- }
- ]
- },
- {
- path: '/Platform/defectManagement',
- name: '缺陷管理',
- component: () => import('@/views/Platform/defectManagement'),
- meta: { title: '缺陷管理' },
- children: [
- {
- path: 'bugCreate',
- name: '新建Bug',
- hidden: true,
- component: () => import('@/views/Platform/bugManage/bugCreate'),
- meta: { title: '新建Bug' }
- },
- {
- path: 'bugQuery',
- name: '查看Bug',
- hidden: true,
- component: () => import('@/views/Platform/bugManage/bugQuery'),
- meta: { title: '查看Bug' }
- },
- {
- path: 'bugUpdate',
- name: '更新Bug',
- hidden: true,
- component: () => import('@/views/Platform/bugManage/bugUpdate'),
- meta: { title: '更新Bug' }
- }
- ]
- },
- {
- path: 'teamPage',
- name: 'teamPage',
- hidden: true,
- component: () => import('@/views/Platform/teamPage'),
- meta: { title: '团队管理' }
- }]
- },
- {
- path: '/env-platform',
- component: Layout,
- redirect: '/env-platform/env',
- name: '环境',
- meta: { title: '环境平台', icon: 'env_platform' },
- children: [
- {
- path: 'env',
- name: 'env',
- component: () => import('@/views/env/index.vue'),
- meta: { title: '环境管理' }
- },
- {
- path: 'businessline',
- name: 'businessline',
- component: () => import('@/views/env/index.vue'),
- meta: { title: '业务线管理' }
- },
- {
- path: 'whitelist',
- name: 'whitelist',
- component: () => import('@/views/env/index.vue'),
- meta: { title: '白名单管理' }
- },
- {
- path: 'module',
- name: 'module',
- component: () => import('@/views/env/index.vue'),
- meta: { title: '模块管理' }
- },
- {
- path: 'group',
- name: 'group',
- component: () => import('@/views/env/index.vue'),
- meta: { title: 'Group管理' }
- },
- {
- path: 'topic',
- name: 'topic',
- component: () => import('@/views/env/index.vue'),
- meta: { title: 'Topic管理' }
- },
- {
- path: 'mq',
- name: 'mq',
- component: () => import('@/views/env/index.vue'),
- meta: { title: 'MQ管理' }
- },
- {
- path: 'data',
- name: 'data',
- component: () => import('@/views/env/index.vue'),
- meta: { title: '数据统计' }
- }
- ]
- },
- {
- path: '/mock',
- component: Layout,
- redirect: '/mock/interface',
- name: 'Mock',
- meta: { title: 'Mock服务', icon: 'MQ' },
- children: [
- {
- path: 'interface',
- name: 'Interface',
- component: () => import('@/views/mock/interface'),
- meta: { title: 'dubbo mock' }
- },
- {
- path: 'interface/:rule',
- name: 'Rule',
- hidden: true,
- component: () => import('@/views/mock/rule'),
- meta: { title: 'dubbo规则' }
- },
- {
- path: 'httpmock',
- name: 'httpmock',
- component: () => import('@/views/mock/httpmock'),
- meta: { title: 'http mock' }
- },
- {
- path: 'httpmock/:httprule',
- name: 'Httprule',
- hidden: true,
- component: () => import('@/views/mock/httprule'),
- meta: { title: 'httpmock规则' }
- }
- ]
- },
- {
- path: '/data',
- component: Layout,
- redirect: '/data/upload-file',
- name: '数据中心',
- hidden: true,
- meta: { title: '数据中心', icon: 'examlpe' },
- children: [
- {
- path: 'upload-file',
- name: 'jar包管理',
- component: () => import('@/views/data/upload.vue'),
- meta: { title: 'jar包管理' }
- },
- {
- path: 'item',
- name: '动态数据',
- component: () => import('@/views/data/index.vue'),
- meta: { title: '动态数据' }
- }
- ]
- },
- {
- path: '/online-quality',
- component: Layout,
- redirect: '/online-quality/check-list',
- name: '上线质检',
- meta: { title: '上线质检', icon: '上线质检' },
- children: [
- {
- path: 'check-list',
- name: '模板管理',
- component: () => import('@/views/online-quality/CheckConfig/index.vue'),
- meta: { title: '模板管理' }
- },
- {
- path: 'history-task',
- name: '历史任务',
- component: () => import('@/views/online-quality/HistoryTask/index.vue'),
- meta: { title: '历史任务' }
- },
- {
- path: 'history-task-details/:taskId',
- props: true,
- name: '历史任务详情',
- hidden: true,
- component: () => import('@/views/online-quality/HistoryTask/taskDetails.vue'),
- meta: { title: '历史任务详情' }
- },
- {
- path: 'block-server',
- name: '阻断服务',
- component: () => import('@/views/online-quality/BlockServer/index.vue'),
- meta: { title: '阻断服务' }
- }
- ]
- },
- { path: '*', redirect: '/404', hidden: true },
- {
- path: '/quality',
- component: Layout,
- redirect: '/quality/qualityMarket',
- name: '质量度量',
- // hidden: true,
- meta: { title: '质量度量', icon: 'rule' },
- children: [
- {
- path: 'qualityMarket',
- name: '质量大盘',
- // hidden: true,
- component: () => import('@/views/quality/qualityMarket.vue'),
- meta: { title: '质量大盘' }
- },
- {
- path: 'qualityMarket',
- name: '质量大盘',
- // hidden: true,
- component: () => import('@/views/quality/qualityMarket.vue'),
- meta: { title: '质量大盘' },
- children: [
- {
- path: 'qualityProcess',
- name: '上线过程',
- hidden: true,
- component: () => import('@/views/quality/qualityProcess.vue'),
- meta: { title: '上线过程' }
- }
- ]
- }
- ]
- }
- ]
- 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
|