<template>
	<div class="content-padding-inline" style="margin-top: 30px;">
		<a-row :gutter="[10,10]" type="flex" justify="center">
			<a-col span="18">
				<div style="width: 100%; background-color: #fff;">
					<a-list item-layout="vertical">
						<a-list-item>
							<a-list-item-meta>
								<template #title>
									{{basic.contact}}
								</template>
								<template #description>
									企业编号：13213
								</template>
								<template #avatar>
									<a-avatar :src="basic.photo" :size="48" />
								</template>
							</a-list-item-meta>
							<div style="margin-left: 64px;">
								<a-descriptions :column="2" >
								    <a-descriptions-item label="登录账号" >{{basic.login_name ? basic.login_name : '未知'}}</a-descriptions-item>
								    <a-descriptions-item label="会员始止时间">{{basic.start_date}}-{{basic.end_date}}</a-descriptions-item>
								    <a-descriptions-item label="联系电话">{{basic.mobile ? basic.mobile : '未填写'}}</a-descriptions-item>
								    <a-descriptions-item label="服务终止日期">{{basic.end_date}}</a-descriptions-item>
									<a-descriptions-item label="电子邮箱">{{basic.email ? basic.email : '未填写'}}</a-descriptions-item>
									<a-descriptions-item label="被访问次数">{{basic.click_count ? basic.click_count : '0'}}次</a-descriptions-item>
								  </a-descriptions>
							</div>
						</a-list-item>
					</a-list>
				</div>
			</a-col>
			<a-col span="18">
				<div style="width: 100%; background-color: #fff;padding: 10px 20px;">
					当月已查看{{basic.month_look_resume_qty}}份简历，还可以查看{{basic.limit_resume_qty}}份简历
				</div>
			</a-col>
			<a-col span="18">
				<div style="width: 100%">
					推荐简历
				</div>
				<a-row :gutter="[10,10]">
					<a-col span="12" v-for="(item, index) in list">
						<div class="talent-box">
							<a-list>
								<a-list-item>
									<template #actions>
										<a-button>
											<StarOutlined />
											收藏
										</a-button>
										<a-button>
											邀请面试
										</a-button>
									</template>
									<a-list-item-meta>
										<template #title>
											{{item.seekername}}
										</template>
										<template #description>
											<div>
												{{item.gender}}
												<a-divider type="vertical" />
												{{item.education_text}}
												<a-divider type="vertical" />
												{{item.now_level1_text}}{{item.now_level2_text}}
											</div>
											<div style="margin-top: 10px; overflow: hidden;
											display: -webkit-box;
											-webkit-line-clamp: 1;
											-webkit-box-orient: vertical;
											text-overflow: ellipsis;">
												<div v-html="item.introduction"></div>
											</div>
										</template>
										<template #avatar>
											<a-avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
												:size="48" />
										</template>
									</a-list-item-meta>
								</a-list-item>
							</a-list>
							<!-- <a-list item-layout="horizontal" :split="false" position="bottom" v-for="(item, index) in list">
								<a-list-item>
									<template #actions>
										<a-button>
											<StarOutlined />
											收藏
										</a-button>
										<a-button>
											投简历
										</a-button>
									</template>
									<a-list-item-meta>
										<template #title>
											{{item.seekername}}
										</template>
										<template #description>
											<div>
												Text
												<a-divider type="vertical" />
												<a href="#">Link</a>
												<a-divider type="vertical" />
												<a href="#">Link</a>
												<div>{{item.introduction}}</div>
											</div>
										</template>
										<template #avatar>
											<a-avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" :size="48" />
										</template>
									</a-list-item-meta>
									<div style="width: 30%;">
										<a-row>
											<a-col span="24">
												地点：广东省，中山市
											</a-col>
											<a-col span="24">
												期望：环境更加环境更加环境更加环境更
											</a-col>
											<a-col span="24">
												时间：2023-12-19
											</a-col>
										</a-row>
										
									</div>
								</a-list-item>
							</a-list> -->
						</div>
					</a-col>
					<a-col span="24">
						<div style="display: flex;align-items: center;justify-content: center;padding: 30px;font-size: 24px;">查看更多
						</div>
					</a-col>
				</a-row>
			</a-col>
		</a-row>
	</div>
	
</template>

<script setup lang="ts">
	import { ref, computed, onMounted } from 'vue';
	import JobTalents from '@/components/job/talents/index.vue'
	import { PostCompanyProfile, GetCompanyRecommentResume } from '@/apis/models';

	let jobList = ref<object[]>([])
	let basic = ref<Object>({})
	onMounted(() => {
		PostCompanyProfile().then(res => {
			basic.value = res.data
		})
		
		GetCompanyRecommentResume().then(res => {
			if (res.data.list.length > 10) {
				jobList.value = res.data.list.slice(0, 10)
			} else {
				jobList.value = res.data.list
			}
		})
	})
</script>

<style>
</style>