king
2023-07-21 71e3da644eca32a5aa40503e903efb0640748093
src/tabviews/zshare/topSearch/index.jsx
@@ -11,6 +11,7 @@
import asyncComponent from '@/utils/asyncComponent'
import asyncSpinComponent from '@/utils/asyncSpinComponent'
import Utils from '@/utils/utils.js'
import MKEmitter from '@/utils/events.js'
import MKInput from './mkInput'
import './index.scss'
@@ -25,8 +26,7 @@
class MainSearch extends Component {
  static propTpyes = {
    BID: PropTypes.any,          // 父级Id,用于查询下拉选择项
    config: PropTypes.object,    // 组件配置信息(自定义页面)
    refreshdata: PropTypes.func  // 刷新数据
    config: PropTypes.object,    // 组件配置信息
  }
  state = {
@@ -51,8 +51,6 @@
    let advanceValues = []
    let linkFields = {}
    let record = {}
    let hasReqFields = false
    let forbid = false // header中不设置高级搜索
    let _setting = {showAdv: false, show: false, style: null}
    
@@ -112,10 +110,6 @@
      if (fieldMap.has(item.field)) {
        item.field = item.field + '@tail@'
      }
      if (item.required) {
        hasReqFields = true
      }
      if (item.advanced && !forbid) {
@@ -221,7 +215,7 @@
    this.setState({
      setting: _setting,
      hasReqFields,
      hasReqFields: config.$s_req,
      advanceValues,
      searchlist: _list
    }, () => {
@@ -691,7 +685,12 @@
          this.sign = ''
        }, 2000)
        
        this.props.refreshdata(searches)
        if (this.props.refreshdata) {
          this.props.refreshdata(searches)
        } else {
          window.GLOB.SearchBox.set(this.props.config.$searchId, searches)
          MKEmitter.emit('searchRefresh', this.props.config.$searchId)
        }
      })
    })
  }