import Layout from "@/layout";

// 动态路由，基于用户权限动态去加载
export const dynamicRoutes = [
  {
    name: "UserManage",
    path: "/userManage",
    hidden: false,
    component: Layout,
    permissions: ["800"],
    alwaysShow: true,
    meta: {
      title: "用户管理",
      noCache: false,
      link: null,
    },
    children: [
      {
        name: "RoleManage",
        path: "roleManage",
        hidden: false,
        component: () => import("@/views/userManage/roleManage/roleList"),
        permissions: ["800001"],
        meta: {
          title: "角色管理",
          noCache: false,
          link: null,
        },
      },
      {
        name: "RoleDetail",
        path: "roleManage/:id",
        hidden: true,
        component: () => import("@/views/userManage/roleManage/roleDetail"),
        meta: {
          title: "角色详情",
          activeMenu: "/userManage/roleManage",
        },
      },
      {
        name: "AccountManage",
        path: "accountManage",
        hidden: false,
        component: () => import("@/views/userManage/accountManage/accountList"),
        permissions: ["800002"],
        meta: {
          title: "账号管理",
          noCache: false,
          link: null,
        },
      },
      {
        name: "StaffManage",
        path: "staff",
        hidden: false,
        component: () => import("@/views/userManage/staffManage/staffList"),
        permissions: ["800003"],
        meta: {
          title: "员工管理",
          noCache: false,
          link: null,
        },
      },
    ],
  },
  {
    name: "DictManage",
    path: "/dictManage",
    hidden: false,
    component: Layout,
    permissions: ["820"],
    alwaysShow: true,
    meta: {
      title: "字典管理",
      noCache: false,
      link: null,
    },
    children: [
      {
        name: "HospManage",
        path: "hospManage",
        hidden: false,
        component: () => import("@/views/dictManage/hospManage/wardList"),
        permissions: ["820001"],
        meta: {
          title: "院区配置",
          noCache: false,
          link: null,
        },
      },
      {
        name: "DeptManage",
        path: "deptManage",
        hidden: false,
        component: () => import("@/views/dictManage/deptManage/deptList"),
        permissions: ["820002"],
        meta: {
          title: "科室配置",
          noCache: false,
          link: null,
        },
      },
      {
        name: "DiseaseManage",
        path: "diseaseManage",
        hidden: false,
        component: () => import("@/views/dictManage/diseaseManage/diseaseList"),
        permissions: ["820003"],
        meta: {
          title: "疾病维护",
          noCache: false,
          link: null,
        },
      },
      {
        name: 'ReminderType',
        path: 'reminderType',
        hidden: false,
        component: () => import("@/views/dictManage/reminderType"),
        meta: {
          title: '提醒类型维护',
          noCache: false,
          link: null
        }
      }
    ],
  },
  {
    name: "StatisticalManage",
    path: "/statisticalManage",
    hidden: false,
    component: Layout,
    permissions: ["840"],
    alwaysShow: true,
    meta: {
      title: "统计管理",
      noCache: false,
      link: null,
    },
    children: [
      {
        name: "FollowUpStatistical",
        path: "followupStatistical",
        hidden: false,
        component: () => import("@/views/statisticalManage/followupStatistical/listPage"),
        permissions: ["840001"],
        meta: {
          title: "随访统计",
          noCache: false,
          link: null,
        },
      },
      {
        name: "FollowUpDetail",
        path: "followupDetail/:id",
        hidden: true,
        component: () => import("@/views/statisticalManage/followupStatistical/detail"),
        meta: {
          title: "随访详情",
          activeMenu: "/statisticalManage/followupStatistical",
        },
      },
    ],
  },
  {
    name: 'OperationManage',
    path: '/operationManage',
    hidden: false,
    component: Layout,
    alwaysShow: true,
    meta: {
      title: '运营管理',
      noCache: false,
      link: null
    },
    children: [
      {
        name: 'RecommendDoctorConfig',
        path: 'recommendDoctor',
        hidden: false,
        component: () => import('@/views/operationManage/recommendDoctorConfig'),
        meta: {
          title: '医生推荐配置',
          noCache: false,
          link: null
        }
      }
    ]
  }
];
