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

export default {
  ...conditionObjectBase,
  key: 'typeId',
  title: '类型',
  getList: function(param) {
    return new Promise((resolve, reject) => {
      mxCache.methods.getEvaluationTypeListByCache().then(data => {
        resolve(data)
      }).catch(e => reject(e))
    })
  },
  getCode(item) {
    return item.value
  },
  getLabel(item) {
    return item.label
  }
}
