|  | @@ -1,14 +1,12 @@
 | 
											
												
													
														|  |  <template>
 |  |  <template>
 | 
											
												
													
														|  |    <div>
 |  |    <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">
 |  |        <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>
 |  |        </div>
 | 
											
												
													
														|  | 
 |  | +      <el-button v-if="enableAIFeature" type="primary" @click="toAiAnalysis">AI分析</el-button>
 | 
											
												
													
														|  |      </div>
 |  |      </div>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      <mx-table :propDefines="formatCols" :rows="formatRows">
 |  |      <mx-table :propDefines="formatCols" :rows="formatRows">
 | 
											
										
											
												
													
														|  | @@ -17,7 +15,7 @@
 | 
											
												
													
														|  |        </template>
 |  |        </template>
 | 
											
												
													
														|  |        <template #group="{row}">
 |  |        <template #group="{row}">
 | 
											
												
													
														|  |          <over-under-badge :value="row.isRecommend?1:0" over-text="荐" over-type="success">
 |  |          <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>
 |  |          </over-under-badge>
 | 
											
												
													
														|  |        </template>
 |  |        </template>
 | 
											
												
													
														|  |        <template #temp="{row}">
 |  |        <template #temp="{row}">
 | 
											
										
											
												
													
														|  | @@ -133,7 +131,8 @@
 | 
											
												
													
														|  |      <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" :optionalMajors="optionalMajors" :prevPreferencesInfo="currentSupplyInfo" :generation="generation"></Ai-dialog>
 |  | 
 | 
											
												
													
														|  | 
 |  | +    <Ai-dialog ref="aiDialog" :optionalMajors="optionalMajors" :prevPreferencesInfo="currentSupplyInfo"
 | 
											
												
													
														|  | 
 |  | +               :generation="generation"></Ai-dialog>
 | 
											
												
													
														|  |    </div>
 |  |    </div>
 | 
											
												
													
														|  |  </template>
 |  |  </template>
 | 
											
												
													
														|  |  <script>
 |  |  <script>
 | 
											
										
											
												
													
														|  | @@ -148,6 +147,8 @@ import OverUnderBadge from '@/views/elective/publish/components/steps/fauclty/ov
 | 
											
												
													
														|  |  import { rejectRecommend, submitElectiveModels } from '@/api/webApi/elective/selected-subject'
 |  |  import { rejectRecommend, submitElectiveModels } from '@/api/webApi/elective/selected-subject'
 | 
											
												
													
														|  |  import consts from '@/common/mx-const'
 |  |  import consts from '@/common/mx-const'
 | 
											
												
													
														|  |  import { mapGetters } from 'vuex'
 |  |  import { mapGetters } from 'vuex'
 | 
											
												
													
														|  | 
 |  | +import ElectiveEnrollInfo from '@/views/system/user/profile/components/elective-enroll-info'
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  const resolverModules = require.context('./round-select-resolvers', false, /\.js$/)
 |  |  const resolverModules = require.context('./round-select-resolvers', false, /\.js$/)
 | 
											
												
													
														|  |  const resolvers = resolverModules.keys().map(key => resolverModules(key).default)
 |  |  const resolvers = resolverModules.keys().map(key => resolverModules(key).default)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -158,6 +159,7 @@ export default {
 | 
											
												
													
														|  |      optionalMajors: { type: Array, default: () => [] }
 |  |      optionalMajors: { type: Array, default: () => [] }
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    components: {
 |  |    components: {
 | 
											
												
													
														|  | 
 |  | +    ElectiveEnrollInfo,
 | 
											
												
													
														|  |      OverUnderBadge,
 |  |      OverUnderBadge,
 | 
											
												
													
														|  |      SelectSubjectReportDialog,
 |  |      SelectSubjectReportDialog,
 | 
											
												
													
														|  |      ReportStep,
 |  |      ReportStep,
 | 
											
										
											
												
													
														|  | @@ -169,7 +171,6 @@ export default {
 | 
											
												
													
														|  |    inject: {
 |  |    inject: {
 | 
											
												
													
														|  |      'refreshData': {
 |  |      'refreshData': {
 | 
											
												
													
														|  |        default: function() {
 |  |        default: function() {
 | 
											
												
													
														|  | -        // do nothing
 |  | 
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
										
											
												
													
														|  | @@ -177,7 +178,6 @@ export default {
 | 
											
												
													
														|  |    data() {
 |  |    data() {
 | 
											
												
													
														|  |      return {
 |  |      return {
 | 
											
												
													
														|  |        popoShow: false,
 |  |        popoShow: false,
 | 
											
												
													
														|  | -      activeStep: '',
 |  | 
 | 
											
												
													
														|  |        regInfo: '', // 拒绝原因
 |  |        regInfo: '', // 拒绝原因
 | 
											
												
													
														|  |        dialogVisible: false,
 |  |        dialogVisible: false,
 | 
											
												
													
														|  |        singleList: [], // 单志愿列表
 |  |        singleList: [], // 单志愿列表
 | 
											
										
											
												
													
														|  | @@ -186,6 +186,24 @@ export default {
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    computed: {
 |  |    computed: {
 | 
											
												
													
														|  |      ...mapGetters(['hasPermissions']),
 |  |      ...mapGetters(['hasPermissions']),
 | 
											
												
													
														|  | 
 |  | +    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() {
 |  |      historySupply() {
 | 
											
												
													
														|  |        // 当前代历史报名信息
 |  |        // 当前代历史报名信息
 | 
											
												
													
														|  |        if (!this.generation.models.length) return ''
 |  |        if (!this.generation.models.length) return ''
 | 
											
										
											
												
													
														|  | @@ -273,12 +291,11 @@ export default {
 | 
											
												
													
														|  |        const selectStep = !this.generation.activeOpt.decisionMaking
 |  |        const selectStep = !this.generation.activeOpt.decisionMaking
 | 
											
												
													
														|  |        return stepMatched && selectStep && !this.readonly && !this.activeModels.isAdmission
 |  |        return stepMatched && selectStep && !this.readonly && !this.activeModels.isAdmission
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  | -    aiButtonShow() {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    enableAIFeature() {
 | 
											
												
													
														|  |        if (!this.generation.activeOpt) return false
 |  |        if (!this.generation.activeOpt) return false
 | 
											
												
													
														|  |        const options = this.generation.options
 |  |        const options = this.generation.options
 | 
											
												
													
														|  |        return !this.generation.activeOpt.decisionMaking &&
 |  |        return !this.generation.activeOpt.decisionMaking &&
 | 
											
												
													
														|  | -        this.generation.activeOpt != options.primary &&
 |  | 
 | 
											
												
													
														|  | -        !this.readonly
 |  | 
 | 
											
												
													
														|  | 
 |  | +        this.generation.activeOpt != options.primary && !this.readonly
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      resolveTablePrefix() {
 |  |      resolveTablePrefix() {
 | 
											
												
													
														|  |        return {
 |  |        return {
 | 
											
										
											
												
													
														|  | @@ -408,10 +425,8 @@ export default {
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      isGroupOverSetting(row) {
 |  |      isGroupOverSetting(row) {
 | 
											
												
													
														|  |        if (this.generation.activeOpt.decisionMaking) {
 |  |        if (this.generation.activeOpt.decisionMaking) {
 | 
											
												
													
														|  | -        console.log('isGroupOverSetting decisionMaking', row.groupApprovedCount >= row.personCount, row)
 |  | 
 | 
											
												
													
														|  |          return row.groupApprovedCount >= row.personCount
 |  |          return row.groupApprovedCount >= row.personCount
 | 
											
												
													
														|  |        } else {
 |  |        } else {
 | 
											
												
													
														|  | -        console.log('isGroupOverSetting', row.actualCount >= row.groupIndicator, row)
 |  | 
 | 
											
												
													
														|  |          return row.actualCount >= row.groupIndicator
 |  |          return row.actualCount >= row.groupIndicator
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
										
											
												
													
														|  | @@ -553,12 +568,4 @@ export default {
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  </script>
 |  |  </script>
 | 
											
												
													
														|  |  <style scoped>
 |  |  <style scoped>
 | 
											
												
													
														|  | -/*.cell .el-tag {*/
 |  | 
 | 
											
												
													
														|  | -/*  margin-right: 2px;*/
 |  | 
 | 
											
												
													
														|  | -/*}*/
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -/*.group /deep/ .el-badge__content.is-fixed {*/
 |  | 
 | 
											
												
													
														|  | -/*  top: 8px;*/
 |  | 
 | 
											
												
													
														|  | -/*  right: 14px;*/
 |  | 
 | 
											
												
													
														|  | -/*}*/
 |  | 
 | 
											
												
													
														|  |  </style>
 |  |  </style>
 |