king
2025-01-22 871597aaf2c838946723ee44fc7fa12487b56d34
src/templates/sharecomponent/fieldscomponent/index.jsx
@@ -146,9 +146,20 @@
    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') {
@@ -193,13 +204,6 @@
    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 = []
    if (type === 'search') {
@@ -240,7 +244,7 @@
          label: item.label,
          field: item.field,
          Hide: 'false',
          IsSort: 'true',
          IsSort: 'false',
          type: item.type === 'number' ? 'number' : 'text',
          Width: item.type === 'number' ? 80 : 120
        }
@@ -301,7 +305,8 @@
          decimal: item.decimal,
          orderType: 'asc',
          readonly: 'false',
          required: 'true'
          required: 'true',
          readin: 'top'
        }
        if (/^icon|images?$/ig.test(item.field)) {