<template>
    <div class="default-main device">
        <currentDevice  ref="currentDeviceRef"/>
        <!-- <el-tabs v-model="activeName" type="border-card">
            <el-tab-pane label="当前设备补召" name="0">
                <currentDevice v-if="activeName == '0'" ref="currentDeviceRef"/>
            </el-tab-pane>
            <el-tab-pane label="历史设备补召" name="1">
                <history v-if="activeName == '1'" />
            </el-tab-pane>
        </el-tabs> -->
    </div>
</template>
<script lang="ts" setup>
import { ref, onMounted,watch ,nextTick} from 'vue'
// import current from './supplementaryRecruitment/current.vue'
import currentDevice from './supplementaryRecruitment/currentDevice.vue'
import history from './supplementaryRecruitment/history.vue'
import { useRoute } from 'vue-router'
const route = useRoute()
const activeName = ref('0')
const currentDeviceRef=ref()
watch(
    ()=>activeName.value,
    (val,oldVal)=>{
        if(val=='0'){
            nextTick(()=>{
                currentDeviceRef.value&&currentDeviceRef.value.getMakeUpDataList(route.query)
            })
           
        }
    },
    {
        immediate:true,
        deep:true
    }
)
onMounted(() => {
    console.log()
    currentDeviceRef.value&&currentDeviceRef.value.getMakeUpDataList(route.query)
})
</script>
<style lang="scss" scoped>
.device{
    width: 100%;
    height: 100%;
}
</style>
