|
@@ -1,14 +1,12 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div class="mb10 fx-row fx-end-base jc-between">
|
|
|
+ <div class="mb10 fx-row fx-bet-cen">
|
|
|
<div class="fx-row fx-end-cen">
|
|
|
- <slot name="header-prefix"></slot>
|
|
|
- <p v-if="generation.active > 1" v-html="currentSupplyInfo"></p>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <el-button v-if="aiButtonShow" type="primary" @click="toAiAnalysis">AI分析</el-button>
|
|
|
- <!-- <el-button>选科历史记录</el-button>-->
|
|
|
+ <el-button circle icon="el-icon-refresh" @click="refreshData" class="mr30"></el-button>
|
|
|
+ <elective-enroll-info v-if="enrollInfoVisible" :generation="generation"
|
|
|
+ :enroll-status="enrollStatus"></elective-enroll-info>
|
|
|
</div>
|
|
|
+ <el-button v-if="enableAIFeature" type="primary" @click="toAiAnalysis">AI分析</el-button>
|
|
|
</div>
|
|
|
|
|
|
<mx-table :propDefines="formatCols" :rows="formatRows">
|
|
@@ -17,7 +15,7 @@
|
|
|
</template>
|
|
|
<template #group="{row}">
|
|
|
<over-under-badge :value="row.isRecommend?1:0" over-text="荐" over-type="success">
|
|
|
- <el-tag size="medium" :type="isGroupOverSetting(row) ? 'danger' : 'warning'">{{ row.groupName }}</el-tag>
|
|
|
+ <el-tag size="medium" :type="row.allowSelect ? 'warning' : 'danger'">{{ row.groupName }}</el-tag>
|
|
|
</over-under-badge>
|
|
|
</template>
|
|
|
<template #temp="{row}">
|
|
@@ -133,7 +131,8 @@
|
|
|
<esign-dialog ref="esignDialog"></esign-dialog>
|
|
|
<choose-subject-dialog ref="chooseDialog"></choose-subject-dialog>
|
|
|
<select-subject-report-dialog ref="reportDialog"></select-subject-report-dialog>
|
|
|
- <Ai-dialog ref="aiDialog" :optionalMajors="optionalMajors" :prevPreferencesInfo="currentSupplyInfo" :generation="generation"></Ai-dialog>
|
|
|
+ <Ai-dialog ref="aiDialog" :optionalMajors="optionalMajors" :prevPreferencesInfo="currentSupplyInfo"
|
|
|
+ :generation="generation"></Ai-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -146,6 +145,7 @@ import EsignDialog from '@/views/system/user/profile/components/esign-dialog'
|
|
|
import ReportStep from './report-step'
|
|
|
import OverUnderBadge from '@/views/elective/publish/components/steps/fauclty/over-under-badge'
|
|
|
import { rejectRecommend, submitElectiveModels } from '@/api/webApi/elective/selected-subject'
|
|
|
+import ElectiveEnrollInfo from '@/views/system/user/profile/components/elective-enroll-info'
|
|
|
|
|
|
const resolverModules = require.context('./round-select-resolvers', false, /\.js$/)
|
|
|
const resolvers = resolverModules.keys().map(key => resolverModules(key).default)
|
|
@@ -157,6 +157,7 @@ export default {
|
|
|
optionalMajors: { type: Array, default: () => [] }
|
|
|
},
|
|
|
components: {
|
|
|
+ ElectiveEnrollInfo,
|
|
|
OverUnderBadge,
|
|
|
SelectSubjectReportDialog,
|
|
|
ReportStep,
|
|
@@ -168,7 +169,6 @@ export default {
|
|
|
inject: {
|
|
|
'refreshData': {
|
|
|
default: function() {
|
|
|
- // do nothing
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -176,7 +176,6 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
popoShow: false,
|
|
|
- activeStep: '',
|
|
|
regInfo: '', // 拒绝原因
|
|
|
dialogVisible: false,
|
|
|
singleList: [], // 单志愿列表
|
|
@@ -184,6 +183,24 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
+ enrollInfoVisible() {
|
|
|
+ return this.generation.active > this.generation.options.primary.value
|
|
|
+ },
|
|
|
+ enrollStatus() {
|
|
|
+ const enrolledGroup = this.generation.activeModel.models?.find(m => m.approved || m.forceAdjusted)
|
|
|
+ if (enrolledGroup) {
|
|
|
+ let enrolledModel = this.generation.activeModel
|
|
|
+ do {
|
|
|
+ const matched = enrolledModel.models?.find(m => m.groupId == enrolledGroup.groupId && (m.approved || m.forceAdjusted))
|
|
|
+ if (matched && enrolledModel.selectedList.includes(matched)) {
|
|
|
+ return { enrolledGroup, enrolledModel }
|
|
|
+ }
|
|
|
+ enrolledModel = enrolledModel.prevModel
|
|
|
+ }
|
|
|
+ while (enrolledModel)
|
|
|
+ }
|
|
|
+ return { enrolledGroup, enrolledModel: null }
|
|
|
+ },
|
|
|
historySupply() {
|
|
|
// 当前代历史报名信息
|
|
|
if (!this.generation.models.length) return ''
|
|
@@ -271,12 +288,11 @@ export default {
|
|
|
const selectStep = !this.generation.activeOpt.decisionMaking
|
|
|
return stepMatched && selectStep && !this.readonly && !this.activeModels.isAdmission
|
|
|
},
|
|
|
- aiButtonShow() {
|
|
|
+ enableAIFeature() {
|
|
|
if (!this.generation.activeOpt) return false
|
|
|
const options = this.generation.options
|
|
|
return !this.generation.activeOpt.decisionMaking &&
|
|
|
- this.generation.activeOpt != options.primary &&
|
|
|
- !this.readonly
|
|
|
+ this.generation.activeOpt != options.primary && !this.readonly
|
|
|
},
|
|
|
resolveTablePrefix() {
|
|
|
return {
|
|
@@ -403,10 +419,8 @@ export default {
|
|
|
},
|
|
|
isGroupOverSetting(row) {
|
|
|
if (this.generation.activeOpt.decisionMaking) {
|
|
|
- console.log('isGroupOverSetting decisionMaking', row.groupApprovedCount >= row.personCount, row)
|
|
|
return row.groupApprovedCount >= row.personCount
|
|
|
} else {
|
|
|
- console.log('isGroupOverSetting', row.actualCount >= row.groupIndicator, row)
|
|
|
return row.actualCount >= row.groupIndicator
|
|
|
}
|
|
|
},
|
|
@@ -548,12 +562,4 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
-/*.cell .el-tag {*/
|
|
|
-/* margin-right: 2px;*/
|
|
|
-/*}*/
|
|
|
-
|
|
|
-/*.group /deep/ .el-badge__content.is-fixed {*/
|
|
|
-/* top: 8px;*/
|
|
|
-/* right: 14px;*/
|
|
|
-/*}*/
|
|
|
</style>
|