|
@@ -213,17 +213,15 @@ export default {
|
|
|
if (!Object.keys(this.formatRows).length) return {}
|
|
|
const options = this.generation.options
|
|
|
if (!options || !this.generation.active) return {}
|
|
|
- const optValues = Object.values(options)
|
|
|
const dynamicColumns = {}
|
|
|
- for (let gen = options.primary.value; gen <= this.generation.active; gen++) {
|
|
|
- const opt = optValues.find(opt => opt.value == gen)
|
|
|
- const resolverKey = opt.key + 'Resolver'
|
|
|
+ this.generation.activeModels.forEach(model => {
|
|
|
+ const resolverKey = model.option.key + 'Resolver'
|
|
|
const resolver = this[resolverKey]
|
|
|
if (typeof resolver === 'function') {
|
|
|
- const genColumns = resolver(gen, this.generation.active, dynamicColumns)
|
|
|
+ const genColumns = resolver(model, this.generation.activeModel, dynamicColumns)
|
|
|
Object.assign(dynamicColumns, genColumns)
|
|
|
}
|
|
|
- }
|
|
|
+ })
|
|
|
return dynamicColumns
|
|
|
},
|
|
|
formatRows() {
|
|
@@ -233,7 +231,7 @@ export default {
|
|
|
const activeModel = this.generation.activeModel
|
|
|
return this.generation.roundGroups.map(rg => {
|
|
|
const row = activeModel.models?.find(item => item.groupId == rg.groupId) || {}
|
|
|
- row.allowSelectTips = this.combineGroupStatus(row, activeModel)
|
|
|
+ this.$set(row, 'allowSelectTips', this.combineGroupStatus(row, activeModel))
|
|
|
const matchedMajors = this.optionalMajors.filter(college => college.matchedGroupIds.includes(row.groupId))
|
|
|
this.$set(row, 'colleges', matchedMajors.map(m => ({ college: m.collegeName, major: m.majorCategoryName })))
|
|
|
this.$set(row, 'subjects', matchedMajors.map(m => m['majorCategoryName']))
|