<template>
  <div class="resumeDetail">
    <div class="personalInformation" v-show="JSON.stringify(resume)!=='{}'">
      <p class="detailTitel">
        <span>
          <img src="https://o7oe0d6qz.qnssl.com/image/icon_%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF_23_16px.png" style="height:16px;width:23px; vertical-align: middle;margin-top:-4px">
        </span>
        <span style="margin-left:7px;font-size:16px;color:#0092FF" >基本信息</span>
        <span style="float:right;width:50px;height:24px;margin-right:5px"><Button type="primary" size='small' style="width:50px;height:24px" @click="downloadONE(detialID)">下载</Button></span>
      </p>
      <div class="personalInformation-left">
        <p style="margin-top:20px" @click="a">姓名：{{resume&&resume.ownerName}}</p>
        <p>联系电话：{{resume&&resume.ownerMobile}}</p>
        <p>电子邮箱：{{resume&&resume.email}}</p>
        <p>所在地：{{resume&&resume.locationCity}}</p>
        <p>求职状态：{{resume&&resume.statusMessage}}</p>
        <p>期望行业：{{resume&&resume.industries}}</p>
        <p>期望职位：{{resume&&resume.expectTitles}}</p>
      </div>
      <div class="personalInformation-right">
        <p style="margin-top:20px">年龄：{{resume&&resume.ownerAge}}岁</p>
        <p>职位：{{resume&&resume.ownerExpectTitles}}</p>
        <p>学历：{{resume&&resume.ownerHighestDegree}}</p>
        <p>经验：{{resume&&resume.workYearsOriginal}}年</p>
        <p style="margin-top:30px">期望薪资：{{resume&&resume.expectSalary}}</p>
        <p>期望地区：{{resume&&resume.city}}</p>
      </div>
    </div>
    <div class="workExperience" v-show="roList.length !==0 " style="margin-top:30px">
      <p class="detailTitel">
        <span>
          <img src="https://o7oe0d6qz.qnssl.com/image/icon_%E5%B7%A5%E4%BD%9C%E7%BB%8F%E5%8E%86_20_18px.png" style="height:16px;width:23px;vertical-align: middle;margin-top:-4px">
        </span>
        <span style="margin-left:7px;font-size:16px;color:#0092FF;">工作经历</span>
      </p>
      <div class="workExperience-detail"  v-for="(item,index) in roList" :key="index">
        <div class="workExperience-top">
         <p style="height:28px;line-height:28px;font-size:14px;">
           <span style="margin-left:30px">{{item.startTime}}-{{item.endTime}}</span>
           <span style="margin-left:18px"><span>{{item.company}}<span>({{item.workTime}})</span></span></span>
           <span style="float:right;margin-right:30px">
            <span>{{item.industry}}</span>
            <span>{{item.companyType}}</span>
           </span>
         </p>
         <p style="height:28px;line-height:28px;font-size:14px;">
           <span style="float:right;margin-right:30px">{{item.department}}</span>
         </p>
        </div>
        <div class="workExperience-bottom">{{item.desc}}</div>
      </div>
    </div>
    <div class="projectExperience" v-show="rpList.length !==0 ">
      <p class="detailTitel">
        <span>
          <img src="https://o7oe0d6qz.qnssl.com/image/icon_%E9%A1%B9%E7%9B%AE%E7%BB%8F%E5%8E%86_20_20px.png" style="height:14px;width:19px; vertical-align: middle;margin-top:-4px;margin-left:2px"></span>
        <span style="margin-left:7px;font-size:16px;color:#0092FF">项目经历</span>
      </p>
      <div class="projectExperience-detail" v-for="(item,index) in rpList" :key="index">
        <div class="projectExperience-top">
         <p style="height:28px;line-height:28px;font-size:14px;">
           <span style="margin-left:30px">{{item.startYear}}/{{item.startMonth}}-{{item.endYear}}/{{item.endMonth}}</span>
           <span style="margin-left:18px"><span>{{item.name}}<span></span></span></span>
           <span style="float:right;margin-right:30px">
            <span>{{item.post}}</span>
           </span>
         </p>
        </div>
        <div class="projectExperience-bottom">{{item.desc}}</div>
      </div>
    </div>
    <div class="internshipExperience" v-show="riList.length !==0 ">
      <p class="detailTitel">
        <span>
          <img src="https://o7oe0d6qz.qnssl.com/image/icon_%E5%AE%9E%E4%B9%A0%E7%BB%8F%E5%8E%86_21_18px.png" style="height:16px;width:23px; vertical-align: middle;margin-top:-4px"></span>
        <span style="margin-left:7px;font-size:16px;color:#0092FF">实习经历</span>
      </p>
      <div class="internshipExperience-detail"  v-for="(item,index) in riList" :key="index">
        <div class="internshipExperience-top">
         <p style="height:28px;line-height:28px;font-size:14px;">
           <span style="margin-left:30px">{{item.startYear}}/{{item.startMonth}}-{{item.endYear}}/{{item.endMonth}}</span>
           <span style="margin-left:18px"><span>{{item.company}}<span></span></span></span>
           <span style="float:right;margin-right:30px">
            <span>{{item.industry}}</span>
            <!-- <span>{{item.title}}</span> -->
           </span>
         </p>
          <p style="height:28px;line-height:28px;font-size:14px;">
           <span style="float:right;margin-right:30px">{{item.title}}</span>
          </p>
        </div>
        <div class="internshipExperience-bottom">{{item.desc}}</div>
      </div>
    </div>
    <div class="educationalExperience" v-show="reList.length !==0">
      <p class="detailTitel">
        <span>
          <img src="https://o7oe0d6qz.qnssl.com/image/icon_%E6%95%99%E8%82%B2%E7%BB%8F%E5%8E%86_26_20px.png" style="height:16px;width:23px; vertical-align: middle;margin-top:-4px"></span>
        <span style="margin-left:7px;font-size:16px;color:#0092FF">教育经历</span>
      </p>
      <div class="educationalExperience-detail"  v-for="(item,index) in reList" :key="index">
         <div class="educationalExperience-content">
           <div class="educationalExperience-left">
             <p style="line-height:25px;margin-top:20px">{{item.school}}(({{item.startYear}}.{{item.startMonth}}-{{item.endYear}}.{{item.endMonth}}))</p>
             <p style="margin-top:20px;">专业：{{item.major}}</p>
           </div>
           <div class="educationalExperience-right">
             <p style="margin-top:65px">学历：{{item.degree}}</p>
           </div>
         </div>
      </div>
    </div>
    <div class="Self-evaluation" v-show="JSON.stringify(resume)!=='{}'">
      <p class="detailTitel">
        <span>
          <img src="https://o7oe0d6qz.qnssl.com/image/icon_%E8%87%AA%E6%88%91%E8%AF%84%E4%BB%B7_18_18px.png" style="height:16px;width:23px; vertical-align: middle;margin-top:-4px"></span>
        <span style="margin-left:7px;font-size:16px;color:#0092FF">自我评价</span>
      </p>
      <div class="evaluation-content">
          {{resume&&resume.selfEvaluate}}
      </div>
    </div>
  </div>
