前端初始化
This commit is contained in:
@@ -0,0 +1,331 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import Layout from '@/layout/Layout.vue'
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
component: Layout,
|
||||
redirect: '/dashboard',
|
||||
children: [
|
||||
{
|
||||
path: 'dashboard',
|
||||
name: 'Dashboard',
|
||||
component: () => import('@/views/dashboard/Index.vue'),
|
||||
meta: { title: '工作台', icon: 'Odometer' }
|
||||
}
|
||||
]
|
||||
},
|
||||
// 资产模块
|
||||
{
|
||||
path: '/asset',
|
||||
component: Layout,
|
||||
redirect: '/asset/ledger',
|
||||
meta: { title: '资产', icon: 'Box' },
|
||||
children: [
|
||||
{
|
||||
path: 'ledger',
|
||||
name: 'EquipmentLedger',
|
||||
component: () => import('@/views/asset/ledger/Index.vue'),
|
||||
meta: { title: '设备台账', icon: 'List' }
|
||||
},
|
||||
{
|
||||
path: 'ledger/equipment',
|
||||
name: 'EquipmentInfo',
|
||||
component: () => import('@/views/asset/ledger/EquipmentInfo.vue'),
|
||||
meta: { title: '设备信息', icon: 'Document' }
|
||||
},
|
||||
{
|
||||
path: 'ledger/category',
|
||||
name: 'CategoryView',
|
||||
component: () => import('@/views/asset/ledger/CategoryView.vue'),
|
||||
meta: { title: '分类管理视图', icon: 'FolderOpened' }
|
||||
},
|
||||
{
|
||||
path: 'ledger/lifecycle',
|
||||
name: 'LifecycleView',
|
||||
component: () => import('@/views/asset/ledger/LifecycleView.vue'),
|
||||
meta: { title: '全生命周期视图', icon: 'Clock' }
|
||||
},
|
||||
{
|
||||
path: 'ledger/compliance',
|
||||
name: 'ComplianceView',
|
||||
component: () => import('@/views/asset/ledger/ComplianceView.vue'),
|
||||
meta: { title: '合规管理视图', icon: 'Stamp' }
|
||||
},
|
||||
{
|
||||
path: 'ledger/statistics',
|
||||
name: 'AssetStatistics',
|
||||
component: () => import('@/views/asset/ledger/Statistics.vue'),
|
||||
meta: { title: '分类统计', icon: 'DataAnalysis' }
|
||||
},
|
||||
{
|
||||
path: 'qrcode',
|
||||
name: 'QRCode',
|
||||
component: () => import('@/views/asset/qrcode/Index.vue'),
|
||||
meta: { title: '二维码管理', icon: 'Iphone' }
|
||||
}
|
||||
]
|
||||
},
|
||||
// 检测模块
|
||||
{
|
||||
path: '/inspection',
|
||||
component: Layout,
|
||||
redirect: '/inspection/dashboard',
|
||||
meta: { title: '检测', icon: 'Monitor' },
|
||||
children: [
|
||||
{
|
||||
path: 'dashboard',
|
||||
name: 'DeviceDashboard',
|
||||
component: () => import('@/views/inspection/dashboard/Index.vue'),
|
||||
meta: { title: '设备看板', icon: 'DataBoard' }
|
||||
},
|
||||
{
|
||||
path: 'dashboard/temperature',
|
||||
name: 'TemperatureBox',
|
||||
component: () => import('@/views/inspection/dashboard/TemperatureBox.vue'),
|
||||
meta: { title: '温度箱看板', icon: 'Sunny' }
|
||||
},
|
||||
{
|
||||
path: 'dashboard/charge',
|
||||
name: 'ChargeCabinet',
|
||||
component: () => import('@/views/inspection/dashboard/ChargeCabinet.vue'),
|
||||
meta: { title: '充放电柜看板', icon: 'Battery' }
|
||||
},
|
||||
{
|
||||
path: 'dashboard/auxiliary',
|
||||
name: 'AuxiliaryDevice',
|
||||
component: () => import('@/views/inspection/dashboard/AuxiliaryDevice.vue'),
|
||||
meta: { title: '辅助设备看板', icon: 'SetUp' }
|
||||
},
|
||||
{
|
||||
path: 'dashboard/detail/:id',
|
||||
name: 'DeviceDetail',
|
||||
component: () => import('@/views/inspection/dashboard/DeviceDetail.vue'),
|
||||
meta: { title: '设备详情', icon: 'View' }
|
||||
},
|
||||
{
|
||||
path: 'report',
|
||||
name: 'StatisticsReport',
|
||||
component: () => import('@/views/inspection/report/Index.vue'),
|
||||
meta: { title: '统计报表', icon: 'DataLine' }
|
||||
},
|
||||
{
|
||||
path: 'bigscreen',
|
||||
name: 'BigScreen',
|
||||
component: () => import('@/views/inspection/bigscreen/Index.vue'),
|
||||
meta: { title: '数据大屏', icon: 'FullScreen' }
|
||||
},
|
||||
{
|
||||
path: 'efficiency',
|
||||
name: 'EfficiencyAnalysis',
|
||||
component: () => import('@/views/inspection/efficiency/Index.vue'),
|
||||
meta: { title: '设备效率分析', icon: 'TrendCharts' }
|
||||
},
|
||||
{
|
||||
path: 'patrol',
|
||||
name: 'PatrolManage',
|
||||
component: () => import('@/views/inspection/patrol/Index.vue'),
|
||||
meta: { title: '巡检管理', icon: 'Guide' }
|
||||
},
|
||||
{
|
||||
path: 'patrol/template',
|
||||
name: 'PatrolTemplate',
|
||||
component: () => import('@/views/inspection/patrol/Template.vue'),
|
||||
meta: { title: '巡检模板配置', icon: 'Setting' }
|
||||
},
|
||||
{
|
||||
path: 'patrol/task',
|
||||
name: 'PatrolTask',
|
||||
component: () => import('@/views/inspection/patrol/Task.vue'),
|
||||
meta: { title: '巡检任务执行', icon: 'Checked' }
|
||||
},
|
||||
{
|
||||
path: 'patrol/record',
|
||||
name: 'PatrolRecord',
|
||||
component: () => import('@/views/inspection/patrol/Record.vue'),
|
||||
meta: { title: '巡检记录查询', icon: 'Document' }
|
||||
},
|
||||
{
|
||||
path: 'patrol/auto',
|
||||
name: 'AutoPatrol',
|
||||
component: () => import('@/views/inspection/patrol/AutoPatrol.vue'),
|
||||
meta: { title: '自动巡检', icon: 'MagicStick' }
|
||||
},
|
||||
{
|
||||
path: 'alert-rule',
|
||||
name: 'AlertRule',
|
||||
component: () => import('@/views/inspection/alert-rule/Index.vue'),
|
||||
meta: { title: '告警规则', icon: 'Bell' }
|
||||
},
|
||||
{
|
||||
path: 'alert-message',
|
||||
name: 'AlertMessage',
|
||||
component: () => import('@/views/inspection/alert-message/Index.vue'),
|
||||
meta: { title: '消息告警', icon: 'ChatDotRound' }
|
||||
}
|
||||
]
|
||||
},
|
||||
// 配置管理 (IOT)
|
||||
{
|
||||
path: '/config',
|
||||
component: Layout,
|
||||
redirect: '/config/product',
|
||||
meta: { title: '配置管理', icon: 'Setting' },
|
||||
children: [
|
||||
{
|
||||
path: 'product',
|
||||
name: 'ProductManage',
|
||||
component: () => import('@/views/config/product/Index.vue'),
|
||||
meta: { title: '产品管理', icon: 'Goods' }
|
||||
},
|
||||
{
|
||||
path: 'product/category',
|
||||
name: 'ProductCategory',
|
||||
component: () => import('@/views/config/product/Category.vue'),
|
||||
meta: { title: '产品分类', icon: 'Menu' }
|
||||
},
|
||||
{
|
||||
path: 'device',
|
||||
name: 'DeviceManage',
|
||||
component: () => import('@/views/config/device/Index.vue'),
|
||||
meta: { title: '设备管理', icon: 'Cpu' }
|
||||
},
|
||||
{
|
||||
path: 'gateway',
|
||||
name: 'GatewayManage',
|
||||
component: () => import('@/views/config/gateway/Index.vue'),
|
||||
meta: { title: '网关管理', icon: 'Connection' }
|
||||
},
|
||||
{
|
||||
path: 'protocol/certificate',
|
||||
name: 'CertificateManage',
|
||||
component: () => import('@/views/config/protocol/Certificate.vue'),
|
||||
meta: { title: '证书管理', icon: 'Key' }
|
||||
},
|
||||
{
|
||||
path: 'protocol/message',
|
||||
name: 'ProtocolManage',
|
||||
component: () => import('@/views/config/protocol/Message.vue'),
|
||||
meta: { title: '协议管理', icon: 'Document' }
|
||||
},
|
||||
{
|
||||
path: 'protocol/network',
|
||||
name: 'NetworkComponent',
|
||||
component: () => import('@/views/config/protocol/Network.vue'),
|
||||
meta: { title: '网络组件与协议注册', icon: 'Share' }
|
||||
},
|
||||
{
|
||||
path: 'protocol/template',
|
||||
name: 'ProtocolTemplate',
|
||||
component: () => import('@/views/config/protocol/Template.vue'),
|
||||
meta: { title: '协议模板库', icon: 'Files' }
|
||||
},
|
||||
{
|
||||
path: 'protocol/device-gateway',
|
||||
name: 'DeviceGateway',
|
||||
component: () => import('@/views/config/protocol/DeviceGateway.vue'),
|
||||
meta: { title: '设备网关', icon: 'Switch' }
|
||||
},
|
||||
{
|
||||
path: 'collection/point',
|
||||
name: 'CollectionPoint',
|
||||
component: () => import('@/views/config/collection/Point.vue'),
|
||||
meta: { title: '采集点位配置', icon: 'Location' }
|
||||
},
|
||||
{
|
||||
path: 'collection/strategy',
|
||||
name: 'CollectionStrategy',
|
||||
component: () => import('@/views/config/collection/Strategy.vue'),
|
||||
meta: { title: '采集策略管理', icon: 'Timer' }
|
||||
},
|
||||
{
|
||||
path: 'collection/cleaning',
|
||||
name: 'DataCleaning',
|
||||
component: () => import('@/views/config/collection/Cleaning.vue'),
|
||||
meta: { title: '数据清洗与转换', icon: 'Filter' }
|
||||
},
|
||||
{
|
||||
path: 'collection/storage',
|
||||
name: 'TimeSeriesStorage',
|
||||
component: () => import('@/views/config/collection/Storage.vue'),
|
||||
meta: { title: '时序数据存储', icon: 'Coin' }
|
||||
}
|
||||
]
|
||||
},
|
||||
// 系统管理
|
||||
{
|
||||
path: '/system',
|
||||
component: Layout,
|
||||
redirect: '/system/role',
|
||||
meta: { title: '系统管理', icon: 'Tools' },
|
||||
children: [
|
||||
{
|
||||
path: 'role',
|
||||
name: 'RoleManage',
|
||||
component: () => import('@/views/system/role/Index.vue'),
|
||||
meta: { title: '角色权限管理', icon: 'Lock' }
|
||||
},
|
||||
{
|
||||
path: 'audit',
|
||||
name: 'AuditLog',
|
||||
component: () => import('@/views/system/audit/Index.vue'),
|
||||
meta: { title: '操作审计日志', icon: 'Notebook' }
|
||||
},
|
||||
{
|
||||
path: 'organization',
|
||||
name: 'Organization',
|
||||
component: () => import('@/views/system/organization/Index.vue'),
|
||||
meta: { title: '组织架构管理', icon: 'OfficeBuilding' }
|
||||
},
|
||||
{
|
||||
path: 'user',
|
||||
name: 'UserManage',
|
||||
component: () => import('@/views/system/user/Index.vue'),
|
||||
meta: { title: '用户管理', icon: 'User' }
|
||||
},
|
||||
{
|
||||
path: 'dict',
|
||||
name: 'DictManage',
|
||||
component: () => import('@/views/system/dict/Index.vue'),
|
||||
meta: { title: '数据字典管理', icon: 'Collection' }
|
||||
},
|
||||
{
|
||||
path: 'params',
|
||||
name: 'SystemParams',
|
||||
component: () => import('@/views/system/params/Index.vue'),
|
||||
meta: { title: '系统参数配置', icon: 'Setting' }
|
||||
},
|
||||
{
|
||||
path: 'storage',
|
||||
name: 'FileStorage',
|
||||
component: () => import('@/views/system/storage/Index.vue'),
|
||||
meta: { title: '文件存储管理', icon: 'Folder' }
|
||||
},
|
||||
{
|
||||
path: 'log/access',
|
||||
name: 'AccessLog',
|
||||
component: () => import('@/views/system/log/AccessLog.vue'),
|
||||
meta: { title: '访问日志', icon: 'View' }
|
||||
},
|
||||
{
|
||||
path: 'log/system',
|
||||
name: 'SystemLog',
|
||||
component: () => import('@/views/system/log/SystemLog.vue'),
|
||||
meta: { title: '系统日志', icon: 'Monitor' }
|
||||
}
|
||||
]
|
||||
},
|
||||
// 404
|
||||
{
|
||||
path: '/:pathMatch(.*)*',
|
||||
name: 'NotFound',
|
||||
component: () => import('@/views/error/NotFound.vue')
|
||||
}
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes
|
||||
})
|
||||
|
||||
export default router
|
||||
Reference in New Issue
Block a user