
<script>
import PrevEnrollPlanTree from '@/views/career/PrevBatch/PrevEnrollPlanTree.vue'
import { getPreEnrollV2, getPreEnrollYears } from '@/api/webApi/prev-batch'

export default {
  name: 'PrevShiftLineTree',
  extends: PrevEnrollPlanTree,
  data() {
    return {
      isEnrollMode: true // 重写PrevEnrollPlanTree，让表格显示为投档格式
    }
  },
  methods: {
    async initQueryYear() {
      const res = await getPreEnrollYears({ category: this.query.category })
      this.queryData.years = this._makeOptions(res['rows'])
      this.query.year = this.queryData.years.first().value
    },
    async getList() {
      this.loading = true
      try {
        const res = await getPreEnrollV2(this.query)
        this.rows = res.rows
        this.total = res.total
      } finally {
        this.loading = false
      }
    }
  }
}
</script>

<style scoped>

</style>
