Ver Fonte

企业中台修改bug

lrf402788946 há 5 anos atrás
pai
commit
d30cd95240
1 ficheiros alterados com 11 adições e 7 exclusões
  1. 11 7
      src/pages/corp/views/jobfair/detailAdd.vue

+ 11 - 7
src/pages/corp/views/jobfair/detailAdd.vue

@@ -206,14 +206,14 @@ export default {
     },
     nation_list: [],
   }),
-  created() {
-    this.otherList();
-    this.setValueList();
-    this.getJobsList();
+  async created() {
+    await this.otherList();
+    await this.setValueList();
+    await this.getJobsList();
     if (this.$route.query.id) {
-      this.search();
+      await this.search();
     } else {
-      this.getJobfair();
+      await this.getJobfair();
     }
   },
   computed: {
@@ -231,6 +231,7 @@ export default {
         this.$set(this, `attendList`, result.data.attendee);
         this.$set(this, `gridData`, result.data.jobs);
         this.$set(this, `loading`, true);
+        this.resetJobList();
       }
     },
     async submit() {
@@ -294,7 +295,10 @@ export default {
             selected ? selectList.push(selected) : '';
           }
         });
-        chooseList = _.differenceBy(data, selectList, 'id');
+        // chooseList = _.differenceBy(data, selectList, 'id');
+        chooseList = _.differenceWith(data, selectList, (item, value) => {
+          return item.id === value.id;
+        });
       } else {
         chooseList = data;
       }