<template>
	<view>
		<view class="resumepage">
			<view class="u-flex u-row-between">
				<view class="">
					<view class="u-flex">
						<text>{{from.name}}</text>
						<u-icon @click="onchange" name="edit-pen-fill" color="#777" size="22"></u-icon>
					</view>
					<view class="" style="margin-top: 20rpx;">
						<text style="margin-right: 12rpx;">{{from.experience}}年工作经验</text>|
						<text style="margin-left: 12rpx;margin-right: 12rpx;">{{from.birthday_text}}岁</text>|
						<text style="margin-left: 12rpx;">{{}}</text>
					</view>
				</view>
				<image style="width: 136rpx;height: 136rpx;border-radius:50%;" src="" mode=""></image>
			</view>
			<view class="" style="margin-top: 30rpx;">
				<view class="u-flex u-row-between">
					<text class="title">个人优势</text>
					<u-icon name="edit-pen-fill" color="#777" size="22"></u-icon>
				</view>
				<view class="mar">
					<input type="text" placeholder="编辑优势亮点，展示我的独特态度" v-model="from.personal_advantage">
				</view>
			</view>
			<view class="" style="border-top:2rpx solid #F0F0F0;margin-top: 32rpx;">
				<view class="u-flex ">
					<text class="title">求职状态</text>
				</view>
				<view class="u-flex u-row-between" style="margin-top: 20rpx;">
					<input type="text" placeholder="请选择你的求职状态" v-model="from.job_status_name">
					<u-icon name="arrow-right" size="12"></u-icon>
				</view>
			</view>
			<view class="" style="border-top:2rpx solid #F0F0F0;margin-top: 32rpx;">
				<view class="u-flex u-row-between">
					<text class="title">求职意向</text>
					<u-icon name="plus-circle" size="20"></u-icon>
				</view>
				<view class="u-flex u-row-between" style="margin-top: 40rpx;margin-bottom: 20rpx;" v-for="(item,index) in job_intention1" :key="item.id">
					<view class="">
						<text>{{item.category_industry_name}}</text>
						<text style="margin-left: 28rpx;">{{item.salary}}k</text>
					</view>
					<u-icon name="arrow-right" size="12"></u-icon>
				</view>
				<text
					style="margin-top: 20rpx;font-size: 28rpx;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;color: #777777;">北京·行业不限</text>
			</view>
			<view class="" style="border-top:2rpx solid #F0F0F0;margin-top: 32rpx;">
				<view class="u-flex u-row-between">
					<text class="title">工作经历</text>
					<u-icon name="plus-circle" size="20" @click="towork"></u-icon>
				</view>
				<view class="" v-for="(item,index) in job_experience1" :key="item.id">
					<view class="u-flex u-row-between" style="margin-top:40rpx ;">
						<text>{{item.company_name}}</text>
						<view class="u-flex">
							<text>{{item.start_time}}-{{item.end_time}}</text>
							<u-icon name="arrow-right" size="12"></u-icon>
						</view>
					</view>
					<view class="" style="margin-top: 20rpx;font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;">
						<text>{{item.job_name}}｜</text>
						<text>{{item.department}}</text>
					</view>
					<view class="concent">
						{{item.work_content}}
					</view>
				</view>
				<view class=""></view>
			</view>
			<view class="" style="margin-top: 40rpx;border-top: 2rpx solid #F0F0F0;">
				<view class="u-flex u-row-between">
					<text class="title">项目经历</text>
					<u-icon name="plus-circle" size="20"></u-icon>
				</view>
				<view class="" style="margin-top: 40rpx;" v-for="(item,index) in project_experience1">
					<view class="u-flex u-row-between">
						<text style="flex: 1;">{{item.company_name}}</text>
						<view class="u-flex" style="flex: 1;">
							<text>{{item.start_time}}-{{item.end_time}}</text>
							<u-icon name="arrow-right" size="12"></u-icon>
						</view>
					</view>
					<view class="mar">
						<text>{{item.role}}</text>
					</view>
					<view class="concent">
						{{item.description}}
					</view>
				</view>
				<view class=""></view>
			</view>
			<view class="" style="margin-top: 40rpx;border-top: 2rpx solid #F0F0F0;">
				<view class="u-flex u-row-between">
					<text class="title">教育经历</text>
					<u-icon name="plus-circle" size="20"></u-icon>
				</view>
				<view class="" style="margin-top: 40rpx;" v-for="(item,index) in education_experience1" :key="item.id">
					<view class="u-flex u-row-between">
						<text>{{item.name}}</text>
						<view class="u-flex">
							<text>{{item.start_time}}-{{item.end_time}}</text>
							<u-icon name="arrow-right" size="12"></u-icon>
						</view>
					</view>
					<view class="">
						<text>{{item.major}}</text>
					</view>
				</view>
			</view>
			<view class="" style="margin-top: 40rpx;border-top: 2rpx solid #F0F0F0;">
				<view class="u-flex u-row-between">
					<text class="title">语言能力</text>
					<u-icon name="plus-circle" size="20"></u-icon>
				</view>
				<view class="mar">
					<view class="u-flex u-row-between">
						<text>{{language.language_name}}</text>
						<view class="u-flex">
							<text>{{language.level_name}}</text>
							<u-icon name="arrow-right" size="12"></u-icon>
						</view>
					</view>
				</view>
			</view>
			<view class="" style="margin-top: 40rpx;border-top: 2rpx solid #F0F0F0;">
				<view class="u-flex u-row-between">
					<text class="title">专业技能与证书</text>
					<u-icon name="plus-circle" size="20"></u-icon>
				</view>
				<view class="mar">
					<view style="flex: 1;" class="item">{{certificate.professional_skill}}</view>
				</view>
				<view class="u-flex u-row-between">
					<view class="">{{certificate.certificate}}</view>
					<view class="">{{certificate.certificate_date}}</view>
				</view>
			</view>
			<view class="" style="margin-top: 40rpx;border-top: 2rpx solid #F0F0F0;margin-bottom:118rpx ;">
				<view class="u-flex u-row-between">
					<text class="title">附加信息</text>
					<u-icon name="plus-circle" size="20"></u-icon>
				</view>
				<view class="mar">
					<input type="text">
				</view>
			</view>
			<view class="" style="height: 60rpx;"></view>

		</view>
		<view class="back u-flex" style="margin-top: 118rpx;">
			<view class="left">
				简历导入
			</view>
			<view class="right">
				<text style="opacity: 1;color: #0C66C2;">预览</text>
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		resumeDetail
	} from "@/units/inquire.js"
	export default {
		data() {
			return {
				from: {
					name: "",
					birthday_text: "",
					personal_advantage: "", //个人优势
					additional_info: "", //附加信息
					experience: "",
				},
				//求职意向
				job_intention: {
					job_date: "", //date	求职时间(求职意向
					province_id: "", //string	期望省份ID(求职意向
					city_id: "", //string	期望城市ID(求职意向
					province: "", //string	期望省份名称(求职意向
					city: "", //string	期望城市名称(求职意向
					salary_type: "", //string	薪资类型: year=年薪;month=月薪(求职意向
					salary: "", //string	薪水(求职意向
					salary_month: "", //string	一年多少薪(求职意向
					category_field_id: "", //string	领域ID(求职意向
					category_field_name: "", //string	领域名称(求职意向
					category_industry_first: "", //string	行业一级ID(求职意向
					category_industry_id: "", //string	行业ID(求职意向
					category_industry_first_name: "", //string	行业一级名称(求职意向
					category_industry_name: "", //string	行业名称(求职意向
					category_job_first: "", //string	职业分类一级ID(求职意向
					category_job_second: "", //string	职业分类二级ID(求职意向
					category_job_id: "", //string	职位分类ID(求职意向
					category_job_first_name: "", //string	职业分类一级名称(求职意向
					category_job_second_name: "", //string	职业分类二级名称(求职意向
					category_job_name: "", //string	职位分类名称(求职意向)
					is_pay: "",
				},
				//工作经历
				job_experience: {
					company_name: "", //	string	公司名称(工作经历
					industry_id: "", //string	公司行业ID(工作经历
					department: "", //tring	所属部门(工作经历
					job_name: "", //ing	职位名称(工作经历
					underling_count: "", //unt	string	下属数量(工作经历
					report_to: "", //ring	汇报对象(工作经历
					start_time: "", //ate	在职开始时间: 如 2019-01-01(工作经历
					end_time: "", //e	在职结束时间: 如 2019-01-01(工作经历
					level_reason: "", //	string	离职原因(工作经历
					work_content: "", //	string	工作内容(工作经历
				},
				//项目经历
				project_experience: {
					name: "", //string	项目名称(项目经历
					company_name: "", //string	公司名称(项目经历
					role: "", // string	项目角色(项目经历
					start_time: "", //tring	开始时间(项目经历
					end_time: "", //string	结束时间(项目经历
					description: "", // string	项目描述(项目经
				},
				//教育经历
				education_experience: {
					name: "", //string	学校名称(教育经历
					is_recruit: "", //string	是否统招: 1.是, 0.不是(教育经历
					education_id: "", //string	学历ID(教育经历
					education_name: "", //string	学历名称(教育经历
					major: "", //string	专业(教育经历
					start_time: "", //string	开始时间 如 2019-01-01(教育经历
					end_time: "", //string	结束时间 如 2019-01-01(教育经历
				},
				//语言能力
				language: {
					language_id: "", //      tring	语言ID(语言能力
					level_id: "", //      ng	水平ID(语言能力
					language_name: "", //      	string	语言名称(语言能力
					level_name: "", //      ring	水平名称(语言能力
				},
				//附件简历
				file: {
					file:"", //string	附件(附件简历
					title:"", //string	附件名称(附件简历
				},
				education_experience1:[],//教育经历
				job_experience1:[],//工作经历
				job_intention1:[],//教育经历
				project_experience1:[],//项目经历
			}
		},
		onLoad() {
			this.resumeDetail()
		},
		methods: {
			towork(){
				uni.navigateTo({
					url:"/pagesD/work",
					events:{
						work:(res)=>{
							
						}
					}
				})
			},
			resumeDetail() {
				resumeDetail().then(res => {
					this.from.name = res.data.name,
						this.from.birthday_text = res.data.birthday_text,
						// this.job_intention.province = res.data.job_intention[0].province,
						this.from.experience = res.data.experience
						this.education_experience1 = res.data.education_experience
						this.job_experience1 = res.data.job_experience
						this.job_intention1 = res.data.job_intention
						this.project_experience1 = res.data.project_experience
				})
			},
			onchange() {
				uni.navigateTo({
					url: "/pagesD/personal-infor"
				})
			}
		}
	}
