
import type { RouteRecordRaw } from 'vue-router'

const routers: Array<RouteRecordRaw> = [
  {
    path: '/user-info',
    name: 'userInfo',
    component: () => import('@/views/user/UserInfoView.vue'),
    meta: {
      title: '用户信息',
      anonymous: true,
      keepAlive: true
    }
  },
  {
    path: '/system-dictType',
    name: 'SystemDictType',
    component: () => import('@/views/system/dictType.vue'),
    meta: {
      title: '字典管理',
      permissions:"DICT_TYPE_VIEW_BT"
    }
  },
  {
    path: '/system-dictData/:pkDictType',
    name: 'SystemDictData',
    component: () => import('@/views/system/dictData.vue'),
    meta: {
      title: '字典详情',
      permissions:"DICT_TYPE_VIEW_BT"
    }
  },
  {
    path: '/gen-index',
    name: 'GenIndex',
    component: () => import('@/views/gen/GenTable.vue'),
    meta: {
      title: '代码生成'
    }
  },
  {
    path: '/gen-edit/:tableId', // 确保这个路由存在
    component: () => import('@/views/gen/editTable.vue'), // 确认组件路径正确
    name: 'GenEdit',
    meta: { title: '编辑生成配置', activeMenu: '/gen/GenTable' },
  },
  {
    path: '/analyze-newDeclaredGoods',
    name: 'NewDeclaredGoods',
    component: () => import('@/views/analyze/NewDeclaredGoods.vue'),
    meta: {
      title: '事后通知',
      permissions:"NEW_DECLARED_GOODS_VIEW_BT"
    }
  },
  {
    path: '/analyze/chemicals-entry',
    name: 'chemicalsEntry',
    component: () => import('@/views/analyze/ChemicalsEntry.vue'),
    meta: {
      title: '表头',
      permissions:"CHEMICALS_ENTRY_VIEW_BT"
    }
  },
  {
    path: '/get-chemicals',
    component: () => import('@/views/analyze/ChemicalsEntryDetail.vue'),
    meta: {
      title: '报关单详情',
      keepAlive: false,
      permissions:"CHEMICALS_ENTRY_VIEW_BT"
    }
  },
  {
    path: '/analyze/goods-entry',
    name: 'goodsEntry',
    component: () => import('@/views/analyze/GoodsEntry.vue'),
    meta: {
      title: '表头',
      permissions:"GOODS_ENTRY_VIEW_BT"
    }
  },
  {
    path: '/get-goods',
    component: () => import('@/views/analyze/GoodsEntryDetail.vue'),
    meta: {
      title: '报关单详情',
      keepAlive: false,
      permissions:"GOODS_ENTRY_VIEW_BT"
    }
  },
  {
    path: '/statReport-customMStatF',
    name: 'CustomMStatF',
    component: () => import('@/views/statReport/CustomMStatF.vue'),
    meta: {
      title: '申报地海关报表',
      permissions:"CUSTOMS_STAT_F_VIEW_BT"
    }
  },
  {
    path: '/base-packCatalog',
    name: 'PackCatalog',
    component: () => import('@/views/base/PackCatalog.vue'),
    meta: {
      title: '包装种类目录',
      permissions:"PACK_CATALOG_VIEW_BT"
    }
  },
  {
    path: '/base-goodsCatalog',
    name: 'GoodsCatalog',
    component: () => import('@/views/base/GoodsCatalog.vue'),
    meta: {
      title: '危险货物目录',
      permissions:"GOODS_CATALOG_VIEW_BT"
    }
  },
  {
    path: '/base-chemicalsCatalog',
    name: 'ChemicalsCatalog',
    component: () => import('@/views/base/ChemicalsCatalog.vue'),
    meta: {
      title: '危化品目录',
      permissions:"CHEMICALS_CATALOG_VIEW_BT"
    }
  },
]

export default routers
