import conditionObjectBase from '../condition-object-base.js'
import mxCache from '@/components/Cache/mx-cache-mixin.js'

export default {
  ...conditionObjectBase,
  key: 'gradeId',
  title: '年级',
  getList: function(param) {
    return new Promise((resolve, reject) => {
      mxCache.methods.getPharseGradeListByCache().then(data => {
        resolve(data)
      }).catch(e => reject(e))
    })
  },
  getCode: function(item) {
    return item.gradeId
  },
  getLabel: function(item) {
    return item.grade.gradename
  }
}
