叶松
2023-11-30 bbe5e8baf16c153e3f6324850fd3d7d08115ef80
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<template>
  <div class="main">
    <div class="main_tabs">
      <el-tabs v-model="activeName" @tab-click="handleClick">
            <!-- <el-tab-pane label="预埋件理论耗量" name="first">
                <fitt-consump ref="Fitts"></fitt-consump> 
            </el-tab-pane> -->
            <el-tab-pane label="钢筋笼理论耗量" name="second">
                <rebar-consump ref="Rebars"></rebar-consump>
            </el-tab-pane>
            <el-tab-pane label="混凝土方量及混凝土原材料" name="third">
                <raw-consump ref="Raws"></raw-consump>
            </el-tab-pane>
        </el-tabs>
    </div>
  </div>
</template>
<script>
// import FittConsump from './components/FittConsump.vue'//预埋件理论耗量
import RebarConsump from './components/RebarConsump.vue'//钢筋笼理论耗量
import RawConsump from './components/RawConsump.vue'//混凝土方量及混凝土原材料
export default {
    components:{
        // FittConsump,
        RebarConsump,
        RawConsump
    },
    data(){
        return{
            activeName:'second'
        }
    },
    mounted(){
        this.$refs.Rebars.searchButtonInfo(true);
        this.$refs.Rebars.getInits();
    },
    methods:{
        //切换界面
        handleClick(tab){
            switch(tab.name){
                // case 'second':
                //     this.$refs.Rebars.getInits();
                //     this.$refs.Rebars.getAllProjectData();
                //     break;
                case 'third':
                    this.$refs.Raws.getAllProjects();
                    this.$refs.Raws.searchButtonInfo(true);
                    break;
                default:
                    // this.$refs.Fitts.searchButtonInfo(true);
                    this.$refs.Rebars.getInits();
                    this.$refs.Rebars.getAllProjectData();
            }
        },
    }
}
</script>
<style scoped lang="scss">
@import'@/style/layout-main.scss';
/deep/ .el-tabs__content{
    position: static;
}
 
/deep/.main {
  background: none;
}
</style>