<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)" v-show="this.showBtn!=1">下载</Button></span>
      </p>
       <div class="massageTitle">
        <p>
          <span class="bassMassage">姓名：{{resume&&resume.ownerName}}</span>
          <span class="bassMassageRight">年龄：{{resume&&resume.ownerAge}}岁</span>
        </p>
        <p>
          <span class="bassMassage">联系电话：{{resume&&resume.ownerMobile}}</span>
          <span class="bassMassageRight">职位：{{resume&&resume.ownerExpectTitles}}</span>
        </p>
        <p>
          <span class="bassMassage">电子邮箱：{{resume&&resume.email}}</span>
          <span class="bassMassageRight">学历：{{resume&&resume.ownerHighestDegree}}</span>
        </p>
        <p>
          <span class="bassMassage">所在地：{{resume&&resume.locationCity}}</span>
          <span class="bassMassageRight">经验：{{resume&&resume.workYearsOriginal}}年</span>
        </p>
        <p>
          <span class="bassMassage">求职状态：{{resume&&resume.statusMessage}}</span>
          <span class="bassMassageRight"></span>
        </p>
        <p>
          <span class="bassMassage">期望行业：{{resume&&resume.industries}}</span>
          <span class="bassMassageRight">期望薪资：{{resume&&resume.expectSalary}}</span>
        </p>
        <p >
          <span class="bassMassage">期望职位：{{resume&&resume.expectTitles}}</span>
          <span class="bassMassageRight">期望地区：{{resume&&resume.city}}</span>
        </p>
       </div>
    </div>
    <div class="workExperience" v-show="roList.length !==0 ">
      <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 localStorage from '../../service/localstorage.service.js'
 import {
  sapi
}from '../../config'
export default {
  data(){
    return {
      resume:{},
      riList:[],
      roList:[],
      rpList:[],
      reList:[],
      downresume:'',
      detialID:'',
      showBtn:'',
    }
  },
   methods: {
        getDETAIL(){
          this.detialID=this.$route.query.ID
          this.showBtn=this.$route.query.noShowBtn
          let token = this.$route.query.token || ''
          let parmars={
            uid: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;
  color: #000000;
  font-family: "\5FAE\8F6F\96C5\9ED1"
}
.personalInformation{
  width:860px;
  /* height: 600px; */
  float: left;
  /* border: 1px solid black */
}
.bassMassage{
  display: inline-block;
  width: 322px;
  float: left;
  margin-left:30px;
  font-size: 14px;
  margin-top:20px
}
.bassMassageRight{
  display: inline-block;
  width: 322px;
  float: left;
  font-size: 14px;
  margin-top:20px;
  margin-left:20px
}
.massageTitle{
  /* 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;
  margin-top: 10px
}
.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: 690px;
  margin-left:30px;
  float: left;
  margin-top: 20px;
  line-height: 30px;
  margin-bottom: 40px
}
.detailTitel{
  width: 860px;
  height: 24px;
  float: left;
  margin-top: 20px;
  /* border: 1px solid red */
}
</style>

