import conditionObjectBase from '../condition-object-base.js'
import { years } from "@/api/webApi/career-other";

export default {
  ...conditionObjectBase,
  dependentKeys: ['location'],
  key: 'yearAdmission',
  title: '学年',
  isDependencyReady(params) {
    return params.location
  },
  getList: function(param) {
    return new Promise((resolve, reject) => {
      years(param).then(res => resolve(res.rows))
        .catch(e => reject(e))
    })
  },
  getCode: function(item) {
    return item
  },
  getLabel: function(item) {
    return item
  }
}
