import Vue from 'vue' import Router from 'vue-router' import Login from './views/Login.vue' import Register from './views/Register.vue' import NotFound from './views/404.vue' import Home from './views/Home.vue' // new router // 今日桌面 import desktop from './views/desktop' import desktopDetail from './views/desktop/detail.vue' import unusual from './views/desktop/unusual.vue' // 工作报告 import statistics from './views/workReport/statistics.vue' import daily from './views/workReport/daily.vue' import review from './views/workReport/list.vue' import reviewImport from './views/workReport/list_import.vue' import timer from './views/workReport/timer.vue' import reviewProfession from './views/workReport/list_profession.vue' import reviewDepartment from './views/workReport/list_department.vue' // 项目管理 import list from './views/project/list.vue' import cost from './views/project/cost.vue' import proDetail from './views/project/detail.vue' import depDetail from './views/project/detailDep.vue' import task from './views/task/list.vue' import projectInside from './views/project/projectInside.vue' import info from './views/project/info.vue' import projectGantt from './views/project/project_gantt.vue' // 团队管理 import team from './views/team/index.vue' // 系统设置 import timetype from './views/settings/timetype.vue'; import role from './views/role/role'; import finance from './views/project/finance'; import Market from './views/market/list'; import PdfView from './views/pdf/pdfview'; // 费用报销 import expense from './views/expense/expense'; //客户管理 import customer from './views/customer/list'; //专业管理 import profession from './views/profession/list'; //企业报表 import corpReport from './views/corpreport/list'; //审批流程 import workflow from './views/workflow/report'; // 权限管理 // import jurisdiction from './views/jurisdiction/jurisdiction' //简易工时统计表 import simpleReport from './views/simplereport/list'; // 任务管理 import tasks from './views/task/list'; // 请假 import leave from './views/leave/list'; import customData from './views/project/custom_data'; // 出差 import awayOffice from './views/awayOffice/awayOffice'; // 研究中心 // import research from './views/research/list'; // 角色权限 import quanx from './views/quanx/quanx' // 研究中心管理 import centerManage from './views/centerManage/centerManage' // 供应商模块 import provider from './views/provider/provider' Vue.use(Router) export const fixedRouter = [ { path: '/login', component: Login, name: '', hidden: true }, { path: '/register', component: Register, name: '', hidden: true }, { path: '/market', component: Market, name: '', hidden: true }, //tab页签切换 { path: '/', component: Home, name: '项目管理', iconCls: 'fa fa-sticky-note', hidden:true, leaf: true, children: [ { path: 'projectInside/:id', component: projectInside, name: '任务看板' }, { path: 'files/:id', component: projectInside, name: '文件中心' }, { path: 'info/:id', component: projectInside, name: '项目概览' }, { path: 'summary/:id', component: projectInside, name: '数据统计' }, { path: 'costbaseline/:id', component: projectInside, name: '成本管理' }, { path: 'earning/:id', component: projectInside, name: '挣值分析' }, ], // 其他信息 meta: { text: 'navigation.projectManagement' } }, { path: '/projectGantt', component: projectGantt, name: '项目甘特图', hidden: true }, { path: '/viewonline', component: PdfView, name: '', hidden: true }, ]; export const allRouters = [//组织架构 //工时报告 { path: '/', component: Home, name: '工时报告', text: 'navigation.reports', iconCls: 'iconfont firerock-icontianbao1', leaf: true, children: [ { path: '/daily', component: daily, name: '工时报告' }, ], // 其他信息 meta: { text: 'reports' } }, // { // path: '/', // component: Home, // name: '自动计时', // iconCls: 'iconfont firerock-iconmiaobiao', // leaf: true, // children: [ // { path: '/timer', component: timer, name: '自动计时' }, // ] // }, //工时审核 { path: '/', component: Home, name: '专业审核', iconCls: 'iconfont firerock-iconshenhe', leaf: true, children: [ { path: '/reviewProfession', component: reviewProfession, name: '专业审核' }, ], // 其他信息 meta: { text: 'navigation.professionalAudit' } }, { path: '/', component: Home, name: '部门审核', iconCls: 'iconfont firerock-iconshenhe', leaf: true, children: [ { path: '/reviewDepartment', component: reviewDepartment, name: '部门审核' }, ], // 其他信息 meta: { text: 'navigation.departmentAudit' } }, { path: '/', component: Home, name: '项目报告审核', iconCls: 'iconfont firerock-iconshenhe', leaf: true, children: [ { path: '/review', component: review, name: '项目报告审核' }, ], // 其他信息 meta: { text: 'navigation.projectReportReview' } }, { path: '/', component: Home, name: '导入日报审核', iconCls: 'iconfont firerock-iconshenhe', leaf: true, children: [ { path: '/reviewImport', component: reviewImport, name: '导入日报审核' }, ], // 其他信息 meta: { text: 'navigation.ImportDailyReview' } }, //成本统计 { path: '/', component: Home, name: '工时成本统计', iconCls: 'iconfont firerock-icontongji', leaf: true, children: [ { path: '/cost', component: cost, name: '工时成本统计' }, { path: '/cost/:id/:name', component: proDetail, name: '成本详情', hidden: true }, { path: '/costDep/:id/:name', component: depDetail, name: '成本详情', hidden: true }, ], // 其他信息 meta: { text: 'navigation.laborCostStatistics' } }, //自定义数值统计 { path: '/', component: Home, name: '自定义数值统计', iconCls: 'iconfont firerock-icontongji', leaf: true, children: [ { path: '/customData', component: customData, name: '自定义数值统计' } ], // 其他信息 meta: { text: 'navigation.customizeNumericalStatistics' } }, //每月财务成本 { path: '/', component: Home, name: '财务核算成本', iconCls: 'iconfont firerock-iconcaiwu', leaf: true, children: [ { path: '/finance', component: finance, name: '财务核算成本' }, ], // 其他信息 meta: { text: 'navigation.financialAccountingCost' } }, // 任务管理 { path: '/', component: Home, name: '待办任务', iconCls: 'iconfont firerock-icondaibanshixiang', leaf: true, children: [ { path: '/task', component: tasks, name: '待办任务' }, ] }, //项目管理 { path: '/', component: Home, name: '项目管理', iconCls: 'iconfont firerock-iconxiangmu', leaf: true, children: [ { path: '/list', component: list, name: '项目管理' }, ] }, { path: '/', component: Home, name: '项目报表服务', iconCls: 'iconfont firerock-iconbaobiao', leaf: true, children: [ { path: '/corpreport', component: corpReport, name: '项目报表服务' } ] }, { path: '/', component: Home, name: '请假管理', iconCls: 'iconfont firerock-iconwj-qjd', leaf: true, children: [ { path: '/leave', component: leave, name: '请假管理' } ] }, { path: '/', component: Home, name: '出差管理', iconCls: 'iconfont firerock-iconwj-qjd', leaf: true, children: [ { path: '/awayOffice', component: awayOffice, name: '出差管理' } ] }, { path: '/', component: Home, name: '客户管理', iconCls: 'iconfont firerock-iconkehu', leaf: true, children: [ { path: '/customer', component: customer, name: '客户管理' } ] }, { path: '/', component: Home, name: '工程专业管理', iconCls: 'iconfont firerock-iconjianzhugongchenglei', leaf: true, children: [ { path: '/profession', component: profession, name: '工程专业管理' } ] }, // 费用报销模块 { path: '/', component: Home, name: '费用报销', iconCls: 'iconfont firerock-iconbaoxiao', leaf: true, children: [ { path: '/expense', component: expense, name: '费用报销' } ] }, { path: '/', component: Home, name: '研究中心管理', iconCls: 'iconfont firerock-icondaibanshixiang', leaf: true,//只有一个节点 children: [ { path: '/centerManage', component: centerManage, name: '研究中心管理' }, ] }, { path: '/', component: Home, name: '供应商管理', iconCls: 'iconfont firerock-iconzuzhijiagou1', leaf: true,//只有一个节点 children: [ { path: '/provider', component: provider, name: '供应商管理' }, ] }, { path: '/', component: Home, name: '组织架构', iconCls: 'iconfont firerock-iconzuzhijiagou1', leaf: true,//只有一个节点 children: [ { path: '/team', component: team, name: '组织架构' }, ] }, { path: '/', component: Home, name: '审批流设置', iconCls: 'iconfont firerock-iconliucheng', leaf: true,//只有一个节点 children: [ { path: '/workflow', component: workflow, name: '审批流设置' }, ] }, //设置时间类型 // { // path: '/', // component: Home, // name: '', // iconCls: 'iconfont firerock-iconsetting', // leaf: true,//只有一个节点 // children: [ // { path: '/timetype', component: timetype, name: '系统基础设置' }, // ] // }, // { // path: '/', // component: Home, // name: '基础数据管理', // iconCls: 'iconfont firerock-iconsetting', // leaf: false,//只有一个节点 // children: [ // { path: '/timetype', component: infrastructure, name: '系统基础设置', iconCls: 'iconfont firerock-iconsetting' }, // { path: '/quanx', component: quanx, name: '角色权限管理', iconCls: 'iconfont firerock-iconsetting' } // ] // }, { path: '/', component: Home, name: '基础数据管理', iconCls: 'iconfont firerock-iconsetting', leaf: false,//只有一个节点 children: [ { path: '/timetype', component: timetype, name: '系统基础设置', iconCls: 'iconfont firerock-iconxitong-'}, { path: '/role', component: quanx, name: '角色权限管理', iconCls: 'iconfont firerock-iconquanxian1' } ] }, { path: '/404', component: NotFound, name: '', hidden: true }, { path: '*', hidden: true, redirect: { path: '/404' } } ] export const simpleRouters = [ //工时统计表 { path: '/', component: Home, name: '', iconCls: 'iconfont firerock-icontianbao1', leaf: true, children: [ { path: '/simple', component: simpleReport, name: '工时统计表' }, ] }, { path: '/404', component: NotFound, name: '', hidden: true }, { path: '*', hidden: true, redirect: { path: '/404' } } ] export default new Router({ routes: fixedRouter })