叶松
2023-09-27 95caf74f05712c6556128eca180d555f427e289e
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<template>
    <div class="main">
        <div class="main_tabs">
            <el-tabs v-model="activeName" @tab-click="handleClick">
                <el-tab-pane label="库存管理" name="first">
                    <embedded-invent ref="Invent"></embedded-invent>
                </el-tab-pane>
                <el-tab-pane label="消耗记录" name="third">
                    <embedded-cost ref="Costs"></embedded-cost>
                </el-tab-pane>
                <el-tab-pane label="入库记录" name="second">
                    <embedded-income ref="Income"></embedded-income>
                </el-tab-pane>
                <el-tab-pane label="校正记录" name="fourth">
                    <embedded-check ref="checks"></embedded-check>
                </el-tab-pane>
                <el-tab-pane label="预埋件种类" name="five">
                    <embedded-type ref="Auxiliary"></embedded-type>
                </el-tab-pane>
            </el-tabs>
        </div>
    </div>
</template>
<script>
import EmbeddedInvent from './components/embedded/Invent'//库存管理
import EmbeddedCost from './components/embedded/Cost'//消耗记录
import EmbeddedIncome from './components/embedded/Income'//入库记录
import EmbeddedCheck from './components/embedded/Check'//校正记录
import EmbeddedType from './components/embedded/Type'//预埋件种类
export default {
    components: {
        EmbeddedInvent,
        EmbeddedCost,
        EmbeddedIncome,
        EmbeddedCheck,
        EmbeddedType
    },
    data() {
        return {
            activeName: 'first'
        }
    },
    mounted() {
        this.$refs.Invent.searchButtonInfo(true);
    },
    methods: {
        //切换界面
        handleClick(tab) {
            switch (tab.name) {
                case 'second':
                    this.$refs.Income.searchButtonInfo(true);
                    this.$refs.Income.getNameList()
                    break;
                case 'third':
                    this.$refs.Costs.searchButtonInfo(true);
                    this.$refs.Costs.getNameList()
                    break;
                case 'fourth':
                    this.$refs.checks.searchButtonInfo(true);
                    break;
                case 'five':
                    this.$refs.Auxiliary.searchButtonInfo(true);
                    this.$refs.Auxiliary.getAllTypes();
                    break;
                default:
                    this.$refs.Invent.searchButtonInfo(true);
            }
        },
    }
}
</script>
<style scoped lang="scss">
@import'@/style/layout-main.scss';
 
/deep/ .el-tabs__content {
    position: static;
}
 
/deep/.main {
    background: none;
}
</style>