gaoshp
2024-06-13 fd7586c8d91473d2850af1e48b12f1a289e6b8d1
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
<!--
 * @Author: lzhe lzhe@example.com
 * @Date: 2024-03-26 10:28:33
 * @LastEditors: lzhe lzhe@example.com
 * @LastEditTime: 2024-04-09 20:12:59
 * @FilePath: /smart-web/src/views/master/person/main/index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
    <div class="person-main">
        <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
            <el-tab-pane label="员工" name="first">
                <person-person v-if="activeName == 'first'"></person-person>
            </el-tab-pane>
            <el-tab-pane label="岗位" name="second">
                <person-post v-if="activeName == 'second'"></person-post>
            </el-tab-pane>
            <el-tab-pane label="部门" name="third">
                <person-department v-if="activeName == 'third'"></person-department>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>
 
<script>
    import personPerson from './personPerson'
    import personPost from './personPost'
    import personDepartment from './personDepartment'
    
    export default {
        name: "bakalaka",
        data(){
            return {
                activeName: 'first'
            }
        },
        components: {personPerson,personPost,personDepartment},
        created(){
            
        },
        mounted(){
            
        },
        methods: {
            handleClick(tab, event) {
                console.log(tab.props.label, this.activeName);
            }
        }
    }
</script>
 
<style>
.person-main {
    padding: 8px 8px 0px 8px;
    overflow: hidden auto;
}
.person-main .el-tabs__header {
    margin-bottom: 0px;
}
</style>