|
@@ -30,8 +30,8 @@
|
|
|
:rank-descriptors="value.rankDescriptors"></elective-flow-rank-descriptor>
|
|
|
</template>
|
|
|
<template #flow-action="{row}">
|
|
|
- <el-link v-if="enableStudentTableView" @click="handleStudentTable(row)" :underline="false">查看</el-link>
|
|
|
- <el-link v-if="enableLogView" @click="handleFlowLog(row)" :underline="false">查看</el-link>
|
|
|
+ <el-link v-if="enableStudentTableView(row)" @click="handleStudentTable(row)" :underline="false">查看</el-link>
|
|
|
+ <el-link v-if="enableLogView(row)" @click="handleFlowLog(row)" :underline="false">查看</el-link>
|
|
|
<el-popover v-if="row['enableForce']" :ref="'force_'+row['studentId']" width="80" trigger="click"
|
|
|
popper-class="zero-padding-popover">
|
|
|
<div class="fx-column">
|
|
@@ -51,8 +51,8 @@
|
|
|
<elective-generation-flow-log :groups="prevData.groups" :histories="logRow.histories"
|
|
|
:matched-majors="this.majorsMap[logRow['studentId']]"/>
|
|
|
</el-dialog>
|
|
|
- <el-dialog :title="'查看详情 '+activeOpt.title" :visible.sync="studentTableVisible" :width="logDialogWidth">
|
|
|
- <report-table :generation="studentGeneration" :optional-majors="studentMajors" readonly></report-table>
|
|
|
+ <el-dialog :title="'查看分析 '+activeOpt.title" :visible.sync="studentTableVisible" :width="logDialogWidth">
|
|
|
+ <elective-ai-table :generation="studentGeneration" :optional-majors="studentMajors" readonly></elective-ai-table>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -60,6 +60,7 @@
|
|
|
<script>
|
|
|
import config from '@/common/mx-config'
|
|
|
import transferMixin from '@/components/mx-transfer-mixin'
|
|
|
+import ElectiveToolsMixin from '@/views/elective/select/components/elective-tools-mixins'
|
|
|
import groupTranslateMixin from '@/components/Cache/modules/mx-select-translate-mixin'
|
|
|
import ElectiveColorMap from './components/elective-color-map-mixins'
|
|
|
import { mapGetters } from 'vuex'
|
|
@@ -72,12 +73,18 @@ import {
|
|
|
import ElectiveGenerationFlowLog from '@/views/elective/generation/components/elective-generation-flow-log'
|
|
|
import ElectiveFlowMajor from '@/views/elective/generation/components/elective-flow-major'
|
|
|
import ElectiveFlowRankDescriptor from '@/views/elective/generation/components/elective-flow-rank-descriptor'
|
|
|
-import ReportTable from '@/views/elective/select/components/elective-table'
|
|
|
import { getStudentElectiveModels } from '@/api/webApi/elective/selected-subject'
|
|
|
+import ElectiveAiTable from '@/views/elective/select/components/elective-ai-table'
|
|
|
|
|
|
export default {
|
|
|
- components: { ReportTable, ElectiveFlowRankDescriptor, ElectiveFlowMajor, ElectiveGenerationFlowLog, MxCondition },
|
|
|
- mixins: [transferMixin, groupTranslateMixin, ElectiveColorMap],
|
|
|
+ components: {
|
|
|
+ ElectiveAiTable,
|
|
|
+ ElectiveFlowRankDescriptor,
|
|
|
+ ElectiveFlowMajor,
|
|
|
+ ElectiveGenerationFlowLog,
|
|
|
+ MxCondition
|
|
|
+ },
|
|
|
+ mixins: [transferMixin, groupTranslateMixin, ElectiveColorMap, ElectiveToolsMixin],
|
|
|
name: 'generation-detail',
|
|
|
computed: {
|
|
|
...mapGetters(['school']),
|
|
@@ -142,7 +149,9 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
- columns.actions = { label: '操作', slot: 'flow-action', minWidth: '100px' }
|
|
|
+ // 初选报名不需要展示操作
|
|
|
+ const actionHide = this.activeOpt?.value == this.options.primary.value
|
|
|
+ columns.actions = { label: '操作', slot: 'flow-action', minWidth: '100px', hidden: actionHide }
|
|
|
return {
|
|
|
rows,
|
|
|
columns,
|
|
@@ -153,12 +162,6 @@ export default {
|
|
|
const expectedWidth = (this.prevData.groups.length + 3) * 160 // 假定elective-generation-flow-log 单格宽160
|
|
|
const finalWidth = Math.min(expectedWidth, window.innerWidth * 0.8)
|
|
|
return finalWidth + 'px'
|
|
|
- },
|
|
|
- enableLogView() {
|
|
|
- return this.activeOpt?.value >= this.options.forceAdjust.value
|
|
|
- },
|
|
|
- enableStudentTableView() {
|
|
|
- return this.activeOpt?.value < this.options.forceAdjust.value
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
@@ -224,7 +227,7 @@ export default {
|
|
|
?.majors?.filter(m => m['matchedGroupIds'].some(id => id == groupId)) || [])
|
|
|
.groupBy(m => m.collegeName)
|
|
|
const current = this.prevData.activeGeneration
|
|
|
- const options = Object.values(config.electiveGenerationOptions)
|
|
|
+ const options = Object.values(this.options)
|
|
|
const histories = row['histories'] || []
|
|
|
const filterHistories = []
|
|
|
for (let g = current; g > 0; g--) {
|
|
@@ -251,6 +254,15 @@ export default {
|
|
|
if (row.color) style.color = this.matchElectiveColor(row.color)
|
|
|
return style
|
|
|
},
|
|
|
+ enableLogView(student) {
|
|
|
+ return this.activeOpt?.value > this.options.primary.value
|
|
|
+ && !this.enableStudentTableView(student)
|
|
|
+ },
|
|
|
+ enableStudentTableView(student) {
|
|
|
+ return !this.isGroupEnrolled(student)
|
|
|
+ && this.activeOpt?.value > this.options.primary.value
|
|
|
+ && this.activeOpt?.value < this.options.forceAdjust.value
|
|
|
+ },
|
|
|
handleFlowLog(row) {
|
|
|
this.logRow = row
|
|
|
this.logVisible = true
|
|
@@ -264,15 +276,18 @@ export default {
|
|
|
const majors = this.majorsMap[query.studentId]?.majors || []
|
|
|
getStudentElectiveModels(query).then(res => {
|
|
|
this.studentMajors = majors
|
|
|
+ const generationModels = res.data?.filter(g => g.generation <= query.generation) || []
|
|
|
+ this.initGenerationModels(generationModels, this.options)
|
|
|
this.studentGeneration = {
|
|
|
- options: config.electiveGenerationOptions,
|
|
|
+ options: this.options,
|
|
|
current: query.generation,
|
|
|
currentOpt: this.activeOpt,
|
|
|
active: query.generation,
|
|
|
activeOpt: this.activeOpt,
|
|
|
roundGroups: this.prevData.groups,
|
|
|
- models: res.data,
|
|
|
- activeModels: res.data?.filter(g => g.generation <= query.generation) || []
|
|
|
+ models: generationModels,
|
|
|
+ activeModels: generationModels,
|
|
|
+ activeModel: generationModels.find(g => g.generation == query.generation)
|
|
|
}
|
|
|
this.studentTableVisible = true
|
|
|
}).finally(() => this.loading = false)
|