king
2021-06-26 bfadd84fbc2b23c59695e5a94778ab7ac40fea03
src/tabviews/zshare/topSearch/index.jsx
@@ -15,6 +15,7 @@
import './index.scss'
const { MonthPicker, WeekPicker, RangePicker } = DatePicker
const { Search } = Input
const MutilForm = asyncSpinComponent(() => import('./advanceform'))
const CheckCard = asyncComponent(() => import('@/tabviews/zshare/mutilform/checkCard'))
@@ -81,7 +82,7 @@
      _searchlist = fromJS(config.search).toJS()
      if (config.type === 'search' && config.subtype === 'mainsearch') {
        float = config.wrap.float
        showButton = config.wrap.float === 'left' && config.wrap.show === 'true'
        showButton = config.wrap.show !== 'false'
        searchStyle = config.style
      } else {
        formId = ''
@@ -99,7 +100,7 @@
      item.required = item.required === 'true'
      if (['select', 'link', 'multiselect', 'checkcard'].includes(item.type)) {
        if (item.setAll === 'true' && item.type !== 'multiselect') {
        if (item.setAll === 'true' && ['select', 'link'].includes(item.type)) {
          item.options.unshift({
            key: Utils.getuuid(),
            Value: '',
@@ -550,7 +551,7 @@
  getFields() {
    const { getFieldDecorator } = this.props.form
    const { dict, showButton, formId, showAdvanced } = this.state
    const { dict, showButton, formId, showAdvanced, float } = this.state
    const fields = []
    this.state.searchlist.forEach((item, index) => {
@@ -568,7 +569,9 @@
                    message: dict['form.required.input'] + item.label + '!'
                  }
                ]
              })(<Input placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onPressEnter={this.handleSearch} />)}
              })(item.inputType === 'search' ?
                <Search placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onSearch={this.handleSearch} enterButton/> :
                <Input placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onPressEnter={this.handleSearch} />)}
            </Form.Item>
          </Col>
        )
@@ -725,7 +728,7 @@
            </Form.Item>
          </Col>
        )
      } else if (item.type === 'checkcard') { // 多选框
      } else if (item.type === 'checkcard') {
        fields.push(
          <Col span={item.ratio || 6} key={index}>
            <Form.Item label={item.labelShow !== 'false' ? item.label : ''}>
@@ -747,7 +750,7 @@
    })
    if (showButton) {
      fields.push(
      let action = (
        <Col span={6} style={{ whiteSpace: 'nowrap' }} className="search-button" key="actions">
          <Form.Item label={' '} colon={false} style={{ minHeight: '40px' }}>
            <Button type="primary" onClick={this.handleSearch}>
@@ -762,6 +765,11 @@
          </Form.Item>
        </Col>
      )
      if (float === 'right') {
        fields.unshift(action)
      } else {
        fields.push(action)
      }
    }
    
    return fields
@@ -898,15 +906,14 @@
        cell.match = 'between'
        search.push(cell)
        if (item.transfer === 'true') {
          let copy = fromJS(cell).toJS()
          copy.type = 'group'
          copy.key = item.field.replace(/@tail@$/, '')
          copy.value = searchValues[item.field] || ''
          copy.match = '='
          copy.forbid = true
          search.push(copy)
        }
        let copy = fromJS(cell).toJS()
        copy.type = 'group'
        copy.key = item.field.replace(/@tail@$/, '')
        copy.value = searchValues[item.field] || ''
        copy.match = '='
        copy.forbid = true
        search.push(copy)
      } else {
        let _value = values[item.field] || cell.value || ''
        if (!_value) {