<template>
	<a-modal v-model:visible="openOtherModel_1" title="招聘会详情" @cancel="cancelModal" width="50%" :footer="null">
		<a-typography>
			<a-typography-title :level="3">{{detailData.title}}</a-typography-title>
			<a-typography-paragraph>发布时间：{{detailData.created_at}}</a-typography-paragraph>
			<a-typography-text>
				<div v-html="detailData.content">
				</div>
			</a-typography-text>
		</a-typography>
	</a-modal>
</template>

<script setup lang="ts">
	import { ref, onMounted, computed, defineProps, watch, defineEmits } from 'vue';
	import he from 'he';
	import { GetRecruitmentDetail } from '@/apis/models';
	import { useCommon } from '@/hooks/useCommon';
	import { cols } from '@/views/company/department/columns';
	let { store, commomParams, hideOtherModal1, openOtherModel_1 } = useCommon();
	const emit = defineEmits();
	let props = defineProps(['detail_record']);
	let detailData = ref<object>({})

	openOtherModel_1 = computed(() => {
		return store.state.openOtherModel_1;
	})

	let detail_record = ref<Object>({});
	watch(() => props.detail_record, (newVal1) => {
		detail_record.value = newVal1;
		getData()
	})

	const getData = async (val) => {
		try {
			let res = await GetRecruitmentDetail({ id: detail_record.value.id });
			detailData.value = res.data
			detailData.value.content = he.decode(detailData.value.content)
		} catch {
		}
	}


	const cancelModal = () => {
		hideOtherModal1()
	}
</script>

<style>
	
</style>