<template>
  <div class="fx-column">
    <mx-table :prop-defines="facultyTableDefines" :rows="rows">
      <template #tag="{value}">
        <over-under-badge :value="value"></over-under-badge>
      </template>
    </mx-table>
    <div class="fx-column mt15">
      <span class="f16 bold f-666 mb5">师资超缺解决方案</span>
      <span>1、调整单科周课时数</span>
      <span>2、调整组合科目</span>
      <span>3、增加单科老师课时数</span>
    </div>
  </div>
</template>

<script>
import OverUnderBadge from '@/views/elective/publish/components/steps/fauclty/over-under-badge'
export default {
  name: 'faculty-result',
  components: { OverUnderBadge },
  props: {
    rows: {
      type: Array,
      default: () => []
    }
  },
  computed: {
    facultyTableDefines() {
      return {
        subjectName: {
          label: '科目'
        },
        levelClassCount: {
          label: '等级考课时总数',
          minWidth: '130px'
        },
        qualifiedClassCount: {
          label: '合格考课时总数',
          minWidth: '130px'
        },
        requiredClassesCount: {
          label: '所需周课时总数',
          minWidth: '130px'
        },
        actualClassesCount: {
          label: '实际周课时总数',
          minWidth: '130px',
          disabled: true
        },
        missingClassesCount: {
          label: '所缺课时数',
          slot: 'tag',
          minWidth: '130px'
        },
        missingTeacherCount: {
          label: '所需老师人数',
          slot: 'tag',
          minWidth: '130px'
        }
      }
    },

  },
  methods: {
    badgeValue(val) {
      if (!val) return ''
      if (val > 0) return '缺'
      return '超'
    }
  }
}
</script>

<style scoped>
</style>
