叶松
2023-10-26 aefd598cc1ced37ff2cfed2b529dbf10bea7554c
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
<template>
  <div class="main">
    <div class="main_tabs">
      <el-tabs v-model="activeName" @tab-click="handleClick">
            <el-tab-pane label="模具尺寸检查" name="first">
                <pattern-check ref="pattern"></pattern-check> 
            </el-tab-pane>
            <el-tab-pane label="三维检查" name="second">
                <threed-check ref="threed"></threed-check>
            </el-tab-pane>
        </el-tabs>
    </div>
  </div>
</template>
<script>
import PatternCheck from './components/PatternCheck.vue'//模具尺寸检查
import ThreedCheck from './components/ThreedCheck.vue'//三维检查
export default {
    components:{
        PatternCheck,
        ThreedCheck,
    },
    data(){
        return{
            activeName:'first'
        }
    },
    mounted(){
        this.$refs.pattern.searchButtonInfo(true);
        this.$refs.pattern.getAllPersons();
    },
    methods:{
        //切换界面
        handleClick(tab){
            switch(tab.name){
                case 'second':
                    this.$refs.threed.searchButtonInfo(true);
                    this.$refs.threed.getAllPersons();
                    break;
                default:
                    this.$refs.pattern.searchButtonInfo(true);
                    this.$refs.pattern.getAllPersons();
            }
        },
    }
}
</script>
<style scoped lang="scss">
@import'@/style/layout-main.scss';
/deep/ .el-tabs__content{
    position: static;
}
 
/deep/.main {
  background: none;
}
</style>