|  | @@ -7,161 +7,35 @@
 | 
											
												
													
														|  |      width="80%"
 |  |      width="80%"
 | 
											
												
													
														|  |    >
 |  |    >
 | 
											
												
													
														|  |      <p class="mb10"><el-button type="primary" @click="toReport('all')">整体报告</el-button></p>
 |  |      <p class="mb10"><el-button type="primary" @click="toReport('all')">整体报告</el-button></p>
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -    <mx-table :propDefines="propDefines" :rows="formatRows">
 |  | 
 | 
											
												
													
														|  | -      <template #underOver="{value}">
 |  | 
 | 
											
												
													
														|  | -        <over-under-badge :value="value"></over-under-badge>
 |  | 
 | 
											
												
													
														|  | -      </template>
 |  | 
 | 
											
												
													
														|  | -      <template #subjects="{row}">
 |  | 
 | 
											
												
													
														|  | -        <el-row>
 |  | 
 | 
											
												
													
														|  | -          <el-col :span="8" v-for="subject in row.subjects">
 |  | 
 | 
											
												
													
														|  | -            <el-popover
 |  | 
 | 
											
												
													
														|  | -              placement="top"
 |  | 
 | 
											
												
													
														|  | -              popper-class="zero-padding-popover"
 |  | 
 | 
											
												
													
														|  | -              trigger="hover"
 |  | 
 | 
											
												
													
														|  | -            >
 |  | 
 | 
											
												
													
														|  | -              <div class="fx-column">
 |  | 
 | 
											
												
													
														|  | -                <el-button plain type="text">{{ subject }}</el-button>
 |  | 
 | 
											
												
													
														|  | -              </div>
 |  | 
 | 
											
												
													
														|  | -              <el-tag type="success" slot="reference" class="mr10 mb10">{{ subject[0] }}</el-tag>
 |  | 
 | 
											
												
													
														|  | -            </el-popover>
 |  | 
 | 
											
												
													
														|  | -          </el-col>
 |  | 
 | 
											
												
													
														|  | -        </el-row>
 |  | 
 | 
											
												
													
														|  | -      </template>
 |  | 
 | 
											
												
													
														|  | -      <template #group="{row}">
 |  | 
 | 
											
												
													
														|  | -        <el-badge value="荐" :hidden="!row.isRecommend" type="success">
 |  | 
 | 
											
												
													
														|  | -          <el-tag size="medium" :type="row.allowSelect ? 'warning' : 'danger'" >{{row.groupName}}</el-tag>
 |  | 
 | 
											
												
													
														|  | -        </el-badge>
 |  | 
 | 
											
												
													
														|  | -      </template>
 |  | 
 | 
											
												
													
														|  | -      <template #colleges="{row}">
 |  | 
 | 
											
												
													
														|  | -        <el-row>
 |  | 
 | 
											
												
													
														|  | -          <el-col :span="12" v-for="college in row.colleges">
 |  | 
 | 
											
												
													
														|  | -            <el-popover
 |  | 
 | 
											
												
													
														|  | -              placement="top"
 |  | 
 | 
											
												
													
														|  | -              popper-class="zero-padding-popover"
 |  | 
 | 
											
												
													
														|  | -              trigger="hover"
 |  | 
 | 
											
												
													
														|  | -            >
 |  | 
 | 
											
												
													
														|  | -              <div class="fx-column">
 |  | 
 | 
											
												
													
														|  | -                <el-button plain type="text">{{ college.major }}</el-button>
 |  | 
 | 
											
												
													
														|  | -              </div>
 |  | 
 | 
											
												
													
														|  | -              <el-tag type="success" slot="reference" class="mr10 mb10">{{ college.major[0] }}</el-tag>
 |  | 
 | 
											
												
													
														|  | -            </el-popover>
 |  | 
 | 
											
												
													
														|  | -            :
 |  | 
 | 
											
												
													
														|  | -            <span>{{ college.college }}</span>
 |  | 
 | 
											
												
													
														|  | -          </el-col>
 |  | 
 | 
											
												
													
														|  | -        </el-row>
 |  | 
 | 
											
												
													
														|  | -      </template>
 |  | 
 | 
											
												
													
														|  | -      <template #report="{row}">
 |  | 
 | 
											
												
													
														|  | -        <el-button @click="toReport('single',row)" >查看</el-button>
 |  | 
 | 
											
												
													
														|  | -      </template>
 |  | 
 | 
											
												
													
														|  | -    </mx-table>
 |  | 
 | 
											
												
													
														|  | 
 |  | +    <ai-table :generation="generation" :optionalMajors="optionalMajors"></ai-table>
 | 
											
												
													
														|  |      <span slot="footer" class="dialog-footer">
 |  |      <span slot="footer" class="dialog-footer">
 | 
											
												
													
														|  |          <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
 |  |          <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
 | 
											
												
													
														|  |      </span>
 |  |      </span>
 | 
											
												
													
														|  | -    <single-subject-report :admissionInfo="prevPreferencesInfo"  :reportInfo="formatRows"  ref="SingleSubjectReport"></single-subject-report>
 |  | 
 | 
											
												
													
														|  | 
 |  | +<!--    <single-subject-report :admissionInfo="prevPreferencesInfo"  :reportInfo="formatRows"  ref="SingleSubjectReport"></single-subject-report>-->
 | 
											
												
													
														|  |    </el-dialog>
 |  |    </el-dialog>
 | 
											
												
													
														|  |  </template>
 |  |  </template>
 | 
											
												
													
														|  |  <script>
 |  |  <script>
 | 
											
												
													
														|  |  import SingleSubjectReport from './single-subject-report'
 |  |  import SingleSubjectReport from './single-subject-report'
 | 
											
												
													
														|  | -import OverUnderBadge from '@/views/elective/publish/components/steps/fauclty/over-under-badge'
 |  | 
 | 
											
												
													
														|  | 
 |  | +import AiTable from './ai-table'
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -const resolverModules = require.context('./ai-round-select-resolvers', false, /\.js$/)
 |  | 
 | 
											
												
													
														|  | -const resolvers = resolverModules.keys().map(key => resolverModules(key).default)
 |  | 
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  export default {
 |  |  export default {
 | 
											
												
													
														|  |    components:{
 |  |    components:{
 | 
											
												
													
														|  | -    SingleSubjectReport,
 |  | 
 | 
											
												
													
														|  | -    OverUnderBadge
 |  | 
 | 
											
												
													
														|  | 
 |  | +    AiTable
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    props: {
 |  |    props: {
 | 
											
												
													
														|  |      generation: Object,
 |  |      generation: Object,
 | 
											
												
													
														|  |      prevPreferencesInfo: String,
 |  |      prevPreferencesInfo: String,
 | 
											
												
													
														|  | 
 |  | +    optionalMajors: { type: Array, default: () => [] }
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  | -  mixins: [...resolvers],
 |  | 
 | 
											
												
													
														|  |    data() {
 |  |    data() {
 | 
											
												
													
														|  |      return{
 |  |      return{
 | 
											
												
													
														|  |        dialogVisible:false,
 |  |        dialogVisible:false,
 | 
											
												
													
														|  | -      formatRows: [],
 |  | 
 | 
											
												
													
														|  | -      tableInfo: {},
 |  | 
 | 
											
												
													
														|  | -      currentReportName: '',
 |  | 
 | 
											
												
													
														|  | -    }
 |  | 
 | 
											
												
													
														|  | -  },
 |  | 
 | 
											
												
													
														|  | -  computed: {
 |  | 
 | 
											
												
													
														|  | -    resolveTablePrefix() {
 |  | 
 | 
											
												
													
														|  | -      return {
 |  | 
 | 
											
												
													
														|  | -        groupName: {
 |  | 
 | 
											
												
													
														|  | -          label: '选科组合',
 |  | 
 | 
											
												
													
														|  | -          width:'120px',
 |  | 
 | 
											
												
													
														|  | -          slot: 'group'
 |  | 
 | 
											
												
													
														|  | -        },
 |  | 
 | 
											
												
													
														|  | -        scoreSumGroup: {
 |  | 
 | 
											
												
													
														|  | -          label: '组合成绩'
 |  | 
 | 
											
												
													
														|  | -        },
 |  | 
 | 
											
												
													
														|  | -      }
 |  | 
 | 
											
												
													
														|  | -    },
 |  | 
 | 
											
												
													
														|  | -    resolveTableSuffix() {
 |  | 
 | 
											
												
													
														|  | -      return{
 |  | 
 | 
											
												
													
														|  | -        subjects: {
 |  | 
 | 
											
												
													
														|  | -          label: '自选专业',
 |  | 
 | 
											
												
													
														|  | -          slot: 'subjects',
 |  | 
 | 
											
												
													
														|  | -          width: '150'
 |  | 
 | 
											
												
													
														|  | -        },
 |  | 
 | 
											
												
													
														|  | -        colleges: {
 |  | 
 | 
											
												
													
														|  | -          label: '院校',
 |  | 
 | 
											
												
													
														|  | -          slot: 'colleges',
 |  | 
 | 
											
												
													
														|  | -          width: '250'
 |  | 
 | 
											
												
													
														|  | -        },
 |  | 
 | 
											
												
													
														|  | -        signUp: {
 |  | 
 | 
											
												
													
														|  | -          label: '报告',
 |  | 
 | 
											
												
													
														|  | -          slot: 'report',
 |  | 
 | 
											
												
													
														|  | -          width: '100',
 |  | 
 | 
											
												
													
														|  | -          fixed: 'right',
 |  | 
 | 
											
												
													
														|  | -        }
 |  | 
 | 
											
												
													
														|  | -      }
 |  | 
 | 
											
												
													
														|  | -    },
 |  | 
 | 
											
												
													
														|  | -    formatTable() {
 |  | 
 | 
											
												
													
														|  | -      if (!this.formatRows) return {}
 |  | 
 | 
											
												
													
														|  | -      const options = this.generation.options
 |  | 
 | 
											
												
													
														|  | -      console.log(this.generation)
 |  | 
 | 
											
												
													
														|  | -      if (!options || !this.generation.active) return {}
 |  | 
 | 
											
												
													
														|  | -      // const optValues = Object.values(options)
 |  | 
 | 
											
												
													
														|  | -      const dynamicColumns = {}
 |  | 
 | 
											
												
													
														|  | -      const resolverKey = this.generation.activeOpt.key + 'Resolver'
 |  | 
 | 
											
												
													
														|  | -      const resolver = this[resolverKey]
 |  | 
 | 
											
												
													
														|  | -      if (typeof resolver === 'function') {
 |  | 
 | 
											
												
													
														|  | -         const genColumns = resolver(this.generation.active)
 |  | 
 | 
											
												
													
														|  | -         Object.assign(dynamicColumns, genColumns)
 |  | 
 | 
											
												
													
														|  | -      }
 |  | 
 | 
											
												
													
														|  | -      // for (let gen = options.primary.value; gen <= this.generation.active; gen++) {
 |  | 
 | 
											
												
													
														|  | -      //   const opt = optValues.find(opt => opt.value == gen)
 |  | 
 | 
											
												
													
														|  | -      //   const resolverKey = opt.key + 'Resolver'
 |  | 
 | 
											
												
													
														|  | -      //   const resolver = this[resolverKey]
 |  | 
 | 
											
												
													
														|  | -      //   if (typeof resolver === 'function') {
 |  | 
 | 
											
												
													
														|  | -      //     const genColumns = resolver(gen, this.generation.active)
 |  | 
 | 
											
												
													
														|  | -      //     Object.assign(dynamicColumns, genColumns)
 |  | 
 | 
											
												
													
														|  | -      //   }
 |  | 
 | 
											
												
													
														|  | -      // }
 |  | 
 | 
											
												
													
														|  | -      console.log(dynamicColumns)
 |  | 
 | 
											
												
													
														|  | -      return dynamicColumns
 |  | 
 | 
											
												
													
														|  | -    },
 |  | 
 | 
											
												
													
														|  | -    propDefines() {
 |  | 
 | 
											
												
													
														|  | -      return {
 |  | 
 | 
											
												
													
														|  | -        ...this.resolveTablePrefix,
 |  | 
 | 
											
												
													
														|  | -        ...this.formatTable,
 |  | 
 | 
											
												
													
														|  | -        ...this.resolveTableSuffix,
 |  | 
 | 
											
												
													
														|  | -      }
 |  | 
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    methods: {
 |  |    methods: {
 | 
											
												
													
														|  | -    toReport(type,row) {
 |  | 
 | 
											
												
													
														|  | -      this.$refs.SingleSubjectReport.init(type,row)
 |  | 
 | 
											
												
													
														|  | -    },
 |  | 
 | 
											
												
													
														|  |      open(rows) {
 |  |      open(rows) {
 | 
											
												
													
														|  |        this.dialogVisible = true
 |  |        this.dialogVisible = true
 | 
											
												
													
														|  | -      this.formatRows = rows
 |  | 
 | 
											
												
													
														|  | -    },
 |  | 
 | 
											
												
													
														|  | -    handleClose() {
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |    }
 |  |    }
 | 
											
												
													
														|  |  }
 |  |  }
 |