<template>
|
<div class="main" style="overflow:hidden">
|
<div class="main_tabs">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tab-pane label="原材料消耗" name="first">
|
<material-cost ref="Materials"></material-cost>
|
</el-tab-pane>
|
<el-tab-pane label="钢筋消耗" name="second">
|
<rebar-cost ref="Rebars"></rebar-cost>
|
</el-tab-pane>
|
<el-tab-pane label="辅材消耗" name="third">
|
<auxiliary-cost ref="Auxiliarys"></auxiliary-cost>
|
</el-tab-pane>
|
</el-tabs>
|
</div>
|
</div>
|
</template>
|
<script>
|
import MaterialCost from './components/MaterialCost.vue'//原材料消耗
|
import RebarCost from './components/RebarCost.vue'//钢筋消耗
|
import AuxiliaryCost from './components/AuxiliaryCost.vue'//辅材消耗
|
export default {
|
components:{
|
MaterialCost,
|
RebarCost,
|
AuxiliaryCost,
|
},
|
data(){
|
return{
|
activeName:'first'
|
}
|
},
|
mounted(){
|
this.$refs.Materials.searchButtonInfo();
|
},
|
methods:{
|
//切换界面
|
handleClick(tab){
|
switch(tab.name){
|
case 'second':
|
this.$refs.Rebars.searchButtonInfo();
|
break;
|
case 'third':
|
this.$refs.Auxiliarys.searchButtonInfo();
|
break;
|
default:
|
this.$refs.Materials.searchButtonInfo();
|
}
|
},
|
}
|
}
|
</script>
|
<style scoped lang="scss">
|
@import'@/style/layout-main.scss';
|
/deep/ .el-tabs__content{
|
position: static;
|
}
|
|
/deep/.main {
|
background: none;
|
}
|
</style>
|