Explorar o código

mode - argument

hare8999@163.com %!s(int64=2) %!d(string=hai) anos
pai
achega
9c5f2d63cc
Modificáronse 1 ficheiros con 8 adicións e 4 borrados
  1. 8 4
      src/views/career/zhiyuan/components/recommend.vue

+ 8 - 4
src/views/career/zhiyuan/components/recommend.vue

@@ -203,6 +203,10 @@ export default {
     }
   },
   computed: {
+    mode() {
+      if (!this.formSubject) return []
+      return [this.formSubject.firstSubject, ...this.formSubject.lastSubject]
+    },
     // 所有二级
     majorAllChildren() {
       let arr = []
@@ -316,7 +320,7 @@ export default {
             scores: [],
             wishes: wishes
           },
-          mode: `${this.formSubject.firstSubject},${this.formSubject.lastSubject}`,
+          mode: this.mode.toString(),
           score: this.formSubject.score
         },
         id: 0,
@@ -349,7 +353,7 @@ export default {
     },
     getCols() {
       getVoluntaryHeaders({
-        mode: `${this.formSubject.firstSubject},${this.formSubject.lastSubject}`,
+        mode: this.mode.toString(),
         year: this.batch.year
       }).then(res => {
         this.cols = res.data
@@ -361,7 +365,7 @@ export default {
         batchName: this.batch.name,
         batch: this.batch.batch,
         majors: this.checkedList,
-        mode: `${this.formSubject.firstSubject},${this.formSubject.lastSubject}`,
+        mode: this.mode.toString(),
         // mode1: string,
         pickType: this.filter_form.pickType,
         // "rank": 0,
@@ -415,7 +419,7 @@ export default {
         {
           batchName: this.batch.name,
           collegeCode: item.recruitPlan.collegeCode,
-          mode: this.formSubject.firstSubject,
+          mode: this.mode.toString(),
           universityId: item.recruitPlan.universityId,
           year: item.recruitPlan.year
         }