徐桐章 4 years ago
parent
commit
2ca3e76a27

+ 40 - 33
src/views/candidateManage/candidateAll.vue

@@ -4,7 +4,7 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-30 10:17:25
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-08-03 11:51:16
+ * @LastEditTime: 2020-08-05 20:09:41
 -->
 <template>
   <div class="indexPage">
@@ -14,11 +14,11 @@
       :tableList="tableList"
       :sortType="true"
       :queryData="queryData"
-      :form="form"
+      :form="searchForm"
       @details="details"
     ></v-table>
     <v-pager @page="callPage" :total="totalrecords"></v-pager>
-    <resume :dialogFormVisible="dialogFormVisible" :close="close" :info="info"></resume>
+    <resume :dialogFormVisible="dialogFormVisible" :close="close" :info="info" :searchForm="searchForm" :queryData="queryData"></resume>
   </div>
 </template>
 
@@ -32,7 +32,7 @@ export default {
       page: 1,
       totalrecords: 0,
       pickList: [],
-      form: {},
+      searchForm: {},
       info: {},
       list: [
         {
@@ -49,18 +49,16 @@ export default {
           type: 'select',
           placeholder: '来源',
           props: 'resumeFrom',
-          options: [{ label: '51job', value: 0 }, { label: '智联', value: 1 }]
+          options: [{ label: '51job', value: 0 }, { label: '智联', value: 1 }, { label: '58同城', value: 2 }]
         },
         {
-          type: 'select',
-          placeholder: '投递职位',
-          props: 'positionApplied',
-          options: []
+          placeholder: '请输入投递职位',
+          props: 'positionApplied'
         },
         {
           type: 'select',
           placeholder: '应聘职位',
-          props: '',
+          props: 'desiredPositionId',
           options: []
         }
       ],
@@ -76,7 +74,7 @@ export default {
         column: [
           {
             label: '编号',
-            props: ''
+            props: 'id'
           },
           {
             label: '姓名',
@@ -89,11 +87,13 @@ export default {
           },
           {
             label: '简历来源',
-            props: ''
+            props: 'resumeFrom',
+            options: ['51job', '智联招聘', '58同城']
           },
           {
             label: '招聘类型',
-            props: ''
+            props: 'recruitType',
+            options: ['社招', '校招', '直接校招']
           },
           {
             label: '简历投递职位',
@@ -101,7 +101,7 @@ export default {
           },
           {
             label: '简历状态',
-            props: 'status'
+            props: ''
           },
           {
             label: '工作年限',
@@ -109,7 +109,7 @@ export default {
           },
           {
             label: '学历',
-            props: ''
+            props: 'delivererEducation'
           },
           {
             label: '联系电话',
@@ -117,23 +117,25 @@ export default {
           },
           {
             label: '面试应聘职位',
-            props: ''
+            props: 'desiredPositionId'
           },
           {
             label: '通知面试时间',
-            props: ''
+            props: 'sendMailTime'
           },
           {
             label: '完成面试时间',
-            props: ''
+            props: 'confirmInterviewTime'
           },
           {
             label: '面试状态',
-            props: ''
+            props: 'interviewStatus',
+            options: ['未面试', '已面试']
           },
           {
             label: '面试结果',
-            props: ''
+            props: 'isPass',
+            options: ['未通过', '已通过', '已淘汰']
           }
         ],
         fixed: true,
@@ -153,14 +155,15 @@ export default {
   },
   mounted () {
     this.queryData()
+    this.queryDownList()
   },
   methods: {
     queryData (form = {}) {
       let page = this.page
-      this.form = form
+      this.searchForm = form
       let reqdata = form
       this.$api
-        .post('/resumeInfo/queryResumeList', {
+        .post('/resumeInfo/queryCandidateList', {
           reqdata,
           page
         })
@@ -169,20 +172,24 @@ export default {
           this.tableList = res.list
         })
     },
+    queryDownList () {
+      this.$api
+        .post('/position/queryPositionList', {
+          reqdata: {}
+        })
+        .then((res) => {
+          this.list[4].options = res.list.map((item) => ({
+            value: item.id,
+            label: item.positionName
+          }))
+        })
+    },
     search (form) {
       this.queryData(form)
     },
-    details ({ id }) {
-      // this.$api
-      //   .post('', {
-      //     reqdata: {
-      //       id
-      //     }
-      //   })
-      //   .then((res) => {
+    details (row) {
       this.open()
-      //     this.info = res.object
-      //   })
+      this.info = row
     },
     open () {
       this.dialogFormVisible = true
@@ -193,7 +200,7 @@ export default {
     },
     callPage (val) {
       this.page = val
-      this.queryData(this.form)
+      this.queryData(this.searchForm)
     }
   }
 }

+ 298 - 70
src/views/candidateManage/candidateList.vue

@@ -4,196 +4,381 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-28 15:25:06
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-08-02 16:48:59
+ * @LastEditTime: 2020-08-05 20:30:04
 -->
 <template>
   <div class="indexPage">
-    <v-input :btn="btn" :list="list" @del="delAll" @search="search"></v-input>
+    <v-input
+      :btn="isCollapse?isCollapse===1?btn1:btn2:btn0"
+      :list="list"
+      :key="isCollapse+3"
+      @del="delAll"
+      @search="search"
+      @through="throughAll"
+      @eliminate="eliminateAll"
+    ></v-input>
     <el-radio-group v-model="isCollapse" style="margin-bottom: 20px;">
+      <el-radio-button :label="0">候选人列表</el-radio-button>
       <el-radio-button :label="1">已通过候选人</el-radio-button>
       <el-radio-button :label="2">已淘汰候选人</el-radio-button>
     </el-radio-group>
     <v-table
       :key="isCollapse"
-      :table="table"
+      :table="isCollapse===2?table2:table"
       :tableList="tableList"
       :sortType="true"
+      :form="searchForm"
       :queryData="queryData"
-      :form="form"
       @details="details"
-      @update="update"
+      @eliminate="eliminate"
+      @through="through"
+      @del="del"
       @selection-change="selection"
-      id=""
+      id="id"
     ></v-table>
     <v-pager @page="callPage" :total="totalrecords"></v-pager>
+    <resume :dialogFormVisible="dialogVisible" :close="closeDia" :info="info" :searchForm="searchForm" :queryData="queryData"></resume>
   </div>
 </template>
 
 <script>
+import resume from './resume'
 export default {
   data () {
     return {
+      dialogFormVisible: false,
+      dialogVisible: false,
       tableList: [],
       page: 1,
-      sortRule: {},
-      isCollapse: 1,
+      isCollapse: 0,
       totalrecords: 0,
       pickList: [],
+      downList: [],
+      searchForm: {},
       form: {},
+      info: {},
+      rules: {
+        templateId: [
+          { required: true, message: '请选择群发模板', trigger: 'blur' }
+        ]
+      },
       list: [
         {
           placeholder: '请输入关键字查询',
-          props: ''
+          props: 'condition'
         },
         {
           type: 'select',
           placeholder: '性别',
-          props: '',
-          options: [{ label: '男', value: 1 }, { label: '女', value: 0 }]
+          props: 'delivererSex',
+          options: [
+            { label: '男', value: 1 },
+            { label: '女', value: 0 }
+          ]
         },
         {
           type: 'select',
           placeholder: '来源',
-          props: '',
-          options: []
+          props: 'resumeFrom',
+          options: [
+            { label: '51job', value: 0 },
+            { label: '智联', value: 1 },
+            { label: '58同城', value: 2 }
+          ]
         },
         {
-          type: 'select',
-          placeholder: '投递职位',
-          props: '',
-          options: []
+          placeholder: '请输入投递职位',
+          props: 'positionApplied'
         },
         {
           type: 'select',
           placeholder: '应聘职位',
-          props: '',
+          props: 'desiredPositionId',
           options: []
         },
         {
           type: 'date'
         }
       ],
-      btn: [
+      btn0: [
         {
           name: '确定',
           type: 'primary',
+          method: 'search'
+        },
+        {
+          name: '标记通过',
+          type: 'success',
+          method: 'through'
+        },
+        {
+          name: '标记淘汰',
+          type: 'danger',
+          method: 'eliminate'
+        }
+      ],
+      btn1: [
+        {
+          name: '确定',
+          type: 'primary',
+          method: 'search'
+        },
+        {
+          name: '通知成功',
+          type: 'success',
           method: ''
         }
       ],
+      btn2: [
+        {
+          name: '确定',
+          type: 'primary',
+          method: 'search'
+        },
+        {
+          name: '标记通过',
+          type: 'success',
+          method: 'through'
+        },
+        {
+          name: '删除',
+          type: 'danger',
+          method: 'del'
+        }
+      ],
       table: {
         selection: true,
         column: [
           {
             label: '编号',
-            props: ''
+            props: 'id'
           },
           {
             label: '姓名',
-            props: ''
+            props: 'delivererName'
+          },
+          {
+            label: '性别',
+            props: 'delivererSex',
+            options: ['女', '男']
           },
           {
             label: '简历来源',
-            props: ''
+            props: 'resumeFrom',
+            options: ['51job', '智联招聘', '58同城']
           },
           {
-            label: '简历投递时间',
-            props: ''
+            label: '招聘类型',
+            props: 'recruitType',
+            options: ['社招', '校招', '直接校招']
           },
           {
             label: '简历投递职位',
-            props: ''
+            props: 'positionApplied'
+          },
+          {
+            label: '面试应聘职位',
+            props: 'desiredPositionId'
           },
           {
             label: '工作年限',
-            props: ''
+            props: 'delivererWorkExp'
           },
           {
             label: '学历',
-            props: ''
+            props: 'delivererEducation'
           },
           {
             label: '联系电话',
-            props: ''
+            props: 'delivererPhone'
+          },
+          {
+            label: '通知面试时间',
+            props: 'sendMailTime'
+          },
+          {
+            label: '完成面试时间',
+            props: 'confirmInterviewTime'
           }
         ],
+        width: 310,
         handle: [
           {
             title: '查看简历',
-            method: '',
+            method: 'details',
             type: 'info'
           },
           {
-            title: '通知面试',
-            method: '',
+            title: '标记通过',
+            method: 'through',
+            type: 'success'
+          },
+          {
+            title: '标记淘汰',
+            method: 'eliminate',
+            type: 'danger'
+          }
+        ]
+      },
+      table2: {
+        selection: true,
+        column: [
+          {
+            label: '编号',
+            props: 'id'
+          },
+          {
+            label: '姓名',
+            props: 'delivererName'
+          },
+          {
+            label: '性别',
+            props: 'delivererSex',
+            options: ['女', '男']
+          },
+          {
+            label: '简历来源',
+            props: 'resumeFrom',
+            options: ['51job', '智联招聘', '58同城']
+          },
+          {
+            label: '简历投递职位',
+            props: 'positionApplied'
+          },
+          {
+            label: '面试应聘职位',
+            props: 'desiredPositionId'
+          },
+          {
+            label: '工作年限',
+            props: 'delivererWorkExp'
+          },
+          {
+            label: '学历',
+            props: 'delivererEducation'
+          },
+          {
+            label: '联系电话',
+            props: 'delivererPhone'
+          },
+          {
+            label: '被标记未通过时间',
+            props: 'rejectTime'
+          },
+          {
+            label: '理由',
+            props: 'rejectReason'
+          }
+        ],
+        width: 300,
+        handle: [
+          {
+            title: '查看简历',
+            method: 'details',
             type: 'info'
           },
           {
             title: '标记通过',
-            method: '',
-            type: 'info'
+            method: 'through',
+            type: 'success'
           },
           {
-            title: '标记淘汰',
-            method: '',
-            type: 'warning'
+            title: '删除',
+            method: 'del',
+            type: 'danger'
           }
         ]
       }
     }
   },
   mounted () {
-    // this.queryData()
+    this.queryData()
+    this.queryDownList()
+  },
+  components: {
+    resume
   },
   methods: {
-    queryData (form = { conditions: '' }, sort = {}) {
+    queryData (form = {}) {
       let page = this.page
-      this.sortRule = sort
-      this.form = form
-      let reqdata = Object.assign({}, form, sort)
+      this.searchForm = form
+      let reqdata = form
+      reqdata.interviewResult = this.isCollapse
       this.$api
-        .post('', {
+        .post('/resumeInfo/queryCandidateList', {
           reqdata,
           page
         })
         .then((res) => {
           this.totalrecords = res.totalrecords
-          this.tableList = res.list.map((item) => {
-            item.ctx = item.infoContent
-              ? item.infoContent.length > 15
-                ? item.infoContent.replace(/<[^>]+>/g, '').slice(0, 15) + '...'
-                : item.infoContent.replace(/<[^>]+>/g, '').slice(0, 15)
-              : ''
-            return item
-          })
+          this.tableList = res.list
+        })
+    },
+    queryDownList () {
+      this.$api
+        .post('/position/queryPositionList', {
+          reqdata: {}
+        })
+        .then((res) => {
+          this.list[4].options = res.list.map((item) => ({
+            value: item.id,
+            label: item.positionName
+          }))
+        })
+      this.$api
+        .post('/template/queryTemplateList', {
+          reqdata: {}
+        })
+        .then((res) => {
+          this.downList = res.list
         })
     },
-    search (form, sortRule) {
-      this.queryData(form, sortRule)
+    search (form) {
+      this.queryData(form)
     },
     details (row) {
-      this.dialogVisible = true
-      this.querydetail(row.infoId)
+      this.openDia()
+      this.info = row
+    },
+    through (row, type = false) {
+      let ids = type ? row : [row.id]
+      let resumeInfoStatusList = ids.map(item => ({ id: item, interviewResult: 1 }))
+      this.$api
+        .post('/resumeInfo/changeInterviewResult', {
+          reqdata: {
+            resumeInfoStatusList
+          }
+        })
+        .then((res) => {
+          this.queryData(this.searchForm)
+        })
     },
-    update (row) {
-      this.type = 1
-      this.querydetail(row.infoId)
-      this.openDiaLog()
+    throughAll () {
+      this.pickList.length
+        ? this.through(this.pickList, true)
+        : this.$message({ type: 'info', message: '请选择通过的应聘者' })
     },
-    querydetail (infoId) {
+    eliminate (row, type = false) {
+      let ids = type ? row : [row.id]
+      let resumeInfoStatusList = ids.map(item => ({ id: item, interviewResult: 2 }))
       this.$api
-        .post('/platform/information/platformGetInformation', {
+        .post('/resumeInfo/changeInterviewResult', {
           reqdata: {
-            infoId
+            resumeInfoStatusList
           }
         })
         .then((res) => {
-          let obj = res.object
-          // obj.createtime = this.$utils.format(res.object.createtime)
-          this.info = obj
+          this.queryData(this.searchForm)
         })
     },
+    eliminateAll () {
+      this.pickList.length
+        ? this.eliminate(this.pickList, true)
+        : this.$message({ type: 'info', message: '请选择被淘汰的应聘者' })
+    },
     del (row, type = false) {
-      let id = type ? row : [row.infoId]
+      let ids = type ? row : [row.id]
+      let deleteResumeInfoList = ids.map(item => ({ id: item, status: 1 }))
       this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -201,13 +386,13 @@ export default {
       })
         .then(() => {
           this.$api
-            .post('/platform/information/platformDeleteInformation', {
+            .post('/resumeInfo/deleteResumeInfo', {
               reqdata: {
-                id
+                deleteResumeInfoList
               }
             })
             .then((res) => {
-              this.queryData(this.form, this.sortRule)
+              this.queryData(this.searchForm)
               this.$message({
                 type: 'success',
                 message: '删除成功!'
@@ -227,11 +412,54 @@ export default {
         : this.$message({ type: 'info', message: '请选择需要删除的内容' })
     },
     selection (val) {
-      this.pickList = val
+      this.$set(this.$data, 'pickList', val)
+    },
+    closeDia () {
+      this.dialogVisible = false
+    },
+    openDia () {
+      this.dialogVisible = true
     },
     callPage (val) {
       this.page = val
-      this.queryData(this.form, this.sortRule)
+      this.queryData(this.searchForm)
+    }
+  },
+  watch: {
+    isCollapse () {
+      this.queryData(this.searchForm)
+      this.isCollapse === 1
+        ? this.$set(this.table, 'handle', [
+          {
+            title: '查看简历',
+            method: 'details',
+            type: 'info'
+          },
+          {
+            title: '通知成功',
+            method: '',
+            type: 'success'
+          }
+        ])
+        : this.isCollapse === 0 && this.$set(this.table, 'handle',
+          [
+            {
+              title: '查看简历',
+              method: 'details',
+              type: 'info'
+            },
+            {
+              title: '标记通过',
+              method: 'through',
+              type: 'success'
+            },
+            {
+              title: '标记淘汰',
+              method: 'eliminate',
+              type: 'danger'
+            }
+          ]
+        )
     }
   }
 }

+ 50 - 8
src/views/candidateManage/resume.vue

@@ -4,7 +4,7 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-30 10:32:00
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-08-03 11:10:21
+ * @LastEditTime: 2020-08-05 20:23:31
 -->
 <template>
     <div>
@@ -12,7 +12,7 @@
             <div class="flex">
                 <div class="left">
                     <div class="top">
-                        <div class="title">小八的面试视频:</div>
+                        <div class="title">{{info.delivererName}}的面试视频:</div>
                         <div class="video">
                             <video width="100%" controls :src="$img + '/yc1min/videoLibrary/20200729/86a4a324-7e90-415d-9685-41e2f4a75c03.mp4'"></video>
                         </div>
@@ -31,17 +31,17 @@
                             :rows="4"
                             resize="none"
                             placeholder="请输入内容"
-                            v-model="positionIntroduce"
+                            v-model="remark"
                         ></el-input>
                     </div>
                     <div class="footer">
-                        <el-button type="primary" @click="close">提交备注</el-button>
-                        <el-button type="danger" >标记为未通过</el-button>
-                        <el-button type="success" >标记为通过</el-button>
+                        <el-button type="primary" @click="submit">提交备注</el-button>
+                        <el-button type="danger" @click="through(2)">标记为未通过</el-button>
+                        <el-button type="success" @click="through(1)">标记为通过</el-button>
                     </div>
                 </div>
                 <div class="right">
-                    <iframe width="100%" height="100%" :src="$img + '/yc1min/resume/resume.html'"></iframe>
+                    <iframe width="100%" height="100%" :src="$img + info.filePath"></iframe>
                 </div>
             </div>
         </el-dialog>
@@ -52,7 +52,7 @@
 export default {
   data () {
     return {
-      positionIntroduce: '',
+      remark: '',
       active: 0
     }
   },
@@ -68,9 +68,51 @@ export default {
     info: {
       type: Object,
       default: () => {}
+    },
+    searchForm: {
+      type: Object,
+      default: () => {}
+    },
+    queryData: {
+      type: Function,
+      default: () => {}
+    }
+  },
+  methods: {
+    through (val) {
+      let deleteResumeInfoList = [this.info.id].map(item => ({ id: item, isPass: val }))
+      this.$api
+        .post('/resumeInfo/changeInterviewResult', {
+          reqdata: {
+            deleteResumeInfoList
+          }
+        })
+        .then((res) => {
+          this.close()
+          this.queryData(this.searchForm)
+        })
+    },
+    submit () {
+      this.$api
+        .post('/resumeInfo/addRemakes', {
+          reqdata: {
+            id: this.info.id,
+            remark: this.remark
+          }
+        })
+        .then((res) => {
+          this.close()
+          this.queryData(this.searchForm)
+        })
+    }
+  },
+  watch: {
+    info () {
+      this.remark = this.info.remark
     }
   }
 }
+
 </script>
 
 <style lang="scss" scoped>

+ 44 - 21
src/views/candidateManage/resumeList.vue

@@ -4,7 +4,7 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-30 09:53:19
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-08-03 16:30:53
+ * @LastEditTime: 2020-08-05 16:36:16
 -->
 <template>
   <div class="indexPage">
@@ -44,7 +44,7 @@
       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">
           <div class="title">通知群发列表</div>
@@ -122,10 +122,8 @@ export default {
           ]
         },
         {
-          type: 'select',
-          placeholder: '投递职位',
-          props: 'positionApplied',
-          options: []
+          placeholder: '请输入投递职位',
+          props: 'positionApplied'
         }
       ],
       btn: [
@@ -301,6 +299,27 @@ export default {
       let page = this.page
       this.searchForm = form
       let reqdata = form
+      // reqdata.isPass = this.isCollapse === 1 ? 0 : this.isCollapse === 2 ? 1 : this.isCollapse === 3 ? 1 : this.is
+      switch (this.isCollapse) {
+        case 1:
+          reqdata.isPass = 0
+          reqdata.isSendInviteMail = 0
+          break
+        case 2:
+          reqdata.isPass = 1
+          reqdata.isSendInviteMail = 0
+          break
+        case 3:
+          reqdata.isPass = 1
+          reqdata.isSendInviteMail = 1
+          break
+        case 4:
+          reqdata.isPass = 2
+          reqdata.isSendInviteMail = 0
+          break
+        default:
+          break
+      }
       this.$api
         .post('/resumeInfo/queryResumeList', {
           reqdata,
@@ -319,16 +338,16 @@ 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
-          }))
-        })
+      // this.$api
+      //   .post('/position/queryPositionList', {
+      //     reqdata: {}
+      //   })
+      //   .then((res) => {
+      //     this.list[3].options = res.list.map((item) => ({
+      //       value: item.id,
+      //       label: item.positionName
+      //     }))
+      //   })
     },
     search (form) {
       this.queryData(form)
@@ -379,10 +398,11 @@ export default {
     },
     through (row, type = false) {
       let ids = type ? row : [row.id]
+      let deleteResumeInfoList = ids.map(item => ({ id: item, isPass: 1 }))
       this.$api
         .post('/resumeInfo/changeReadType', {
           reqdata: {
-            ids
+            deleteResumeInfoList
           }
         })
         .then((res) => {
@@ -396,10 +416,11 @@ export default {
     },
     eliminate (row, type = false) {
       let ids = type ? row : [row.id]
+      let deleteResumeInfoList = ids.map(item => ({ id: item, isPass: 2 }))
       this.$api
         .post('/resumeInfo/changeReadType', {
           reqdata: {
-            ids
+            deleteResumeInfoList
           }
         })
         .then((res) => {
@@ -413,6 +434,7 @@ export default {
     },
     del (row, type = false) {
       let ids = type ? row : [row.id]
+      let deleteResumeInfoList = ids.map(item => ({ id: item, status: 1 }))
       this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -422,7 +444,7 @@ export default {
           this.$api
             .post('/resumeInfo/deleteResumeInfo', {
               reqdata: {
-                ids
+                deleteResumeInfoList
               }
             })
             .then((res) => {
@@ -454,7 +476,7 @@ export default {
     close () {
       this.dialogFormVisible = false
       this.form = {}
-      this.copyPickList = Array.from(JSON.parse(JSON.stringify(this.pickList)))
+      this.copyPickList = Array.from(this.pickList)
     },
     callPage (val) {
       this.page = val
@@ -463,9 +485,10 @@ export default {
   },
   watch: {
     pickList () {
-      this.copyPickList = Array.from(JSON.parse(JSON.stringify(this.pickList)))
+      this.copyPickList = Array.from(this.pickList)
     },
     isCollapse () {
+      this.queryData(this.searchForm)
       this.$set(
         this.table,
         'handle',