<template>
    <div class="allResume">
      <!-- <Spin size="large" fix v-if="spinShow" style="font-size:25px">加载中...</Spin> -->
      <div class="allResume-left">
          <Form :label-width="80" style="width:88%;margin-left:7%">
            <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 in ownerWorkYears1" :value="item.value" :key="item.value">{{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 in ownerWorkYears2" :value="item.value" :key="item.value">{{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:5%;line-height:5%;margin-bottom:0.5%">
                    <input type='checkbox' class='input-checkbox' v-model='checked' @click='checkedAll' style="margin-left:10px;cursor:pointer;margin-top:1%">
                    <span style="margin-left:10px">全选</span>
                    <Button  type="primary" size="small" style="margin-left:2%;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="float:right;margin-right:20px;margin-top:0.6%" @click="allexport">导出列表</Button>
                    <Button  type="primary" size="small" style="float:right;margin-right:20px;margin-top:0.6%" @click="sendEmail">发送邮件</Button>
              </div>
              <div style="width:100%;float:left;margin-bottom:40px;overflow-y: auto;height:100%" class="a">
              <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}">
                    <p>  
                      <span style="display:inline-block;height:100%;font-size: 12px;margin-top:5px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap;margin-top:5px">
                        <input type='checkbox' name='checkboxinput' class='input-checkbox'  v-model='checkboxList' :value="item.id" @click="selectInputElement(i,item.id,item.flowStatus,item.STATES)" style="margin-left:10px;cursor:pointer">
                      </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.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:15%;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'"><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'"><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'"><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'"><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'"><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'"><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'"><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'"><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)">
                                  <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'"><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'"><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'"><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'"><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)">
                                  <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">
                                <option value="1">待处理</option>
                                <option value="2">pass</option>
                                <option value="3">邀请面试</option>
                                <option value="4">备选</option>
                            </select>
                                <span><Icon type="md-download" @click="downloadONE(item.id)" style="font-size:15px;cursor:pointer;color:#0092FF"/></span>
                                <span ><Icon  type="md-trash" v-if="item.flowStatus=='TO_SEE'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span ><Icon  type="md-trash" v-if="item.flowStatus=='HAS_SEE'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span ><Icon  type="md-trash" v-if="item.flowStatus=='SEE_FAIL'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span ><Icon  type="md-trash" v-if="item.flowStatus=='INTERVIEW_FAIL'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span ><Icon  type="md-trash" v-if="item.flowStatus=='TO_SENT_OFFER'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span ><Icon  type="md-trash" v-if="item.flowStatus=='TO_ENTRY'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span ><Icon  type="md-trash" v-if="item.flowStatus=='HAS_ENTRY'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span ><Icon  type="md-trash" v-if="item.flowStatus=='ARRIVED'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span ><Icon  type="md-trash" v-if="item.flowStatus=='NO_ENTRY'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span ><Icon  type="md-trash" v-if="item.flowStatus=='END'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span ><Icon  type="md-trash" v-if="item.flowStatus=='HAS_SENT_OFFER'"  @click="undelate" style="color:#b5b5b5;font-size:15px;cursor:pointer"/></span>
                                <span ><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 ><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 ><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 @click="RecordSEE(item.id,item.ownerName)" style="color:#0092FF;cursor:pointer">记录</span>
                           </span>
                    </p>
                    <p style="margin-top:5px;color:Greys">
                      <span style="display:inline-block;font-size: 12px;margin-left:25px;color:orange" v-show="item.hasForward=='1'" >已转</span> 
                      <span style="display:inline-block;font-size: 12px;margin-left:25px;color:Grey" v-if="item.srcSite!==''" v-show="item.hasForward==null">{{item.deliveryTime}}投递  |</span> 
                      <span style="display:inline-block;font-size: 12px;margin-left:25px;color:Grey" 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:5px;color:Grey" v-if="item.srcSite!==''" v-show="item.hasForward!==null">{{item.deliveryTime}}投递  |</span> 
                      <span style="display:inline-block;font-size: 12px;margin-left:5px;color:Grey" 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;width:30%;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" style="width:59%;background:rgba(241,241,241,1);text-align:center;position:fixed;bottom:0;height:40px">
          <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'>
        <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:blue">“新建面试”</span>后，你需要从<span style="color:blue">”面试管理“</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="ruleInline" 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" :show-massage='false'>
                   <Input style="width:95%" v-model="emailInline.receiveEmail" @on-blur='receiveEmail'/>
                   <span style="position: absolute;left:0;top:30px;color:gray">输入多个邮箱地址以英文”;“分隔</span>
                </FormItem>
                <FormItem label="抄送" style="margin-top:20px">
                  <Input style="width:95%" v-model="emailInline.copyname" @on-blur='copyname'/>
                </FormItem>
                <FormItem label="主题" style="margin-top:20px">
                    <Input  style="width:95%" v-model="emailInline.theme" @on-blur='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="75" ref="formInline" :rules="ruleInline" :model="formInline" style="margin-top:35px" label-position="left">
                    <FormItem label="邀约人" style="margin-top:20px" prop="UpdateOWER">
                        <Input v-model="formInline.UpdateOWER" style="width:100%" :maxlength="5" @on-blur='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-blur='UpdateTIME'></DatePicker>
                    </FormItem>
                    <FormItem label="面试官" style="margin-top:20px" prop='UpdateVIEW'>
                        <Input v-model="formInline.UpdateVIEW" style="width:100%" :maxlength="5"  @on-blur='UpdateVIEW'/>
                    </FormItem>
                </Form>
                <!-- <Checkbox v-model="disabledSingle" style="margin-left:40px" @on-change='changenotice'><span style="margin-left:20px">微信通知面试官</span></Checkbox> -->
          </div>
        </div>
        <div class="ckeditor">
            <ckeditor :value='sad' :uploadUrl='uploadurl' @getValue='getEditorValue' 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" class="Ubt">
            <Button type='primary' @click='emailModalPush'>取消</Button>
            <Button type='primary' @click='confireSendEmail' v-show="this.isShowAll==false" :disabled="!isDisable">发送</Button>
            <Button type='primary' @click='confireSendEmail' v-show="this.isShowAll==true" :disabled="!isDisable">添加并发送</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} from '../../api/resume.server'
