king
2023-05-13 93f67eceb286067a6ec5bbd747147f4824c1c6d2
src/tabviews/zshare/topSearch/index.jsx
@@ -16,6 +16,8 @@
const MutilForm = asyncSpinComponent(() => import('./advanceform'))
const MKCheckCard = asyncComponent(() => import('@/tabviews/zshare/mutilform/mkCheckCard'))
const MKCheck = asyncComponent(() => import('@/tabviews/zshare/mutilform/mkCheck'))
const MKSwitch = asyncComponent(() => import('@/tabviews/zshare/mutilform/mkSwitch'))
const MKSelect = asyncComponent(() => import('./mkSelect'))
const DateGroup = asyncComponent(() => import('./dategroup'))
const MKDatePicker = asyncComponent(() => import('./mkDatePicker'))
@@ -77,6 +79,7 @@
        _setting.labelwidth = config.wrap.searchLwidth !== undefined ? config.wrap.searchLwidth : 33.3
        _setting.labelCol = {style: {width: _setting.labelwidth + '%'}}
        _setting.wrapperCol = {style: {width: (100 - _setting.labelwidth) + '%'}}
        _setting.borderRadius = config.wrap.borderRadius
      }
      _setting.style = null
      
@@ -188,9 +191,9 @@
            })
          } else { // 合并请求,区分本地及系统
            if (item.database === 'sso') {
              mainItems.push(`select '${item.field}' as obj_name,'${_option.field}' as arr_field,'${window.btoa(window.encodeURIComponent(_option.sql))}' as LText`)
              mainItems.push(`select '${item.field}' as obj_name,'${_option.field}' as arr_field,'${window.btoa(window.encodeURIComponent(_option.sql.replace(/%/ig, ' mpercent ')))}' as LText`)
            } else {
              localItems.push(`select '${item.field}' as obj_name,'${_option.field}' as arr_field,'${window.btoa(window.encodeURIComponent(_option.sql))}' as LText`)
              localItems.push(`select '${item.field}' as obj_name,'${_option.field}' as arr_field,'${window.btoa(window.encodeURIComponent(_option.sql.replace(/%/ig, ' mpercent ')))}' as LText`)
            }
          }
        }
@@ -531,6 +534,10 @@
        content = <DateGroup position={index} config={item} onChange={(val, type) => this.dateGroupChange(val, type, item)} />
      } else if (item.type === 'checkcard') {
        content = <MKCheckCard config={item} onChange={(val) => this.cardChange(val, item)} />
      } else if (item.type === 'check') {
        content = <MKCheck config={item} onChange={(val) => this.recordChange(val, false, item)} />
      } else if (item.type === 'switch') {
        content = <MKSwitch config={item} onChange={(val) => this.recordChange(val, false, item)} />
      }
      if (content) {
@@ -552,6 +559,11 @@
    })
    if (setting.show || setting.showAdv) {
      let style = {}
      if (setting.borderRadius) {
        style.borderRadius = setting.borderRadius
      }
      fields.push(
        <Col span={setting.ratio} style={{ whiteSpace: 'nowrap' }} className="mk-search-col search-button" key="actions">
          <Form.Item
@@ -560,10 +572,10 @@
            labelCol={setting.labelCol}
            wrapperCol={setting.wrapperCol}
          >
            {setting.show ? <Button type="primary" onClick={this.handleSubmit}>
            {setting.show ? <Button style={style} type="primary" onClick={this.handleSubmit}>
              搜索
            </Button> : null}
            {setting.show ? <Button style={{ marginLeft: 8 }} onClick={this.handleReset}>
            {setting.show ? <Button style={{ marginLeft: 8, ...style }} onClick={this.handleReset}>
              重置
            </Button> : null}
            {setting.showAdv ? <Button className={visible ? 'visible' : ''} type="link" onClick={this.handleAdvance}>
@@ -830,7 +842,7 @@
    return (
      <>
        <Form {...formItemLayout} className={`top-search mk-float-${setting.float}`} style={setting.style}>
        <Form {...formItemLayout} className={`mk-search-wrap mk-float-${setting.float}`} style={setting.style}>
          <Row gutter={24}>{this.getFields()}</Row>
          {advanceValues.length && (setting.advanceType !== 'pulldown' || (setting.advanceType === 'pulldown' && !visible)) ? <Row gutter={24}>
            <div className="advanced-list">