| | |
| | | }, () => { |
| | | 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) // 去除系统项 |
| | |
| | | */ |
| | | 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() {} |
| | |
| | | |
| | | let size = '' |
| | | if (config.wrap && config.wrap.searchSize) { |
| | | size = ' mk-size-' + config.wrap.searchSize |
| | | size = ' mk-order-' + config.wrap.searchSize |
| | | } |
| | | |
| | | return ( |
| | |
| | | title={card && card.copyType === 'search' ? '搜索条件-复制' : '搜索条件-编辑'} |
| | | wrapClassName="mk-scroll-modal" |
| | | visible={visible} |
| | | width={850} |
| | | width={950} |
| | | maskClosable={false} |
| | | onOk={this.handleSubmit} |
| | | confirmLoading={sqlVerifing} |