<!--
@ 作者: 秦东
@ 时间: 2024-08-31 16:56:19
@ 备注: 性格测试结果
-->
<script lang='ts' setup>
import CharacterColor from "@/views/hr/archives/basicinformation/charactercolor.vue"; //性格色彩
import DiscTest from "@/views/hr/archives/basicinformation/discTest.vue"; //DISC测试结果

const props = defineProps({
  	tabsid: {
		type: String,
		default: "1",
	},
	usercont:{
		type:Object,
		default(){
			return {}
		}
	} 
});
/**
@ 作者: 秦东
@ 时间: 2024-08-30 14:52:29
@ 功能: 判断现实哪种测验结果
*/
const isTestShouw = (val:number) => {
    // console.log("判断现实哪种测验结果",props.usercont.isColorTrue)
    switch (props.usercont.isColorTrue) {
        case 1:
            if(val == 1){
                return true
            }else{
                return false
            }
            break;
        case 3:
            if(val == 2){
                return true
            }else{
                return false
            }
            break;
        case 4:
            if(val == 3){
                return false
            }else{
                return true
            }
            break;
        case 5:
            if(val == 3){
                return true
            }else{
                return false
            }
            break;
        default:
            return false
            break;
    }
}
</script>
<template>
	<div>
		<CharacterColor v-if="isTestShouw(1)" :usercont="props.usercont" :tabsid="props.tabsid" />
		<DiscTest v-if="isTestShouw(2)" :usercont="props.usercont" :tabsid="props.tabsid" />
	</div>
</template>
<style  lang='scss' scoped>

</style>
