徐桐章 4 years ago
parent
commit
b17cdbf38f

+ 38 - 4
src/common/api/axios.js

@@ -2,7 +2,7 @@
  * @Author       : yuanrunwei
  * @Date         : 2020-05-18 12:05:37
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-08-10 19:58:38
+ * @LastEditTime: 2020-08-12 11:55:58
  * @FilePath     : \batterycloud-admin\src\common\api\axios.js
  */
 import axios from 'axios'
@@ -12,9 +12,9 @@ import { Message, Loading } from 'element-ui'
 let api = ''
 let loading
 const whiteList = ['test', 'production']
-// const allowList = [
-//   '/platform/upload/platformUploadImg'
-// ]
+const allowList = [ // 文件请求路径数组
+  '/export/export2Web'
+]
 
 const service = axios.create({
   baseURL: process.env.VUE_APP_API,
@@ -43,6 +43,12 @@ service.interceptors.request.use(
       spinner: 'el-icon-loading',
       background: 'rgba(0, 0, 0, 0.7)'
     })
+    if (allowList.includes(config.url)) {
+      // config.headers['Content-Type'] = 'application/vnd.ms-excel'
+      // console.log(config)
+      config.responseType = 'blob'
+    }
+
     config.headers['platform-sessionId'] = localStorage.getItem('token')
     api = config.url
     return config
@@ -54,7 +60,35 @@ service.interceptors.request.use(
 
 service.interceptors.response.use(
   res => {
+    console.log(res)
+    let a = false
     return new Promise((resolve, reject) => {
+      allowList.forEach(item => {
+        if (res.config.url === process.env.VUE_APP_API + item) {
+          // resolve(res.data)
+          const content = res.data
+          const blob = new Blob([content])
+          console.log(blob)
+          const fileName = '人才库.xls'
+          if ('download' in document.createElement('a')) { // 非IE下载
+            const elink = document.createElement('a')
+            elink.download = fileName
+            elink.style.display = 'none'
+            elink.href = URL.createObjectURL(blob)
+            document.body.appendChild(elink)
+            elink.click()
+            URL.revokeObjectURL(elink.href) // 释放URL 对象
+            document.body.removeChild(elink)
+          } else { // IE10+下载
+            navigator.msSaveBlob(blob, fileName)
+          }
+          a = true
+        }
+      })
+      if (a) {
+        loading.close()
+        return
+      }
       if (res.data.state === 206) {
         localStorage.clear()
         // sessionStorage.claer()

+ 18 - 4
src/views/candidateManage/candidateAll.vue

@@ -4,11 +4,11 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-30 10:17:25
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-08-11 17:15:43
+ * @LastEditTime: 2020-08-12 17:59:30
 -->
 <template>
   <div class="indexPage">
-    <v-input :btn="btn" :list="list" @search="search"></v-input>
+    <v-input :btn="btn" :list="list" @search="search" @exports="exports"></v-input>
     <v-table
       :table="table"
       :tableList="tableList"
@@ -68,6 +68,11 @@ export default {
           name: '确定',
           type: 'primary',
           method: 'search'
+        },
+        {
+          name: '导出',
+          type: 'primary',
+          method: 'exports'
         }
       ],
       table: {
@@ -164,7 +169,7 @@ export default {
       this.searchForm = form
       let reqdata = form
       this.$api
-        .post('/resumeInfo/queryCandidateList', {
+        .post('/resumeInfo/queryTalentPoolList', {
           reqdata,
           page
         })
@@ -172,7 +177,7 @@ export default {
           this.totalrecords = res.totalrecords
           this.tableList = res.list.map(item => {
             item.desiredPositionId = item.desiredPositionId ? this.downList1.some(i => i.id === item.desiredPositionId) ? this.downList1.find(i => i.id === item.desiredPositionId).positionName : '' : ''
-            item.state = item.isPass ? item.interviewResult === 0 ? '未通过' : item.interviewResult === 1 ? '已通过' : '已淘汰' : '未读'
+            item.state = item.interviewResult ? ['', '已通过', '未通过'][item.interviewResult] : item.isSendInviteMail ? '已通知' : ['未通过', '已通过', '已淘汰', '待定'][item.isPass]
             return item
           })
         })
@@ -197,6 +202,15 @@ export default {
       this.open()
       this.info = row
     },
+    exports () {
+      this.$api
+        .post('/export/export2Web', {
+          reqdata: this.searchForm
+        })
+        .then((res) => {
+          console.log(res)
+        })
+    },
     open () {
       this.dialogFormVisible = true
     },

+ 80 - 12
src/views/candidateManage/candidateList.vue

@@ -4,10 +4,10 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-28 15:25:06
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-08-11 14:27:17
+ * @LastEditTime: 2020-08-12 18:01:05
 -->
 <template>
-  <div class="indexPage">
+  <div class="candidateList">
     <v-input
       :btn="isCollapse?isCollapse===1?btn1:btn2:btn0"
       :list="list"
@@ -35,6 +35,7 @@
       @through="through"
       @notice="notice"
       @del="del"
+      @openDia="openDia"
       @selection-change="selection"
       id="id"
     ></v-table>
@@ -43,7 +44,6 @@
       :visible.sync="dialogFormVisible"
       width="600px"
       :before-close="close"
-      :show-close="false"
        :close-on-click-modal="false"
       >
       <el-form :model="form" ref="form" label-width="140px" :rules="rules" label-position="left">
@@ -72,16 +72,42 @@
         </el-form-item>
         <el-form-item label="群发邮箱">139820930@qq.com</el-form-item>
         <el-form-item>
+          <el-button @click="close">取消</el-button>
           <el-button type="primary" @click="launch">立即发出</el-button>
         </el-form-item>
       </el-form>
     </el-dialog>
-    <resume :dialogFormVisible="dialogVisible" :close="closeDia" :info="info" :searchForm="searchForm" :queryData="queryData"></resume>
+    <el-dialog
+      :visible.sync="dialogVisible"
+      width="600px"
+      :before-close="closeDia"
+       :close-on-click-modal="false"
+      >
+        <div class="title" slot="title">{{info.delivererName}}的面试视频</div>
+        <div class="content">
+          <div class="video">
+              <video
+                width="100%"
+                controls
+                :src="info.answerVideoList && info.answerVideoList.length ? $img + info.answerVideoList[info.active].answerVideoPath : ''"
+              ></video>
+            </div>
+            <div class="list" v-if="info.answerVideoList && info.answerVideoList.length">
+              <div
+                v-for="(item, index) in info.answerVideoList"
+                :key="item.id"
+                class="active"
+                @click="info.active = index"
+                :class="info.active === index ? 'is-active' : ''"
+              >第{{index + 1}}段</div>
+            </div>
+            <div v-else class="prompt">暂无视频</div>
+        </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import resume from './resume'
 export default {
   data () {
     return {
@@ -241,7 +267,7 @@ export default {
             props: 'confirmInterviewTime'
           }
         ],
-        width: 310,
+        width: 360,
         handle: [
           {
             title: '查看简历',
@@ -249,6 +275,11 @@ export default {
             type: 'info'
           },
           {
+            title: '查看视频',
+            method: 'openDia',
+            type: 'info'
+          },
+          {
             title: '标记通过',
             method: 'through',
             type: 'success'
@@ -334,9 +365,6 @@ export default {
   mounted () {
     this.queryDownList()
   },
-  components: {
-    resume
-  },
   methods: {
     queryData (form = {}) {
       let page = this.page
@@ -381,8 +409,15 @@ export default {
       this.queryData(form)
     },
     details (row) {
-      this.openDia()
-      this.info = row
+      // this.$api
+      //   .post('/resumeInfo/queryResumeInfoDetail', {
+      //     reqdata: {
+      //       id
+      //     }
+      //   })
+      //   .then((res) => {
+      row.filePath ? window.open(this.$img + row.filePath) : this.$message({ type: 'info', message: '无此人简历' })
+      // })
     },
     launch () {
       let a
@@ -502,7 +537,9 @@ export default {
     closeDia () {
       this.dialogVisible = false
     },
-    openDia () {
+    openDia (row) {
+      this.info = row
+      this.info.active = 1
       this.dialogVisible = true
     },
     callPage (val) {
@@ -521,6 +558,11 @@ export default {
             type: 'info'
           },
           {
+            title: '查看视频',
+            method: 'openDia',
+            type: 'info'
+          },
+          {
             title: '通知成功',
             method: 'notice',
             type: 'success'
@@ -534,6 +576,11 @@ export default {
               type: 'info'
             },
             {
+              title: '查看视频',
+              method: 'openDia',
+              type: 'info'
+            },
+            {
               title: '标记通过',
               method: 'through',
               type: 'success'
@@ -552,3 +599,24 @@ export default {
   }
 }
 </script>
+
+<style lang="scss" scoped>
+  .title {
+    font-size: 20px;
+    font-weight: bold;
+  }
+  .prompt {
+    text-align: center;
+    height: 30px;
+    line-height: 40px;
+    font-size: 20px;
+    color: #888;
+  }
+</style>
+<style lang="scss">
+  .candidateList {
+      .el-dialog__body {
+      padding-top: 10px;
+    }
+  }
+</style>

+ 2 - 2
src/views/candidateManage/resume.vue

@@ -4,7 +4,7 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-30 10:32:00
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-08-11 17:27:52
+ * @LastEditTime: 2020-08-12 10:57:25
 -->
 <template>
   <div>
@@ -34,7 +34,7 @@
                 :class="active === index ? 'is-active' : ''"
               >第{{index + 1}}段</div>
             </div>
-            <div v-else class="prompt">无视频</div>
+            <div v-else class="prompt">无视频</div>
           </div>
           <div class="center">
             <div class="title">简历备注:</div>

+ 160 - 72
src/views/candidateManage/resumeList.vue

@@ -4,7 +4,7 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-30 09:53:19
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-08-11 17:41:15
+ * @LastEditTime: 2020-08-12 15:35:50
 -->
 <template>
   <div class="indexPage">
@@ -15,17 +15,19 @@
       @notice="noticeAll"
       @through="throughAll"
       @eliminate="eliminateAll"
+      @undetermined="undeterminedAll"
       @search="search"
     ></v-input>
     <el-radio-group v-model="isCollapse" size="medium" style="margin-bottom: 20px;">
-      <el-radio-button :label="1">未读简历</el-radio-button>
-      <el-radio-button :label="2">已通过简历</el-radio-button>
-      <el-radio-button :label="3">已通知简历</el-radio-button>
-      <el-radio-button :label="4">已淘汰简历</el-radio-button>
+      <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-button :label="3">待定</el-radio-button>
+      <el-radio-button :label="4">已通知</el-radio-button>
     </el-radio-group>
     <v-table
       :key="isCollapse"
-      :table="isCollapse===3?throughTable:table"
+      :table="isCollapse===4?throughTable:table"
       :tableList="tableList"
       :sortType="true"
       :queryData="queryData"
@@ -35,6 +37,8 @@
       @through="through"
       @eliminate="eliminate"
       @del="del"
+      @undetermined="undetermined"
+      @toVedio="toVedio"
       @selection-change="selection"
       id="id"
     ></v-table>
@@ -71,6 +75,7 @@
         </el-form-item>
         <el-form-item label="群发邮箱">139820930@qq.com</el-form-item>
         <el-form-item>
+          <el-button @click="close">取消</el-button>
           <el-button type="primary" @click="launch">立即发出</el-button>
         </el-form-item>
       </el-form>
@@ -85,7 +90,7 @@ export default {
       tableList: [],
       dialogFormVisible: false,
       page: 1,
-      isCollapse: 1,
+      isCollapse: 0,
       totalrecords: 0,
       pickList: [],
       copyPickList: [],
@@ -132,11 +137,11 @@ export default {
           type: 'primary',
           method: 'search'
         },
-        // {
-        //   name: '通知面试',
-        //   type: 'success',
-        //   method: 'notice'
-        // },
+        {
+          name: '标记待定',
+          type: 'success',
+          method: 'undetermined'
+        },
         {
           name: '标记通过',
           type: 'primary',
@@ -195,18 +200,18 @@ export default {
             props: 'delivererPhone'
           }
         ],
-        width: 500,
+        width: 420,
         handle: [
           {
             title: '查看简历',
             method: 'details',
             type: 'info'
           },
-          // {
-          //   title: '通知面试',
-          //   method: 'notice',
-          //   type: 'success'
-          // },
+          {
+            title: '标记待定',
+            method: 'undetermined',
+            type: 'success'
+          },
           {
             title: '标记通过',
             method: 'through',
@@ -280,8 +285,10 @@ export default {
           },
           {
             title: '查看视频',
-            method: '',
-            type: 'warning'
+            method: 'toVedio',
+            type: 'warning',
+            props: 'interviewStatus',
+            key: 1
           },
           {
             title: '删除',
@@ -301,23 +308,26 @@ 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:
+        case 0:
           reqdata.isPass = 0
           reqdata.isSendInviteMail = 0
           break
-        case 2:
+        case 1:
           reqdata.isPass = 1
           reqdata.isSendInviteMail = 0
           break
+        case 2:
+          reqdata.isPass = 2
+          reqdata.isSendInviteMail = 0
+          break
         case 3:
-          reqdata.isPass = 1
-          reqdata.isSendInviteMail = 1
+          reqdata.isPass = 3
+          reqdata.isSendInviteMail = 0
           break
         case 4:
-          reqdata.isPass = 2
-          reqdata.isSendInviteMail = 0
+          reqdata.isPass = 1
+          reqdata.isSendInviteMail = 1
           break
         default:
           break
@@ -469,6 +479,27 @@ export default {
         ? this.del(this.pickList, true)
         : this.$message({ type: 'info', message: '请选择需要删除的内容' })
     },
+    undetermined (row, type = false) {
+      let ids = type ? row : [row.id]
+      let resumeInfoStatusList = ids.map(item => ({ id: item, isPass: 3 }))
+      this.$api
+        .post('/resumeInfo/changeReadType', {
+          reqdata: {
+            resumeInfoStatusList
+          }
+        })
+        .then((res) => {
+          this.queryData(this.searchForm)
+        })
+    },
+    undeterminedAll () {
+      this.pickList.length
+        ? this.undetermined(this.pickList, true)
+        : this.$message({ type: 'info', message: '请选择待定的应聘者' })
+    },
+    toVedio () {
+      window.open('candidateList')
+    },
     selection (val) {
       this.$set(this.$data, 'pickList', val)
     },
@@ -494,18 +525,18 @@ export default {
       this.$set(
         this.table,
         'handle',
-        this.isCollapse === 1
+        this.isCollapse === 0
           ? [
             {
               title: '查看简历',
               method: 'details',
               type: 'info'
             },
-            // {
-            //   title: '通知面试',
-            //   method: 'notice',
-            //   type: 'success'
-            // },
+            {
+              title: '标记待定',
+              method: 'undetermined',
+              type: 'success'
+            },
             {
               title: '标记通过',
               method: 'through',
@@ -517,12 +548,17 @@ export default {
               type: 'warning'
             },
             {
-              title: '删除',
-              method: 'del',
-              type: 'danger'
+              title: '标记待定',
+              method: 'undetermined',
+              type: 'warning'
             }
+            // {
+            //   title: '删除',
+            //   method: 'del',
+            //   type: 'danger'
+            // }
           ]
-          : this.isCollapse === 2
+          : this.isCollapse === 1
             ? [
               {
                 title: '查看简历',
@@ -530,38 +566,61 @@ export default {
                 type: 'info'
               },
               {
-                title: '通知面试',
-                method: 'notice',
-                type: 'success'
-              },
-              {
                 title: '标记淘汰',
                 method: 'eliminate',
                 type: 'warning'
               },
               {
-                title: '删除',
-                method: 'del',
-                type: 'danger'
-              }
-            ]
-            : [
-              {
-                title: '标记通过',
-                method: 'through',
-                type: 'primary'
-              },
-              {
-                title: '删除',
-                method: 'del',
-                type: 'danger'
+                title: '通知面试',
+                method: 'notice',
+                type: 'success'
               }
             ]
+            : this.isCollapse === 2
+              ? [
+                {
+                  title: '查看简历',
+                  method: 'details',
+                  type: 'info'
+                },
+                {
+                  title: '标记通过',
+                  method: 'through',
+                  type: 'primary'
+                },
+                {
+                  title: '删除',
+                  method: 'del',
+                  type: 'danger'
+                }
+              ]
+              : [
+                {
+                  title: '查看简历',
+                  method: 'details',
+                  type: 'info'
+                },
+                {
+                  title: '通知面试',
+                  method: 'notice',
+                  type: 'success'
+                },
+                {
+                  title: '标记通过',
+                  method: 'through',
+                  type: 'primary'
+                },
+                {
+                  title: '标记淘汰',
+                  method: 'eliminate',
+                  type: 'warning'
+                }
+              ]
       )
       this.$set(
         this.$data,
         'btn',
-        this.isCollapse === 1
+        this.isCollapse === 0
           ? [
             {
               name: '确定',
@@ -569,9 +628,9 @@ export default {
               method: 'search'
             },
             {
-              name: '通知面试',
+              name: '标记待定',
               type: 'success',
-              method: 'notice'
+              method: 'undetermined'
             },
             {
               name: '标记通过',
@@ -582,9 +641,14 @@ export default {
               name: '标题淘汰',
               type: 'warning',
               method: 'eliminate'
+            },
+            {
+              name: '删除',
+              type: 'danger',
+              method: 'del'
             }
           ]
-          : this.isCollapse === 2
+          : this.isCollapse === 1
             ? [
               {
                 name: '确定',
@@ -602,16 +666,9 @@ export default {
                 method: 'eliminate'
               }
             ]
-            : this.isCollapse === 3
+            : this.isCollapse === 2
               ? [
                 {
-                  name: '删除',
-                  type: 'danger',
-                  method: 'del'
-                }
-              ]
-              : [
-                {
                   name: '确定',
                   type: 'primary',
                   method: 'search'
@@ -627,13 +684,44 @@ export default {
                   method: 'del'
                 }
               ]
+              : this.isCollapse === 3
+                ? [
+                  {
+                    name: '确定',
+                    type: 'primary',
+                    method: 'search'
+                  },
+                  {
+                    name: '标记通过',
+                    type: 'primary',
+                    method: 'through'
+                  },
+                  {
+                    name: '删除',
+                    type: 'danger',
+                    method: 'del'
+                  }
+                ]
+                : [
+                  {
+                    name: '确定',
+                    type: 'primary',
+                    method: 'search'
+                  },
+                  {
+                    name: '删除',
+                    type: 'danger',
+                    method: 'del'
+                  }
+                ]
       )
       this.$set(
         this.table,
         'width',
-        this.isCollapse === 1
-          ? 500 : this.isCollapse === 2
-            ? 400 : 200
+        this.isCollapse === 0
+          ? 420 : this.isCollapse === 1
+            ? 300 : this.isCollapse === 2
+              ? 300 : 400
       )
     }
   }

+ 73 - 16
src/views/candidateManage/statistics.vue

@@ -4,11 +4,27 @@
  * @Autor: XuTongZhang
  * @Date: 2020-08-03 15:00:31
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-08-03 15:55:13
+ * @LastEditTime: 2020-08-12 18:37:45
 -->
 <template>
   <div>
-    <div id="echart" ref="mychart" :style="{width: '100%', height: '300px'}"></div>
+    <div class="flex">
+      <div ref="mychart1" :style="{width: '75%', height: '500px'}"></div>
+      <div class="flex1">
+        <div>
+          <div class="num">校招投递简历总数 {{schoolTotal||0}}条</div>
+          <div class="num">社招投递简历总数 {{clubTotal}}条</div>
+        </div>
+        <div>
+          <div class="title">本周</div>
+          <div class="num">校招投递简历数  {{0}}条</div>
+          <div class="num">社招投递简历数  {{0}}条</div>
+        </div>
+      </div>
+    </div>
+    <div class="flex">
+      <div ref="mychart2" :style="{width: '75%', height: '300px'}"></div>
+    </div>
   </div>
 </template>
 
@@ -17,23 +33,44 @@ import echarts from 'echarts'
 export default {
   data () {
     return {
+      timeList: [],
+      clubRecruit: [],
+      schoolRecruit: [],
+      clubTotal: 0,
+      schoolTotal: 0
     }
   },
   mounted () {
-    this.initChart()
+    this.queryData()
   },
   methods: {
     queryData () {
       this.$api
-        .post('', {
-          reqdata: {}
+        .post('/chart/getResumeChart', {
+          reqdata: {
+            recruitType: 0
+          }
         })
         .then((res) => {
-          this.initChart(res.object)
+          console.log(res)
+          this.timeList = res.object.weekList
+          this.clubRecruit = res.object.countList
+          this.clubTotal = res.object.countTotal
+          this.$api
+            .post('/chart/getResumeChart', {
+              reqdata: {
+                recruitType: 1
+              }
+            })
+            .then((res) => {
+              this.schoolRecruit = res.object.countList
+              this.schoolTotal = res.object.countTotal
+              this.initChart()
+            })
         })
     },
-    initChart (data) {
-      let myChart = echarts.init(this.$refs.mychart)
+    initChart () {
+      let myChart = echarts.init(this.$refs.mychart1)
       myChart.setOption({
         title: {
           text: '简历投递信息'
@@ -50,15 +87,19 @@ export default {
           bottom: '3%',
           containLabel: true
         },
-        toolbox: {
-          feature: {
-            saveAsImage: {}
-          }
-        },
+        // toolbox: {
+        //   feature: {
+        //     saveAsImage: {}
+        //   }
+        // },
         xAxis: {
           type: 'category',
           boundaryGap: false,
-          data: [1, 2]
+          data: this.timeList,
+          axisLabel: {
+            interval: 0,
+            rotate: 70
+          }
         },
         yAxis: {
           type: 'value'
@@ -67,19 +108,35 @@ export default {
           {
             name: '校招投递简历',
             type: 'line',
-            data: [50, 30]
+            data: this.schoolRecruit
           },
           {
             name: '社招投递简历',
             type: 'line',
-            data: [1, 50]
+            data: this.clubRecruit
           }
         ]
       })
+      setTimeout(function () {
+        window.onresize = function () {
+          myChart.resize()
+        }
+      }, 200)
     }
   }
 }
 </script>
 
 <style lang="scss" scoped>
+  .flex {
+    display: flex;
+  }
+  .flex1 {
+    margin-top: 00px;
+    margin-left: 80px;
+  }
+  .num {
+    margin: 20px;
+    font-size: 14px;
+  }
 </style>

+ 2 - 2
src/views/companyManage/positionInfo.vue

@@ -4,7 +4,7 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-28 17:19:43
  * @LastEditors: XuTongZhang
- * @LastEditTime: 2020-08-11 15:53:18
+ * @LastEditTime: 2020-08-12 17:05:48
 -->
 <template>
   <div class="indexPage">
@@ -96,7 +96,7 @@ export default {
           },
           {
             label: '职位状态',
-            props: 'status',
+            props: 'isDisable',
             options: ['有效', '禁用']
           }
         ],