Commit f4250c06 authored by FE-安焕焕's avatar FE-安焕焕 👣

转发面试官功能

parent f1880f06
......@@ -121,3 +121,13 @@ export function sendEmail(parmars) {
// 'Content-Type':'application/json'
}})
}
export function findCompanyEmailByKey(key) { //公司通讯录
return axios.get(`${sapi}/api/companyEmail/findCompanyEmailByKey?key=${key}`)
}
// 转发邮箱通知
export function forwardResume(params) {
return axios.post(`${sapi}/api/resume/forwardResume`,params, {headers: {
'Content-Type':'application/json'
}})
}
......@@ -8,6 +8,7 @@ import router from './router';
import initRouter from './service/init.service.js'
import 'vue-happy-scroll/docs/happy-scroll.css'
import {Notice} from 'iview'
import store from '../src/store'
Vue.use(iView);
Vue.use(Notice)
Vue.config.productionTip = false;
......@@ -16,6 +17,7 @@ initRouter.init(router)
new Vue({
el: '#app',
router,
store,
components: { App },
template: '<App/>',
});
......@@ -21,11 +21,11 @@
<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>
<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 in ownerWorkYears2" :value="item.value" :key="item.value">{{item.label}}</Option>
<Option v-for="(item, index) in ownerWorkYears2" :value="item.value" :key="index">{{item.label}}</Option>
</Select>
</span><br>
</FormItem>
......@@ -45,7 +45,11 @@
<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>
<Button type="primary" size="small" style="float:right;margin-right:20px;margin-top:0.6%;" @click="sendEmail">发送邮件</Button>
<Button type="primary" size="small" style="float:right;margin-right:20px;margin-top:0.6%;position:relative;position:relative" @click="transpond">
<Badge :count="interviewee.length" size='small' :class='["badge",{"badges1":interviewee.length>9, "badges": interviewee.length>99}]'></Badge>转发面试官
</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>
......@@ -54,7 +58,7 @@
<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">
<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="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>
......@@ -356,17 +360,52 @@
<Button type='primary' @click='confireSendEmail' v-show="this.isShowAll==true">添加并发送</Button>
</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='请输入面试官全名'>
<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>
</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 { serchList,downloadone,sousuoList,seedetail,PASS,OPTION,deleteREsume,downloadOne,exportLIST,recodeLIST,addinterview,updatastatus,TODORes,sendEmail,getEmailMoo,getEmailContent,uploadimage, findCompanyEmailByKey,forwardResume} from '../../api/resume.server'
import qs from 'qs'
import {
sapi
} from '../../config'
import Router from 'vue-router';
import ckeditor from '../../components/ckeditor'
import {mapState} from 'vuex'
// import ckeditor from '../../../static/ckeditor'
export default {
data () {
......@@ -381,8 +420,14 @@ import ckeditor from '../../components/ckeditor'
callback ()
}
}
const validator = (rule, value, callback) => {
if (!value)this.$Notice.warning({title: '提示',desc: '请输入您要通知的面试官'})
callback()
}
return {
sad:'',
loading1: false,
options: [],
ruleInline: {
UpdateOWER: [
{ required: true, message: '邀约人不能为空', trigger: 'blur' }
......@@ -437,6 +482,14 @@ import ckeditor from '../../components/ckeditor'
modal5:false,
modal6:false,
modal7:false,
modal8: false,
transpondFrom: {
interviewerName: ''
},
transpondRule: {
interviewerName: [{required: true, trigger: 'blur', validator: validator}]
},
interviewerList: [{name: 'test', value: '1'}],
title:'',
emailMOdal:false,
DOSTA:'',
......@@ -521,21 +574,18 @@ import ckeditor from '../../components/ckeditor'
watch: {
checkboxList: {
handler: function (val, oldVal) {
if(this.ajaxData.length==0){
this.checked=false
return
}
if(this.delateARRALL.length==30){
if(this.delateARRALL.length==30 || (this.ajaxData.length!=0&&this.checkboxList.length === this.ajaxData.length)){
this.checked=true
return
}
if(this.delateARRALL.length!==30){
this.checked=false
return
}
if (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;
}
......@@ -545,7 +595,10 @@ import ckeditor from '../../components/ckeditor'
},
components:{
ckeditor
ckeditor
},
computed:{
...mapState({interviewee: 'interviewee'})
},
methods: {
//全选与反选
......@@ -553,21 +606,21 @@ import ckeditor from '../../components/ckeditor'
if (this.checked) {//实现反选
this.checkboxList = [];
this.ajaxData.forEach( (item) => {
this.removeInterviewee(item)
this.checkboxList = [];
this.delateARRALL=[];
this.flowStatusarr=[]
item.STATES=false
});
console.log(this.delateARRALL,666666)
} 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
});
console.log(this.delateARRALL,7777777)
}
},
// 准备约面
......@@ -627,7 +680,7 @@ import ckeditor from '../../components/ckeditor'
let parmars={
resumeId: this.toseeid,
inviterName:this.formInline.UpdateOWER,
interviewerName:this.formInline.UpdateVIEW,
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==''){
......@@ -830,14 +883,26 @@ import ckeditor from '../../components/ckeditor'
item.srcSite=item.srcSite
item.optSource=item.optSource
item.modifier=item.modifier
item.STATES=false
item.STATES=isClick.call(this, item.id)
item.isShow=false
item.c=item.modifier==''?item.modifier:item.modifier.split('_')
item.d=item.c[0]
if (item.STATES) { //以选中
this.checkboxList.push(item.id)
this.delateARRALL.push(item.id);
this.flowStatusarr.push(item.flowStatus)
}
return item
})
}
})
function isClick (id) { // 是否已选中转发
let filterArr = this.interviewee.filter(item => {
return item.id == id
})
return filterArr.length > 0
}
},
//选择搜索元素
selectElement1(tItem,Tindex){
......@@ -916,12 +981,15 @@ import ckeditor from '../../components/ckeditor'
return
}
this.ajaxData=[]
this.checkboxList = []
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.totalSize=res.data.body.totalNumber
let data = res.data.body.items || []
console.log('')
this.ajaxData=res.data.body.items.map((item,index)=>{
item.id=item.id
item.ownerName=item.ownerName
......@@ -937,15 +1005,26 @@ import ckeditor from '../../components/ckeditor'
item.modifyTime=item.modifyTime
item.srcSite=item.srcSite
item.optSource=item.optSource
item.STATES=false
item.STATES=isClick.call(this, item.id)
item.isShow=false
item.modifier=item.modifier
item.c=item.modifier==''?item.modifier:item.modifier.split('_')
item.d=item.c[0]
if (item.STATES) { //以选中
this.checkboxList.push(item.id)
this.delateARRALL.push(item.id);
this.flowStatusarr.push(item.flowStatus)
}
return item
})
}
})
function isClick (id) { // 是否已选中转发
let filterArr = this.interviewee.filter(item => {
return item.id == id
})
return filterArr.length > 0
}
},
// 判断输入年限的大小
judge1(value){
......@@ -982,7 +1061,7 @@ import ckeditor from '../../components/ckeditor'
})
},
// 选择input元素
selectInputElement(index,doID,doStatus,sss){
selectInputElement(index,doID,doStatus,sss, item){
this.DOWNLOAD=doID
this.emailIdArr.push(doID)
this.emailId=doID
......@@ -1004,13 +1083,13 @@ import ckeditor from '../../components/ckeditor'
this.delateARRALL.push(doID)
this.delateARRALL2.push(doID)
this.flowStatusarr.push(doStatus)
console.log(this.delateARRALL,8888888, this.ajaxData[index].STATES)
this.addInterviewee(item)
}
if(sss==false){
this.delateARRALL.remove(doID)
this.delateARRALL2.remove(doID)
this.flowStatusarr.remove(doStatus)
console.log(this.delateARRALL,5555555, this.ajaxData[index].STATES)
this.removeInterviewee(item)
}
},
//查看简历详情
......@@ -1041,17 +1120,22 @@ import ckeditor from '../../components/ckeditor'
url+=index==0?`?resumeId=${item}`:`&resumeId=${item}`
})
window.location.href=url
this.checkboxList=[]
// this.checkboxList=[]
},
// 可删除状态下点击
delateR(delateid){
this.delateARRALL3 = []
this.delateARRALL3.push(delateid)
this.modal3=true
},
// 删除单条简历
delateONE(){
console.log(this.delateARRALL3)
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)
}
......@@ -1143,6 +1227,9 @@ import ckeditor from '../../components/ckeditor'
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)
......@@ -1253,9 +1340,7 @@ import ckeditor from '../../components/ckeditor'
})
},
beforUpload(aaa){
console.log(aaa,File,aaa.name)
this.fileList.push(aaa.name)
console.log(this.fileList)
return false
},
// 发送全部内容
......@@ -1294,20 +1379,124 @@ import ckeditor from '../../components/ckeditor'
formData.append('emailContent',this.emailContent)
formData.append('resumeInterviewVO.resumeId',this.emailId)
formData.append('resumeInterviewVO.inviterName',this.formInline.UpdateOWER)
formData.append('resumeInterviewVO.interviewerName',this.formInline.UpdateVIEW)
formData.append('resumeInterviewVO.intervieweeName',this.formInline.UpdateVIEW)
formData.append('resumeInterviewVO.seeTime',moment(this.formInline.UpdateTIME).format('YYYY/MM/DD HH:mm'))
formData.append(' flowStatus',this.flowStatusTT)
sendEmail(formData).then(res=>{
console.log(res)
})
}
},
},
removeInterviewee (value) {
let data = {
type: 'all',
data: value
}
this.$store.dispatch('removeInterviewee', data)
},
addInterviewee (value) {
let data = {
type: 'all',
data: value
}
this.$store.dispatch('addInterviewee', data)
},
clearInterviewee (value) {
let data = {
type: 'all',
data: value
}
this.$store.dispatch('clearInterviewee', data)
this.checkboxList = []
this.delateARRALL = []
this.flowStatusarr = []
},
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.success) {
this.clearInterviewee()
this.modal8 = false
this.$Notice.warn({
title: '提示',
desc: '发送成功'
});
} else{
this.$Notice.error({
title: '提示',
desc: '发送失败'
});
this.clearInterviewee()
this.modal8 = false
}
})
})
},
remoteMethod (query) {
if (query !== '') {
this.loading1 = true;
setTimeout(() => {
this.loading1 = false;
let list = []
findCompanyEmailByKey(query).then(res => {
list = res
this.options = list.data.body.filter(item => item.name.toLowerCase().indexOf(query.toLowerCase()) > -1 || item.email.toLowerCase().indexOf(query.toLowerCase()) > -1);
}, 200);
})
} else {
this.options = [];
}
},
},
mounted(){
this.SearchList()
}
}
</script>
<style scoped>
<style scoped lang='less'>
.allResume{
width: 100%;
height:100%
......@@ -1433,4 +1622,57 @@ select{
.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: -32%;
right: -15px;
}
.badges {
right: -30px;
}
.badges1 {
right: -21px;
}
.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;
}
</style>
......@@ -45,6 +45,9 @@
<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>
<Button type="primary" size="small" style="float:right;margin-right:20px;margin-top:0.6%;position:relative;position:relative" @click="transpond">
<Badge :count="interviewee.length" size='small' :class='["badge",{"badges1":interviewee.length>9, "badges": interviewee.length>99}]'></Badge>转发面试官
</Button>
</div>
<div style="margin-bottom:40px;float:left;width:100%;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>
......@@ -52,7 +55,7 @@
<div class="detailResume" id="a" @mousemove="ahove(i,item.isShow)" @mouseleave="movleave(i,item.isShow)" :class="{red:item.isShow}" >
<p class="massage" style="margin-top:10px">
<span style="display:inline-block;height:100%;font-size: 12px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap;margin-top:5px">
<input type='checkbox' name='checkboxinput' style="margin-left:10px;cursor:pointer" class='input-checkbox' v-model='checkboxList' :value="item.id" @click="selectInputElement(i,item.id,item.flowStatus,item.STATES)"></span>
<input type='checkbox' name='checkboxinput' style="margin-left:10px;cursor:pointer" class='input-checkbox' v-model='checkboxList' :value="item.id" @click="selectInputElement(i,item.id,item.flowStatus,item.STATES, item)"></span>
<span style="display:inline-block;height:100%;font-size: 12px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap;cursor:pointer" @click="Seedetail(item.id)">{{item.ownerName}} |</span>
<span style="display:inline-block;height:100%;font-size: 12px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap;cursor:pointer" @click="Seedetail(item.id)"> {{item.ownerMobile}} |</span>
<span style="display:inline-block;height:100%;font-size: 12px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap;cursor:pointer" @click="Seedetail(item.id)"> {{item.ownerAge}}岁 |</span>
......@@ -351,18 +354,57 @@
<Button type='primary' @click='emailMOdal=false' v-show="this.isShowAll==false">发送</Button>
<Button type='primary' @click='emailMOdal=false' v-show="this.isShowAll==true">添加并发送</Button>
</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='请输入面试官全名'>
<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>
</div>
</template>
<script>
import moment from 'moment'
import {adoptOneSeeResumeList, serchList,downloadone,sousuoList,seedetail,PASS,OPTION,deleteREsume,downloadOne,exportLIST,recodeLIST,addinterview,TODORes,getEmailMoo,getEmailContent} from '../../api/resume.server.js'
import {adoptOneSeeResumeList, serchList,downloadone,sousuoList,seedetail,PASS,OPTION,deleteREsume,downloadOne,exportLIST,recodeLIST,addinterview,TODORes,getEmailMoo,getEmailContent, findCompanyEmailByKey,forwardResume } from '../../api/resume.server.js'
import {
sapi
} from '../../config'
import ckeditor from '../../components/ckeditor'
import {mapState} from 'vuex'
export default {
data(){
const validator = (rule, value, callback) => {
if (!value)this.$Notice.warning({title: '提示',desc: '请输入您要通知的面试官'})
callback()
}
return {
ruleInline: {
UpdateOWER: [
......@@ -389,6 +431,15 @@ export default {
Enclosure:[],//附件
templateContent:'',//模板内容
},
transpondFrom: {
interviewerName: ''
},
transpondRule: {
interviewerName: [{required: true, trigger: 'blur', validator: validator}]
},
interviewerList: [{name: 'test', value: '1'}],
loading1: false,
options: [],
fileList:[],
uploadurl:'192.168.28.10',
isShowAll:false,
......@@ -429,6 +480,7 @@ export default {
modal4:false,
modal5:false,
modal7:false,
modal8: false,
optcode:'',
toseename:'',
// UpdateOWER:'',
......@@ -469,9 +521,13 @@ export default {
value:[],
ajaxData: [],
checkData: [],
checkboxList:[]
checkboxList:[],
delateARRALL3: []
}
},
computed:{
...mapState({interviewee: state => state.channelInterviewee})
},
components:{
ckeditor
},
......@@ -491,12 +547,13 @@ export default {
},
//全选与反选
checkedAll: function() {
if(this.ajaxData.length==0){
this.checkboxList=[]
}
// if(this.ajaxData.length==0){
// this.checkboxList=[]
// }
if (this.checked) {//实现反选
this.checkboxList = [];
this.ajaxData.forEach( (item) => {
this.removeInterviewee(item)
this.checkboxList = [];
this.delateARRALL=[];
this.flowStatusarr=[]
......@@ -509,6 +566,7 @@ export default {
}
this.checkboxList = [];
this.ajaxData.forEach( (item) => {
this.addInterviewee(item)
this.checkboxList.push(item.id);
this.delateARRALL.push(item.id);
this.flowStatusarr.push(item.flowStatus)
......@@ -761,20 +819,24 @@ export default {
downloadAll(){},
// 可删除状态下点击
delateR(delateid){
this.delateARRALL2.push(delateid)
this.delateARRALL3 = []
this.delateARRALL3.push(delateid)
this.modal3=true
},
// 删除单条简历
delateONE(){
deleteREsume(this.delateARRALL2).then(res=>{
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)
}
})
},
// 选择input元素
selectInputElement(index,doID,doStatus,sss){
selectInputElement(index,doID,doStatus,sss, item){
sss=!sss
this.emailId=doID
this.ajaxData[index].STATES=sss
......@@ -794,11 +856,13 @@ export default {
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)
}
},
//选择搜索元素
......@@ -929,6 +993,9 @@ export default {
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)
......@@ -989,6 +1056,22 @@ export default {
})
})
},
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
}
})
},
//搜索
SouSuo(page){
page = typeof(page)=='number'?page:1
......@@ -1039,16 +1122,27 @@ export default {
item.ownerWorkYears=item.ownerWorkYears
item.modifyTime=item.modifyTime
item.srcSite=item.srcSite
item.STATES=false
item.STATES=isClick.call(this, item.id)
item.isShow=false
item.optSource=item.optSource
item.modifier=item.modifier
item.c=item.modifier==''?item.modifier:item.modifier.split('_')
item.d=item.c[0]
if (item.STATES) { //以选中
this.checkboxList.push(item.id)
this.delateARRALL.push(item.id);
this.flowStatusarr.push(item.flowStatus)
}
return item
})
}
})
function isClick (id) { // 是否已选中转发
let filterArr = this.interviewee.filter(item => {
return item.id == id
})
return filterArr.length > 0
}
},
// 刷新列表
pushlist(){
......@@ -1127,6 +1221,97 @@ export default {
delateFile(index){
this.fileList.splice(index,1)
},
transpond() { //打开转发简历的modal
if(this.interviewee.length == 0) {
this.$Notice.error({
title: '提示',
desc: '请选择您要转发的简历'
});
return
}
this.$refs.transpondFrom.resetFields()
this.modal8= true
},
sendNotice() {
this.$refs.transpondFrom.validate(valid => {
if(!this.transpondFrom.interviewerName){
console.log('====')
return
}
if (this.interviewee.length < 1) {
this.$Notice.warning({title: '提示',desc: '发送内通为空,请勾选您要发送的简历'})
return
}
console.log('-----')
let resumeIdList = []
this.interviewee.map(item => {
resumeIdList.push(item.id)
})
console.log('=====')
let params = {
resumeIdList,
email: this.transpondFrom.interviewerName
}
console.log('++++',)
forwardResume(params).then(res => {
if (res.success) {
this.clearInterviewee()
this.modal8 = false
this.$Notice.warn({
title: '提示',
desc: '发送成功'
});
} else{
this.$Notice.error({
title: '提示',
desc: '发送失败'
});
this.clearInterviewee()
this.modal8 = false
}
})
})
},
remoteMethod (query) {
if (query !== '') {
this.loading1 = true;
setTimeout(() => {
this.loading1 = false;
let list = []
findCompanyEmailByKey(query).then(res => {
list = res
this.options = list.data.body.filter(item => item.name.toLowerCase().indexOf(query.toLowerCase()) > -1 || item.email.toLowerCase().indexOf(query.toLowerCase()) > -1);
}, 200);
})
} else {
this.options = [];
}
},
removeInterviewee (value) {
let data = {
type: 'channel',
data: value
}
this.$store.dispatch('removeInterviewee', data)
},
addInterviewee (value) {
let data = {
type: 'channel',
data: value
}
this.$store.dispatch('addInterviewee', data)
},
clearInterviewee (value) {
let data = {
type: 'channel',
data: value
}
this.$store.dispatch('clearInterviewee', data)
this.checkboxList = []
this.delateARRALL = []
this.flowStatusarr = []
},
},
watch: {
'$route' (to, from) {
......@@ -1137,6 +1322,7 @@ export default {
optSourceCode:this.$route.params.channelname
}
}
this.clearInterviewee()
this.ajaxData=[]
adoptOneSeeResumeList(parmars).then(res=>{
if(res.data.success==true){
......@@ -1161,16 +1347,27 @@ export default {
item.ownerWorkYears=item.ownerWorkYears
item.modifyTime=item.modifyTime
item.srcSite=item.srcSite
item.STATES=false
item.STATES=isClick.call(this, item.id)
item.isShow=false
item.optSource=item.optSource
item.modifier=item.modifier
item.c=item.modifier==''?item.modifier:item.modifier.split('_')
item.d=item.c[0]
if (item.STATES) { //以选中
this.checkboxList.push(item.id)
this.delateARRALL.push(item.id);
this.flowStatusarr.push(item.flowStatus)
}
return item
})
}
})
function isClick (id) { // 是否已选中转发
let filterArr = this.interviewee.filter(item => {
return item.id == id
})
return filterArr.length > 0
}
},
checkboxList: {
handler: function (val, oldVal) {
......@@ -1194,15 +1391,15 @@ export default {
}
},
deep: true
}
},
},
mounted(){
this.SouSuo()
}
}
</script>
<style scoped>
<style scoped lang='less'>
.channel{
width: 100%;
height: 100%
......@@ -1334,5 +1531,58 @@ select{
.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: -32%;
right: -15px;
}
.badges {
right: -30px;
}
.badges1 {
right: -21px;
}
.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;
}
}
</style>
......@@ -4,8 +4,14 @@ let action = {
cookieTipsShow({commit}, value) {
commit(types.COOKIE_SHOW, value)
},
cookieTipsHide ({commit}, value) {
commit(types.COOKIE_HIDE, value)
addInterviewee ({commit}, value) {
commit(types.ADD_INTERVIEWEE, value)
},
removeInterviewee ({commit}, value) {
commit(types.REMOVE_INTERVIEWEE, value)
},
clearInterviewee ({commit}, value) {
commit(types.CLEAR_INTERVIEWEE, value)
}
}
export default action
\ No newline at end of file
......@@ -6,7 +6,9 @@ import actions from './actions.js'
Vue.use(Vuex)
const state = {
cookieTips: false
cookieTips: false,
interviewee: [],
channelInterviewee: [],
}
export default new Vuex.Store({
mutations,
......
export const COOKIE_SHOW = 'COOKIE_SHOW'
export const COOKIE_HIDE = 'COOKIE_HIDE'
export const ADD_INTERVIEWEE = 'ADD_INTERVIEWEE'
export const REMOVE_INTERVIEWEE = 'REMOVE_INTERVIEWEE'
export const CLEAR_INTERVIEWEE = 'CLEAR_INTERVIEWEE'
import {COOKIE_SHOW, COOKIE_HIDE} from './muationsType'
import {COOKIE_SHOW, COOKIE_HIDE,ADD_INTERVIEWEE,REMOVE_INTERVIEWEE, CLEAR_INTERVIEWEE} from './muationsType'
export default {
[COOKIE_SHOW] (state, value) {
state.cookieTips = value || true
},
[COOKIE_HIDE](state, value) {
state.cookieTips = value || false
},
[ADD_INTERVIEWEE] (state, object) {
let flag = false
let data = object.data
if (object.type=='channel') {
console.log(data)
state.channelInterviewee.map(item => {
if (data&&item.id == data.id) {
flag = true
return
}
})
if (!flag) {
state.channelInterviewee.push(data)
}
} else {
state.interviewee.map(item => {
if (data&&item.id == data.id) {
flag = true
return
}
})
if (!flag) {
state.interviewee.push(data)
}
}
},
[REMOVE_INTERVIEWEE](state, object) {
let data = object.data
if (object.type=='channel') {
state.channelInterviewee.map((item, index) => {
if (data&&item.id == data.id) {
state.channelInterviewee.splice(index, 1)
}
})
} else {
state.interviewee.map((item, index) => {
if (data&&item.id == data.id) {
state.interviewee.splice(index, 1)
}
})
}
},
[CLEAR_INTERVIEWEE](state, object) {
let type = object.type
if (type == 'channel') {
state.channelInterviewee = []
console.log('===')
} else {
state.interviewee = []
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment