import conditionObjectBase from '../condition-object-base.js'
import { listYears } from '@/api/webApi/selection.js'

export default {
  ...conditionObjectBase,
  key: 'year',
  title: '学年',
  getList: function(param) {
    return new Promise((resolve, reject) => {
      listYears().then(res => resolve(res.data))
        .catch(e => reject(e))
    })
  },
  getCode: function(item) {
    return item
  },
  getLabel: function(item) {
    return item
  }
}
