import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/login/login' // 登陆
import Index from '@/components/index/index' // 首页
import ZHGL from '@/components/zhuanghaoguanli/zhuanghaoguanli' // 账户管理
import DisposeSituation from '@/components/disposeSituation' // 处置情况
import SmokeWarn from '@/components/smokeWarn' // 冒烟告警
import WatchBill from '@/components/watchBill' // 值班表
import BroadcastContent from '@/components/broadcastContent' // 广播内容
import SystemSetup from '@/components/systemSetup' // 系统设置

Vue.use(Router)

export default new Router({
	// mode: 'history',
	// base: '/smoke/',
	routes: [
		{
			path: '/',
			name: 'Login',
			component: Login
		},
		{
			path: '/smoke/index',
			name: 'index',
			redirect: '/smoke/index/watchBill', // 设置默认打开的页面
			component: Index,
			children: [{
				path: 'zhgl',
				name: 'ZHGL',
				component: ZHGL // 账户管理
			},
			{
				path: 'watchBill',
				name: 'WatchBill',
				component: WatchBill // 值班表
			},
			{
				path: 'disposeSituation',
				name: 'DisposeSituation',
				component: DisposeSituation // 处置情况
			},
			{
				path: 'smokeWarn',
				name: 'smokeWarn',
				component: SmokeWarn // 冒烟告警
			},
			{
				path: 'broadcastContent',
				name: 'BroadcastContent',
				component: BroadcastContent // 广播内容
			},
			{
				path: 'systemSetup',
				name: 'SystemSetup',
				component: SystemSetup // 系统设置
			}
			]
		}]
})
