import { logicConfig } from "@/logicConfig";
import layoutMain from "@/Main.vue";
//登录页
import login from "@/components/frame/login.vue";
//系统图
import systemGraph from "@/components/systemGraph";
//系统图编辑页面
import systemGraphEdit from "@/components/systemGraph/edit";

import facilityLedger from "@/components/old-adm/ledger/facility/index";
import deviceDetails from "@/components/old-adm/ledger/facility/details/index";
import deviceadd from '@/components/old-adm/ledger/facility/addfacility'
// 系统台账
import systemLedger from '@/components/old-adm/ledger/system/index';
import systemadd from '@/components/old-adm/ledger/system/addsystem'
import batchPointAssets from '@/components/old-adm/ledger/facility/batchPoint' //批量维护设备位置
import buildFloor from '@/components/old-adm/ready/buildfloor/index'
import repetitionGraphy from '@/components/old-adm/ready/buildfloor/repetitionGraphy'

//-----------------业务空间台账
//业务空间台账首页
import businessSpaceLedger from '@/components/old-adm/businessSpaceLedger'
//业务空间详情
import businessSpaceDetail  from '@/components/old-adm/businessSpaceLedger/spaceDetail'
//添加业务空间
import businessSpaceAdd  from '@/components/old-adm/businessSpaceLedger/spaceadd'


// 全部关系总览
import overView from '@/components/old-adm/relation/overview'
import relationShip from '@/components/old-adm/relation/relationShip'

//cad核查图纸管理
import cadDrawingManage from '@/components/cadDrawingManage'

// 项目信息管理
import projectManage from '@/components/project-manage/index'

export default [
  {
    path: logicConfig.routerNameConfig.loginRouteName,
    name: "登录页",
    component: login,
  },
  {
    path: "/",
    name: "首页",
    component: layoutMain,
  },
  {
    path: logicConfig.routerNameConfig.systemGraphName,
    name: "系统图",
    component: layoutMain,
    children: [
      {
        path: "/",
        component: systemGraph,
      },
      {
        path: '/ready/buildfloor',
        name: 'buildFloor',
        component: buildFloor,
        meta: {keepAlive: false, breadcrumbs: [{label: '建筑楼层管理'}]}
      },
      {
        path: 'repetitionGraphy',
        name: 'repetitionGraphy',
        component: repetitionGraphy,
        meta: {keepAlive: false, breadcrumbs: [{label: '建筑楼层管理', path: '/ready/buildfloor'}, {label: '平面图维护'}]}
      },
      {
        path: "/ledger/facility",
        name: "facilityLedger",
        component: facilityLedger,
        meta: {keepAlive: true, isBack: false, breadcrumbs: [{label: '台账管理', path: '/ledger/facility'}, {label: '设备台账'}]}
      },
      {
        path: '/ledger/batchPointAssets',
        name: 'BatchPointAssets',
        component: batchPointAssets,
        meta: {keepAlive: false,
          breadcrumbs: [{label: '台账管理', path: '/ledger/facility'}, {
            label: '设备台账',
            path: '/ledger/facility'
          }, {label: '批量维护设备位置'}]
        }
      },
      {
        path: '/ledger/deviceadd',
        name: 'deviceadd',
        component: deviceadd,
        meta: {
          keepAlive: false,
          breadcrumbs: [{label: '台账管理', path: '/ledger/facility'}, {
            label: '设备台账',
            path: '/ledger/facility'
          }, {label: '添加设备'}]
        }
      },
      {
        path: '/ledger/deviceDetails',
        name: 'deviceDetails',
        component: deviceDetails,
        meta: {
          keepAlive: false,
          breadcrumbs: [
            {label: '台账管理', path: '/ledger/facility'},
            {label: '设备台账', path: '/ledger/facility'},
            {label: '台账详情'}
          ]
        }
      },
      {
        path: "/project/manage",
        name: "项目信息管理",
        component: projectManage,
      },
      {
        path: "/ledger/list",
        name: "系统台账",
        component: systemLedger,
      },
      {
        path: '/ledger/systemadd',
        name: 'systemadd',
        component: systemadd,
        meta: {
          keepAlive: false,
          breadcrumbs: [{label: '台账管理', path: '/ledger/facility'}, {
            label: '系统台账',
            path: '/ledger/list'
          }, {label: '添加系统'}]
        }
      },
      {
        path: '/relation/overview',
        name: "全部关系总览",
        component: overView,
      },
      {
        path: '/relation/relationShip',
        name: "编辑关系",
        component: relationShip,
      },
      {
        path: '/ledger/spacelist',
        name: '业务空间台账',
        component: businessSpaceLedger,
      },
      {
        path: '/ledger/spaceDetail',
        name: '业务空间台账详情',
        component: businessSpaceDetail,
      },
      {
        path: '/ledger/spaceadd',
        name: '添加业务空间',
        component: businessSpaceAdd,
      },
    ],
  },
  {
    path: logicConfig.routerNameConfig.systemGraphEditName,
    name: "系统图编辑器",
    component: systemGraphEdit,
  },
  {
    path: '/deliveryTools',
    name: '现场交付工具',
    component: layoutMain,
    children: [
      {
        path: logicConfig.routerNameConfig.cadDrawingManageRoute,
        name: 'CAD核查图纸管理',
        component: cadDrawingManage
      }
    ]
  }
];
