叶松
2023-09-27 e1e25f4f7fa6b7e31c7f0567cc3744fb3ee6ba98
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
<template>
  <div class="main">
    <div class="main_tabs">
      <el-tabs v-model="activeName" @tab-click="handleClick">
            <el-tab-pane label="出库管理" name="first">
                <despatch-out ref="Outs"></despatch-out> 
            </el-tab-pane>
            <el-tab-pane label="车辆管理" name="second">
                <car-manage ref="Cars"></car-manage>
            </el-tab-pane>
            <el-tab-pane label="GPS设备管理" name="third">
                <gps-manage ref="Gpss"></gps-manage>
            </el-tab-pane>
        </el-tabs>
    </div>
  </div>
</template>
<script>
import DespatchOut from './components/DespatchOut.vue'//出库管理
import CarManage from './components/CarManage.vue'//车辆管理
import GpsManage from './components/GpsManage.vue'//车辆管理
export default {
    components:{
        DespatchOut,
        CarManage,
        GpsManage
    },
    data(){
        return{
            activeName:'first'
        }
    },
    mounted(){
        this.$refs.Outs.searchButtonInfo(true);
    },
    methods:{
        //切换界面
        handleClick(tab){
            switch(tab.name){
                case 'second':
                    this.$refs.Cars.searchButtonInfo(true);
                    break;
                case 'third':
                    this.$refs.Gpss.searchButtonInfo(true);
                    break;
                default:
                    this.$refs.Outs.searchButtonInfo(true);
            }
        },
    }
}
</script>
<style scoped lang="scss">
@import'@/style/layout-main.scss';
/deep/ .el-tabs__content{
    position: static;
}
 
/deep/.main {
  background: none;
}
</style>