Selaa lähdekoodia

人才库简历crud

noob 4 vuotta sitten
vanhempi
commit
7d300716f5

+ 1 - 1
src/components/vInput/vInput.vue

@@ -39,7 +39,7 @@
                   v-else
                   :action="action"
                   :file-list="fileList">
-                  <el-button size="small">{{item.name}}</el-button>
+                  <el-button size="small" type="primary">{{item.name}}</el-button>
                 </el-upload>
                 <span class="prompt" v-if="item.message">{{item.message}}</span>
             </span>

+ 5 - 1
src/components/vTable/vTable.vue

@@ -60,7 +60,7 @@
                     </el-dropdown-menu>
                 </el-dropdown>
                 <el-button-group v-else style="display:flex;justify-content: center;">
-                    <el-button v-for="(item,index) in table.handle.filter(item => scope.row[item.props] === item.key)" :key="index" size="small" :type="item.type" style="margin:0px;" class="btn handelBtn" @click="handleMethods(scope.$index, scope.row, item)">
+                    <el-button v-for="(item,index) in table.handle.filter(item => scope.row[item.props] === item.key && item.readonly!==readonly)" :key="index" size="small" :type="item.type" style="margin:0px;" class="btn handelBtn" @click="handleMethods(scope.$index, scope.row, item)">
                         {{item.title}}
                         <!-- v-if="scope.row[item.props]===item.key" -->
                     </el-button>
@@ -110,6 +110,10 @@ export default {
       type: Array,
       default: () => []
     },
+    readonly: {
+      type: Boolean,
+      default: false
+    },
     form: Object
   },
   data () {

+ 84 - 7
src/views/candidateManage/candidateAll.vue

@@ -4,12 +4,12 @@
  * @Autor: XuTongZhang
  * @Date: 2020-07-30 10:17:25
  * @LastEditors  : yuanrunwei
- * @LastEditTime : 2021-02-05 15:12:37
+ * @LastEditTime : 2021-02-05 17:11:16
 -->
 <template>
 <div class="indexPage">
     <v-input :btn="btn" :list="list" @search="search" @exports="exports" @upload="upload=true" @excel="handleExcel"></v-input>
-    <v-table :table="table" :tableList="tableList" :sortType="true" :queryData="queryData" :form="searchForm" @details="details" @update="update"></v-table>
+    <v-table :table="table" :tableList="tableList" :sortType="true" :queryData="queryData" :form="searchForm" @details="details" @update="update" @duplicate="handleDuplicate" @delete="handleDelete"></v-table>
     <v-pager @page="callPage" :total="totalrecords"></v-pager>
     <!-- <resume :dialogFormVisible="dialogFormVisible" :close="close" :info="info" :searchForm="searchForm" :queryData="queryData"></resume> -->
     <el-dialog :visible.sync="dialogVisible" width="600px" :before-close="closeDia" :close-on-click-modal="false">
@@ -141,6 +141,9 @@
             </el-form-item>
         </el-form>
     </el-dialog>
+    <el-dialog :visible.sync="duplicate" width="90%" :before-close="()=>{duplicate=false}" :close-on-click-modal="false">
+        <v-table :table="table" :tableList="duplicateList" :sortType="true" @update="update" @delete="handleDelete" readonly></v-table>
+    </el-dialog>
 </div>
 </template>
 
@@ -161,10 +164,12 @@ export default {
       tableList: [],
       dialogFormVisible: false,
       dialogVisible: false,
+      duplicate: false,
       upload: false,
       page: 1,
       totalrecords: 0,
       pickList: [],
+      duplicateList: [],
       downList1: [],
       searchForm: {},
       form: {},
@@ -400,11 +405,23 @@ export default {
         ],
         // fixed: true,
         width: 200,
-        handle: [{
-          title: '修改',
-          method: 'update',
-          type: 'warning'
-        }
+        handle: [
+          {
+            title: '修改',
+            method: 'update',
+            type: 'warning'
+          },
+          {
+            title: '去重',
+            method: 'duplicate',
+            type: 'primary',
+            readonly: true
+          },
+          {
+            title: '删除',
+            method: 'delete',
+            type: 'danger'
+          }
         // {
         //   title: '查看简历',
         //   method: 'details',
@@ -479,6 +496,9 @@ export default {
           })
           this.closeDia()
           this.queryData()
+          if (this.duplicate) {
+            this.handleDuplicateRefresh(reqdata)
+          }
         })
     },
     details (row) {
@@ -571,6 +591,63 @@ export default {
         this.$message.success('导入成功')
         this.queryData()
       })
+    },
+    handleDuplicate (param) {
+      this.$api.post('/resumeInfo/duplicateResume', {
+        reqdata: {
+          ...param
+        }
+      }).then(result => {
+        if (result.list && result.list.length) {
+          this.$confirm(`检索到“${param.delivererName}”的疑似重复记录${result.list.length}条,是否查看?`, '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            this.duplicateList = result.list.map((item, index) => ({
+              serialNumber: index + 1,
+              state: item.interviewResult ? ['', '已通过', '未通过'][item.interviewResult] : item.isSendInviteMail ? '已通知' : ['未读', '通过', '淘汰', '待定'][item.isPass],
+              ...item
+            }))
+            this.duplicate = true
+          })
+        }
+      })
+    },
+    handleDuplicateRefresh (param) {
+      this.$api.post('/resumeInfo/duplicateResume', {
+        reqdata: {
+          ...param
+        }
+      }).then(result => {
+        this.duplicateList = result.list.map((item, index) => ({
+          serialNumber: index + 1,
+          state: item.interviewResult ? ['', '已通过', '未通过'][item.interviewResult] : item.isSendInviteMail ? '已通知' : ['未读', '通过', '淘汰', '待定'][item.isPass],
+          ...item
+        }))
+      })
+    },
+    handleDelete (param) {
+      this.$confirm(`确定删除该条简历吗?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$api.post('/resumeInfo/deleteResumeInfo', {
+          reqdata: {
+            resumeInfoStatusList: [{
+              ...param,
+              status: 1
+            }]
+          }
+        }).then(result => {
+          this.$message.success('删除成功')
+          this.queryData()
+          if (this.duplicate) {
+            this.handleDuplicateRefresh(param)
+          }
+        })
+      })
     }
   }
 }