// 用电检测
import type { Route } from '@/global'

const Layout = () => import('@/layouts/index.vue')
const routes: Route.recordRaw[] = [
  {
    path: '/electricity',
    component: Layout,
    redirect: '/electricity/electricitylist',
    name: 'Electricity',
    meta: {
      title: '用电监测',
      icon: 'ep:key',
      auth: '/electricity',
    },
    children: [
      {
        path: '/electricitylist',
        component: Layout,
        redirect: '/electricitylist/electricitypage',
        name: 'ElectricityList',
        meta: {
          title: '用电监测',
          icon: 'ep:key',
          auth: '/data/electricity',
        },
        children: [
          {
            path: 'electricitypage',
            name: 'electricityPage',
            component: () => import('@/views/data/electricity/index.vue'),
            meta: {
              title: '用电监测',
              auth: '/data/electricity',
              sidebar: false,
              breadcrumb: true,
              activeMenu: '/electricity',
            },
          },
        ],
      },
      {
        path: '/datalist',
        component: Layout,
        redirect: '/datalist/datapage',
        name: 'DataList1',
        meta: {
          title: '数据管理',
          icon: 'ep:key',
          auth: '/electricity/data',
        },
        children: [
          {
            path: 'datapage',
            name: 'DataPage1',
            component: () => import('@/views/data/useHeat/page.vue'),
            meta: {
              title: '数据管理',
              auth: '/electricity/data',
              sidebar: false,
              breadcrumb: true,
              activeMenu: '/electricity',
            },
          },
        ],
      },
    ],
  },
]

export default routes
