Files
admin-govern/src/views/govern/device/control/supplementaryRecruitment.vue

44 lines
1.3 KiB
Vue
Raw Normal View History

2024-07-22 10:35:01 +08:00
<template>
<div class="default-main">
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="当前设备补招" name="0">
<!-- <current v-if="activeName == '0'" /> -->
<currentDevice v-if="activeName == '0'" ref="currentDeviceRef"/>
2024-07-22 10:35:01 +08:00
</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'
2024-07-22 10:35:01 +08:00
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)
2024-07-22 10:35:01 +08:00
})
</script>
<style lang="scss" scoped></style>