<template>
    <div class="allResume">
      <!-- <Spin size="large" fix v-if="spinShow" style="font-size:25px">加载中...</Spin> -->
      <div class="allResume-left">
          <Form :label-width="90" style="width:88%;margin:0 auto;" class='emailForm'>
            <FormItem label="关键词：" style="margin-top:20px">
                <Input placeholder="请输入关键词" style="width:98%" v-model="keywords" @keyup.enter.native="SouSuo()"/>
            </FormItem>
            <FormItem label="历任公司：">
                <Input placeholder="请输入历任公司" style="width:98%" v-model="lrgs" @keyup.enter.native="SouSuo()"/>
            </FormItem>
            <FormItem label="性别：" class="sex">
                <span  v-for="(item,index) in sexs"  :class="{'active1':index==clickIndex1}" @click="selectElement1(item.status1,index)" :key="index" style="cursor:pointer"> {{item.status1}}</span>
            </FormItem>
            <FormItem label="学历：" class="Education">
                <span  v-for="(item,index) in Education"  :class="{'active1':index==clickIndex2}" @click="selectElement2(item.Num2,index)" :key="index" style="cursor:pointer"> {{item.status2}}</span>
            </FormItem>
            <FormItem label="状态：" class="state">
                <span  v-for="(item,index) in state"  :class="{'active1':item.sta==true}"  @click="selectElement3(item.Num3,index,item.status3,item.sta)" :key="index" style="cursor:pointer"> {{item.status3}}</span>
            </FormItem>
            <FormItem label="工作年限：">
                <span style="width:100px;">
                    <Select style="width:40%"  placeholder="不限"  :label-in-value='true' v-model="searchInfo.ownerWorkYears1" @on-change='judge1'>
                      <Option v-for="(item, index) in ownerWorkYears1" :value="item.value" :key="index">{{item.label}}</Option>
                    </Select>
                    <span>-</span>
                    <Select style="width:40%" placeholder="不限" :label-in-value='true' v-model="searchInfo.ownerWorkYears2" @on-change='judge2'>
                        <Option v-for="(item, index) in ownerWorkYears2" :value="item.value" :key="index">{{item.label}}</Option>
                    </Select>
                </span><br>
            </FormItem>
           
          </Form>
          <Button type="primary" style="width:30%;margin-left:34%;font-size:13px;background:#0092FF" @click="SouSuo(item.Num1,item.Num2,item.Num3)">搜索</Button>
      </div>
      <div class="allResume-right">
          <div class="resumeRightContentTop">
              <!-- <div style="width:100%;height:80px;margin-top:20px;display:none">
                  <div style="width:47%;height:100%;float:left;background:rgb(61,169,247);margin-left:1%;line-height:80px;text-align:center;color:white;font-size:20px">数据展示</div>
                  <div style="width:48%;height:100%;float:left;background:rgb(253,85,83);margin-left:3%;line-height:80px;text-align:center;color:white;font-size:20px">提示语</div>
              </div> -->
               <div style="background:WhiteSmoke;width:100%;height:40px;" class='bar'>
                    <input   type='checkbox' class='selectAll' v-model='checked' @click='checkedAll'  style="margin-left:10px;cursor:pointer;">
                    <span  style="margin-left:5px;position:relative;">选择<Badge :count="interviewee.length" size='small' :class='["badge",{"badges1":interviewee.length>9, "badges": interviewee.length>99}]'></Badge></span>
                    <Button  type="primary" size="small" style="margin-left:4%;width:50px" @click="downloadAll">下载</Button>
                    <Button  type="primary" size="small" style="margin-left:2%;width:50px" @click="delateAll">删除</Button>
                    <Button  type="primary" size="small" style="margin-left:2%;" @click="transpond">
                   转发面试官
                  </Button>
                    <Button  type="primary" size="small" class='left'  @click="allexport">导出列表</Button>
                    <Button  type="primary" size="small" class='left leftBtn' @click="sendEmail(1)">邀请面试</Button>
              </div>
              <div style="width:100%;float:left;overflow-y: auto;height:100%" class="content">
              <div style="margin:50px auto;width:300px;height:200px;line-height:200px;text-align:center;font-size:20px;color:LightGray" v-show="ajaxData.length==0">暂无数据</div>
              <!-- <div style="float:left;margin-left:1%;width:99%;overflow-y: auto;height:600px;margin-bottom:40px"> -->
              <div class="Resumecontent"  v-for='(item,i) in ajaxData' :key="i"  >
                 <div class="detailResume" id="a" style="" @mousemove="ahove(i,item.isShow)" @mouseleave="movleave(i,item.isShow)" :class="{red:item.isShow, grey: i%2!=0}">
                    <p style='margin-left: 10px;'> 
                      <span style="display:inline-block;height:100%;margin-top:5px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap;margin-top:5px;" class='inputcheck'>
                        <input type='checkbox' name='checkboxinput' class='input-checkbox'  v-model='checkboxList' :value="item.id" @click="selectInputElement(i,item.id,item.flowStatus,item.STATES, item)" style="cursor:pointer">
                      </span>
                      <span style="display:inline-block;height:100%;margin-top:5px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap;cursor:pointer" @click="Seedetail(item.id)" >{{item.ownerName}}  <span v-show="item.ownerMobile !==''">|</span></span>
                      <span style="display:inline-block;height:100%;font-size: 12px;margin-top:5px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap;cursor:pointer" @click="Seedetail(item.id)"> {{item.ownerMobile}}  <span v-show="item.ownerAge !==''">|</span></span>
                      <span style="display:inline-block;height:100%;font-size: 12px;margin-top:5px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap;cursor:pointer" @click="Seedetail(item.id)"> {{item.ownerAge}}岁  <span v-show="item.ownerSex !==''">|</span></span>
                      <span style="display:inline-block;height:100%;font-size: 12px;margin-top:5px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap;cursor:pointer" @click="Seedetail(item.id)"> {{item.ownerSex}} <span v-show="item.ownerWorkYears !==''">|</span> </span>
                      <span style="display:inline-block;height:100%;font-size: 12px;margin-top:5px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap;cursor:pointer" @click="Seedetail(item.id)"> {{item.ownerWorkYears}}年  <span v-show="item.ownerExpectTitles !==''">|</span></span>
                      <span style="display:inline-block;height:100%;font-size: 12px;margin-top:5px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap;cursor:pointer" @click="Seedetail(item.id)"> {{item.ownerHighestDegree}} <span v-show="item.ownerExpectTitles !==''">|</span></span>
                      <span style="display:inline-block;height:100%;margin-top:5px;font-size:12px;width:25%;overflow:hidden;text-overflow:ellipsis;white-space: nowrap;cursor:pointer" @click="Seedetail(item.id)"> {{item.ownerExpectTitles}}</span>
                      <span style="display:inline-block;height:100%;font-size: 12px;width:25%;float:right;text-align:right;margin-right:10px;margin-top:5px">
                            <span style="margin-right:20px;margin-top:5px" v-if="item.flowStatus=='INTERVIEW_OK'" class='status'><Icon type="ios-radio-button-on"  style="color:#43CD80" /><span style="margin-left:10px">面试合适</span></span>
                            <span style="margin-right:20px;margin-top:5px" v-else-if="item.flowStatus=='INTERVIEW_FAIL'" class='status'><Icon type="ios-radio-button-on" style="color:red"  /><span style="margin-left:10px" >面试淘汰</span></span>
                            <span style="margin-right:20px;margin-top:5px" v-else-if="item.flowStatus=='TO_RESULT'" class='status'><Icon type="ios-radio-button-on" style="color:red"  /><span style="margin-left:10px" >面试结果待定</span></span>
                            <span style="margin-right:20px;margin-top:5px" v-else-if="item.flowStatus=='END'" class='status'><Icon type="ios-radio-button-on"  style="color:red" /><span style="margin-left:10px" >终止面试</span></span>
                            <span style="margin-right:20px;margin-top:5px" v-else-if="item.flowStatus=='SEE_FAIL'" class='status'><Icon type="ios-radio-button-on" style="color:red" /><span style="margin-left:10px" >约面失败</span></span>
                            <span style="margin-right:20px;margin-top:5px" v-else-if="item.flowStatus=='NO_ENTRY'" class='status'><Icon type="ios-radio-button-on" style="color:red" /><span style="margin-left:10px">未入职</span></span>
                             <span style="margin-right:20px;margin-top:5px" v-else-if="item.flowStatus=='ARRIVED'" class='status'><Icon type="ios-radio-button-on" style="color:#43CD80" /><span style="margin-left:10px">已到达</span></span>
                            <span style="margin-right:10px;margin-top:5px" v-else-if="item.flowStatus=='TO_SEE'">
                              <span style="cursor:pointer" >
                                <select name="3" id="3" @change="selectFn2($event,item.id,item.flowStatus)" >
                                  <option value="1">邀请面试</option>
                                  <option value="2">备选</option>
                                  <option value="3">PASS</option>
                                  <option value="4">待处理</option>
                                </select>
                              </span>
                            </span>
                            <span style="margin-right:20px;margin-top:5px" v-else-if="item.flowStatus=='HAS_SEE'" class='status'><Icon type="ios-radio-button-on" style="color:#43CD80" /><span style="margin-left:10px;" >已邀约</span></span>
                            <span style="margin-right:10px;margin-top:5px" v-else-if="item.flowStatus=='OPTION'">
                              <span  style="cursor:pointer">
                                <select name="4" id="4" @change="selectFn3($event,item.id,item.flowStatus)" class='status' >
                                  <option value="1">备选</option>
                                  <option value="2">邀请面试</option>
                                  <option value="3">PASS</option>
                                  <option value="4">待处理</option>
                                </select>
                              </span>
                            </span>
                            <span style="margin-right:20px;margin-top:5px" v-else-if="item.flowStatus=='TO_SENT_OFFER'" class='status'><Icon type="ios-radio-button-on" style="color:#43CD80;" /><span style="margin-left:10px" >待Offer</span></span>
                            <span style="margin-right:20px;margin-top:5px" v-else-if="item.flowStatus=='HAS_SENT_OFFER'" class='status'><Icon type="ios-radio-button-on" style="color:#43CD80"  /><span style="margin-left:10px">已发Offer</span></span>
                            <span style="margin-right:20px;margin-top:5px" v-else-if="item.flowStatus=='TO_ENTRY'" class='status'><Icon type="ios-radio-button-on" style="color:#43CD80" /><span style="margin-left:10px" >待入职</span></span>
                            <span style="margin-right:20px;margin-top:5px" v-else-if="item.flowStatus=='HAS_ENTRY'" class='status'><Icon type="ios-radio-button-on" style="color:#43CD80" /><span style="margin-left:10px">已入职</span></span>
                            <span style="margin-right:10px;margin-top:5px" v-else-if="item.flowStatus=='PASS'">
                              <span  style="cursor:pointer" >
                                <select name="2" id="2" @change="selectFn4($event,item.id,item.flowStatus)" class='status' >
                                  <option value="1">PASS</option>
                                  <option value="2">邀请面试</option>
                                  <option value="3">备选</option>
                                  <option value="4">待处理</option>
                                </select>
                              </span>
                            </span>
                            <select name="1" id="a"  @change="selectFn1($event,item.id,item.flowStatus)"  v-else-if="item.flowStatus=='TO_DO'" style="margin-right:10px;cursor:pointer"  class='status' >
                                <option value="1">待处理</option>
                                <option value="2">pass</option>
                                <option value="3">邀请面试</option>
                                <option value="4">备选</option>
                            </select>
                                <span class='record'><Icon type="md-download" @click="downloadONE(item.id)" style="font-size:15px;cursor:pointer;color:#0092FF"/></span>
                                <span  class='record'><Icon  type="md-trash" v-if="item.flowStatus=='TO_SEE'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span  class='record'><Icon  type="md-trash" v-if="item.flowStatus=='HAS_SEE'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span  class='record'><Icon  type="md-trash" v-if="item.flowStatus=='SEE_FAIL'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span  class='record'><Icon  type="md-trash" v-if="item.flowStatus=='INTERVIEW_FAIL'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span  class='record'><Icon  type="md-trash" v-if="item.flowStatus=='TO_SENT_OFFER'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span  class='record'><Icon  type="md-trash" v-if="item.flowStatus=='TO_ENTRY'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span  class='record'><Icon  type="md-trash" v-if="item.flowStatus=='HAS_ENTRY'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span  class='record'><Icon  type="md-trash" v-if="item.flowStatus=='ARRIVED'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span  class='record'><Icon  type="md-trash" v-if="item.flowStatus=='NO_ENTRY'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span  class='record'><Icon  type="md-trash" v-if="item.flowStatus=='END'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span  class='record'><Icon  type="md-trash" v-if="item.flowStatus=='HAS_SENT_OFFER'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span  class='record'><Icon  type="md-trash" v-if="item.flowStatus=='PASS'"  @click="delateR(item.id)" style="font-size:15px;cursor:pointer;color:rgb(242, 93, 87);"/></span>
                                <span  class='record'><Icon  type="md-trash" v-if="item.flowStatus=='OPTION'"  @click="delateR(item.id)" style="font-size:15px;cursor:pointer;color:rgb(242, 93, 87);"/></span>
                                <span  class='record'><Icon  type="md-trash" v-if="item.flowStatus=='TO_DO'"  @click="delateR(item.id)" style="font-size:15px;cursor:pointer;color:rgb(242, 93, 87);"/></span>
                                <span class='recordtext' @click="RecordSEE(item.id,item.ownerName)" style="color:#0092FF;cursor:pointer">记录</span>
                           </span>
                    </p>
                    <p style="margin-top:5px;color:Greys;padding-left:10px;">
                      <span style="display:inline-block;font-size: 12px;color:orange" v-show="item.hasForward=='1'" class='transmit' >已转</span> 
                      <span style="display:inline-block;font-size: 12px;margin-left:20px;color:Grey" v-if="item.srcSite!==''" v-show="item.hasForward==null">{{item.deliveryTime}}投递  |</span> 
                      <span style="display:inline-block;font-size: 12px;color:Grey;margin-left:20px" v-if="item.srcSite==''"  v-show="item.hasForward==null">{{item.deliveryTime}}上传 <span v-show="item.optSource!==''">  |</span></span>
                      <span style="display:inline-block;font-size: 12px;margin-left:-2px;color:Grey" v-if="item.srcSite!==''" v-show="item.hasForward!==null">{{item.deliveryTime}}投递  |</span> 
                      <span style="display:inline-block;font-size: 12px;color:Grey;margin-left:-2px" v-if="item.srcSite==''" v-show="item.hasForward!==null">{{item.deliveryTime}}上传 <span v-show="item.optSource!==''">  |</span></span>
                      <span style="display:inline-block;font-size: 12px;margin-left:3px;color:Grey">{{item.optSource}}<span v-show="item.srcSite!==''">  |</span></span> 
                      <span style="display:inline-block;font-size: 12px;margin-left:3px;color:Grey">{{item.srcSite}}</span> 
                      <span style="display:inline-block;font-size: 12px;float:right;text-align:right;margin-right:10px;color:Grey">
                          <span>{{item.modifyTime}}</span>
                          <span >最后操作人：{{item.d}}</span>
                      </span>
                    </p>
                 </div>
              </div>
             </div>
            <div class="pageBottom">
              <Page :total="totalSize" show-elevator show-total   @on-change="pageChange"  @on-page-size-change="pageSizeChange" :current='pageIndex' :page-size='pageSize' style="text-align:center;margin-top:4px"></Page>
            </div>
        </div>
       </div>
    <!-- 操作记录弹出框 -->
    <Modal
        v-model="modal1"
         width='500px'
        :footer-hide="true"
         :closable='false'>
        <div>
            <h2 style="text-align: center;color:black" >操作记录</h2>
            <h2 style="text-align: center;color:#999999">候选人:{{toseename}}</h2>
            <div v-for="(item,index) in recordList" :key="index">
                <p style="margin-top:30px;text-align:center" class="Recode">
                    <span>{{item.approveUserName}}</span>
                    <span>{{item.dateTime}}</span>
                    <span style="color:blue" v-if=" item.previousState=='INTERVIEW_OK'">面试合适</span>
                    <span style="color:blue" v-if=" item.previousState=='INTERVIEW_FAIL'">面试淘汰</span>
                    <span style="color:blue" v-if=" item.previousState=='END'">终止面试</span>
                    <span style="color:blue" v-if=" item.previousState=='SEE_FAIL'">约面失败</span>
                    <span style="color:blue" v-if=" item.previousState=='NO_ENTRY'">未入职</span>
                    <span style="color:blue" v-if=" item.previousState=='TO_SEE'">准备约面</span>
                    <span style="color:blue" v-if=" item.previousState=='HAS_SEE'">已邀约</span>
                    <span style="color:blue" v-if=" item.previousState=='OPTION'">备选</span>
                    <span style="color:blue" v-if=" item.previousState=='TO_SENT_OFFER'">待Offer</span>
                    <span style="color:blue" v-if=" item.previousState=='HAS_SENT_OFFER'">已发offer</span>
                    <span style="color:blue" v-if=" item.previousState=='TO_ENTRY'">待入职</span>
                    <span style="color:blue" v-if=" item.previousState=='HAS_ENTRY'">已入职</span>
                    <span style="color:blue" v-if=" item.previousState=='PASS'">PASS</span>
                    <span style="color:blue" v-if=" item.previousState=='TO_DO'">待处理</span>
                    <span style="color:blue" v-if=" item.previousState=='RESET'">重启面试</span>
                    <span style="color:blue" v-if=" item.previousState=='ARRIVED'">已到达</span>
                    <span>变更为</span>
                    <span style="color:blue" v-if=" item.afterState=='INTERVIEW_OK'">面试合适</span>
                    <span style="color:blue" v-if=" item.afterState=='INTERVIEW_FAIL'">面试淘汰</span>
                    <span style="color:blue" v-if=" item.afterState=='END'">终止面试</span>
                    <span style="color:blue" v-if=" item.afterState=='SEE_FAIL'">约面失败</span>
                    <span style="color:blue" v-if=" item.afterState=='NO_ENTRY'">未入职</span>
                    <span style="color:blue" v-if=" item.afterState=='TO_SEE'">准备约面</span>
                    <span style="color:blue" v-if=" item.afterState=='HAS_SEE'">已邀约</span>
                    <span style="color:blue" v-if=" item.afterState=='OPTION'">备选</span>
                    <span style="color:blue" v-if=" item.afterState=='TO_SENT_OFFER'">待Offer</span>
                    <span style="color:blue" v-if=" item.afterState=='HAS_SENT_OFFER'">已发offer</span>
                    <span style="color:blue" v-if=" item.afterState=='TO_ENTRY'">待入职</span>
                    <span style="color:blue" v-if=" item.afterState=='HAS_ENTRY'">已入职</span>
                    <span style="color:blue" v-if=" item.afterState=='PASS'">PASS</span>
                    <span style="color:blue" v-if=" item.afterState=='TO_DO'">待处理</span>
                    <span style="color:blue" v-if=" item.afterState=='RESET'">重启面试</span>
                    <span style="color:blue" v-if=" item.afterState=='ARRIVED'">已到达</span>
                </p>
            </div>
            
        </div>
        <div style="height:30px;width:100%;text-align:center;margin-top:30px">
            <Button type="primary" size='small' @click="modal1=false">关闭</Button>
        </div>
    </Modal>
    <!-- 准备约面弹出框 -->
    <Modal
        v-model="modal2"
         width='380px'
         :closable='false'>
        <div >
            <h2 style="text-align: center;color:black">提示</h2>
            <p style="margin-top:20px;line-height:25px">
                  <span>更改为<span style="color:blue">“邀请约面”</span>的状态后，你需要从<span style="color:blue">”面试管理“</span>中对该候选人进行后续的操作。</span>
            </p>
            <p style="margin-top:20px;line-height:25px">
                <Form :label-width="80" ref="formInline" :rules="ruleInline" :model="formInline">
                    <FormItem label="邀约人" style="margin-top:20px" prop="UpdateOWER">
                        <Input v-model="formInline.UpdateOWER" style="width:180px" :maxlength="5"/>
                    </FormItem>
                    <FormItem label="面试时间" style="margin-top:20px" prop="UpdateTIME">
                      <DatePicker type="datetime"  style="width:180px" v-model="formInline.UpdateTIME" format="yyyy-MM-dd HH:mm" @on-change="changeTime" :options="options3" :editable='false'></DatePicker>
                    </FormItem>
                    <FormItem label="面试官" style="margin-top:20px" prop='UpdateVIEW'>
                        <Input v-model="formInline.UpdateVIEW" style="width:180px" :maxlength="5"/>
                    </FormItem>
                </Form>
            </p>
        </div>
        <div  slot='footer' style="text-align:center">
            <Button type='primary' @click='pushlist'>取消</Button>
            <Button type='primary' @click="nextStep" >下一步</Button>
        </div>
    </Modal>
    <!-- 可删除状态下，删除提示框 -->
     <Modal
        v-model="modal3"
         width='280px'
         :closable='false'>
        <div >
            <h2 style="text-align: center;color:black">提示</h2>
            <p>删除后不可恢复，是否确定永久删除简历？</p>
        </div>
        <div  slot='footer' style="text-align:center">
            <Button type='primary' @click='modal3=false'>取消</Button>
            <Button type='primary' @click="delateONE" >确定</Button>
        </div>
    </Modal>
     <Modal
        v-model="modal7"
         width='280px'
         :closable='false'>
        <div >
            <h2 style="text-align: center;color:black">提示</h2>
            <p>删除后不可恢复，是否确定永久删除简历？</p>
        </div>
        <div  slot='footer' style="text-align:center">
            <Button type='primary' @click='modal7=false'>取消</Button>
            <Button type='primary' @click="cofdelateAll" >确定</Button>
        </div>
    </Modal>
    <!-- 不可删除状态下，删除提示框 -->
    <Modal
        v-model="modal4"
         width='280px'
         :closable='false'>
        <div >
            <h2 style="text-align: center;color:black">提示</h2>
            <p>进入面试管理中的候选人，都不可删除。如需继续删除，请在面试管理中操作”终止面试“后，再重启流程，然后返回该页面进行删除。</p>
        </div>
        <div  slot='footer' style="text-align:center">
            <Button type='primary' @click='modal4=false'>取消</Button>
            <Button type='primary' @click="tointerview">面试管理</Button>
        </div>
    </Modal>
    <!-- 没有选择元素时下载提示 -->
    <Modal
        v-model="modal6"
         width='280px'
         :closable='false'>
        <div >
            <h2 style="text-align: center;color:black">提示</h2>
            <p style="text-align: center;">选项不能为空</p>
        </div>
        <div  slot='footer' style="text-align:center">
            <Button type='primary' @click='modal6=false'>取消</Button>
        </div>
    </Modal>
    <!-- 发送邮件 -->
    <Modal
        v-model="emailMOdal"
         width='1000px'
         :mask-closable='false'
         :closable='false'
         :styles="{top:'50px'}">
        <div >
            <h2 style="text-align:center;color:black" v-show="this.isShowAll==false">发送邮件</h2>
            <h2 style="text-align:center;color:black"  v-show="this.isShowAll==true">新建面试</h2>
            <h3 style="text-align:center;color:black"  v-show="this.isShowAll==true"> <span>新建面试后，你需要从<span style="color:#0092ff">“面试管理”</span>中对该候选人进行后续的操作。</span></h3>
        </div>
        <div class="emailModal-title">
          <div class="emailModalTitle-left">
            <p>
              <Form :label-width="70"  :model="emailInline" label-position="left" style="margin-left:5%" ref="emailInline" :rules="emailruleInline" class="emailForm">
                <FormItem label="选择模板" style="margin-top:20px" prop='moo'>
                  <Select style="width:95%" @on-change='getEmailContentValue' v-model="emailInline.moo" >
                      <Option  v-for="(item,index) in emailInline.modalArr" :key="index" :value="item.templateCode">{{item.templateName}}</Option>
                  </Select><br>
                  <!-- <span v-show="emailMassage==true">你尚未选择简历，请先选择简历</span> -->
                </FormItem>
                <FormItem label="收件人" style="margin-top:20px" prop='receiveEmail'>
                   <Input style="width:95%" v-model="emailInline.receiveEmail"  @on-focus='getfocus("emailInline","receiveEmail")'/>
                   <span style="position: absolute;left:0;top:30px;color:gray;font-size:12px;" v-show='!tip'>{{tipInfo}}</span>
                </FormItem>
                <FormItem label="抄送" style="margin-top:20px" prop='copyname'>
                  <Input style="width:95%" v-model="emailInline.copyname" @on-focus='getfocus("emailInline","copyname")'/>
                </FormItem>
                <FormItem label="主题" style="margin-top:20px" prop='theme'>
                    <Input  style="width:95%" v-model="emailInline.theme" @on-focus='getfocus("emailInline","theme")'/>
                </FormItem>
              </Form>
            </p>
          </div>
          <div class="emailModalTitle-right" v-show="interviewIsShow==true">
               <h3 style="text-align:center;margin-top:20px">请输入约面信息</h3>
               <Form :label-width="80" ref="formInline" :rules="ruleInline" :model="formInline" style="margin-top:35px" label-position="left" class="emailForm">
                    <FormItem label="邀约人" style="margin-top:20px" prop="UpdateOWER">
                        <Input v-model="formInline.UpdateOWER" style="width:100%" :maxlength="5" @on-focus='getfocus("formInline", "UpdateOWER")'/>
                    </FormItem>
                    <FormItem label="面试时间" style="margin-top:20px" prop="UpdateTIME">
                      <DatePicker type="datetime"  style="width:100%" v-model="formInline.UpdateTIME" format="yyyy-MM-dd HH:mm" @on-change="changeTime" :options="options3" :editable='false' @on-open-change='getfocus("formInline", "UpdateTIME", $event)'></DatePicker>
                    </FormItem>
                    <FormItem label="面试官" style="margin-top:20px" prop='UpdateVIEW'>
                       <Select v-model ='formInline.UpdateVIEW' filterable style='width:100%;' remote
                        :remote-method="remoteMethod"
                        :loading="loading1" placeholder='请输入面试官全名' clearable @on-open-change='getfocus("formInline", "UpdateVIEW", $event)'  ref='setQuery' :label='formInline.UpdateVIEW'>
                        <Option v-for='(item, index) in options' :key='index' :value='item.name'>{{item.name}}({{item.email}})</Option>
                     </Select>
                    </FormItem>  
                </Form>
               
          </div>
        </div>
        <div class="ckeditor">
            <ckeditor :value='editorObject' ref='editor' :uploadUrl='uploadurl' height='300px' width='100%' style="margin-left:3%"></ckeditor>
        </div>
        <div class="uploadEnclosure">
            <p style="height:50px;">
              <span style="font-size:16px;display:inline-block;margin:20px 0 0 3%">添加附件</span>
              <span style="margin-left:500px">
                 <Upload
                    multiple
                    :before-upload='beforUpload'
                    action="//jsonplaceholder.typicode.com/posts/">
                 <Button  size='small' style="margin:-40px 0 0 95px" type="primary" @click="uploadFile">选择文件</Button>
                 </Upload>
               </span>
            </p>
            <p v-for="(item,index) in fileList" :key="index" style="height:30px;line-height:30px">
              <span style="margin-left:60px">{{item}}</span> 
              <span><Icon type="md-close" @click="delateFile(index)" style="font-size:16px;float:right;margin-right:80px" /></span>
            </p>
        </div>
        <div  slot='footer' style="text-align:center;position:relative;" class="Ubt">
            <Button type='primary' @click='emailModalPush'>取消</Button>
            <Button type='primary' @click='submit' v-show="this.isShowAll==false">发送</Button>
            <Button type='primary' @click='submit' v-show="this.isShowAll==true">添加并发送</Button>
            <Checkbox v-model="formInline.sendWeixin" class='wechat'><span>微信通知面试官</span></Checkbox>
        </div>
    </Modal>
     <Modal
        v-model="modal10"
         width='280px'
         :closable='false'>
        <div >
            <h2 style="text-align: center;color:black">提示</h2>
            <p style="text-align:center">确定要发送邮件吗？</p>
        </div>
        <div  slot='footer' style="text-align:center">
            <Button type='primary' @click='modal10=false'>取消</Button>
            <Button type='primary' @click="confireSendEmail">确定</Button>
        </div>
    </Modal>
     <Modal
        v-model="modal12"
         width='450px'
         :closable='false'
         :footer-hide='true'>
        <div style="text-align:center">
          <h2 style="text-align: center;color:black;font-size:16px">发送失败</h2>
          <p style="text-align: center;color:black;margin-top:15px;font-size:15px">该面试官没有通过微信端绑定账号，请提醒他关注并绑定。</p>
          <p style="text-align: center;color:#0092FF;margin-top:30px;font-size:15px;cursor:pointer;font-weight: 900" @click="modal12=false">我已知晓</p>
        </div>
    </Modal>
    <Modal
        v-model="modal13"
         width='480px'
         :closable='false'
         :footer-hide='true'>
        <div style="text-align:center">
          <h2 style="text-align: center;color:black;font-size:16px">发送失败</h2>
          <p style="text-align: center;color:black;margin-top:15px;font-size:15px">该面试官没有关注微信，无法接收通知，请提醒他关注并绑定。</p>
          <p style="text-align: center;color:#0092FF;margin-top:30px;font-size:15px;cursor:pointer;font-weight: 900" @click="modal13=false">我已知晓</p>
        </div>
    </Modal>
    <!-- 转发邮件 -->
    <Modal
        v-model="modal8"
         width='400'
         :closable='false'>
        <div style='min-height:300px;'>
          <div class='title'>
            <h2>转发给面试官</h2>
            <p class='hint'>该通知将以微信形式发送给面试官，面试官可通过微信筛选简历</p>
          </div>
          <Form ref="transpondFrom" :model="transpondFrom" :rules="transpondRule">
            <FormItem label='面试官' prop='interviewerName'>
             <Select v-model ='transpondFrom.interviewerName' filterable style='width:250px;' remote
                :remote-method="remoteMethod"
                :loading="loading1" placeholder='请输入面试官全名' clearable>
                <Option v-for='(item, index) in options' :key='index' :value='item.email'>{{item.name}}({{item.email}})</Option>
             </Select>
            </FormItem>
            <FormItem label='' prop='interviewee'>
              <div v-for='(item, index) in interviewee' :key='index' class='interviewee'>
                 <div class='pic'>
                  <Icon type="ios-close" size='25' style='color:red' @click='delInterviewee(item)'/>
                  <img src='https://o7oe0d6qz.qnssl.com/resume.png'></img>
                 </div>
                  <span style='overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:100%;display: inline-block;'>{{item.ownerName}}</span>
              </div>
            </FormItem>
          </Form>
        </div>
        <div  slot='footer' style="text-align:center">
            <Button type='primary' @click='modal8=false'>取消</Button>
            <Button type='primary' @click="sendNotice" >发送</Button>
        </div>
    </Modal>
    <!-- 发送失败再次发送 -->
     <Modal
        v-model="modal11"
         width='350px'
         :closable='false'>
        <div >
            <h2 style="text-align: center;color:black">提示</h2>
            <p style="text-align:center;margin-top:10px;font-size: 14px;text-align:left;">{{errorInfo}}</p>
        </div>
        <div  slot='footer' style="text-align:center">
            <Button type='primary' @click='cancelSubmit'>取消</Button>
            <Button type='primary' @click="sendFail">确定</Button>
        </div>
    </Modal>
    </div>
