|
@@ -7,31 +7,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <mx-table :propDefines="formatTable.cols" :rows="formatTable.rows">
|
|
|
|
- <template #rankInGroup="{label, key}">
|
|
|
|
- <div class="fx-column">
|
|
|
|
- <span>{{ label }}</span>
|
|
|
|
- <el-popover
|
|
|
|
- placement="bottom"
|
|
|
|
- trigger="click"
|
|
|
|
- >
|
|
|
|
- <span>组合成绩在填报组合的排名</span>
|
|
|
|
- <i slot="reference" class="pointer el-icon-question el-icon"></i>
|
|
|
|
- </el-popover>
|
|
|
|
- </div>
|
|
|
|
- </template>
|
|
|
|
- <template #rankInGrade="{label, key}">
|
|
|
|
- <div class="fx-column">
|
|
|
|
- <span>{{ label }}</span>
|
|
|
|
- <el-popover
|
|
|
|
- placement="bottom"
|
|
|
|
- trigger="click"
|
|
|
|
- >
|
|
|
|
- <span>组合成绩在全校的排名</span>
|
|
|
|
- <i slot="reference" class="pointer el-icon-question el-icon"></i>
|
|
|
|
- </el-popover>
|
|
|
|
- </div>
|
|
|
|
- </template>
|
|
|
|
|
|
+ <mx-table :propDefines="formatCols" :rows="formatRows">
|
|
<template #temp="{row}">
|
|
<template #temp="{row}">
|
|
<span class="btn-blue mr5" @click="toSelectSub(row)">选择</span>
|
|
<span class="btn-blue mr5" @click="toSelectSub(row)">选择</span>
|
|
<span class="btn-green" @click="toReport">查看记录</span>
|
|
<span class="btn-green" @click="toReport">查看记录</span>
|
|
@@ -111,11 +87,12 @@
|
|
<el-button slot="reference" type="danger">不同意</el-button>
|
|
<el-button slot="reference" type="danger">不同意</el-button>
|
|
</el-popover>
|
|
</el-popover>
|
|
</div>
|
|
</div>
|
|
|
|
+ {{ resolveDynamicTable }}
|
|
</div>
|
|
</div>
|
|
<esign-dialog ref="esignDialog"></esign-dialog>
|
|
<esign-dialog ref="esignDialog"></esign-dialog>
|
|
<choose-subject-dialog ref="chooseDialog"></choose-subject-dialog>
|
|
<choose-subject-dialog ref="chooseDialog"></choose-subject-dialog>
|
|
<select-subject-report-dialog ref="reportDialog"></select-subject-report-dialog>
|
|
<select-subject-report-dialog ref="reportDialog"></select-subject-report-dialog>
|
|
- <Ai-dialog ref="aiDialog" :prevPreferences="prevPreferences"></Ai-dialog>
|
|
|
|
|
|
+ <!-- <Ai-dialog ref="aiDialog" :prevPreferences="prevPreferences"></Ai-dialog>-->
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
@@ -126,17 +103,26 @@ import ChooseSubjectDialog from './choose-subject-dialog'
|
|
import SelectSubjectReportDialog from '@/views/system/user/profile/components/select-subject-report-dialog'
|
|
import SelectSubjectReportDialog from '@/views/system/user/profile/components/select-subject-report-dialog'
|
|
import EsignDialog from '@/views/system/user/profile/components/esign-dialog'
|
|
import EsignDialog from '@/views/system/user/profile/components/esign-dialog'
|
|
import ReportStep from './report-step'
|
|
import ReportStep from './report-step'
|
|
|
|
+import PrimaryResolverMixins
|
|
|
|
+ from '@/views/system/user/profile/components/round-select-resolvers/primary-resolver-mixins'
|
|
|
|
+import PrimaryDMResolverMixins
|
|
|
|
+ from '@/views/system/user/profile/components/round-select-resolvers/primaryDM-resolver-mixins'
|
|
|
|
+import BackTrackingResolverMixins
|
|
|
|
+ from '@/views/system/user/profile/components/round-select-resolvers/backTracking-resolver-mixins'
|
|
|
|
+import BackTrackingDMResolverMixins
|
|
|
|
+ from '@/views/system/user/profile/components/round-select-resolvers/backTrackingDM-resolver-mixins'
|
|
|
|
+
|
|
|
|
+import FinalAdjustResolverMixins
|
|
|
|
+ from '@/views/system/user/profile/components/round-select-resolvers/finalAdjust-resolver-mixins'
|
|
|
|
+import FinalAdjustDMResolverMixins
|
|
|
|
+ from '@/views/system/user/profile/components/round-select-resolvers/finalAdjustDM-resolver-mixins'
|
|
|
|
+import RankBalanceResolverMixins
|
|
|
|
+ from '@/views/system/user/profile/components/round-select-resolvers/rankBalance-resolver-mixins'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
|
+
|
|
props: {
|
|
props: {
|
|
- generation: {
|
|
|
|
- type: Number,
|
|
|
|
- default: 1 // 模拟报名所处状态, 0为初录
|
|
|
|
- },
|
|
|
|
- preferenceCount: {
|
|
|
|
- type: Number,
|
|
|
|
- default: 3 // 多志愿个数
|
|
|
|
- }
|
|
|
|
|
|
+ generation: Object
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
SelectSubjectReportDialog,
|
|
SelectSubjectReportDialog,
|
|
@@ -146,7 +132,16 @@ export default {
|
|
ChooseSubjectDialog,
|
|
ChooseSubjectDialog,
|
|
AiDialog
|
|
AiDialog
|
|
},
|
|
},
|
|
- mixins: [MxSelectTranslate],
|
|
|
|
|
|
+ mixins: [
|
|
|
|
+ MxSelectTranslate,
|
|
|
|
+ PrimaryResolverMixins,
|
|
|
|
+ PrimaryDMResolverMixins,
|
|
|
|
+ BackTrackingResolverMixins,
|
|
|
|
+ BackTrackingDMResolverMixins,
|
|
|
|
+ FinalAdjustDMResolverMixins,
|
|
|
|
+ FinalAdjustResolverMixins,
|
|
|
|
+ RankBalanceResolverMixins
|
|
|
|
+ ],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
popoShow: false,
|
|
popoShow: false,
|
|
@@ -157,46 +152,16 @@ export default {
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
modelsWrapper: {},
|
|
modelsWrapper: {},
|
|
selectedList: [],
|
|
selectedList: [],
|
|
- singleList: [] // 单志愿列表
|
|
|
|
|
|
+ singleList: [], // 单志愿列表
|
|
|
|
+ formatRows: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
// this.$refs.drage.init(this.selectedList)
|
|
// this.$refs.drage.init(this.selectedList)
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- formatTable() {
|
|
|
|
- if (!this.modelsWrapper.models) return {}
|
|
|
|
- if (!this.optionalMajors) return {}
|
|
|
|
-
|
|
|
|
- // 行
|
|
|
|
- const rows = this.modelsWrapper.models.map(item => {
|
|
|
|
- item.allowSelectTips = item.allowSelect ? '报名中' : '无法报名'
|
|
|
|
- item.subjects = this.optionalMajors.filter(college => {
|
|
|
|
- if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
|
|
|
|
- }).map(item => item.majorCategoryName)
|
|
|
|
- item.colleges = this.optionalMajors.filter(college => {
|
|
|
|
- if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
|
|
|
|
- }).map(item => {
|
|
|
|
- return {
|
|
|
|
- college: item.collegeName,
|
|
|
|
- major: item.majorCategoryName
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- return item
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- // 列
|
|
|
|
- const statCols = {}
|
|
|
|
- this.modelsWrapper.statColumns.map((column, index) => {
|
|
|
|
- const prop = 'statistic_' + index
|
|
|
|
- statCols[prop] = { label: column.name }
|
|
|
|
- rows.forEach((row) => {
|
|
|
|
- const descriptors = column.groupDescriptors.find(desc => desc.groupId == row.groupId) ?
|
|
|
|
- column.groupDescriptors.find(desc => desc.groupId == row.groupId).descriptors : []
|
|
|
|
- row[prop] = descriptors.length > 0 ? descriptors.length > 1 ? `${descriptors[0].value}/${descriptors[1].value}` : `${descriptors[0].value}` : ''
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- const cols = {
|
|
|
|
|
|
+ resolveTablePrefix() {
|
|
|
|
+ return {
|
|
index: {
|
|
index: {
|
|
type: 'index',
|
|
type: 'index',
|
|
label: '编号'
|
|
label: '编号'
|
|
@@ -209,16 +174,11 @@ export default {
|
|
},
|
|
},
|
|
personCount: {
|
|
personCount: {
|
|
label: '人数设置'
|
|
label: '人数设置'
|
|
- },
|
|
|
|
- ...statCols,
|
|
|
|
- rankInGroup: {
|
|
|
|
- label: '当前组合实时排名',
|
|
|
|
- slotHeader: 'rankInGroup'
|
|
|
|
- },
|
|
|
|
- rankInGrade: {
|
|
|
|
- label: '选科全校排名',
|
|
|
|
- slotHeader: 'rankInGrade'
|
|
|
|
- },
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ resolveTableSuffix() {
|
|
|
|
+ return {
|
|
allowSelectTips: {
|
|
allowSelectTips: {
|
|
label: '报名状态'
|
|
label: '报名状态'
|
|
},
|
|
},
|
|
@@ -244,14 +204,106 @@ export default {
|
|
fixed: 'right'
|
|
fixed: 'right'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ resolveDynamicTable() {
|
|
|
|
+ const resolverKey = this.generation.activeOpt.key + 'Resolver'
|
|
|
|
+ const resolver = this[resolverKey]
|
|
|
|
+ if (typeof resolver === 'function') {
|
|
|
|
+ return resolver()
|
|
|
|
+ }
|
|
|
|
+ return {}
|
|
|
|
+ },
|
|
|
|
+ formatCols() {
|
|
return {
|
|
return {
|
|
- rows,
|
|
|
|
- cols
|
|
|
|
|
|
+ ...this.resolveTablePrefix,
|
|
|
|
+ ...this.resolveDynamicTable,
|
|
|
|
+ ...this.resolveTableSuffix
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ // formatTable() {
|
|
|
|
+ // // if (!this.models.length) return {}
|
|
|
|
+ // // if (!this.optionalMajors) return {}
|
|
|
|
+ // return {}
|
|
|
|
+ // // 初始化 rows cols
|
|
|
|
+ // // let rows = this.models[0].models.map(item => {
|
|
|
|
+ // // item.allowSelectTips = item.allowSelect ? '报名中' : '无法报名'
|
|
|
|
+ // // item.subjects = this.optionalMajors.filter(college => {
|
|
|
|
+ // // if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
|
|
|
|
+ // // }).map(item => item.majorCategoryName)
|
|
|
|
+ // // item.colleges = this.optionalMajors.filter(college => {
|
|
|
|
+ // // if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
|
|
|
|
+ // // }).map(item => {
|
|
|
|
+ // // return {
|
|
|
|
+ // // college: item.collegeName,
|
|
|
|
+ // // major: item.majorCategoryName
|
|
|
|
+ // // }
|
|
|
|
+ // // })
|
|
|
|
+ // // return item
|
|
|
|
+ // // })
|
|
|
|
+ // // let formatCols = this.formatCols({})
|
|
|
|
+ // // let stateCol = {}
|
|
|
|
+ // // // 判断当前步骤
|
|
|
|
+ // // const step = this.models.length
|
|
|
|
+ // // // step = 1 reutrn cols 选科人数比 组合实时排名 学校实时排名
|
|
|
|
+ // // console.log(this.activeOpt)
|
|
|
|
+ // // switch (this.activeOpt) {
|
|
|
|
+ // // // 初录报名
|
|
|
|
+ // // case config.electiveGenerationOptions.primary:
|
|
|
|
+ // // console.log(2222222222222)
|
|
|
|
+ // // // cols
|
|
|
|
+ // // stateCol = {
|
|
|
|
+ // // applyCount: {
|
|
|
|
+ // // label: '选科人数比'
|
|
|
|
+ // // },
|
|
|
|
+ // // rankInGroup: {
|
|
|
|
+ // // label: '当前组合实时排名',
|
|
|
|
+ // // },
|
|
|
|
+ // // rankInGrade: {
|
|
|
|
+ // // label: '选科全校排名',
|
|
|
|
+ // // }
|
|
|
|
+ // // }
|
|
|
|
+ // // formatCols = this.formatCols(stateCol)
|
|
|
|
+ // // // rows
|
|
|
|
+ // // console.log(rows)
|
|
|
|
+ // // rows = rows.map(item => {
|
|
|
|
+ // // item.applyCount = `${item.actualCount}/${item.personCount}`
|
|
|
|
+ // // return item
|
|
|
|
+ // // })
|
|
|
|
+ // // break
|
|
|
|
+ // // // 初录结果
|
|
|
|
+ // // case config.electiveGenerationOptions.primaryDM:
|
|
|
|
+ // // stateCol = {
|
|
|
|
+ // // applyCount: {
|
|
|
|
+ // // label: '选科人数比'
|
|
|
|
+ // // },
|
|
|
|
+ // // groupIndicator: {
|
|
|
|
+ // // label: '超/缺'
|
|
|
|
+ // // },
|
|
|
|
+ // // rankInGroup: {
|
|
|
|
+ // // label: '当前组合实时排名',
|
|
|
|
+ // // },
|
|
|
|
+ // // rankInGrade: {
|
|
|
|
+ // // label: '选科全校排名',
|
|
|
|
+ // // }
|
|
|
|
+ // // }
|
|
|
|
+ // // rows = rows.map(item => {
|
|
|
|
+ // // item.applyCount = `${item.actualCount}/${item.personCount}`
|
|
|
|
+ // // item.groupIndicator = item.groupIndicator
|
|
|
|
+ // // return item
|
|
|
|
+ // // })
|
|
|
|
+ // // formatCols = this.formatCols(stateCol)
|
|
|
|
+ // // }
|
|
|
|
+ // //
|
|
|
|
+ // // return {
|
|
|
|
+ // // rows,
|
|
|
|
+ // // formatCols
|
|
|
|
+ // // }
|
|
|
|
+ // }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ getModelsByStep() {
|
|
|
|
+ return this.models.findIndex()
|
|
|
|
+ },
|
|
toReport() {
|
|
toReport() {
|
|
this.$refs.reportDialog.open()
|
|
this.$refs.reportDialog.open()
|
|
},
|
|
},
|
|
@@ -312,18 +364,6 @@ export default {
|
|
const course1 = this.translateCourse1(row.groupId)
|
|
const course1 = this.translateCourse1(row.groupId)
|
|
this.$refs.chooseDialog.open(course0, course1)
|
|
this.$refs.chooseDialog.open(course0, course1)
|
|
},
|
|
},
|
|
- init(list) {
|
|
|
|
- console.log(list)
|
|
|
|
- this.modelsWrapper = list
|
|
|
|
- this.selectedList = this.modelsWrapper.models.filter(item => {
|
|
|
|
- return item.selected
|
|
|
|
- })
|
|
|
|
- // generation > 0 时 是单志愿报名
|
|
|
|
- this.singleList = this.modelsWrapper.models.filter(item => {
|
|
|
|
- return item.allowSelect
|
|
|
|
- })
|
|
|
|
- this.$nextTick(() => this.$refs.drage.init(this.selectedList))
|
|
|
|
- },
|
|
|
|
initOption(optionalMajors) {
|
|
initOption(optionalMajors) {
|
|
console.log(optionalMajors)
|
|
console.log(optionalMajors)
|
|
this.optionalMajors = optionalMajors
|
|
this.optionalMajors = optionalMajors
|