const resetpassword = (r) =>
  require.ensure(
    [],
    () => r(require("@/views/resetpassword.vue")),
    "resetpassword"
  ); //修改密码
const home = (r) =>
  require.ensure([], () => r(require("@/views/Home.vue")), "Home"); //主页

const reportlist = (r) =>
  require.ensure(
    [],
    () => r(require("@/views/report_manage/reportlist")),
    "reportlist"
  ); //研报管理-报告列表
const reportdtl = (r) =>
  require.ensure(
    [],
    () => r(require("@/views/report_manage/reportdtl")),
    "reportdtl"
  ); //研报管理-预览报告
const everyday = (r) =>
  require.ensure(
    [],
    () => r(require("@/views/report_manage/everyday")),
    "everyday"
  ); //研报管理-每日咨询

const classifylist = (r) =>
  require.ensure(
    [],
    () => r(require("@/views/classify_manage/indexList")),
    "classifylist"
  ); //分类管理-分类列表

export default [
  {
    path: "/reportdtl",
    component: reportdtl,
    name: "预览报告",
    hidden: true,
  },
  {
    path: "/fingerpost",
    component: () => import("@/views/operation_manage/index.vue"),
    name: "操作指南",
    hidden: false,
  },
  {
  	path:'/AIQA',
  	component:()=> import('@/views/operation_manage/AIQA/AIQA.vue'),
  	name:'AI问答',
  	hidden:false
  },

  // 主页
  {
    path: "/",
    component: home,
    name: "主页",
    hidden: true,
    children: [
      {
        path: "resetpsd",
        component: resetpassword,
        name: "修改密码",
        hidden: true,
        meta: {
          keepAlive: false,
        },
      },
    ],
  },

  // 研报管理
  {
    path: "/",
    component: home,
    name: "研报管理",
    icon_path: require("@/assets/img/home/report_ic.png"),
    hidden: false,
    children: [
      {
        path: "reportlist",
        component: reportlist,
        name: "研报列表",
        hidden: false,
        meta: {
          keepAlive: false,
        },
      },
      {
        path: "classifylist",
        component: classifylist,
        name: "分类列表",
        hidden: false,
        meta: {
          keepAlive: false,
        },
      },
      {
        path: "chapterSetting",
        component: () => import("@/views/classify_manage/chapterSetting.vue"),
        name: "章节设置",
        hidden: true,
        meta: {
          pathFrom: "classifylist",
          pathName: "分类列表",
        },
      },
      {
        path: "everyday",
        component: everyday,
        name: "每日商品聚焦",
        hidden: false,
        meta: {
          keepAlive: false,
        },
      },
      {
        path: "addreportNew",
        component: () => import("@/views/report_manage/addreportNew.vue"),
        name: "添加研报",
        hidden: true,
        meta: {
          pathFrom: "reportlist",
          pathName: "研报列表",
          keepAlive: false,
        },
      },
      {
        path: "editreportNew",
        component: () => import("@/views/report_manage/editreportNew.vue"),
        name: "编辑研报",
        hidden: true,
        meta: {
          pathFrom: "reportlist",
          pathName: "研报列表",
          keepAlive: false,
        },
      },
      {
        path: "dayorweek",
        component: () => import("@/views/report_manage/dayOrWeek.vue"),
        name: "添加晨报/周报",
        hidden: true,
        meta: {
          pathFrom: "reportlist",
          pathName: "研报列表",
          keepAlive: false,
        },
      },
      {
        path: "editchapterreport",
        component: () => import("@/views/report_manage/editChapterReport.vue"),
        name: "晨报/周报",
        hidden: true,
        meta: {
          keepAlive: false,
          pathFrom: "dayorweek",
          pathName: "晨报/周报",
        },
      },
      // {
      //   path: "reportupdate",
      //   component: () => import("@/views/report_manage/dayWeekUpdate.vue"),
      //   name: "更新管理",
      //   hidden: true,
      //   meta: {
      //     keepAlive: false,
      //   },
      // },
      // {
      //   path: "reportlabel",
      //   component: () => import("@/views/report_manage/tagLib.vue"),
      //   name: "标签库",
      //   hidden: true,
      // },
      {
        path: "reportEnList",
        component: () =>
          import("@/views/report_manage/reportEn/reportlist.vue"),
        name: "英文研报",
        hidden: false,
      },
      {
        path: "reportEnEditor",
        component: () =>
          import("@/views/report_manage/reportEn/reportEditor.vue"),
        name: "英文研报编辑",
        hidden: false,
      },
      {
        path: "emaiList",
        component: () => import("@/views/report_manage/emailList.vue"),
        name: "邮箱管理",
        hidden: false,
      },
      // {
      // 	path: 'classifyEnlist',
      // 	component: () => import('@/views/classify_manage/classifyEnlist.vue'),
      // 	name: '英文分类列表',
      // 	hidden: false
      // },
      {
        path: "reportAuthor",
        component: () => import("@/views/report_manage/reportAuthor.vue"),
        name: "研报作者管理",
        hidden: false,
      },
      {
        path: "sendlog",
        component: () =>
          import("@/views/report_manage/reportEn/sendMsgLog.vue"),
        name: "群发日志",
        hidden: true,
      },
      {
        path: "strategyReport",
        name: "策略报告",
        component: () => import("@/views/report_manage/strategyReport.vue"),
      },
      {
        path: "cloudDisk",
        name: "云盘",
        component: () => import("@/views/report_manage/cloudDisk.vue"),
      },
      // {
      //   path: "pdfList",
      //   name: "PDF报告",
      //   component: () => import("@/views/report_manage/pdfList.vue"),
      // },
      {
        path: "reportvariety",
        name: "英文品种配置",
        component: () => import("@/views/report_manage/reportVariety.vue"),
      },
    ],
  },

  // 系统设置
  {
    path: "/",
    component: home,
    name: "系统设置",
    hidden: false,
    icon_path: require("@/assets/img/home/set_ico.png"),
    children: [
      {
        path: "Sysdepart",
        component: () => import("@/views/system_manage/departManage.vue"),
        name: "部门管理",
        hidden: false,
        meta: {
          keepAlive: false,
        },
      },
      {
        path: "Sysrole",
        component: () => import("@/views/system_manage/roleManage.vue"),
        name: "角色管理",
        hidden: false,
        meta: {
          keepAlive: false,
        },
      },
      {
        path: "Sysauth",
        //component: () => import("@/views/system_manage/authManage.vue"),
        component: () => import("@/views/system_manage/newAuthManage.vue"),
        name: "设置权限",
        hidden: true,
        meta: {
          pathFrom: "Sysrole",
          pathName: "角色管理",
          keepAlive: false,
        },
      },
      {
        path: "Sysdatauth",
        component: () => import("@/views/system_manage/dataAuthManage.vue"),
        name: "手工数据权限",
        hidden: false,
      },
      {
        path: "operateAuth",
        component: () => import("@/views/system_manage/operateAuthManage.vue"),
        name: "数据操作权限",
        hidden: false,
      },
      {
        path: "enAuthManage",
        component: () => import("@/views/system_manage/enAuthManage.vue"),
        name: "英文权限配置",
        hidden: false,
      },
      {
        path: "etaBaseConfig",
        component: () => import("@/views/system_manage/etaBaseConfig.vue"),
        name: "基本配置",
        hidden: true,
      },
    ],
  },
];
