<!-- 我的简历 -->
<template>
	<view class="resume">

		<!-- ================================ 头像部分 ================================ -->
		<view class="resume-head" @click="jumpPage('/pages/dynamicTracking/dynamicTracking')">
			<view class="resume-head-left">
				<u-avatar :src="userInfo.avatar" mode="circle" size="160" />
			</view>
			<view class="resume-head-right">
				<view>{{ userInfo.nickName }}</view>
				<view>{{ userInfo.sex }}</view>
				<view>
					<text>{{ userInfo.company ? '入职中' : '未入职' }}</text>
					{{ `（${ userInfo.company }）` }}
				</view>
			</view>
		</view>

		<!-- ================================ 基本信息部分 ================================ -->
		<view class="resume-base-info">
			<view class="title">基本信息</view>
			<view class="resume-base-info-item">退役军人 / 36岁 / 群众 / 本科
			</view>
			<view class="resume-base-info-phone">
				<text class="icon-phone-icon"></text> 17004240181
			</view>
		</view>

		<!-- ================================ 求职意向部分 ================================ -->
		<view class="resume-job-intention">
			<view class="title">求职意向</view>
			<view class="resume-job-intention-add" v-if="jobIntention">
				<view class="rjia-item">暂未补充求职意向...</view>
				<view class="rjia-item" @click="jumpPage('/pages/evaluationIntention/evaluationIntention', { tabCur: 0 })">立即补充</view>
				<view class="rjia-item">（补充信息使求职方向更加精准，增加获得面试的机会）</view>
			</view>
			<view class="resume-job-intention-info" v-else>
				<view class="rjii-box">
					<view class="rjii-left">
						<view>武装押运员，贵阳</view>
						<view>银行 / 生物科学 / 精密仪器</view>
					</view>
					<view class="rjii-right">5000 ~ 8000元</view>
				</view>
				<view class="rjii-edit-btn">修改</view>
			</view>
		</view>

		<!-- ================================ 自我评价部分 ================================ -->
		<view class="resume-self-evaluation">
			<view class="title">自我评价</view>
			<view class="resume-self-evaluation-add" v-if="selfEvaluation">
				<view class="rsea-item">暂未补充自我评价...</view>
				<view class="rsea-item" @click="jumpPage('/pages/evaluationIntention/evaluationIntention', { tabCur: 1 })">立即补充</view>
				<view class="rsea-item">（补充信息使企业第一时间了解你，增加获得面试的机会）</view>
			</view>
			<view class="resume-self-evaluation-info" v-else>
				<view class="rsei-box">性格开朗,工作认真负责,细心,有很强的职责心和进取心,头脑灵活,不怕吃苦,理解潜力强,能够很好的处理同事的关系,具有强烈的团队合作精神,并能承担必须的工作压力。
				</view>
				<view class="rsei-edit-btn">修改</view>
			</view>
		</view>

		<!-- ================================ 工作经历部分 ================================ -->
		<view class="resume-work-experience">
			<view class="title">工作经历</view>
			<view class="resume-work-experience-steps" :class="isExpand ? 'height-auto' : 'height-110'">
				<view class="u-steps">
					<view class="u-steps__item u-steps__item--column" v-for="(item, index) in workExperice"
						:key="index">
						<view class="u-steps__item__dot"></view>
						<view class="u-steps-content">
							<view>{{ item.dateLine }}</view>
							<view>{{ item.company }}</view>
							<view>{{ item.position }}</view>
							<view>获得企业评价：<text>{{ item.evaluate }}</text></view>
						</view>
						<view class="u-steps__item__line u-steps__item__line--column"
							v-if="index < workExperice.length - 1">
							<u-line direction="column" length="100%" :hair-line="false" color="#2a82e4" />
						</view>
					</view>
				</view>
			</view>
			<view class="resume-work-experience-btn" @click="isExpand = !isExpand">
				{{ isExpand ? '收起' : '展开全部' }}
			</view>
		</view>

		<!-- ================================ 培训与教育经历部分 ================================ -->
		<view class="resume-train-experience">
			<view class="title">培训与教育经历</view>
			<view class="resume-train-experience-steps" :class="isTrainExpand ? 'height-auto' : 'height-110'">
				<view class="u-steps">
					<view class="u-steps__item u-steps__item--column" v-for="(item, index) in trainExperice"
						:key="index">
						<view class="u-steps__item__dot"></view>
						<view class="u-steps-content">
							<view>{{ item.dateLine }}</view>
							<view>{{ item.classes }}</view>
							<view>{{ item.school }}</view>
							<view>{{ item.content }}</view>
							<view>获得企业评价：<text>{{ item.evaluate }}</text></view>
						</view>
						<view class="u-steps__item__line u-steps__item__line--column"
							v-if="index < trainExperice.length - 1">
							<u-line direction="column" length="100%" :hair-line="false" color="#2a82e4" />
						</view>
					</view>
				</view>
			</view>
			<view class="resume-train-experience-btn" @click="isTrainExpand = !isTrainExpand">
				{{ isTrainExpand ? '收起' : '展开全部' }}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userInfo: {
					avatar: require('@/static/img/avatar.jpg'),
					nickName: '郝爱国',
					company: '贵州威振押运有限公司',
					sex: '男'
				},
				// 求职意向
				jobIntention: true,
				// 自我评价
				selfEvaluation: true,
				// 工作经历
				workExperice: [{
						dateLine: '2020.3 ~ 至今',
						company: '贵州威振押运有限公司',
						position: '武装押运员',
						evaluate: '优秀'
					},
					{
						dateLine: '2018.5 ~ 2020.3',
						company: '贵州威振押运有限公司',
						position: '武装押运员',
						evaluate: '优秀'
					},
					{
						dateLine: '2015.11 ~ 2018.5',
						company: '贵州威振押运有限公司',
						position: '武装押运员',
						evaluate: '优秀'
					}
				],
				// 是否展开工作经历
				isExpand: true,
				// 培训与教育经历
				trainExperice: [{
						dateLine: '2020.3 ~ 2020.5',
						classes: '武装押运服务课程',
						school: '贵州特种服务职业技术学校',
						content: '2020年3月9日毕业，成绩优秀，获得特种服务证书',
						evaluate: '优秀'
					},
					{
						dateLine: '2019.3 ~ 2020.2',
						classes: '武装押运服务课程',
						school: '贵州特种服务职业技术学校',
						content: '2020年3月9日毕业，成绩优秀，获得特种服务证书',
						evaluate: '优秀'
					}
				],
				// 是否展开培训经历
				isTrainExpand: true
			}
		},
		methods: {
			/**
			 * 跳转到指定页
			 */
			jumpPage(url, params) {
				this.$u.route({
					url: url,
					params: params
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import 'myResume.scss'
</style>
