import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/login/Login'  // 登陆
import Index from '@/components/index/Index'  // 首页
import DevMgr from '@/components/dev_mgr/DevMgr' // 设备管理
import Balance from '@/components/balance/Balance' // 余额管理
import CZJL from '@/components/congzhijilu/congzhijilu' // 充值记录
import SJDZ from '@/components/shangjiaduizhang/shangjiaduizhang' // 商家对账
import YSFX from '@/components/yongshuifenxi/yongshuifenxi' // 用水分析
import FLSZ from '@/components/feilvset/feilvset' // 费率设置
import YSYC from '@/components/yongshuiyichang/yongshuiyichang' // 用水异常
import ZFYC from '@/components/zhifuyichang/zhifuyichang' // 支付异常
import ZHGL from '@/components/zhuanghaoguanli/zhuanghaoguanli' // 账户管理
import AD from '@/components/ad/ad' // 广告管理

Vue.use(Router)

export default new Router({
	mode: 'history',
	base: '/jxch-smartmp/',
	routes: [{
		path: '/',
		name: 'Login',
		component: Login
	}, {
		path: '/index',
		name: 'index',
		redirect: '/index/devmgr', // 设置默认打开的页面
		component: Index,
		children: [{
			path: 'devmgr',
			name: 'DevMgr',
			component: DevMgr // 设备管理
		}, {
			path: 'balan',
			name: 'Balance',
			component: Balance // 余额管理
		}, {
			path: 'czjl',
			name: 'CZJL',
			component: CZJL // 充值记录
		}, {
			path: 'sjdz',
			name: 'SJDZ',
			component: SJDZ // 商家对账
		}, {
			path: 'ysfx',
			name: 'YSFX',
			component: YSFX // 用水分析
		}, {
			path: 'flsz',
			name: 'FLSZ',
			component: FLSZ // 费率设置
		}, {
			path: 'ysyc',
			name: 'YSYC',
			component: YSYC // 用水异常
		}, {
			path: 'zfyc',
			name: 'ZFYC',
			component: ZFYC // 支付异常
		}, {
			path: 'zhgl',
			name: 'ZHGL',
			component: ZHGL // 账户管理
		}, {
			path: 'ad',
			name: 'AD',
			component: AD // 广告管理
		}]
	}]
})