</template>
<script>
import moment from 'moment'
import { serchList,downloadone,sousuoList,seedetail,PASS,OPTION,deleteREsume,downloadOne,exportLIST,recodeLIST,addinterview,updatastatus,TODORes,sendEmail,getEmailMoo,getEmailContent,uploadimage, findCompanyEmailByKey,forwardResume} from '../../api/resume.server'
import {Serchinterviewor} from '../../api/interview.server.js'
import qs from 'qs'
import {
    sapi
} from '../../config'
import{_debounce,_throttle,emailValidata, emailRule, vidte, validator} from '../../service/util.js'
import localStorage from '../../service/localstorage.service'
import Router from 'vue-router';
import ckeditor from '../../components/ckeditor'
import {mapState} from 'vuex'
    export default {
        data () {
            return {
                    modal11: false,
                    errorInfo: '',
                    interviewee: [],
                    interviewerNameList: [],
                    tip: false,
                    tipInfo: '输入多个邮箱地址以英文”;“分隔',
                    sad:'',
                    loading1: false,
                    options: [],
                    editorObject: {type: '', value: ''},
                    ruleInline: {
                        UpdateOWER: [
                            {  required: true, message: '邀约人不能为空', trigger: 'blur',validator: emailValidata.bind(this)}
                        ],
                        UpdateTIME: [
                           {  required: true,  message: '面试时间不能为空', trigger: 'change', type:'date', validator: emailValidata.bind(this)}
                        ],
                         UpdateVIEW: [
                           {  required: true,message: '面试官不能为空',  trigger: 'change', validator: emailValidata.bind(this), type: String}
                        ]
                    },
                    emailruleInline: {
                      receiveEmail: [{required: true, trigger: 'blur', pattern: emailRule, validator: emailValidata.bind(this)}],
                      theme: [{required: true, trigger: 'blur',message: '主题不能为空', validator: emailValidata.bind(this)}],
                      copyname: [{required: false, trigger: 'blur', pattern: emailRule, validator: emailValidata.bind(this), empty: true}]
                    },
                    formInline:{
                        UpdateOWER:'',
                        UpdateTIME:'',
                        UpdateVIEW:'',
                        sendWeixin: true
                    },
                    emailInline:{
                      moo:'',
                      modalArr:[],
                      copyname:'',
                      receiveEmail:'',//收件人
                      theme:'',//主题
                      Enclosure:[],//附件
                      templateContent:'',//模板内容
                    },
                    // selectFn1Element:'1',
                    // selectFn2Element:'1',
                    // selectFn3Element:'1',
                    // selectFn4Element:'1',
                    selectFn1STA:'',
                    selectFn2STA:'',
                    selectFn3STA:'',
                    selectFn4STA:'',
                    limentName:0,
                    errorCode:'',
                    emailMassage:false,
                    allEmailVilitor:false,
                    emailContent:'',
                    emailFlowStatus:'',
                    fileList:[],
                    UpdateTIMETwo:'',
                    uploadFileList:[],
                    temp:'',
                    uploadurl:`${sapi}/api/ckeditor/uploadImage?token=${localStorage.get('token')}&&backUrl=/getimage`,
                    isShowAll:false,
                    isShowTwo:false,
                    isLimitSize:false,
                    isDisable:true,
                    disabledSingle:true,
                    emailId:'',
                    RescopyArr:[],
                    interelement:'1',
                    emailIdArr:[],
                    attachFileList:[],
                    flowStatusTT:'',
                    emailCode:'',
                    modal1:false,
                    modal2:false,
                    modal3:false,
                    modal4:false,
                    modal5:false,
                    modal6:false,
                    modal7:false,
                    modal8: false,
                    modal12:false,
                    modal13:false,
                    transpondFrom: {
                      interviewerName: ''
                    },
                    transpondRule: {
                      interviewerName: [{required: true, trigger: 'blur', validator: validator.bind(this)}]
                    },
                    interviewerList: [{name: 'test', value: '1'}],
                    modal10:false,
                    title:'',
                    emailMOdal:false,
                    DOSTA:'',
                    DOWNLOAD:'',
                    spinShow: true,
                    options3: {
                    disabledDate (date) {
                      return date && date.valueOf() <Date.now()-3600*24*1000;
                      }
                    },
                    checkboxList:[],
                    Black:false,
                    ownerName:'',
                    midStr:'',
                    toseename:'',
                    // UpdateOWER:'',
                    // UpdateTIME:'',
                    // UpdateVIEW:'',
                    DOWNID:'',
                    resume:[],//简历基本详情
                    riList:[],//实习经历列表
                    roList:[],//工作经历列表
                    rpList:[],//项目经历列表
                    reList:[],//教育经历列表
                    a:[],
                    interviewIsShow:false,
                    beforeBtu:false,
                    checked: false,
                    activeClass: 0,
                    clickIndex1: 0,
                    clickIndex2: 0,
                    clickIndex3:0,
                    keywords:'',
                    recordList:[],
                    all:'all',
                    lrgs:'',
                    a:'',
                    ITEMSTA:'',
                    pageT:'',
                    toseeid:'',
                    item:[],
                    STATE:'',
                    delateARRALL:[],
                    delateARRALL2:[],
                    delateARRALL3:[],
                    flowStatusarr:[],
                    flowStatusarr2:[],
                    DELATEARR:[],
                    quanxuan:[],
                    orignarr:['TO_SEE','HAS_SEE','SEE_FAIL','INTERVIEW_FAIL','TO_SENT_OFFER','TO_ENTRY','HAS_ENTRY','NO_ENTRY','END','ARRIVED'],
                    totalSize:null,
                    pageSize:30,
                    pageIndex:1,
                    searchInfo:{
                      pageSize:30,
                      pageIndex:1,
                      id:'',
                      SEX:'',
                      Edu:'',
                      ccc:'',
                      STA:[],
                      status:"",
                      ownerWorkYears1:'',
                      ownerWorkYears2:'',
                    },
                    arr:[],
                    bg:'',
                    sexs:[{Num1:'',status1:'不限'},{Num1:'0',status1:"男"},{Num1:'0',status1:'女'}],
                    Education:[{Num2:'',status2:'不限'},{Num2:"0",status2:'专科以下'},{Num2:'1',status2:'专科及以上'},{Num2:'2',status2:'本科及以上'},{Num2:'3',status2:'硕士及以上'},{Num2:'4',status2:'博士及以上'},{Num2:'99',status2:'985/211'}],
                    state:[{Num3:[],status3:'不限',sta:true},{Num3:'TO_DO',status3:'待处理',sta:false},{Num3:'OPTION',status3:'备选',sta:false},{Num3:'PASS',status3:'Pass',sta:false},{Num3:'HAS_SEE',status3:'已邀约',sta:false},{Num3:'SEE_FAIL',status3:'邀约失败',sta:false},
                           {Num3:'INTERVIEW_FAIL',status3:'面试淘汰',sta:false},{Num3:'TO_SENT_OFFER',status3:'待Offer',sta:false},{Num3:'HAS_SENT_OFFER',status3:'已发offer',sta:false},{Num3:'HAS_ENTRY',status3:'已入职',sta:false},{Num3:'NO_ENTRY',status3:'未入职',sta:false},{Num3:'END',status3:'终止面试',sta:false},],
                    active:'',
                    ownerWorkYears1:[{value:'',label:'不限'},{value:0,label:'0'},{value:1,label:'1'},{value:2,label:'2'},{value:3,label:'3'},{value:4,label:'4'},{value:5,label:'5'},
                             {value:6,label:'6'},{value:7,label:'7'},{value:8,label:'8'},{value:9,label:'9'},{value:10,label:'10'}],
                     ownerWorkYears2:[{value:'',label:'不限'},{value:0,label:'0'},{value:1,label:'1'},{value:2,label:'2'},{value:3,label:'3'},{value:4,label:'4'},{value:5,label:'5'},
                             {value:6,label:'6'},{value:7,label:'7'},{value:8,label:'8'},{value:9,label:'9'},{value:10,label:'10'}],
                    value:[],
                    ajaxData: [],
				checkData: [] // 双向数据绑定的数组
               }
          },
          watch: {
            checkboxList: {
            handler: function (val, oldVal) { 

                if(this.delateARRALL.length==30 || (this.ajaxData.length!=0&&this.checkboxList.length === this.ajaxData.length)){
                  this.checked=true
                }
                // if(this.delateARRALL.length!==30){
                //   this.checked=false
                //   return
                // }
                // if(this.ajaxData.length==0){
                //   this.checked=false
                //   return
                // }
                else {
                    this.checked=false;
                }
            },
            deep: true
            }

        },
        components:{
          ckeditor
        },
        computed:{
          
        },
        methods: {
           //全选与反选
          checkedAll: function() {
            if (this.checked) {//实现反选
                this.checkboxList = [];
                this.ajaxData.forEach( (item) => {
                this.removeInterviewee(item)
                this.checkboxList = [];
                this.delateARRALL=[];
                this.flowStatusarr=[]
                item.STATES=false
                });
            } else { //实现全选
                this.checkboxList = [];
                this.ajaxData.forEach( (item) => {
                    this.addInterviewee(item)
                    this.checkboxList.push(item.id);
                    this.delateARRALL.push(item.id);
                    this.flowStatusarr.push(item.flowStatus)
                    item.STATES=true
                });
            }
        },
        // 准备约面
        tosee(){
          let parmars={
                status:"TO_SEE",
                id:this.toseeid,
            }
          TOSEE(parmars).then(res=>{
              if(res.data.success==true){
                this.modal2=false
                this.SouSuo(this.pageT)
              }
              
          })
        },
        //操作处理面试状态
        selectFn1(e,SID,itemsta) {
            this.toseeid=SID
            this.emailId=SID
            this.emailIdArr=[]
            this.emailIdArr.push(SID)
            this.isShowTwo=true
            this.ITEMSTA=itemsta
            // this.selectFn1STA=e.target.value
            // 准备约面
            if(e.target.value==3){
              this.emailFlowStatus='TO_SEE'
              this.isShowTwo=true
              this.sendEmail()
            }
            // 简历PASS
            if(e.target.value==2){
                let parmars={
                status:"PASS",
                id:SID,
                }
                PASS(parmars).then(res=>{
                    if(res.data.success==true){
                        this.SouSuo(this.pageT)
                    }
                })
            }
            // 简历备选
            if(e.target.value==4){
                let parmars={
                status:"OPTION",
                id:SID,
                }
                OPTION(parmars).then(res=>{
                    if(res.data.success==true){
                       this.SouSuo(this.pageT)
                    }
                })
            }
        },
        addINTERVIEW(){
            let parmars={
                resumeId: this.toseeid,
                inviterName:this.formInline.UpdateOWER,
                intervieweeName:this.formInline.UpdateVIEW,
                seeTime:moment(this.formInline.UpdateTIME).format('YYYY-MM-DD HH:mm'),
            }
            if(this.formInline.UpdateOWER==''||this.formInline.UpdateVIEW==''||this.formInline.UpdateTIME==''){
               this.$Notice.error({
                    title: '提示',
                    desc:  '请您填写完整的约面信息'
                });
                return
            }
            addinterview(parmars).then(res=>{
              if(res.data.success==true){
                  this.modal2=false
                  this.formInline.UpdateOWER=''
                  this.formInline.UpdateVIEW=''
                  this.formInline.UpdateTIME=''
                  this.formInline.sendWeixin=true
                  this.SouSuo(this.pageT)
              }
              if(res.data.body.code==0){
                this.SouSuo(this.pageT)
              }
            })
        },
        nextStep(){
          this.beforeBtu=true
          this.modal2=false
          this.sendEmail()
        },
        selectFn2(e,SID,itemsta) {
          this.ITEMSTA=itemsta
          this.emailId=SID
          this.toseeid=SID
          // this.selectFn2STA=e.target.value
            // 准备约面
            if(e.target.value==1){
                this.emailFlowStatus='TO_SEE'
                this.isShowTwo=true
                this.sendEmail()
                // this.selectFn2STA=e.target.value
            }
            // 简历PASS
            if(e.target.value==3){
                let parmars={
                status:"PASS",
                id:SID,
                }
                PASS(parmars).then(res=>{
                    if(res.data.success==true){
                      this.SouSuo(this.pageT)
                    }
                })
            }
            // 简历备选
            if(e.target.value==2){
                let parmars={
                status:"OPTION",
                id:SID,
                }
                OPTION(parmars).then(res=>{
                    if(res.data.success==true){
                       this.SouSuo(this.pageT)
                    }
                })
            }
            if(e.target.value==2){
                let parmars={
                status:"TO_DO",
                id:SID,
                }
                TODORes(parmars).then(res=>{
                    if(res.data.success==true){
                       this.SouSuo(this.pageT)
                    }
                })
            }
        },
        selectFn3(e,SID,itemsta) {
          this.ITEMSTA=itemsta
          this.emailId=SID
          this.toseeid=SID
          // this.selectFn3STA=e.target.value
            // 准备约面
            if(e.target.value==2){
              this.emailFlowStatus='TO_SEE'
              this.isShowTwo=true
              this.sendEmail()
             
            }
            // 简历PASS
            if(e.target.value==3){
                let parmars={
                status:"PASS",
                id:SID,
                }
                PASS(parmars).then(res=>{
                    if(res.data.success==true){
                      this.SouSuo(this.pageT)
                    }
                })
            }
            // 简历备选
            if(e.target.value==1){
                let parmars={
                status:"OPTION",
                id:SID,
                }
                OPTION(parmars).then(res=>{
                    if(res.data.success==true){ 
                       this.SouSuo(this.pageT)
                    }
                })
            }
            if(e.target.value==4){
                let parmars={
                status:"TO_DO",
                id:SID,
                }
                TODORes(parmars).then(res=>{
                    if(res.data.success==true){
                       this.SouSuo(this.pageT)
                    }
                })
            }
        },
        selectFn4(e,SID,itemsta) {
           this.ITEMSTA=itemsta
           this.toseeid=SID
           this.emailId=SID
          //  this.selectFn4STA=e.target.value
            // 准备约面
            if(e.target.value==2){
              this.emailFlowStatus='TO_SEE'
              this.isShowTwo=true
              this.sendEmail()
            }
            // 简历PASS
            if(e.target.value==1){
                let parmars={
                status:"PASS",
                id:SID,
                }
                PASS(parmars).then(res=>{
                    if(res.data.success==true){
                         this.SouSuo(this.pageT)
                    }
                })
            }
            // 简历备选
            if(e.target.value==3){
                let parmars={
                status:"OPTION",
                id:SID,
                }
                OPTION(parmars).then(res=>{
                    if(res.data.success==true){
                       this.SouSuo(this.pageT)
                    }
                })
            }
            if(e.target.value==4){
                let parmars={
                status:"TO_DO",
                id:SID,
                }
                TODORes(parmars).then(res=>{
                    if(res.data.success==true){
                       this.SouSuo(this.pageT)
                    }
                })
            }
        },
        //查询简历列表
        SearchList(page){
            page = typeof(page)=='number'?page:1
            this.searchInfo.pageIndex = page
            this.pageIndex = page
            let parmars={
                pageSize:this.searchInfo.pageSize,
                pageIndex:this.searchInfo.pageIndex
            }
            this.ajaxData=[]
            this.interviewee = []
            serchList(parmars).then(res=>{
                if(res.data.success==true){
                    // this.ajaxData=[]
                    this.checkboxList=[]
                    this.spinShow=false
                    this.totalSize=res.data.body.totalNumber
                    this.quanxuan.push(res.data.body.items.id)
                    this.ajaxData=res.data.body.items.map((item,index)=>{
                        item.id=item.id
                        item.ownerName=item.ownerName
                        item.ownerSex=item.ownerSex
                        item.deliveryTime=item.deliveryTime
                        item.belongs=item.belongs
                        item.emailSendtime=item.emailSendtime
                        item.ownerMobile=item.ownerMobile
                        item.ownerHighestDegree=item.ownerHighestDegree
                        item.ownerExpectTitles=item.ownerExpectTitles
                        item.flowStatus=item.flowStatus
                        item.ownerAge=item.ownerAge
                        item.ownerWorkYears=item.ownerWorkYears
                        item.modifyTime=item.modifyTime
                        item.srcSite=item.srcSite
                        item.optSource=item.optSource
                        item.modifier=item.modifier
                        item.STATES=false
                        item.hasForward=item.hasForward
                        item.isShow=false
                        item.c=item.modifier==''?item.modifier:item.modifier.split('_')
                        item.d=item.c[0]
                        return item
                    })

                }
            })
        },
        //选择搜索元素
        selectElement1(tItem,Tindex){
           this.searchInfo.SEX=Tindex==0?'':tItem;
           this.clickIndex1=Tindex
        },
        selectElement2(tItem,Tindex){
            this.searchInfo.Edu=tItem;
           this.clickIndex2=Tindex
        },
        selectElement3(tItem,Tindex,status3,sta3){
            sta3=!sta3
            this.state[Tindex].sta=sta3
           if(Tindex==0){
                this.searchInfo.STA=[]
                this.state.map((item,index)=>{
                    if(index!==0){
                        item.sta=false
                    }
                    if(index==0){
                        item.sta=true
                    }
                    return item
                })
                return
           }
           if(Tindex!==0){
               this.state[0].sta=false
           }
           if(sta3==true){
              this.searchInfo.STA.push(tItem) 
           }
           if(sta3==false){
            Array.prototype.indexOf = function(val) { 
            for (var i = 0; i < this.length; i++) { 
            if (this[i] == val) return i; 
            } 
            return -1; 
            }
            Array.prototype.remove = function(val) { 
            var index = this.indexOf(val); 
            if (index > -1) { 
            this.splice(index, 1); 
            } 
            }
            this.searchInfo.STA.remove(tItem)
           }
        },
        //获取option的值
        selectElement4(){
        },
         //搜索
        SouSuo(page, status){
            page = typeof(page)=='number'?page:1
            this.searchInfo.pageIndex = page
            this.pageIndex = page
            this.interviewee = []
            let parmars={
                pageSize:this.searchInfo.pageSize,
                pageIndex:this.searchInfo.pageIndex,
                parameter:{
                    optSourceCode:'',
                    keywordString:this.keywords==''?'':this.keywords,
                    company:this.lrgs==''?'':this.lrgs,
                    ownerSex:this.searchInfo.SEX,
                    highestDegreeNum:this.searchInfo.Edu,
                    flowStatusList:this.searchInfo.STA,
                    ownerWorkYears1:this.searchInfo.ownerWorkYears1,
                    ownerWorkYears2:this.searchInfo.ownerWorkYears2,
                }
            }
            this.ajaxData=[]
            this.checkboxList = []
             sousuoList(parmars,status).then(res=>{
               let Ishow=res.data.items
                if(res.data.success==true){
                    this.checkboxList=[]
                    this.spinShow=false
                    this.totalSize=res.data.body.totalNumber
                    let data = res.data.body.items || []
                    this.ajaxData=res.data.body.items.map((item,index)=>{
                        item.id=item.id
                        item.ownerName=item.ownerName
                        item.ownerSex=item.ownerSex
                        item.belongs=item.belongs
                        item.emailSendtime=item.emailSendtime
                        item.ownerMobile=item.ownerMobile
                        item.ownerHighestDegree=item.ownerHighestDegree
                        item.ownerExpectTitles=item.ownerExpectTitles
                        item.flowStatus=item.flowStatus
                        item.ownerAge=item.ownerAge
                        item.ownerWorkYears=item.ownerWorkYears
                        item.modifyTime=item.modifyTime
                        item.srcSite=item.srcSite
                        item.hasForward=item.hasForward
                        item.optSource=item.optSource
                        item.STATES=false
                        item.isShow=false
                        item.modifier=item.modifier
                        item.c=item.modifier==''?item.modifier:item.modifier.split('_')
                        item.d=item.c[0]
                        return item
                    }) 
                }
            })
        },
        // 判断输入年限的大小
         judge1(value){
            this.searchInfo.ownerWorkYears1=value.value
        },
        judge2(value){
            this.searchInfo.ownerWorkYears2=value.value
            if(this.searchInfo.ownerWorkYears1>this.searchInfo.ownerWorkYears2){
                this.Black=true
                let t1=setTimeout(() => {
                 this.Black=false
                }, 3000)
            }

         
        },
        // 操作记录查询
        RecordSEE(RID,sname){
            this.toseename=sname
            this.modal1=true
            let parmars={
                resumeId:RID
            }
            recodeLIST(parmars).then(res=>{
                this.ownerName=res.data.body.ownerName
                this.recordList=res.data.body.map((item,index)=>{
                    item.ownerName=item.ownerName
                    item.approveUserName=item.approveUserName
                    item.dateTime=item.dateTime
                    item.previousState=item.previousState
                    item.afterState=item.afterState
                    return item
                })
            })
        },
        // 选择input元素
        selectInputElement(index,doID,doStatus,sss, item){
            this.DOWNLOAD=doID
            this.emailIdArr = []
            sss=!sss
            this.ajaxData[index].STATES=sss
            Array.prototype.indexOf = function(val) { 
            for (var i = 0; i < this.length; i++) { 
            if (this[i] == val) return i; 
            } 
            return -1; 
            }
            Array.prototype.remove = function(val) { 
            var index = this.indexOf(val); 
            if (index > -1) { 
            this.splice(index, 1); 
            } 
            }
            if(sss==true){
                this.emailIdArr.push(doID)
                // this.emailId=doID
                this.delateARRALL.push(doID)
                this.delateARRALL2.push(doID)
                this.flowStatusarr.push(doStatus)
                this.addInterviewee(item)
            }
            if(sss==false){
                this.delateARRALL.remove(doID)
                this.delateARRALL2.remove(doID)
                this.flowStatusarr.remove(doStatus)
                this.removeInterviewee(item)
                this.emailIdArr.remove(doID) 
            }
        },
        //查看简历详情
        Seedetail(Tid){
            this.DOWNID=Tid
            let newpage = this.$router.resolve({ 
                name: 'resumeDetail',
                params:{},
                query:{id:this.DOWNID,noShowBtn:''}
            })
            window.open(newpage.href, '_blank');
        },
        //下载单条简历
        downloadONE(downID){
            window.location.href=`${sapi}/api/resume/download/formatted/one?resumeId=${downID}`
        },
        // 批量下载简历
        downloadAll(){
            if(this.checkboxList==''){
               this.$Notice.error({
                    title: '提示',
                    desc:  '选项不能为空'
                });
                return
            }
            let url=`${sapi}/api/resume/download/formatted/compress`
            this.checkboxList.map((item,index)=>{
               url+=index==0?`?resumeId=${item}`:`&resumeId=${item}`
            })
            window.location.href=url
             // this.checkboxList=[]
        },
        // 可删除状态下点击
        delateR(delateid){
           this.delateARRALL3 = []
           this.delateARRALL3.push(delateid)
           this.modal3=true
        },
        // 删除单条简历
        delateONE(){
          deleteREsume(this.delateARRALL3).then(res=>{
            if(res.data.success==true){
              this.delateARRALL3.map(item => {
                this.removeInterviewee({id:item})
              })
                this.modal3=false
               this.SouSuo(this.pageT)
            }
          })
        },
        changeTime(b){
            this.UpdateTIME=b
            if (!b){
              this.editorObject = {
                type: this.temp,
                value: this.emailInline.templateContent
              }
              this.isDisable = false
              return
            } else {
              this.isDisable = true
            }
            var reg = /<span id="email_seeTime"><span>/g
            var time = b.split('-')
            var year = time[0]
            var mon = time[1]
            var day = time[2].split(' ')[0]
            var time = time[2].split(' ')[1]
            var content = `<span id="email_seeTime">${year}年${mon}月${day}日 ${time}<span>`
            this.editorObject = {
              type: this.temp,
              value: this.emailInline.templateContent.replace(reg, content)
            }
        },
        // 不可删除状态下点击
        undelate(){
            this.modal4=true
        },
        // 批量删除
        delateAll(){
            var array1 = this.orignarr;//数组1
            var array2 = this.flowStatusarr;//数组2
            var tempArray1 = [];//临时数组1
            var tempArray2 = [];//临时数组2
            Array.prototype.indexOf = function(val) { 
            for (var i = 0; i < this.length; i++) { 
            if (this[i] == val) return i; 
            } 
            return -1; 
            }
            Array.prototype.remove = function(val) { 
            var index = this.indexOf(val); 
            if (index > -1) { 
            this.splice(index, 1); 
            } 
            }
            for(var i=0;i<array2.length;i++){
                tempArray1[array2[i]]=true;//将数array2 中的元素值作为tempArray1 中的键，值为true；
            }
            for(var i=0;i<array1.length;i++){
                if(tempArray1[array1[i]]){
                    tempArray2.push(array1[i]);//过滤array1 中与array2 相同的元素；
                }
            }
            if(tempArray2.length!==0){
              this.$Notice.error({
                title: '提示',
                desc:  '您选中的简历中包含不可删除简历'
              });
            }
            if(this.delateARRALL.length==0){
              this.$Notice.error({
                    title: '提示',
                    desc:  '选项不能为空'
                });
                return
            }
            if(tempArray2.length==0){
                this.modal7=true
            }
        },
        //确认批量删除
        cofdelateAll(){
            var array1 = this.orignarr;//数组1
            var array2 = this.flowStatusarr;//数组2
            var tempArray1 = [];//临时数组1
            var tempArray2 = [];//临时数组2
            for(var i=0;i<array2.length;i++){
                tempArray1[array2[i]]=true;//将数array2 中的元素值作为tempArray1 中的键，值为true；
            }
            for(var i=0;i<array1.length;i++){
                if(tempArray1[array1[i]]){
                    tempArray2.push(array1[i]);//过滤array1 中与array2 相同的元素；
                }
            }
            if(tempArray2.length!==0){
             this.$Notice.error({
                title: '提示',
                desc:  '您选中的简历中包含不可删除简历'
              });
            }
            Array.prototype.indexOf = function(val) { 
            for (var i = 0; i < this.length; i++) { 
            if (this[i] == val) return i; 
            } 
            return -1; 
            }
            Array.prototype.remove = function(val) { 
            var index = this.indexOf(val); 
            if (index > -1) { 
            this.splice(index, 1); 
            } 
            }
            this.DELATEARR=this.delateARRALL
             deleteREsume(this.DELATEARR).then(res=>{
                    if(res.data.success==true){
                        this.modal7=false
                        this.delateARRALL.map(item => {
                          this.removeInterviewee({id:item})
                        })
                        this.delateARRALL=[]
                        this.flowStatusarr=[]
                        this.SouSuo(this.pageT)
                    }
                })
        },
        // 批量导出
        allexport(){
          let parmars={
                optSourceCode:'',
                keywordString:this.keywords==''?'':this.keywords,
                company:this.lrgs==''?'':this.lrgs,
                ownerSex:this.searchInfo.SEX,
                highestDegreeNum:this.searchInfo.Edu,
                flowStatusList:this.clickIndex3=0?this.searchInfo.STA=[]:this.searchInfo.STA,
                ownerWorkYears1:this.searchInfo.ownerWorkYears1,
                ownerWorkYears2:this.searchInfo.ownerWorkYears2,
              
            }
             window.location.href=`${sapi}/api/excel/output?optSourceCode=${parmars.optSourceCode}&keywordString=${parmars.keywordString}&company=${parmars.company}&ownerSex=${parmars.ownerSex}&highestDegreeNum=${parmars.highestDegreeNum}&flowStatusList=${parmars.flowStatusList}&ownerWorkYears1=${parmars.ownerWorkYears1}&ownerWorkYears2=${parmars.ownerWorkYears2}`
        },
        //改变页码
        pageChange(page){
          this.pageT=page
          this.delateARRALL=[]
          this.flowStatusarr=[]
          this.searchInfo.ownerWorkYears1=''
          this.searchInfo.ownerWorkYears2=''
          this.SouSuo(this.pageT)
        },
        pageSizeChange(page){
            this.searchInfo.pageSize=page
            this.pageSize=page
            this.SouSuo()
        },
        // 跳转到面试管理
        tointerview(){
           this.$router.push({name:'interview',params:{fromInterview:true}})
        },
        // 刷新列表
        pushlist(){
            this.modal2=false
            this.SouSuo(this.pageT)
            this.formInline.UpdateOWER=''
            this.formInline.UpdateVIEW=''
            this.formInline.UpdateTIME=''
            this.formInline.sendWeixin=true
        },
        // 鼠标滑过事件
        ahove(index,vvv){
            this.ajaxData[index].isShow=true
        },
        movleave(index,vvv){
           this.ajaxData[index].isShow=false
        },
        // 发送邮件
        sendEmail(type){
            if(this.checkboxList.length == 0&&type) {
               this.$Notice.error({
                title: '提示',
                desc:  '你尚未选择简历，请先选择简历'
                })
               return
            }
            if (this.checkboxList.length > 1&&type){
              this.$Notice.error({
                title: '提示',
                desc:  ' 不能选择多份简历，请选择单份简历'
                })
               return
            }
            this.emailInline.modalArr=[]
            this.$refs.emailInline.resetFields()
            this.$refs.formInline.resetFields()
            this.emailInline.moo = 'TEMP_0001'
            this.options=[]
            this.emailMOdal=true

            getEmailMoo().then(res=>{
                this.emailInline.modalArr=res.data.body
            })
            this.getEmailContentValue(this.emailInline.moo)
        },
        getEmailContentValue(value){
            if (!value){
              return
            }
            this.isDisable=true
            this.temp=value
            if(this.isShowTwo==true){
                this.isShowAll=true
                this.interviewIsShow=true
            }else{
              if(this.emailIdArr.length>1&&(value=='TEMP_0001'||value=='TEMP_0005'||value=='TEMP_0006')){
                this.allEmailVilitor=true
              }else {
                this.allEmailVilitor=false
                if(this.temp=='TEMP_0001'){
                    this.isShowAll=true
                }else{
                    this.isShowAll=false
                }  
              }
              if(value=='TEMP_0001'){
                this.interviewIsShow=true
                this.isShowAll=true
                }else{
                this.interviewIsShow=false
                this.isShowAll=false
              }
              this.emailId=this.emailIdArr.length==0?'':this.emailIdArr[0]
              if(value=='TEMP_0001' &&this.emailId==''){
                 this.interviewBtu=true
                 this.isShowAll=true
                 this.emailMassage=true
              }
              else if(value=='TEMP_0005' && this.emailId==''){
                 this.emailMassage=true
              }
              else if(value=='TEMP_0006' && this.emailId==''){
                 this.emailMassage=true
              }
              else{
                  if(value=='TEMP_0001'){this.isShowAll=true}else{this.isShowAll=false}
                  this.interviewBtu=false
                  
                  this.emailMassage=false 
              }
            }
           this.emailCode=value
           let params={
               resumeId:this.emailId==''?'':this.emailId,
               templateCode:this.emailCode
           }
           getEmailContent(params).then(res=>{
             this.emailInline.theme=res.data.body.templateSubject
             this.emailInline.receiveEmail=res.data.body.receiveEmail
             this.emailInline.templateContent=res.data.body.templateContent
             this.editorObject = {
                 type: value,
                 value: this.emailInline.templateContent || ''
             }
             if(res.data.body&&res.data.body.resumeInterviewVO){
             this.formInline.UpdateOWER=res.data.body.resumeInterviewVO.inviterName
             this.formInline.UpdateVIEW=res.data.body.resumeInterviewVO.interviewerName
             this.formInline.UpdateTIME=res.data.body.resumeInterviewVO.seeTime
             this.changeTime(this.formInline.UpdateTIME)
             }else{
            this.formInline.UpdateOWER=''
            this.formInline.UpdateVIEW=''
            this.formInline.UpdateTIME='' 
             }
             
           })
        },
        uploadFile(){
        //    this.uploadFileList=[]
           this.limentName=0
        },
        beforUpload(uploadFile){
            let isLiment=false
               if(uploadFile.size/1024 > 10240){
                   isLiment=true
                   this.limentName+=1
                   if(this.limentName==1){
                this.$Notice.error({
                title: '提示',
                desc:  '单个文件不能大于10M'
                })
              }
                }else{
                  this.fileList.push(uploadFile.name)
                 this.uploadFileList.push(uploadFile)
                }
             return false
        },
        emailModalPush(){
            this.$refs.emailInline.resetFields()
            this.$refs.formInline.resetFields()
            this.emailInline.modalArr=[]
            this.emailInline.theme=''
            this.emailInline.receiveEmail=''
            this.emailInline.templateContent=''
            this.sad=''
            this.fileList=[]
            this.emailInline.moo=''
            this.emailMOdal=false
            this.emailMassage=false 
            this.emailIdArr=[]
            this.emailFlowStatus=''
            this.formInline.UpdateOWER=''
            this.formInline.UpdateVIEW=''
            this.formInline.UpdateTIME=''
            this.formInline.sendWeixin=true
            this.emailInline.copyname=''
            this.isShowTwo=false
            this.isLimitSize=false 
            this.uploadFileList=[]
            this.clearInterviewee()
             this.SouSuo(this.pageT,'init')
        },
        getEditorValue(value){ // 调编辑器组件方法获取数据
          return this.$refs.editor.getValue()
        },
        delateFile(index){    
            this.fileList.splice(index,1)
            this.uploadFileList.splice(index,1)
        },
        // 确认发送邮件
        confireSendEmail(){
        this.sad = this.getEditorValue()
        if(this.sad==''){
          this.$Notice.error({
            title: '提示',
            desc:  '请填写完整的信息'
            });
            return 
         }
         if(this.emailInline.moo==''){
           this.$Notice.error({
            title: '提示',
            desc:  '请填写完整的信息'
            });
            return 
         }
         if((this.temp=='TEMP_0001')&&(this.emailInline.moo==''||this.emailInline.receiveEmail==''||this.emailInline.theme==''||this.formInline.UpdateOWER==''||this.formInline.UpdateVIEW==''||this.formInline.UpdateTIME=='')){
            this.$Notice.error({
            title: '提示',
            desc:  '请填写完整的信息'
            });
            return
         }
         if((this.temp=='TEMP_0002'||this.temp=='TEMP_0003'||this.temp=='TEMP_0004'||this.temp=='TEMP_0005'||this.temp=='TEMP_0006')&&(this.emailInline.moo==''||this.emailInline.receiveEmail==''||this.emailInline.theme=='')){
           this.$Notice.error({
            title: '提示',
            desc:  '请填写完整的信息'
            });
            return  
         }
         if((this.temp=='TEMP_0001'|| this.temp=='TEMP_0005'|| this.temp=='TEMP_0006')&&this.emailId==''){
              this.$Notice.error({
              title: '提示',
              desc:  '请先选择简历'
             });
            return  
             
         }
         if(this.emailInline.copyname!==''&&!(/^((([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6}\;))*(([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})))$/.test(this.emailInline.copyname))){
            this.$Notice.error({
            title: '提示',
            desc:  '请正确填写邮箱地址'
           });
           return
        }
        if(!(/^((([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6}\;))*(([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})))$/.test(this.emailInline.receiveEmail))){
            this.$Notice.error({
            title: '提示',
            desc:  '请正确填写邮箱地址'
           });
           return
        }


         this.attachFileList=this.uploadFileList.length==0?'':this.uploadFileList
         this.flowStatusTT=this.emailFlowStatus==''?'':'TO_SEE'
         this.UpdateTIMETwo=this.formInline.UpdateTIME==''?'':this.formInline.UpdateTIME
         if(this.temp=='TEMP_0001'){
            var formData= new FormData()
            if(this.attachFileList.length!==0){
               this.attachFileList.map(item=>{
              formData.append('attachFileList',item)   
            }) 
            }else{
                formData.append('attachFileList','')   
            }
            formData.append('resumeId',this.emailId)
            formData.append('templateCode',this.emailCode)
            formData.append('subject',this.emailInline.theme)
            formData.append('toEmail',this.emailInline.receiveEmail)
            formData.append('ccEmail',this.emailInline.copyname)
            formData.append('emailContent',this.sad)
            formData.append('resumeInterviewVO.resumeId',this.emailId)
            formData.append('resumeInterviewVO.inviterName',this.formInline.UpdateOWER==''?'':this.formInline.UpdateOWER)
            formData.append('resumeInterviewVO.interviewerName',this.formInline.UpdateVIEW==''?'':this.formInline.UpdateVIEW)
            let info = this.options.find(item => item.name == this.formInline.UpdateVIEW)
            formData.append('resumeInterviewVO.email',(info&&info.email) || '')
            formData.append('sendWeixin',this.formInline.sendWeixin==true ? 1 : 0)
            formData.append('resumeInterviewVO.seeTime',moment( this.UpdateTIMETwo).format('YYYY/MM/DD HH:mm'))
            formData.append(' flowStatus',this.flowStatusTT)
            this.isDisable=false
            sendEmail(formData).then(res=>{
                  this.isDisable=true
                if(res.data.success==true){
                    setTimeout(() => {
                      this.$Notice.success({
                        title: '提示',
                        desc:  '发送邮件成功'
                      })
                    }, 500)
                    this.emailMOdal=false
                    this.modal10=false
                    this.emailInline.modalArr=[]
                    this.emailInline.theme=''
                    this.emailInline.receiveEmail=''
                    this.emailInline.templateContent=''
                    this.sad=''
                    this.fileList=[]
                    this.emailInline.moo=''
                    this.emailMOdal=false
                    this.emailMassage=false 
                    this.emailIdArr=[]
                    this.emailFlowStatus=''
                    this.formInline.UpdateOWER=''
                    this.formInline.UpdateVIEW=''
                    this.formInline.UpdateTIME=''
                    this.formInline.sendWeixin=true
                    this.emailInline.copyname=''
                    this.isShowTwo=false
                    this.uploadFileList=[]
                    this.clearInterviewee()
                    this.SouSuo(this.pageT)
                }
                if(res.data.success==false){
                    this.modal10 = false
                    this.modal11 = true
                    this.errorInfo = res.data.body.message
                }
            })
         }else{
            var formData= new FormData()
            if(this.attachFileList.length!==0){
               this.attachFileList.map(item=>{
              formData.append('attachFileList',item)   
            }) 
            }else{
                formData.append('attachFileList','')   
            }
            formData.append('resumeId',this.emailId)
            formData.append('templateCode',this.emailCode)
            formData.append('subject',this.emailInline.theme)
            formData.append('toEmail',this.emailInline.receiveEmail)
            formData.append('ccEmail',this.emailInline.copyname)
            formData.append('emailContent',this.sad)
            formData.append(' flowStatus',this.flowStatusTT)
            this.isDisable=false
            sendEmail(formData).then(res=>{
                  this.isDisable=true
                if(res.data.success==true){
                    setTimeout(() => {
                      this.$Notice.success({
                        title: '提示',
                        desc:  '发送邮件成功'
                      })
                    }, 500)
                    
                    this.emailMOdal=false
                    this.modal10=false
                    this.emailInline.modalArr=[]
                    this.emailInline.theme=''
                    this.emailInline.receiveEmail=''
                    this.emailInline.templateContent=''
                    this.sad=''
                    this.fileList=[]
                    this.emailInline.moo=''
                    this.emailMOdal=false
                    this.emailMassage=false 
                    this.emailIdArr=[]
                    this.emailFlowStatus=''
                    this.formInline.UpdateOWER=''
                    this.formInline.UpdateVIEW=''
                    this.formInline.UpdateTIME=''
                    this.isShowTwo=false
                    this.isLimitSize=false 
                    this.emailInline.copyname=''
                    this.uploadFileList=[]
                    this.clearInterviewee()
                    this.SouSuo(this.pageT)
                }
                if(res.data.success==false){
                    this.modal10 = false
                    this.modal11 = true
                    this.errorInfo = res.data.body.message
                }
            }) 
         }
        },
        removeInterviewee (value) {
          this.interviewee.map((item, index) => {
            if (value&&item.id == value.id) {
              this.interviewee.splice(index, 1)
            }
          })
        },
        addInterviewee (data) {
          let flag = false
          this.interviewee.map(item => {
             if (data&&item.id == data.id) {
               flag = true
               return
             } 
          })
          if (!flag) {
            this.interviewee.push(data)
          }
        },
        clearInterviewee (value) {
          this.interviewee = []
          this.checkboxList = []
          this.delateARRALL = []
          this.flowStatusarr = []
          this.ajaxData.map(item => {
            item.STATES = false
          })
        },
        transpond() { //打开转发简历的modal
          if(this.interviewee.length == 0) {
             this.$Notice.error({
                    title: '提示',
                    desc:  '请选择您要转发的简历'
                });
            return
          }
          this.$refs.transpondFrom.resetFields()
          this.modal8= true
        },
        delInterviewee (item) {
          this.removeInterviewee(item)
          let indexOf = this.checkboxList.indexOf(item.id)
          if (indexOf < 0) return
          this.checkboxList.splice(indexOf, 1)
          this.delateARRALL.splice(indexOf, 1)
          this.flowStatusarr.splice(indexOf, 1)
          this.ajaxData.filter((item, index) => {
            item
          })
          this.ajaxData.map((data, index) => {
            if (data.id == item.id) {
              data.STATES = false
            }
          })
        },
        sendNotice() {
          this.$refs.transpondFrom.validate(valid => {
            if(!this.transpondFrom.interviewerName){
              return
            }
            if (this.interviewee.length < 1) {
              this.$Notice.warning({title: '提示',desc: '发送内容为空，请勾选您要发送的简历'})
              return
            }
             let resumeIdList = []
             this.interviewee.map(item => {
                resumeIdList.push(item.id)
             })
             let params = {
                 resumeIdList,
                 email: this.transpondFrom.interviewerName
             }
             forwardResume(params).then(res => {
                if (res.data.success == true) {
                  this.clearInterviewee()
                  this.modal8 = false
                  setTimeout(() => {
                      this.$Notice.success({
                        title: '提示',
                        desc:  '发送成功'
                      })
                    }, 300)
                } else{
                  this.errorCode=res.data.body.code
                  this.modal8=false
                  this.clearInterviewee()
                  if(this.errorCode=='40001'){
                    this.modal12=true
                  }
                  if(this.errorCode=='40002'){
                    this.modal13=true
                  }
                  // setTimeout(() => {
                  //   this.$Notice.error({
                  //     title: '提示',
                  //     desc:  '发送失败'
                  //   })
                  // }, 500)
                  // this.clearInterviewee()
                  // this.modal8 = false
                }    
             })
          })
        },
        remoteMethod: async function(query){
          if (query !== '') {
              this.loading1 = true;
              setTimeout(async () => {
                  this.loading1 = false;
                  query = query.split('(')[0]
                  let list = await findCompanyEmailByKey(query)
                  this.options = list.data.body
              }, 200);                  
          } else {
              this.options = [];
          }
        },
        changenotice(a){
        },
       receiveEmail(){
        if(!(/^((([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6}\;))*(([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})))$/.test(this.emailInline.receiveEmail))){
          this.tipInfo = '请正确填写邮箱地址'
          this.isDisable=false
          return
        }else{
             this.isDisable=true
        }
       },
       copyname(){
        if(this.emailInline.copyname!==''&&!(/^((([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6}\;))*(([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})))$/.test(this.emailInline.copyname))){
            this.$Notice.error({
            title: '提示',
            desc:  '请正确填写邮箱地址'
           });
            this.isDisable=false
           return
        }else{
            this.isDisable=true
        }
       },
       theme(){
        if(this.emailInline.theme==''){
            this.$Notice.error({
            title: '提示',
            desc:  '请填写主题'
           });
            this.isDisable=false
           return
        }else{
            this.isDisable=true 
        }
       },
       UpdateOWER(){
           if(this.formInline.UpdateOWER==''){
               this.isDisable=false 
           }else{
              this.isDisable=true   
           }
       },
       UpdateTIME(){
           if(this.formInline.UpdateTIME==''){
               this.isDisable=false 
           }else{
              this.isDisable=true   
           }
       },
       UpdateVIEW(){
           if(this.formInline.UpdateVIEW==''){
               this.isDisable=false 
           }else{
              this.isDisable=true   
           }
       },
        getfocus(form, name, e){
          let vm = this;
          let value = this[form][name]
          if(name == 'receiveEmail') {
            this.tip&&this.$refs[form].fields.forEach(function (e) {
                if (e.prop == name) {      
                    e.resetField()
                    vm[form][name] = value
                    vm.tip = false
                }
            })
          } else {
            if (name=='UpdateTIME'&&e==false){ // 时间选择器关闭弹框的时候
              this.$refs.formInline.validateField('UpdateTIME', (e) => {})
              return
            }
            if (name=='UpdateVIEW'&&e==false){ // 选择关闭弹框的时候
              this.$refs.formInline.validateField('UpdateVIEW', (e) => {
              })
              return
            }
            this.$refs[form].fields.forEach(function (e) {
                if (e.prop == name) {      
                    e.resetField()
                    vm[form][name] = value
                }
            })
          }
          
        },
        submit() {
          let flag = false
          this.$refs.emailInline.validate(val => {
          if (!val) {
            flag = true
            return
          }
         })
         this.$refs.formInline.validate(val => {
          if (!val) {
            flag = true
            return
          }
         })
         if (!flag){
          this.modal10=true
         }
        },
         SerchlistinterviewList(){
            Serchinterviewor().then(res=>{
            this.interviewerNameList=res.data.body
            })
        },
        cancelSubmit(){
          this.emailMOdal=false
          this.modal11=false
          this.emailInline.modalArr=[]
          this.emailInline.theme=''
          this.emailInline.receiveEmail=''
          this.emailInline.templateContent=''
          this.sad=''
          this.fileList=[]
          this.emailInline.moo=''
          this.emailMOdal=false
          this.emailMassage=false 
          this.emailIdArr=[]
          this.emailFlowStatus=''
          this.formInline.UpdateOWER=''
          this.formInline.UpdateVIEW=''
          this.formInline.UpdateTIME=''
          this.formInline.sendWeixin=true
          this.emailInline.copyname=''
          this.isShowTwo=false
          this.uploadFileList=[]
          this.clearInterviewee()
        },
        sendFail(){
          this.modal11 = false
        }
    },
    mounted(){
        this.SouSuo(null, 'init')
    }
    }
