<template>
    <ie-page>
        <ie-navbar title="霍兰德职业兴趣测评"/>
        <interest-result :holl-info="hollandData" :series-data="chartData" />
    </ie-page>
</template>

<script setup lang="ts">
import {useTransferPage} from "@/hooks/useTransferPage";
import {hollDetail} from "@/api/modules/test-center";
import {HollandEntity} from "@/types/test-center";
import InterestResult from "@/pagesOther/pages/test-center/holland/components/interest-result.vue";

const {prevData} = useTransferPage()
const hollandData = ref<HollandEntity>({} as HollandEntity)
const chartData = ref<number[]>([])

onMounted(async () => {
    if (prevData.value.code) {
        const {data} = await hollDetail({code: prevData.value.code})
        const {scorer, scorea, scorei, scores, scoree, scorec} = data
        hollandData.value = data
        chartData.value = [scorer, scorea, scorei, scores, scoree, scorec]
    }
})

onPageScroll(() => {})
</script>

<style lang="scss">

</style>
