| | |
| | | if (type === 'search') { |
| | | // 添加搜索条件,字段集中存在搜索条件字段,使用搜索条件对象替换字段集,设置数据类型 |
| | | config.search.forEach(item => { |
| | | if (item.field && columns.has(item.field.toLowerCase())) { |
| | | let _datatype = columns.get(item.field.toLowerCase()).datatype |
| | | columns.set(item.field.toLowerCase(), {...item, origin: true, datatype: _datatype}) |
| | | if (item.field) { |
| | | if (/,/.test(item.field)) { |
| | | item.field.split(',').forEach(n => { |
| | | if (columns.has(n.toLowerCase())) { |
| | | let _datatype = columns.get(n.toLowerCase()).datatype |
| | | columns.set(n.toLowerCase(), {...item, field: n, origin: true, datatype: _datatype}) |
| | | } |
| | | }) |
| | | } else { |
| | | if (columns.has(item.field.toLowerCase())) { |
| | | let _datatype = columns.get(item.field.toLowerCase()).datatype |
| | | columns.set(item.field.toLowerCase(), {...item, origin: true, datatype: _datatype}) |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } else if (type === 'columns') { |
| | |
| | | } |
| | | |
| | | let config = fromJS(this.props.config).toJS() |
| | | |
| | | // 获取已选字段集合 |
| | | let cards = selectCards |
| | | let columnsMap = new Map() |
| | | cards.forEach(card => { |
| | | columnsMap.set(card.field.toLowerCase(), card) |
| | | }) |
| | | |
| | | let items = [] |
| | | let keys = [] |