</script>
<style scoped lang='less'>
.allResume{
    width: 100%;
    height:100%
}
  .bar{
    display:flex;
    align-items: center;
    position: relative;
    .left{
      position: absolute;
      right: 10px;
    }
    .leftBtn{
      right: 90px;
    }
  }
   .allResume-left{
      height: 100%;
      width: 29.5%;
      box-shadow:#dcdee2 0 0 6px 1px;
      float: left;
  }
  .allResume-right{
     height: 100%;
     overflow: hidden;
     width: 70.5%;
     float: left;
     position:relative;
  }
  .red{
      background: LightGray
  }
  .resumeRightContentTop{
      width: 100%;
      height: 100%;
      overflow: hidden;
  }
  .Resumecontent{
      width: 100%;
  }
  .massage{
   height:20px;
   margin-top: 5px
  }
  .Recode span{
    margin-left:20px
  }
  select::-ms-expand{display:none;}
  select{
    appearance:none;
   -moz-appearance:none;
   -webkit-appearance:none;
   outline: none;
   border: none;
   color: #0092FF;
   background-color: rgba(255,255,255,0.0)
  }
  .active1{
      color:#0092FF
  }
  .sex span{
      margin-right: 20px
  }
  .Education{
      width: 100%;
      text-align: left;
  }
  .Education span{
      margin-right:20px;
      display:inline-block;
  }
  .Education span:nth-child(1){
      margin-right:20px;
      display:inline-block;
  }
  .state{
      width: 100%;
      /* border:1px solid red */
  }
  .state span{
      margin-right:20px;
      /* border:1px solid black; */
      display: inline-block;
  }
  .state span:nth-child(1){
      margin-right:20px;
      display:inline-block;
  }
  .text1{
      width: 80%;
      height: 60px;
      background:rgb(61,169,247) ;
      margin: 30px 0 0 30px
  }
  .text2{
      width: 80%;
      height: 60px;
      background:rgb(253,85,83);
      margin: 30px 0 0 30px
  }
  .text3{
      width: 80%;
      height: 60px;
      background:rgb(0,176,160);
      margin: 30px 0 0 30px
  }
  .detailResume{
      width:100%;
      height:60px;
  }
  .grey{
  background:rgba(241,241,241,1);
  }
  .emailModal-title{
    height: 280px;
    width: 100%;
    
  }
  .emailModalTitle-left{
    height: 100%;
    width: 60%;
    float: left;
  }
  .emailModalTitle-right{
    height: 100%;
    width: 40%;
    float: left;
  }
  .ckeditor{
    width:100%
  }
  .uploadEnclosure{
      width: 100%;
  }
  .Ubt button{
      margin-left: 40px
  }
  .badge1{
    display: inline-block;
    position: absolute;
    width:25%;
    height:73%;
    line-height: 130%;
    top:-23%;
    left: -10%;
    background:red;
    border-radius: 50%;
  }
  .badge{
    position: absolute;
    top: -50%;
    right: -18px;
  }
  .badges {
    right: -35px;
  }
  .badges1 {
    right: -25px;
  }
  .interviewee{
    float:left;
    width:50px;
    margin :10px;
    height: 60px;
    text-align: center;
    .pic{
      position: relative;
      height:40px;
    }
    img{
      width:100%;
    }
    p{
      width: 100%;
      text-align: center;
    }
    i{
      position: absolute;
      right:-10px;
      top:-10px;
    }
    .hint{

    }
  }
    .title{
      text-align: center;
      width:100%;
      margin-bottom: 10px;
    }
    .wechat{
      position: absolute;
      right: -5px;
      top:30%;
      span{
        font-size: 13px;
      }
    }
  .content{
    padding-bottom: 80px;
  }
  .pageBottom{
    width:100%;
    background:rgba(241,241,241,1);
    text-align:center;
    position:absolute;
    bottom:0;
    height:40px;
  }

</style>
<style>
.allResume .emailForm .ivu-form-item-label{
    font-size: 14px
}
.allResume .ivu-form-item-content{
font-size: 14px;
}
.allResume .ivu-form-item-error-tip{
  font-size:12px;
}
</style>