</script>


<style lang="scss">
	.concent {
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #555555;
		margin-top: 20rpx;
	}

	.mar {
		margin-top: 20rpx;
	}

	.title {
		font-size: 32rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: #222222;
		margin-top: 34rpx;
	}

	.item {
		height: 48rpx;
		background: #F4F4F4;
		border-radius: 6rpx;
		padding: 14rpx;
		box-sizing: border-box;
	}

	.resumepage {
		padding: 0 32rpx;
		background-color: #fff;
	}

	.back {
		padding: 16rpx 32rpx;
		background: #FFFFFF;
		height: 118rpx;
		box-sizing: border-box;
		position: fixed;
		bottom: 0;
		left: 0;

		.left {
			width: 356rpx;
			background: #0C66C2;
			border-radius: 12rpx;
			font-size: 32rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #FFFFFF;
			height: 88rpx;
			line-height: 88rpx;
			margin-right: 24rpx;
			text-align: center;
		}

		.right {
			width: 304rpx;
			// opacity: 0.1;
			// background: #0C66C2;
			border-radius: 12rpx;
			font-size: 32rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #0C66C2;
			height: 88rpx;
			line-height: 88rpx;
			text-align: center;
			background-color: rgba(12, 102, 194, 0.1);
		}
	}
</style>