44 lines
1.3 KiB
Vue
44 lines
1.3 KiB
Vue
<template>
|
|
<div class="default-main device">
|
|
<currentDevice ref="currentDeviceRef" v-if="activeName == '0'" />
|
|
<offLineDataImport ref="currentDeviceRef" v-else-if="activeName == '1'" />
|
|
</div>
|
|
</template>
|
|
<script lang="ts" setup>
|
|
import { ref, onMounted, watch, nextTick } from 'vue'
|
|
import currentDevice from './supplementaryRecruitment/currentDevice.vue'
|
|
import offLineDataImport from '@/views/govern/device/control/offLineDataImport/index.vue'
|
|
import { useRoute } from 'vue-router'
|
|
const route = useRoute()
|
|
const activeName = ref('')
|
|
const currentDeviceRef = ref()
|
|
watch(
|
|
() => activeName.value,
|
|
(val, oldVal) => {
|
|
// if (val == '0') {
|
|
// nextTick(() => {
|
|
// currentDeviceRef.value && currentDeviceRef.value.getMakeUpDataList(route.query)
|
|
// })
|
|
// } else if (val == '1') {
|
|
nextTick(() => {
|
|
currentDeviceRef.value && currentDeviceRef.value.getMakeUpDataList(route.query)
|
|
})
|
|
// }
|
|
},
|
|
{
|
|
immediate: true,
|
|
deep: true
|
|
}
|
|
)
|
|
onMounted(() => {
|
|
|
|
activeName.value = route.query.activeName
|
|
// currentDeviceRef.value && currentDeviceRef.value.getMakeUpDataList(route.query)
|
|
})
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
.device {
|
|
height: calc(100vh - 130px);
|
|
}
|
|
</style>
|