import conditionBase from '../condition-object-base'

export default {
  ...conditionBase,
  key: 'localGroupId',
  title: '组合',
  getList: function(param, $vue) {
    return this._getList(param, $vue)
  },
  _getList: function(param, $vue) {
    if ($vue.localData.groups?.length) {
      return Promise.resolve($vue.localData.groups)
    } else {
      return Promise.resolve([])
    }
  },
  getCode(item) {
    return item.groupId
  },
  getLabel(item) {
    return item.groupName
  }
}