</template>
<script>
import {seedetail} from '../../api/resume.server'
 import {
  sapi
}from '../../config'
export default {
  data(){
    return {
      resume:{},
      riList:[],
      roList:[],
      rpList:[],
      reList:[],
      downresume:'',
      detialID:'',
    }
  },
   methods: {
        getDETAIL(){
          this.detialID=this.$route.query.id
          let parmars={
            resumeId:this.$route.query.id
          }
          seedetail(parmars).then(res=>{
            this.resume=res.data.body.resume
                this.riList=res.data.body.riList
                this.roList=res.data.body.roList
                this.rpList=res.data.body.rpList
                this.reList=res.data.body.reList
          })
        },
        // 下载简历
        downloadONE(doid){
            window.location.href=`${sapi}/api/resume/download/formatted/one?resumeId=${doid}`
        },
        a(){
           
        }
      },
      mounted(){
        this.getDETAIL()
      }
}
</script>
<style scoped>
.resumeDetail{
  width: 860px;
  margin: 30px auto
}
.personalInformation{
  width:860px;
  height: 300px;
  float: left;
}
.personalInformation-left{
  width: 400px;
  height:260px;
  margin-left: 30px;
  float: left;
  font-size: 14px;
}
.personalInformation-left p{
  line-height: 37px
}
.personalInformation-right{
  width: 400px;
  height:260px;
  font-size: 14px;
  float: left;
}
.personalInformation-right p{
  line-height: 37px
}
.workExperience{
  width: 860px;
   float: left;
}
.workExperience-detail{
  width: 860px;

  float: left;
  margin-top: 20px;
}
.workExperience-top{
  width: 860px;
  height: 56px;
  background: rgba(246,246,246,1);
}
.workExperience-bottom{
  width:640px;
  margin-left: 71px;
  margin-top: 20px;
  line-height: 24px;
}
.projectExperience{
  width: 860px;
  margin-top: 30px;
   float: left;
}
.projectExperience-detail{
  width: 860px;
  float: left;
  margin-top: 20px;
}
.projectExperience-top{
  width: 860px;
  height: 34px;
  line-height: 34px;
  background: rgba(246,246,246,1);
}
.projectExperience-bottom{
  width:640px;
  margin-left: 71px;
  margin-top: 20px;
  line-height: 24px
}
.internshipExperience{
  width: 860px;
  margin-top: 30px;
  float: left;
}
.internshipExperience-detail{
  width: 860px;
  float: left;
  margin-top: 20px;
}
.internshipExperience-top{
  width: 860px;
  height: 56px;
  line-height: 34px;
  background: rgba(246,246,246,1);
}
.internshipExperience-bottom{
  width:640px;
  margin-left: 71px;
  margin-top: 20px;
  line-height: 24px
}
.educationalExperience{
  width: 860px;
  float: left;
}
.educationalExperience-left{
  width: 430px;
  float: left;
  margin-left: 30px;
  font-size: 14px
}
.educationalExperience-right{
  width: 380px;
  float: left;
  font-size: 14px
}
.Self-evaluation{
  width: 860px;
  float: left;
}
.evaluation-content{
  width: 720px;
  margin-left:30px;
  float: left;
  margin-top: 30px;
  line-height: 30px
}
.detailTitel{
  width: 860px;
  height: 24px;
  float: left;
  margin-top: 20px
}
</style>

