/**
 * meta 参数说明
 * form:表单路由，存在或ture,也要后台配置，前端校验
 * mode:功能入口路由，存在或ture,也要后台配置，前端校验
 */
const routesCommon = [
	/***公共***/
	{
		path: '/common',
		component: () => import('../views/Layout.vue'),
		children: [
			//消息
			{
				path: 'notice',
				component: () => import('../views/Layout.vue'),
				children: [
					//消息列表
					{
						path: '',
						name: 'CommonNotice',
						component: () => import('../views/Common/Notice/Home.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '消息列表',
						}
					},
					//消息详情
					{
						path: 'info',
						name: 'CommonNoticeInfo',
						component: () => import('../views/Common/Notice/Info.vue'),
						meta: {
							requireAuth: false,
							role: [],
							title: '消息详情',
						}
					},
					//发送通知
					{
						path: 'send',
						name: 'CommonNoticeSend',
						component: () => import('../views/Common/Notice/Send.vue'),
						meta: {
							requireAuth: true,
							role: [],
							title: '发送通知',
							mode: true
						}
					},
				]
			},

			//设备
			{
				path: 'device',
				component: () => import('../views/Layout.vue'),
				children: [
					//设备列表
					{
						path: 'list',
						name: 'CommonDeviceList',
						component: () => import('@/views/Common/Device/List.vue'),
						meta: {
							requireAuth: true,
							role: [],
							title: '设备列表',
							mode: true
						}
					},
					//增加设备
					{
						path: 'add',
						name: 'CommonDeviceAdd',
						component: () => import('../views/Common/Device/Add.vue'),
						meta: {
							requireAuth: true,
							role: [],
							title: '增加设备',
						}
					},
				],
			},

		],
	}
]

export default routesCommon
