import BasicLayout from '../../layouts/BasicLayout.vue';
import Login from '../../views/login/index.vue';


export default [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/login',
    component: Login,
    meta: { title: '登录页面' },
  },
  {
    path: '/home',
    redirect: '/home/index',
    component: BasicLayout,
    children: [
      {
        path: '/home/index',
        name: 'Home',
        component: () => import('../../views/home/index.vue'),
        meta: { title: '首页', requireAuth: true, affix: true, closable: false },
      },
    ]
  },
  {
    path: '/system',
    redirect: '/system/index',
    component: BasicLayout,
    meta: {
      title: '系统管理',
      requireAuth: true,
      permissions: ['sys:user:add']
    },
    children: [
      {
        path: '/system/index',
        name: 'systemIndex',
        component: () => import('../../views/system/index.vue'),
        meta: { title: '人员管理', requireAuth: true, closable: true, permissions: ['sys:user:add'] },
      }, {
        path: '/system/department',
        name: 'systemDepartment',
        component: () => import('../../views/system/department.vue'),
        meta: { title: '部门管理', requireAuth: true, closable: true },
      }, {
        path: '/system/party',
        name: 'systemParty',
        component: () => import('../../views/system/party.vue'),
        meta: { title: '党支部管理', requireAuth: true, closable: true },
      }, {
        path: '/system/notice',
        name: 'systemNotice',
        component: () => import('../../views/system/notice.vue'),
        meta: { title: '通知公告', requireAuth: true, closable: true },
      }, {
        path: '/system/message',
        name: 'systemMessage',
        component: () => import('../../views/system/message.vue'),
        meta: { title: '站内信', requireAuth: true, closable: true },
      }, {
        path: '/system/permission',
        name: 'systemPermission',
        component: () => import('../../views/system/permission.vue'),
        meta: { title: '权限管理', requireAuth: true, closable: true },
      }, {
        path: '/system/menu',
        name: 'systemMenu',
        component: () => import('../../views/system/menu.vue'),
        meta: { title: '菜单管理', requireAuth: true, closable: true },
      }
    ]
  },
  {
    path: '/complaint',
    redirect: '/complaint/index',
    component: BasicLayout,
    children: [
      {
        path: '/complaint/index',
        name: 'Complaint',
        component: () => import('../../views/complaint/index.vue'),
        meta: { title: '投诉管理', requireAuth: true, closable: true },
      },
    ]
  }, {
    path: '/packet',
    redirect: '/packet/index',
    component: BasicLayout,
    children: [
      {
        path: '/packet/index',
        name: 'Packet',
        component: () => import('../../views/packet/index.vue'),
        meta: { title: '拒收红包', requireAuth: true, closable: true },
      },
    ]
  }, {
    path: '/day_evaluation',
    redirect: '/day_evaluation/index',
    component: BasicLayout,
    meta: { title: '日常考评' },
    children: [
      {
        path: '/day_evaluation_assess',
        meta: { title: '日常填报' },
        children: [
          {
            path: '/day_evaluation/index',
            name: 'dayEvaluationIndex',
            component: () => import('../../views/day_evaluation/index.vue'),
            meta: { title: '加减分管理', requireAuth: true, closable: true },
          }, {
            path: '/day_evaluation/examine',
            name: 'dayEvaluationExamine',
            component: () => import('../../views/day_evaluation/examine.vue'),
            meta: { title: '加减分审核', requireAuth: true, closable: true },
          },{
            path: '/day_evaluation/list',
            name: 'dayEvaluationList',
            component: () => import('../../views/day_evaluation/list.vue'),
            meta: { title: '考评列表', requireAuth: true, closable: true },
          },
        ]
      },
      {
        path: '/day_evaluation_self_assess',
        meta: { title: '自评填报考评' },
        children: [
          {
            path: '/month_evaluation/index',
            name: 'monthEvaluationIndex',
            component: () => import('../../views/month_evaluation/index.vue'),
            meta: { title: '月度自评填报', requireAuth: true, closable: true },
          }, {
            path: '/month_evaluation/examine/:id*',
            name: 'monthEvaluationExamine',
            component: () => import('../../views/month_evaluation/examine.vue'),
            meta: { title: '月度自评管理', closable: true },
          }, {
            path: '/month_evaluation/examine/:id*',
            name: 'monthEvaluationExamine',
            component: () => import('../../views/month_evaluation/examine.vue'),
            meta: { title: '季度自评管理', closable: true },
          }, {
            path: '/season_evaluation/index',
            name: 'seasonEvaluationIndex',
            component: () => import('../../views/season_evaluation/index.vue'),
            meta: { title: '季度自评填报', requireAuth: true, closable: true },
          }, {
            path: '/season_evaluation/examine/:id*',
            name: 'seasonEvaluationExamine',
            component: () => import('../../views/season_evaluation/examine.vue'),
            meta: { title: '季度自评管理', closable: true },
          }
        ]
      }, {
        path: '/day_evaluation_system_assess',
        meta: { title: '考评评价管理' },
        children: [
          {
            path: '/month_evaluation/assess',
            name: 'monthEvaluationAssess',
            component: () => import('../../views/month_evaluation/assess.vue'),
            meta: { title: '月度评价填报', requireAuth: true, closable: true },
          },
          {
            path: '/season_evaluation/assess',
            name: 'seasonEvaluationAssess',
            component: () => import('../../views/season_evaluation/assess.vue'),
            meta: { title: '季度评价填报', requireAuth: true, closable: true },
          },
          {
            path: '/year_evaluation/assess',
            name: 'yearEvaluationAssess',
            component: () => import('../../views/year_evaluation/assess.vue'),
            meta: { title: '年度评价填报', requireAuth: true, closable: true },
          },
          {
            path: '/year_evaluation/list',
            name: 'yearEvaluationList',
            component: () => import('../../views/year_evaluation/list.vue'),
            meta: { title: '评价管理列表', requireAuth: true, closable: true },
          }
        ]
      }
    ]
  },
  // {
  //   path: '/month_evaluation',
  //   redirect: '/month_evaluation/index',
  //   component: BasicLayout,
  //   meta: { title: '月度考评' },
  //   children: [
  //     {
  //       path: '/month_evaluation/index',
  //       name: 'monthEvaluationIndex',
  //       component: () => import('../../views/month_evaluation/index.vue'),
  //       meta: { title: '月度考评填报', requireAuth: true, closable: true },
  //     }, {
  //       path: '/month_evaluation/examine/:id*',
  //       name: 'monthEvaluationExamine',
  //       component: () => import('../../views/month_evaluation/examine.vue'),
  //       meta: { title: '月度考评管理', closable: true },
  //     }
  //   ]
  // }, {
  //   path: '/season_evaluation',
  //   redirect: '/season_evaluation/index',
  //   component: BasicLayout,
  //   meta: { title: '季度考评' },
  //   children: [
  //     {
  //       path: '/season_evaluation/index',
  //       name: 'seasonEvaluationIndex',
  //       component: () => import('../../views/season_evaluation/index.vue'),
  //       meta: { title: '季度考评', requireAuth: true, closable: true },
  //     }, {
  //       path: '/season_evaluation/examine/:id*',
  //       name: 'seasonEvaluationExamine',
  //       component: () => import('../../views/season_evaluation/examine.vue'),
  //       meta: { title: '季度考评管理', closable: true },
  //     }
  //   ]
  // }, 
  {
    path: '/outside_evaluation',
    redirect: '/outside_evaluation/index',
    component: BasicLayout,
    meta: { title: '院外考评' },
    children: [
      {
        path: '/outside_evaluation/index',
        name: 'outsideEvaluationIndex',
        component: () => import('../../views/day_evaluation/index.vue'),
        meta: { title: '我的院外考评', requireAuth: true, closable: true },
      }, {
        path: '/outside_evaluation/examine',
        name: 'outsideEvaluationExamine',
        component: () => import('../../views/day_evaluation/examine.vue'),
        meta: { title: '院外考评管理', requireAuth: true, closable: true },
      }
    ]
  }, {
    path: '/year_evaluation',
    redirect: '/year_evaluation/index',
    component: BasicLayout,
    meta: { title: '年度考评' },
    children: [
      {
        path: '/year_evaluation/index',
        name: 'yearEvaluationIndex',
        component: () => import('../../views/year_evaluation/index.vue'),
        meta: { title: '年度考评', requireAuth: true, closable: true },
      }, {
        path: '/year_evaluation/examine/:id*',
        name: 'yearEvaluationExamine',
        component: () => import('../../views/year_evaluation/examine.vue'),
        meta: { title: '年度考评管理', closable: true },
      }, {
        path: '/year_evaluation/department',
        name: 'yearEvaluationDepartment',
        component: () => import('../../views/year_evaluation/department.vue'),
        meta: { title: '年末科室考评管理', closable: true },
      }, {
        path: '/year_evaluation/branch',
        name: 'yearEvaluationBranch',
        component: () => import('../../views/year_evaluation/branch.vue'),
        meta: { title: '年末支部考评管理', closable: true },
      }, {
        path: '/year_evaluation/overall',
        name: 'yearEvaluationOverall',
        component: () => import('../../views/year_evaluation/overall.vue'),
        meta: { title: '年末总党支考评管理', closable: true },
      }, {
        path: '/year_evaluation/hospital',
        name: 'yearEvaluationHospital',
        component: () => import('../../views/year_evaluation/hospital.vue'),
        meta: { title: '年末医院考评管理', closable: true },
      }
    ]
  }, {
    path: '/file_bag',
    redirect: '/file_bag',
    component: BasicLayout,
    meta: { title: '医德医风档案' },
    children: [
      {
        path: '/file_bag/index/:id?',
        name: 'fileBagIndex',
        component: () => import('../../views/file_bag/index.vue'),
        meta: { title: '我的档案', closable: true },
      }, {
        path: '/file_bag/examine',
        name: 'fileBagExamine',
        component: () => import('../../views/file_bag/examine.vue'),
        meta: { title: '员工档案', requireAuth: true, closable: true },
      }
    ]
  }, {
    path: '/year_evaluation_summary',
    redirect: '/year_evaluation_summary/index',
    component: BasicLayout,
    meta: { title: '年度考评汇总' },
    children: [
      {
        path: '/year_evaluation_summary/index',
        name: 'yearEvaluationSummaryIndex',
        component: () => import('../../views/year_evaluation_summary/index.vue'),
        meta: { title: '自动公示', closable: true },
      }, {
        path: '/year_evaluation_summary/examine',
        name: 'yearEvaluationSummaryExamine',
        component: () => import('../../views/year_evaluation_summary/examine.vue'),
        meta: { title: '考评汇总', requireAuth: true, closable: true },
      }, {
        path: '/year_evaluation_summary/statistics',
        name: 'yearEvaluationSummaryStatistics',
        component: () => import('../../views/year_evaluation_summary/statistics.vue'),
        meta: { title: '统计分析', requireAuth: true, closable: true },
      }
    ]
  }, {
    path: '/census',
    redirect: '/census/index',
    component: BasicLayout,
    meta: { title: '统计报表分析' },
    children: [
      {
        path: '/census/index',
        name: 'censusIndex',
        component: () => import('../../views/census/red.vue'),
        meta: { title: '拒收红包报表统计', requireAuth: true, closable: true },
      }, {
        path: '/census/day',
        name: 'censusDay',
        component: () => import('../../views/census/day.vue'),
        meta: { title: '日常考评报表统计', requireAuth: true, closable: true },
      }, {
        path: '/census/month',
        name: 'censusMonth',
        component: () => import('../../views/census/month.vue'),
        meta: { title: '月度考评报表统计', requireAuth: true, closable: true },
      }, {
        path: '/census/season',
        name: 'censusSeason',
        component: () => import('../../views/census/season.vue'),
        meta: { title: '季度考评报表统计', requireAuth: true, closable: true },
      }, {
        path: '/census/year',
        name: 'censusYear',
        component: () => import('../../views/census/year.vue'),
        meta: { title: '年度考评报表统计', requireAuth: true, closable: true },
      }
    ]
  }, {
    path: '/configuration',
    redirect: '/configuration/index',
    component: BasicLayout,
    meta: { title: '规则配置中心' },
    children: [
      {
        path: '/configuration/index',
        name: 'configurationIndex',
        component: () => import('../../views/configuration/index.vue'),
        meta: { title: '登陆日志管理', requireAuth: true, closable: true },
      }, {
        path: '/configuration/foundation',
        name: 'configurationFoundation',
        component: () => import('../../views/configuration/foundation.vue'),
        meta: { title: '基础评分项管理', requireAuth: true, closable: true },
      }, {
        path: '/configuration/add',
        name: 'configurationAdd',
        component: () => import('../../views/configuration/add.vue'),
        meta: { title: '加减分项管理', requireAuth: true, closable: true },
      }, {
        path: '/configuration/time',
        name: 'configurationTime',
        component: () => import('../../views/configuration/time.vue'),
        meta: { title: '考评时间管理', requireAuth: true, closable: true },
      }, {
        path: '/configuration/level',
        name: 'configurationLevel',
        component: () => import('../../views/configuration/level.vue'),
        meta: { title: '考评级别管理', requireAuth: true, closable: true },
      }, {
        path: '/configuration/opinion',
        name: 'configurationOpinion',
        component: () => import('../../views/configuration/opinion.vue'),
        meta: { title: '医德征求意见管理', requireAuth: true, closable: true },
      }
    ]
  }, {
    path: '/education',
    redirect: '/education/index',
    component: BasicLayout,
    meta: { title: '党风廉政教育' },
    children: [
      {
        path: '/education/index',
        name: 'educationIndex',
        component: () => import('../../views/education/index.vue'),
        meta: { title: '内容发布', closable: true },
      }, {
        path: '/education/question',
        name: 'educationQuestion',
        component: () => import('../../views/education/question.vue'),
        meta: { title: '问卷发布', requireAuth: true, closable: true },
      }
    ]
  }, {
    path: '/error',
    component: BasicLayout,
    meta: { title: '错误页面' },
    children: [
      {
        path: '/error/401',
        component: () => import('../../views/error/401.vue'),
        meta: { title: '401' },
      },
      {
        path: '/error/403',
        component: () => import('@/views/error/403.vue'),
        meta: {
          requireAuth: false
        }
      },
      {
        path: '/error/404',
        component: () => import('../../views/error/404.vue'),
        meta: { title: '404' },
      },
      {
        path: '/error/500',
        component: () => import('../../views/error/500.vue'),
        meta: { title: '500' },
      }
    ]
  },

]
