/**
 * 选择控件服务类
 */
export default {

  /**
     * 加载下拉框的数据
     * @param column 列定义
     * @param infoWindowNo 查询窗口定义
     * @param tabGridField 表格字段定义
     */
  loadSelectData: function (column, infoWindowNo, tabGridField) {
    var _self = this;

    column.handsontable = {
      colHeaders: [
        '',
      ],
      columns: [
        {
          data: 'value',
        },
      ],
      autoColumnSize: true,
      getValue: function () {
        var selection = this.getSelectedLast();
        if (selection != null && selection.length > 0) {
          var selectedData = this.getSourceDataAtRow(selection[0]);
          if (selectedData == null) {
            return null;
          } else {
            return selectedData.keyStr;
          }
        } else {
          return null;
        }
      },
      language: 'zh-CN',
      data: tabGridField.keyValues,
    };

    let column1 = column;
    return new Promise((resolve, reject) => {
      resolve();
    });
  },
};