Home.vue 2.28 KB
<template>
  <div class="home">
    <el-container class="home-box">
      <el-header class="headers">
		  <img class="logoImg" src="../assets/img/home/logo.png" alt="">
		  <div class="headRight">
			  <span>2019-11-15 16:50 星期一</span>
			  <img src="../assets/img/home/user.png" alt="">
			  <span class="exit">退出<i class="el-icon-arrow-down"></i></span>
		  </div>
	  </el-header>
      <el-container style="min-height:calc(100vh - 64px);">
        <el-aside width="254px">
			<el-menu default-active="/map" class="el-menu-vertical-demo" :collapse="isCollapse"  @select="handleSelect">
			  <el-submenu index="1">
			    <template slot="title">
			      <i class="el-icon-location"></i>
			      <span slot="title">首页</span>
			    </template>
			      <el-menu-item index="/map"> <i class="el-icon-location"></i>地图展示</el-menu-item>
			  </el-submenu>
			  <el-submenu index="2">
			    <template slot="title">
			      <i class="el-icon-location"></i>
			      <span slot="title">任务管理</span>
			    </template>
				<el-menu-item index="/task/sceneSet"> <i class="el-icon-location"></i>场景配置</el-menu-item>
			      <el-menu-item index="/task/taskSet"> <i class="el-icon-location"></i>任务配置</el-menu-item>
			  </el-submenu>
			  <el-submenu index="3">
			    <template slot="title">
			      <i class="el-icon-document"></i>
			      <span slot="title">智能检索</span>
			    </template>
			  </el-submenu>
			  <el-submenu index="4">
			    <template slot="title">
			      <i class="el-icon-document"></i>
			      <span slot="title">资源管理</span>
			    </template>
			  </el-submenu>
			</el-menu>
		</el-aside>
        <el-main>
			<div class="nav"></div>
			<router-view></router-view>
		</el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
// import HelloWorld from "@/components/HelloWorld.vue";

export default {
  name: "home",
  data(){
	  return{
		    isCollapse: false,
			conHeight:0
	  };
  },
  created(){
	  this.$router.push('/map')
  },
  mounted(){
	  this.conHeight=window.innerHeight-65;
	  console.log(this.conHeight)
  },
  components: {
    // HelloWorld
  },
  methods:{
	   handleSelect(key, keyPath) {
		   this.$router.push(key)
		  console.log(key, keyPath);
		}
  }
};
</script>
<style lang="stylus" scoped>

</style>