|
@@ -4,11 +4,19 @@
|
|
|
* @Autor: XuTongZhang
|
|
|
* @Date: 2020-07-30 09:53:19
|
|
|
* @LastEditors: XuTongZhang
|
|
|
- * @LastEditTime: 2020-07-31 19:43:48
|
|
|
+ * @LastEditTime: 2020-08-02 16:59:20
|
|
|
-->
|
|
|
<template>
|
|
|
<div class="indexPage">
|
|
|
- <v-input :btn="btn" :list="list" @del="delAll" @notice="noticeAll" @through="throughAll" @eliminate="eliminateAll" @search="search"></v-input>
|
|
|
+ <v-input
|
|
|
+ :btn="btn"
|
|
|
+ :list="list"
|
|
|
+ @del="delAll"
|
|
|
+ @notice="noticeAll"
|
|
|
+ @through="throughAll"
|
|
|
+ @eliminate="eliminateAll"
|
|
|
+ @search="search"
|
|
|
+ ></v-input>
|
|
|
<el-radio-group v-model="isCollapse" style="margin-bottom: 20px;">
|
|
|
<el-radio-button :label="1">未读简历</el-radio-button>
|
|
|
<el-radio-button :label="2">已通过简历</el-radio-button>
|
|
@@ -21,7 +29,7 @@
|
|
|
:tableList="tableList"
|
|
|
:sortType="true"
|
|
|
:queryData="queryData"
|
|
|
- :form="form"
|
|
|
+ :form="searchForm"
|
|
|
@details="details"
|
|
|
@notice="notice"
|
|
|
@through="through"
|
|
@@ -31,19 +39,23 @@
|
|
|
id="id"
|
|
|
></v-table>
|
|
|
<v-pager @page="callPage" :total="totalrecords"></v-pager>
|
|
|
- <el-dialog :visible.sync="dialogFormVisible" width="600px" :before-close="close" :show-close="false">
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="dialogFormVisible"
|
|
|
+ width="600px"
|
|
|
+ :before-close="close"
|
|
|
+ :show-close="false"
|
|
|
+ >
|
|
|
<el-form :model="form" ref="form" label-width="140px" :rules="rules" label-position="left">
|
|
|
- <el-form-item label-width="0" prop="pickList">
|
|
|
+ <el-form-item label-width="0">
|
|
|
<div class="title">通知群发列表</div>
|
|
|
<div class="content">
|
|
|
<el-tag
|
|
|
- v-for="(item, index) in pickList"
|
|
|
+ v-for="(item, index) in copyPickList"
|
|
|
:key="item"
|
|
|
closable
|
|
|
- @close="pickList.splice(index, 1)"
|
|
|
- type="success">
|
|
|
- {{tableList.find(i => i.id === item).delivererName}}
|
|
|
- </el-tag>
|
|
|
+ @close="copyPickList.splice(index, 1)"
|
|
|
+ type="success"
|
|
|
+ >{{tableList.find(i => i.id === item).delivererName}}</el-tag>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="选择群发模板" prop="templateId">
|
|
@@ -57,9 +69,7 @@
|
|
|
</el-select>
|
|
|
<!-- <div v-else>{{this.downList1.some(i => i.id === form.processId) ? this.downList1.find(i => i.id === form.processId).processName : ''}}</div> -->
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="群发邮箱">
|
|
|
- 139820930@qq.com
|
|
|
- </el-form-item>
|
|
|
+ <el-form-item label="群发邮箱">139820930@qq.com</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="launch">立即发出</el-button>
|
|
|
</el-form-item>
|
|
@@ -71,28 +81,21 @@
|
|
|
<script>
|
|
|
export default {
|
|
|
data () {
|
|
|
- let validcodeName = (rule, value, callback) => {
|
|
|
- if (!value.length) {
|
|
|
- callback(new Error('通知对象数不能零'))
|
|
|
- } else {
|
|
|
- callback()
|
|
|
- }
|
|
|
- }
|
|
|
return {
|
|
|
tableList: [],
|
|
|
dialogFormVisible: false,
|
|
|
page: 1,
|
|
|
- sortRule: {},
|
|
|
isCollapse: 1,
|
|
|
totalrecords: 0,
|
|
|
pickList: [],
|
|
|
+ copyPickList: [],
|
|
|
downList: [],
|
|
|
form: {},
|
|
|
+ searchForm: {},
|
|
|
rules: {
|
|
|
- pickList: [
|
|
|
- { required: true, validator: validcodeName, trigger: 'blur' }
|
|
|
- ],
|
|
|
- templateId: [{ required: true, message: '请选择群发模板', trigger: 'blur' }]
|
|
|
+ templateId: [
|
|
|
+ { required: true, message: '请选择群发模板', trigger: 'blur' }
|
|
|
+ ]
|
|
|
},
|
|
|
list: [
|
|
|
{
|
|
@@ -112,7 +115,10 @@ export default {
|
|
|
type: 'select',
|
|
|
placeholder: '来源',
|
|
|
props: 'resumeFrom',
|
|
|
- options: [{ label: '51job', value: 0 }, { label: '智联', value: 1 }]
|
|
|
+ options: [
|
|
|
+ { label: '51job', value: 0 },
|
|
|
+ { label: '智联', value: 1 }
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
type: 'select',
|
|
@@ -189,7 +195,6 @@ export default {
|
|
|
}
|
|
|
],
|
|
|
width: 500,
|
|
|
- fixed: true,
|
|
|
handle: [
|
|
|
{
|
|
|
title: '查看简历',
|
|
@@ -263,7 +268,6 @@ export default {
|
|
|
}
|
|
|
],
|
|
|
width: 300,
|
|
|
- fixed: true,
|
|
|
handle: [
|
|
|
{
|
|
|
title: '查看简历',
|
|
@@ -291,6 +295,7 @@ export default {
|
|
|
methods: {
|
|
|
queryData (form = {}) {
|
|
|
let page = this.page
|
|
|
+ this.searchForm = form
|
|
|
let reqdata = form
|
|
|
this.$api
|
|
|
.post('/resumeInfo/queryResumeList', {
|
|
@@ -310,12 +315,21 @@ export default {
|
|
|
.then((res) => {
|
|
|
this.downList = res.list
|
|
|
})
|
|
|
+ this.$api
|
|
|
+ .post('/position/queryPositionList', {
|
|
|
+ reqdata: {}
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.list[3].options = res.list.map((item) => ({
|
|
|
+ value: item.id,
|
|
|
+ label: item.positionName
|
|
|
+ }))
|
|
|
+ })
|
|
|
},
|
|
|
- search (form, sortRule) {
|
|
|
+ search (form) {
|
|
|
this.queryData(form)
|
|
|
},
|
|
|
details ({ id }) {
|
|
|
- // this.open()
|
|
|
this.$api
|
|
|
.post('/resumeInfo/queryResumeInfoDetail', {
|
|
|
reqdata: {
|
|
@@ -327,36 +341,37 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
launch () {
|
|
|
- let reqdata = { id: this.pickList }
|
|
|
- this.$api
|
|
|
- .post('/resumeInfo/queryResumeInfoDetail', {
|
|
|
- reqdata
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- window.open(this.$img + res.object.filePath)
|
|
|
- })
|
|
|
- },
|
|
|
- notice (row, type = false) {
|
|
|
- let ids = type ? row : [row.id]
|
|
|
- this.$api
|
|
|
- .post('/resumeInfo/sendInviteMail', {
|
|
|
- reqdata: {
|
|
|
- ids
|
|
|
- }
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- this.$message({
|
|
|
- message: '通知成功',
|
|
|
- type: 'success'
|
|
|
+ let a
|
|
|
+ this.$refs['form'].validate((valid) => {
|
|
|
+ a = valid
|
|
|
+ })
|
|
|
+ if (!a) return
|
|
|
+ this.copyPickList.length
|
|
|
+ ? this.$api
|
|
|
+ .post('/resumeInfo/sendInviteMail', {
|
|
|
+ reqdata: {
|
|
|
+ ids: this.copyPickList,
|
|
|
+ templateId: this.form.templateId
|
|
|
+ }
|
|
|
})
|
|
|
- this.queryData(this.form)
|
|
|
- })
|
|
|
+ .then((res) => {
|
|
|
+ this.$message({
|
|
|
+ message: '通知成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.close()
|
|
|
+ this.queryData(this.searchForm)
|
|
|
+ })
|
|
|
+ : this.$message({ type: 'info', message: '请添加需要通知的对象' })
|
|
|
+ },
|
|
|
+ notice (row) {
|
|
|
+ this.open()
|
|
|
+ this.copyPickList = [row.id]
|
|
|
},
|
|
|
noticeAll () {
|
|
|
this.pickList.length
|
|
|
- // ? this.notice(this.pickList, true)
|
|
|
? this.open()
|
|
|
- : this.$message({ type: 'info', message: '请选择需要通知的内容' })
|
|
|
+ : this.$message({ type: 'info', message: '请选择需要通知的对象' })
|
|
|
},
|
|
|
through (row, type = false) {
|
|
|
let ids = type ? row : [row.id]
|
|
@@ -367,12 +382,12 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- this.queryData(this.form)
|
|
|
+ this.queryData(this.searchForm)
|
|
|
})
|
|
|
},
|
|
|
throughAll () {
|
|
|
this.pickList.length
|
|
|
- ? this.through(this.pickList, true)
|
|
|
+ ? this.through(this.copyPickList, true)
|
|
|
: this.$message({ type: 'info', message: '请选择通过的应聘者' })
|
|
|
},
|
|
|
eliminate (row, type = false) {
|
|
@@ -384,7 +399,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- this.queryData(this.form)
|
|
|
+ this.queryData(this.searchForm)
|
|
|
})
|
|
|
},
|
|
|
eliminateAll () {
|
|
@@ -407,7 +422,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- this.queryData(this.form, this.sortRule)
|
|
|
+ this.queryData(this.searchForm)
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
message: '删除成功!'
|
|
@@ -434,21 +449,180 @@ export default {
|
|
|
},
|
|
|
close () {
|
|
|
this.dialogFormVisible = false
|
|
|
+ this.form = {}
|
|
|
+ this.copyPickList = Array.from(JSON.parse(JSON.stringify(this.pickList)))
|
|
|
},
|
|
|
callPage (val) {
|
|
|
this.page = val
|
|
|
- this.queryData(this.form)
|
|
|
+ this.queryData(this.searchForm)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ pickList () {
|
|
|
+ this.copyPickList = Array.from(JSON.parse(JSON.stringify(this.pickList)))
|
|
|
+ },
|
|
|
+ isCollapse () {
|
|
|
+ this.$set(
|
|
|
+ this.table,
|
|
|
+ 'handle',
|
|
|
+ this.isCollapse === 1
|
|
|
+ ? [
|
|
|
+ {
|
|
|
+ title: '查看简历',
|
|
|
+ method: 'details',
|
|
|
+ type: 'info'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '通知面试',
|
|
|
+ method: 'notice',
|
|
|
+ type: 'success'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '标记通过',
|
|
|
+ method: 'through',
|
|
|
+ type: 'primary'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '标记淘汰',
|
|
|
+ method: 'eliminate',
|
|
|
+ type: 'warning'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '删除',
|
|
|
+ method: 'del',
|
|
|
+ type: 'danger'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ : this.isCollapse === 2
|
|
|
+ ? [
|
|
|
+ {
|
|
|
+ title: '查看简历',
|
|
|
+ method: 'details',
|
|
|
+ type: 'info'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '标记通过',
|
|
|
+ method: 'through',
|
|
|
+ type: 'primary'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '标记淘汰',
|
|
|
+ method: 'eliminate',
|
|
|
+ type: 'warning'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '删除',
|
|
|
+ method: 'del',
|
|
|
+ type: 'danger'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ : [
|
|
|
+ {
|
|
|
+ title: '查看简历',
|
|
|
+ method: 'details',
|
|
|
+ type: 'info'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '通知面试',
|
|
|
+ method: 'notice',
|
|
|
+ type: 'success'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '标记通过',
|
|
|
+ method: 'through',
|
|
|
+ type: 'primary'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '删除',
|
|
|
+ method: 'del',
|
|
|
+ type: 'danger'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ )
|
|
|
+ this.$set(
|
|
|
+ this.$data,
|
|
|
+ 'btn',
|
|
|
+ this.isCollapse === 1
|
|
|
+ ? [
|
|
|
+ {
|
|
|
+ name: '确定',
|
|
|
+ type: 'primary',
|
|
|
+ method: 'search'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '通知面试',
|
|
|
+ type: 'success',
|
|
|
+ method: 'notice'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '标记通过',
|
|
|
+ type: 'primary',
|
|
|
+ method: 'through'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '标题淘汰',
|
|
|
+ type: 'warning',
|
|
|
+ method: 'eliminate'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ : this.isCollapse === 2
|
|
|
+ ? [
|
|
|
+ {
|
|
|
+ name: '确定',
|
|
|
+ type: 'primary',
|
|
|
+ method: 'search'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '标记通过',
|
|
|
+ type: 'primary',
|
|
|
+ method: 'through'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '标题淘汰',
|
|
|
+ type: 'warning',
|
|
|
+ method: 'eliminate'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ : this.isCollapse === 3
|
|
|
+ ? [
|
|
|
+ {
|
|
|
+ name: '删除',
|
|
|
+ type: 'danger',
|
|
|
+ method: 'del'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ : [
|
|
|
+ {
|
|
|
+ name: '确定',
|
|
|
+ type: 'primary',
|
|
|
+ method: 'search'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '标记通过',
|
|
|
+ type: 'primary',
|
|
|
+ method: 'through'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '删除',
|
|
|
+ type: 'danger',
|
|
|
+ method: 'del'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ )
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- .title {
|
|
|
- font-size: 20px;
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
- .content {
|
|
|
- min-height: 30px;
|
|
|
+.title {
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+.content {
|
|
|
+ min-height: 50px;
|
|
|
+ > span {
|
|
|
+ margin: 5px;
|
|
|
}
|
|
|
+}
|
|
|
</style>
|