king
2023-04-07 20185ab64a165df51515d9fa1c9b12a7a8c55f59
src/templates/sharecomponent/fieldscomponent/index.jsx
@@ -106,10 +106,13 @@
      selectCards.forEach(item => {
        let _match = ''
        let initval = ''
        if (item.type === 'select') {
        let _type = item.type
        if (item.type === 'date') {
          _type = 'daterange'
        } else if (item.type === 'select') {
          _match = '='
        } else {
          item.type = 'text'
          _type = 'text'
          _match = 'like'
        }
@@ -118,7 +121,7 @@
          label: item.label,
          field: item.field,
          initval: initval,
          type: item.type,
          type: _type,
          resourceType: '0',
          options: [],
          orderType: 'asc',
@@ -163,7 +166,7 @@
          field: item.field,
          datatype: _t
        }
        items.push(newcard)
        items.unshift(newcard)
        keys.push(item.field.toLowerCase())
      })
@@ -196,6 +199,7 @@
        if (item.type === 'text' && item.length >= 256) {
          newcard.type = 'textarea'
          newcard.required = 'false'
          newcard.fieldlength = item.length
          if (firstItem) {
            if (firstItem.type === newcard.type) {
@@ -262,9 +266,16 @@
    const { type } = this.props
    const { fields } = this.state
    let label = '批量添加'
    if (type === 'search') {
      label = '添加搜索'
    } else if (type === 'columns') {
      label = '添加显示列'
    }
    return (
      <div className="quickly-add">
        <Button type="primary" block onClick={this.queryField}>批量添加</Button>
        <Button type="primary" block onClick={this.queryField}>{label}</Button>
        {/* 根据字段名添加显示列及搜索条件 */}
        <Modal
          wrapClassName="model-table-fieldmanage-modal"