king
2024-11-15 c5a07dba94694d13f0a78e051dfa26c3522933ee
src/menu/components/share/colsControl/index.jsx
@@ -35,6 +35,9 @@
        title: '对比方式',
        dataIndex: 'match',
        width: '18%',
        render: text => {
          return text === 'regexp' ? '正则表达式' : text
        }
      },
      {
        title: '对比值',
@@ -164,8 +167,10 @@
    let cvalues = {}
    let cols = config.cols.map(item => {
      let types = {custom: '自定义列', colspan: '合并列'}
      let label = types[item.type] ? `${item.label}(${types[item.type]})` : item.label
      let label = item.label
      if (item.type === 'colspan' && item.subcols && item.subcols.length > 0) {
        label = `${item.label}(${item.subcols.map(cell => cell.label).join('、')})`
      }
      cvalues[item.uuid] = label
@@ -240,7 +245,7 @@
    _config.colsCtrls = colsCtrls
    if (this.customForm && this.customForm.state.editItem) {
      const _this = this
      const that = this
      let title = '存在未保存项,确定忽略吗?'
      if (s.length > 0) {
        title = `存在未保存项,且第 ${s.join('、')} 行中字段在搜索条件中不存在,确定忽略吗?`
@@ -248,18 +253,18 @@
      confirm({
        title: title,
        onOk() {
          _this.setState({ visible: false })
          _this.props.onSubmit(_config)
          that.setState({ visible: false })
          that.props.onSubmit(_config)
        },
        onCancel() {}
      })
    } else if (s.length > 0) {
      const _this = this
      const that = this
      confirm({
        title: `第 ${s.join('、')} 行中字段在搜索条件中不存在,确定忽略吗?`,
        onOk() {
          _this.setState({ visible: false })
          _this.props.onSubmit(_config)
          that.setState({ visible: false })
          that.props.onSubmit(_config)
        },
        onCancel() {}
      })
@@ -272,10 +277,16 @@
  }
  render() {
    const { config } = this.props
    const { colsCtrls, columns, visible, cols, searches } = this.state
    let className = ''
    if (config.colsCtrls && config.colsCtrls.length) {
      className = 'cols-ctrls'
    }
    return (
      <div style={{display: 'inline-block'}}>
      <div style={{display: 'inline-block'}} className={className}>
        <ApartmentOutlined style={{color: '#13c2c2'}} title="显示列控制" onClick={this.resetMark} />
        <Modal
          wrapClassName="column-control-modal-wrap"