import MainLayout from "@/layouts/MainLayout.vue";
const routes = [
  {
    path: "/login",
    name: "login",
    component: () => import("@/views/login/index.vue"),
    meta: { nopermission: true },
  },
  {
    path: "/gzbPage",
    name: "gzbPage",
    title: "数据大屏",
    component: () => import("@/views/homePage/index.vue"),
    meta: { nopermission: true },
  },
  {
    path: "/",
    name: "首页",
    redirect: "/homePage",
    component: MainLayout,
    children: [
      {
        path: "/homePage",
        name: "dataSummary",
        title: "数据大屏",
        component: () => import("@/views/homePage/index.vue"),
      },
      {
        path: "/projectManage",
        name: "projectManage",
        title: "投前管理",
        redirect: "/projectAllPage",
        children: [
          {
            path: "/projectDraft",
            name: "projectDraft",
            title: "项目遴选",
            component: () => import("@/views/projectManage/projectDraft.vue"),
          },
          {
            path: "/projectSetUp",
            name: "projectSetUp",
            title: "项目立项",
            component: () => import("@/views/projectManage/projectSetUp.vue"),
          },
          {
            path: "/projectArgument",
            name: "projectArgument",
            title: "项目论证",
            component: () =>
              import("@/views/projectManage/projectArgument.vue"),
          },
          {
            path: "/projectDecision",
            name: "projectDecision",
            title: "项目决策",
            component: () =>
              import("@/views/projectManage/projectDecision.vue"),
          },
          {
            path: "/projectAllPage",
            name: "projectAllPage",
            title: "项目档案库",
            component: () => import("@/views/projectManage/projectAllPage.vue"),
          },
          {
            path: "/addProject/:type",
            name: "addProject",
            title: "新增项目",
            component: () => import("@/views/projectManage/addProject.vue"),
          },
        ],
      },
      {
        path: "/investingManage",
        name: "investingManage",
        title: "投中管理",
        redirect: "/targetLiabilityStatement",
        children: [
          {
            path: "/targetLiabilityStatement",
            name: "targetLiabilityStatement",
            title: "投资目标责任书",
            component: () =>
              import("@/views/investingManage/targetLiabilityStatement.vue"),
          },
          {
            path: "/addStatement",
            name: "addStatement",
            title: "新增责任书",
            component: () => import("@/views/investingManage/addStatement.vue"),
          },
          {
            path: "/targetControl",
            name: "targetControl",
            title: "投资控制",
            component: () =>
              import("@/views/investingManage/targetControl.vue"),
          },
          {
            path: "/addControl",
            name: "addControl",
            title: "新增投资控制",
            component: () => import("@/views/investingManage/addControl.vue"),
          },
          {
            path: "/majorRisk",
            name: "majorRisk",
            title: "重大风险防控",
            component: () => import("@/views/investingManage/majorRisk.vue"),
          },
          {
            path: "/addRisk",
            name: "addRisk",
            title: "新增重大风险",
            component: () => import("@/views/investingManage/addRisk.vue"),
          },
          {
            path: "/construction",
            name: "construction",
            title: "建设期投资检查",
            component: () => import("@/views/investingManage/construction.vue"),
          },
          {
            path: "/constructionAdd",
            name: "constructionAdd",
            title: "建设期投资检查",
            component: () =>
              import("@/views/investingManage/constructionAdd.vue"),
          },
        ],
      },
      {
        path: "/templateManage",
        name: "templateManage",
        title: "模板管理",
        component: () => import("@/views/projectManage/templateManage.vue"),
      },
      {
        path: "/everydayPage",
        name: "everydayPage",
        title: "日常管理",
        redirect: "/share",
        children: [
          {
            path: "/share",
            name: "share",
            title: "投资目标责任书",
            component: () => import("@/views/everydayPage/share.vue"),
          },
          {
            path: "/shareAdd",
            name: "shareAdd",
            title: "投资目标责任书",
            component: () => import("@/views/everydayPage/shareAdd.vue"),
          },
        ],
      },
      {
        path: "/systemManage",
        name: "systemManage",
        title: "系统管理",
        meta: { menuName: "系统管理" },
        children: [
          {
            path: "departManage",
            name: "departManage",
            title: "部门管理",
            component: () => import("@/views/systemManage/departManage.vue"),
          },
          {
            path: "userManage",
            name: "userManage",
            title: "用户管理",
            component: () => import("@/views/systemManage/userManage.vue"),
          },
          {
            path: "roleManage",
            name: "roleManage",
            title: "角色管理",
            component: () => import("@/views/systemManage/roleManage.vue"),
          },
          {
            path: "menuManage",
            name: "menuManage",
            title: "菜单管理",
            component: () => import("@/views/systemManage/menuManage.vue"),
          },
          {
            path: "resourceManage",
            name: "resourceManage",
            title: "资源库管理",
            component: () => import("@/views/systemManage/resourceManage.vue"),
          },
        ],
      },
      {
        path: "/building",
        name: "building",
        title: "建设中",
        component: () => import("@/views/homePage/building.vue"),
      },
    ],
  },
];
export { routes };
