Browse Source

elective student - table colleges&subjects $set

hare8999@163.com 2 years ago
parent
commit
d68cae7ab6
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/views/elective/select/components/elective-table.vue

+ 4 - 3
src/views/elective/select/components/elective-table.vue

@@ -31,7 +31,8 @@
       </template>
     </mx-table>
     <elective-preference-info :generation="generation"></elective-preference-info>
-    <elective-preference-batch v-if="enableMultipleDrag" :generation="generation" :disabled="!enableSelect"></elective-preference-batch>
+    <elective-preference-batch v-if="enableMultipleDrag" :generation="generation"
+                               :disabled="!enableSelect"></elective-preference-batch>
     <elective-preference-reject v-if="enableReject" :generation="generation"></elective-preference-reject>
     <elective-esign-dialog ref="esignDialog"></elective-esign-dialog>
     <choose-subject-dialog ref="chooseDialog"></choose-subject-dialog>
@@ -234,8 +235,8 @@ export default {
         const row = activeModel.models?.find(item => item.groupId == rg.groupId) || {}
         row.allowSelectTips = this.combineGroupStatus(row, activeModel)
         const matchedMajors = this.optionalMajors.filter(college => college.matchedGroupIds.includes(row.groupId))
-        row.colleges = matchedMajors.map(m => ({ college: m.collegeName, major: m.majorCategoryName }))
-        row.subjects = matchedMajors.map(m => m['majorCategoryName'])
+        this.$set(row, 'colleges', matchedMajors.map(m => ({ college: m.collegeName, major: m.majorCategoryName })))
+        this.$set(row, 'subjects', matchedMajors.map(m => m['majorCategoryName']))
         return row
       })
     },