<template>
    <div class="app-container" v-loading="loading">
        <el-tabs @tab-change="handleTabChange">
            <el-tab-pane label="手动组卷">
                <paper-by-hand />
            </el-tab-pane>
            <el-tab-pane label="智能组卷">
                <paper-by-intelligent v-if="intelligentVisited" />
            </el-tab-pane>
        </el-tabs>
    </div>
</template>

<script setup name="PaperIndex">
import PaperByHand from "@/views/dz/papers/components/paper-by-hand.vue";
import PaperByIntelligent from "@/views/dz/papers/components/paper-by-intelligent.vue";
import {useProvideLoading} from "@/views/hooks/useLoading.js";

const {loading} = useProvideLoading()

// 延迟渲染，减少初次打开页面时的加载项
const intelligentVisited = ref(false)
const handleTabChange = () => intelligentVisited.value = true
</script>

<style scoped></style>
