修改测试bug
This commit is contained in:
@@ -1,23 +1,29 @@
|
||||
<template>
|
||||
<div class="default-main device">
|
||||
<currentDevice ref="currentDeviceRef" />
|
||||
<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('0')
|
||||
const activeName = ref('')
|
||||
const currentDeviceRef = ref()
|
||||
watch(
|
||||
() => activeName.value,
|
||||
(val, oldVal) => {
|
||||
if (val == '0') {
|
||||
nextTick(() => {
|
||||
currentDeviceRef.value && currentDeviceRef.value.getMakeUpDataList(route.query)
|
||||
})
|
||||
}
|
||||
// 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,
|
||||
@@ -25,8 +31,9 @@ watch(
|
||||
}
|
||||
)
|
||||
onMounted(() => {
|
||||
console.log()
|
||||
currentDeviceRef.value && currentDeviceRef.value.getMakeUpDataList(route.query)
|
||||
|
||||
activeName.value = route.query.activeName
|
||||
// currentDeviceRef.value && currentDeviceRef.value.getMakeUpDataList(route.query)
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user