浏览代码

简历是否接收

lrf402788946 5 年之前
父节点
当前提交
d3e8b7a463
共有 2 个文件被更改,包括 52 次插入10 次删除
  1. 45 6
      src/views/manager/resume/index.vue
  2. 7 4
      src/views/manager/resume/list.vue

+ 45 - 6
src/views/manager/resume/index.vue

@@ -5,13 +5,40 @@
         简历筛选
       </template>
       <template v-slot:main1>
-        <list type="0" :info="info" :dataList="dataList0" :totalRow="totalRow0" @changePage="search" @selectInfo="selectInfo" @searchInfo="searchInfo"></list>
+        <list
+          type="0"
+          :info="info"
+          :dataList="dataList0"
+          :totalRow="totalRow0"
+          @changePage="search"
+          @selectInfo="selectInfo"
+          @searchInfo="searchInfo"
+          @update="update"
+        ></list>
       </template>
       <template v-slot:main2>
-        <list type="1" :info="info" :dataList="dataList1" :totalRow="totalRow1" @changePage="search" @selectInfo="selectInfo" @searchInfo="searchInfo"></list>
+        <list
+          type="1"
+          :info="info"
+          :dataList="dataList1"
+          :totalRow="totalRow1"
+          @changePage="search"
+          @selectInfo="selectInfo"
+          @searchInfo="searchInfo"
+          @update="update"
+        ></list>
       </template>
       <template v-slot:main3>
-        <list type="2" :info="info" :dataList="dataList2" :totalRow="totalRow2" @changePage="search" @selectInfo="selectInfo" @searchInfo="searchInfo"></list>
+        <list
+          type="2"
+          :info="info"
+          :dataList="dataList2"
+          :totalRow="totalRow2"
+          @changePage="search"
+          @selectInfo="selectInfo"
+          @searchInfo="searchInfo"
+          @update="update"
+        ></list>
       </template>
     </list-tab>
     <el-dialog title="简历详情" center :visible.sync="resumeDialog" :fullscreen="true">
@@ -46,15 +73,18 @@ export default {
     resumeDialog: false,
   }),
   created() {
-    this.search({ type: '0' });
-    this.search({ type: '1' });
-    this.search({ type: '2' });
+    this.initSearch();
   },
   computed: {
     ...mapState(['user']),
   },
   methods: {
     ...mapActions(['lettersOperation', 'resumesOperation']),
+    initSearch() {
+      this.search({ type: '0' });
+      this.search({ type: '1' });
+      this.search({ type: '2' });
+    },
     async search({ type, currentPage, searchInfo }) {
       let skip = 0;
       if (currentPage) {
@@ -93,6 +123,15 @@ export default {
       console.log(type, ids);
       //缓存在本组件中(this.$set在本组件中),为之后的批量操作使用
     },
+    async update(data) {
+      let result = await this.lettersOperation({ type: 'update', data: data });
+      if (`${result.errcode}` === `0`) {
+        this.$message.success('操作成功');
+      } else {
+        this.$message.error(result.errmsg || '操作失败');
+      }
+      this.initSearch();
+    },
   },
 };
 </script>

+ 7 - 4
src/views/manager/resume/list.vue

@@ -20,11 +20,11 @@
               <!-- 链接到查看简历公共模块 -->
               <el-button size="mini" type="text" @click="checkResume(scoped.row.resume_id)">查看简历</el-button>
             </el-col>
-            <el-col :span="12" v-if="type !== '2'">
-              <el-button size="mini" type="text">纳入考虑</el-button>
+            <el-col :span="12" v-if="type !== '1'">
+              <el-button size="mini" type="text" @click="update('1', scoped.row.id)">纳入考虑</el-button>
             </el-col>
-            <el-col :span="12" v-if="type !== '3'">
-              <el-button size="mini" type="text">暂不考虑</el-button>
+            <el-col :span="12" v-if="type !== '2'">
+              <el-button size="mini" type="text" @click="update('2', scoped.row.id)">暂不考虑</el-button>
             </el-col>
           </el-row>
         </template>
@@ -82,6 +82,9 @@ export default {
     checkResume(id) {
       this.$emit('searchInfo', id);
     },
+    update(status, id) {
+      this.$emit('update', { status: status, id: id });
+    },
   },
 };
 </script>