import qs from 'qs'
import {
    sapi
} from '../../config'
import localStorage from '../../service/localstorage.service'
import Router from 'vue-router';
import ckeditor from '../../components/ckeditor'
// import ckeditor from '../../../static/ckeditor'
    export default {
        data () {
            const vidte=(rule,value,callback)=>{
                if(this.emailMassage==true){
                    callback(new Error('你尚未选择简历，请先选择简历'))
                }
                else if(this.allEmailVilitor==true){
                  callback(new Error('不能选择多份简历，请选择单份简历'))
                }
                else{
                    callback ()
                }
            }
            return {
                    sad:'',
                    ruleInline: {
                        UpdateOWER: [
                            {  required: true, message: '邀约人不能为空', trigger: 'blur' }
                        ],
                        UpdateTIME: [
                           {  required: true,  message: '面试时间不能为空', trigger: 'date' }
                        ],
                         UpdateVIEW: [
                           {  required: true,message: '面试官不能为空',  trigger: 'blur' }
                        ],
                         moo:[
                            {required: false,  validator: vidte, trigger: 'change'},
                        ], 
                    },
                    formInline:{
                        UpdateOWER:'',
                        UpdateTIME:'',
                        UpdateVIEW:''
                    },
                    emailInline:{
                      moo:'',
                      modalArr:[],
                      copyname:'',
                      receiveEmail:'',//收件人
                      theme:'',//主题
                      Enclosure:[],//附件
                      templateContent:'',//模板内容
                    },
                    limentName:0,
                    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,
                    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.ajaxData.length==0){
                  this.checked=false
                  return
                }
                if(this.delateARRALL.length==30){
                  this.checked=true
                  return
                }
                if(this.delateARRALL.length!==30){
                  this.checked=false
                  return
                }
                if (this.checkboxList.length === this.ajaxData.length) {
                    this.checked=true;
                }
                else {
                    this.checked=false;
                }
            },
            deep: true
            }

        },
        components:{
          ckeditor 
        },
        methods: {
           //全选与反选
          checkedAll: function() {
            if (this.checked) {//实现反选
                this.checkboxList = [];
                this.ajaxData.forEach( (item) => {
                this.checkboxList = [];
                this.delateARRALL=[];
                this.flowStatusarr=[]
                item.STATES=false
                });
            } else { //实现全选
                this.checkboxList = [];
                this.ajaxData.forEach( (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.push(SID)
            this.isShowTwo=true
            this.ITEMSTA=itemsta
            // 准备约面
            if(e.target.value==3){
              getEmailMoo().then(res=>{
                this.emailInline.modalArr.push(res.data.body[0])
              })
              this.emailMOdal=true
              this.emailFlowStatus='TO_SEE'
              this.isShowTwo=true
            }
            // 简历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,
                interviewerName: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.SouSuo(this.pageT)
              }
              if(res.data.body.code==0){
                this.SouSuo(this.pageT)
              }
            })
        },
        nextStep(){
          this.beforeBtu=true
          this.modal2=false
          this.emailMOdal=true
        },
        selectFn2(e,SID,itemsta) {
          this.ITEMSTA=itemsta
          this.emailId=SID
          this.toseeid=SID
            // 准备约面
            if(e.target.value==1){
                 getEmailMoo().then(res=>{
                   this.emailInline.modalArr.push(res.data.body[0])
                 })
                  this.emailMOdal=true
                  this.emailFlowStatus='TO_SEE'
                 this.isShowTwo=true
            }
            // 简历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
            // 准备约面
            if(e.target.value==2){
                 getEmailMoo().then(res=>{
                 this.emailInline.modalArr.push(res.data.body[0])
                 })
                 this.emailMOdal=true
                 this.emailFlowStatus='TO_SEE'
                 this.isShowTwo=true
            }
            // 简历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
            // 准备约面
            if(e.target.value==2){
                 getEmailMoo().then(res=>{
                 this.emailInline.modalArr.push(res.data.body[0])
                 })
                 this.emailMOdal=true
                 this.emailFlowStatus='TO_SEE'
                 this.isShowTwo=true
            }
            // 简历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=[]
            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.hasForward=item.hasForward
                        item.STATES=false
                        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){
            page = typeof(page)=='number'?page:1
            this.searchInfo.pageIndex = page
            this.pageIndex = page
            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,
                }
            }
            if(this.searchInfo.ownerWorkYears1>this.searchInfo.ownerWorkYears2){
               this.$Notice.error({
                    title: '提示',
                    desc:  '最高年限不能小于最低年限'
                });
                return
            }
            this.ajaxData=[]
             sousuoList(parmars).then(res=>{
               let Ishow=res.data.items
                if(res.data.success==true){
                    this.checkboxList=[]
                    this.spinShow=false
                     this.totalSize=res.data.body.totalNumber
                    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){
            this.DOWNLOAD=doID
            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)
            }
            if(sss==false){
                this.delateARRALL.remove(doID)
                this.delateARRALL2.remove(doID)
                this.flowStatusarr.remove(doStatus)
                this.emailIdArr.remove(doID) 
            }
        },
        //查看简历详情
        Seedetail(Tid){
            this.DOWNID=Tid
            let newpage = this.$router.resolve({ 
                name: 'resumeDetail',
                params:{},
                query:{id:this.DOWNID}
            })
            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.push(delateid)
           this.modal3=true
        },
        // 删除单条简历
        delateONE(){
          deleteREsume(this.delateARRALL3).then(res=>{
            if(res.data.success==true){
                this.modal3=false
               this.SouSuo(this.pageT)
            }
          })
        },
        changeTime(b){
            this.UpdateTIME=b
        },
        // 不可删除状态下点击
        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=[]
                        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=''
        },
        // 鼠标滑过事件
        ahove(index,vvv){
            this.ajaxData[index].isShow=true
        },
        movleave(index,vvv){
           this.ajaxData[index].isShow=false
        },
        // 发送邮件
        sendEmail(){
            this.emailInline.modalArr=[]
            this.emailMOdal=true
            getEmailMoo().then(res=>{
                this.emailInline.modalArr=res.data.body
            })
        },
        getEmailContentValue(value){
            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 parmars={
               resumeId:this.emailId==''?'':this.emailId,
               templateCode:this.emailCode
           }
           getEmailContent(parmars).then(res=>{
             this.emailInline.theme=res.data.body.templateSubject
             this.emailInline.receiveEmail=res.data.body.receiveEmail
             this.emailInline.templateContent=res.data.body.templateContent
             this.sad=this.emailInline.templateContent
             if(res.data.body&&res.data.body.resumeInterviewVO){
             this.formInline.UpdateOWER=res.data.body.resumeInterviewVO.interviewerName
             this.formInline.UpdateVIEW=res.data.body.resumeInterviewVO.inviterName
             this.formInline.UpdateTIME=res.data.body.resumeInterviewVO.seeTime
             }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
        },
        // 发送全部内容
        sendContent(){},
        emailModalPush(){
            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.emailInline.copyname=''
            this.isShowTwo=false
             this.isLimitSize=false 
             this.uploadFileList=[]
            this.SouSuo(this.pageT)
        },
        getEditorValue(value){
            this.emailContent=value
            this.sad = value
        //     if(this.sad==''){this.$Notice.error({
        //         title: '提示',
        //         desc:  '正文不能为空'
        //      });
        //    }
            // if(this.emailContent==''){
            //   this.isDisable=false 
              
            // }else{
            //    this.isDisable=true 
            // }
        },
        delateFile(index){    
            this.fileList.splice(index,1)
            this.uploadFileList.splice(index,1)
        },
        // 确认发送邮件
        confireSendEmail(){
         if(this.emailContent==''){
              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
        }
         if((this.emailIdArr.length>1)&&(this.temp=='TEMP_0001'|| this.temp=='TEMP_0005'|| this.temp=='TEMP_0006')){
           this.$Notice.error({
              title: '提示',
              desc:  '不能选择多份简历，请选择单份简历'
            });
            return
         }
         if( this.emailContent==''){
            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.emailContent)
            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)
            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){
                    this.$Notice.success({
                        title: '提示',
                        desc:  '发送邮件成功'
                    });
                    this.emailMOdal=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.emailInline.copyname=''
                    this.isShowTwo=false
                    this.uploadFileList=[]
                    this.SouSuo(this.pageT)
                }
                if(res.data.success==false){
                    this.$Notice.error({
                        title: '提示',
                        desc:  '发送邮件失败'
                    });
                    this.emailMOdal=false
                    // this.isDisable=true
                    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.emailInline.copyname=''
                    this.isShowTwo=false
                    this.uploadFileList=[]
                    this.SouSuo(this.pageT)
                }
            })
         }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.emailContent)
            formData.append(' flowStatus',this.flowStatusTT)
            this.isDisable=false
            sendEmail(formData).then(res=>{
                  this.isDisable=true
                if(res.data.success==true){
                    this.$Notice.success({
                        title: '提示',
                        desc:  '发送邮件成功'
                    })
                    this.emailMOdal=false
                    //  this.isDisable=true
                    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.SouSuo(this.pageT)
                }
                if(res.data.success==false){
                    this.$Notice.error({
                        title: '提示',
                        desc:  '发送邮件失败'
                    });
                    this.emailMOdal=false
                    // this.isDisable=true
                    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.emailInline.copyname=''
                    this.isShowTwo=false
                    this.isLimitSize=false 
                    this.uploadFileList=[]
                    this.SouSuo(this.pageT)
                }
            }) 
         }
        },
        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.$Notice.error({
            title: '提示',
            desc:  '请正确填写邮箱地址'
           });
            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   
           }
       }

    },
        mounted(){
            this.SouSuo()
        }
    }
</script>
<style scoped>
 .allResume{
    width: 100%;
    height:100%
}
 .allResume-left{
    height: 100%;
    width: 29%;
    box-shadow:#dcdee2 0 0 6px 1px;
    float: left;
}
.allResume-right{
   height: 100%;
   overflow: hidden;
   width: 70.5%;
   float: left;
   margin-left:1px
}
.red{
    background: LightGray
}
.resumeRightContentTop{
    width: 100%;
    height: 90%
}
.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:first-child{
    margin-left: 0px
}
.sex span:not(:first-child){
    margin-left: 30px
}
.Education{
    width: 100%;
}
.Education span{
    width: 87px;
    display:inline-block;
}
.Education span:nth-child(1){
    width: 45px;
    display:inline-block;
}
.state{
    width: 100%;
    /* border:1px solid red */
}
.state span{
    width: 60px;
    /* border:1px solid black; */
    display: inline-block;
}
.state span:nth-child(1){
    width: 45px;
    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;
}
.a div:nth-child(2n){
    background:rgba(241,241,241,1);
}
.emailModal-title{
  height: 260px;
  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
}
</style>
<style>
.emailForm .ivu-form-item-label{
    font-size: 14px
}
</style>