king
2025-05-08 b6c698c8833836971184a0a9c2645a15f8174d37
src/templates/sharecomponent/searchcomponent/index.jsx
@@ -61,6 +61,18 @@
      }, () => {
        this.handleSearch(item)
      })
    } else if (type === 'replace') {
      delete item.focus
      this.setState({
        searchlist: searchlist.map(cell => {
          if (cell.field && cell.field.toLowerCase() === item.field.toLowerCase()) {
            return item
          }
          return cell
        }),
      }, () => {
        this.handleSearch(item)
      })
    } else if (type === 'multil') {
      let list = [...searchlist, ...item]
      list = list.filter(item => !item.origin) // 去除系统项
@@ -247,19 +259,19 @@
   */
  deleteElement = (card) => {
    const { config } = this.props
    let _this = this
    let that = this
    confirm({
      content: `确定删除 - ${card.label} ?`,
      onOk() {
        let _searchlist = fromJS(_this.state.searchlist).toJS()
        let _searchlist = fromJS(that.state.searchlist).toJS()
        _searchlist = _searchlist.filter(item => item.uuid !== card.uuid)
        _this.setState({
        that.setState({
          searchlist: _searchlist
        }, () => {
          _this.props.updatesearch({...config, search: _searchlist})
          that.props.updatesearch({...config, search: _searchlist})
        })
      },
      onCancel() {}
@@ -327,7 +339,7 @@
    let size = ''
    if (config.wrap && config.wrap.searchSize) {
      size = ' mk-size-' + config.wrap.searchSize
      size = ' mk-order-' + config.wrap.searchSize
    }
    return (
@@ -347,7 +359,7 @@
          title={card && card.copyType === 'search' ?  '搜索条件-复制' : '搜索条件-编辑'}
          wrapClassName="mk-scroll-modal"
          visible={visible}
          width={850}
          width={950}
          maskClosable={false}
          onOk={this.handleSubmit}
          confirmLoading={sqlVerifing}