|
|
@@ -7,6 +7,22 @@
|
|
|
float:left;
|
|
|
margin:10px;
|
|
|
}
|
|
|
+.settings{
|
|
|
+ ul{
|
|
|
+ position:relative;
|
|
|
+ left:50px;
|
|
|
+ top:-11px;
|
|
|
+ z-index:4;
|
|
|
+ background-color:#eee;
|
|
|
+ border-radius:5px;
|
|
|
+ list-style: none;
|
|
|
+ color:#000;
|
|
|
+ li{
|
|
|
+ height:40px;
|
|
|
+ line-height:40px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|
|
|
|
|
|
<template>
|
|
|
@@ -21,6 +37,15 @@
|
|
|
<i class="el-icon-s-custom"></i>
|
|
|
{{info.name}}
|
|
|
</span>
|
|
|
+ <!-- <el-dropdown >
|
|
|
+ <span> <i class="el-icon-s-custom"></i>{{checkedCompany?checkedCompany:info.name}} <i class="el-icon-arrow-down"></i></span>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <div v-for='(item,i) in info.enterprise_children' :key='i' @click='getDataAgain(item)'>
|
|
|
+ <el-dropdown-item>{{item.name}}</el-dropdown-item>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown> -->
|
|
|
<span class="logout" @click="logout"><i class="el-icon-switch-button"></i> 退出登录</span>
|
|
|
</div>
|
|
|
</el-header>
|
|
|
@@ -52,7 +77,7 @@
|
|
|
<el-main>
|
|
|
|
|
|
<transition name="fade" mode="out-in">
|
|
|
- <router-view :info='info' :community='community'></router-view>
|
|
|
+ <router-view :info='info' :community='community' v-if='isShow'></router-view>
|
|
|
</transition>
|
|
|
</el-main>
|
|
|
<!-- <el-footer>Footer</el-footer> -->
|
|
|
@@ -66,13 +91,15 @@ export default {
|
|
|
name: 'home',
|
|
|
data() {
|
|
|
return {
|
|
|
+ checkedCompany:'',
|
|
|
menuList:[],
|
|
|
path:'',
|
|
|
info:{},
|
|
|
community_list:[],
|
|
|
community:{},
|
|
|
menu:[],
|
|
|
- now:(new Date()).toLocaleDateString()+" "+(new Date()).toLocaleTimeString()
|
|
|
+ now:(new Date()).toLocaleDateString()+" "+(new Date()).toLocaleTimeString(),
|
|
|
+ isShow:true
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -102,6 +129,22 @@ export default {
|
|
|
this.$api.getInfo().then(res=>{
|
|
|
this.info=res.data.data
|
|
|
})
|
|
|
+ },
|
|
|
+ getDataAgain(item){
|
|
|
+ console.log(111,this.store)
|
|
|
+ this.checkedCompany = item.name;
|
|
|
+ this.$router.push({path:`/companyData`,query:{
|
|
|
+ enterprise_id:item.id
|
|
|
+ }})
|
|
|
+ this.relode()
|
|
|
+ // this.$store.commit("setId",item.id)
|
|
|
+ // console.log(this.$store.getters.getId)
|
|
|
+ },
|
|
|
+ relode(){
|
|
|
+ this.isShow = false;
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.isShow = true;
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
created(){
|