|
|
<template>
|
|
|
<div style="width: 100%">
|
|
|
|
|
|
<Assembly></Assembly>
|
|
|
|
|
|
<el-tabs v-model="activeIndex"
|
|
|
v-if="openTab.length"
|
|
|
type="card"
|
...
|
...
|
@@ -11,6 +15,7 @@ |
|
|
:key="item.name"
|
|
|
:label="item.name"
|
|
|
:name="item.route">
|
|
|
</el-tab-pane>
|
|
|
<section class="content-container">
|
|
|
<div class="grid-content bg-purple-light">
|
|
|
<!-- <el-col :span="24" class="breadcrumb-container">-->
|
...
|
...
|
@@ -28,13 +33,16 @@ |
|
|
</el-col>
|
|
|
</div>
|
|
|
</section>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import Assembly from "@/views/bus/Assembly";
|
|
|
|
|
|
export default {
|
|
|
name: 'TabMenu',
|
|
|
components: { Assembly },
|
|
|
data() {
|
|
|
return {
|
|
|
tabCloseable: true
|
...
|
...
|
@@ -75,10 +83,11 @@ |
|
|
// console.log('=============',this.$store.state.openTab[this.$store.state.openTab.length-1].route)
|
|
|
this.$store.commit('set_active_index', this.$store.state.openTab[this.$store.state.openTab.length-1].route);
|
|
|
this.$router.push({path: this.$store.state.activeIndex});
|
|
|
this.tabCloseable = false;
|
|
|
} else {
|
|
|
this.$router.push({path: '/main'});
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
},
|
|
|
},
|
...
|
...
|
@@ -109,6 +118,9 @@ |
|
|
this.$store.commit('set_active_index', to.path);
|
|
|
}
|
|
|
|
|
|
},
|
|
|
openTab(){
|
|
|
this.openTab.length === 1 ? this.tabCloseable=false :this.tabCloseable = true;
|
|
|
}
|
|
|
},
|
|
|
computed:{
|
...
|
...
|
|