<template>
	<div class="menuList-wrap" style="height:100%;">
		<el-scrollbar class="live-scrollbar">
			<el-menu
				
				router
				:default-active="$route.path"
				class="el-menu-vertical-demo"
				background-color="#F4F5F8"
				text-color="#797979"
				active-text-color="#fff"
			>
				<Menu-item :routes="routes"></Menu-item>
			</el-menu>
		</el-scrollbar>
	</div>
</template>

<script>
import MenuItem from '@/page/Layout/menuList/menuItem'
import {
	menuChange
} from '@/api/login/login.js'
export default {
	name: 'menuList',
	components: {
		MenuItem
	},
	computed: {
		routes() {
			// 拿到业务管理数据
			const myroutes = JSON.parse(sessionStorage.getItem('leftMenuList'))
			return myroutes
		}
	},

	methods: {
		handleOpen(key, keyPath) {
			// console.log(key, keyPath);
		},
		handleClose(key, keyPath) {
			// console.log(key, keyPath);
		},
		handleSelect() {
			let params = {
				action: 'page_Access_Log',
				object: {
					systemName: '企业备案管理',
					userId: sessionStorage.getItem('userCode'),
					userName: sessionStorage.getItem('userName'),
					userDeviceIp: '124.200.190.78',
					state: 1,
					logoutTime: '2019-02-21T03:05:14.604Z',
					pageName: '信息注册审核',
					pageCode: 'j8svcsx5SNws7zVI1MW'
				}
			}
			menuChange(params)
		}
	}
}
</script>

<style scoped>
.menuList-wrap {
	height: 500px;
}
.live-scrollbar {
	height: 100%;
}
.el-scrollbar /deep/ .el-scrollbar__wrap {
	overflow-x: hidden;
}
.el-scrollbar /deep/ .is-horizontal {
	display: none;
}
</style>
<style>
</style>
