king
2025-01-02 88290b40164b2e153a59751445b1879b06a9f170
src/menu/components/table/edit-table/columns/index.jsx
@@ -22,12 +22,12 @@
class HeaderCol extends Component {
  deleteCol = () => {
    const _this = this
    const that = this
    confirm({
      content: '确定删除显示列吗?',
      onOk() {
        _this.props.deleteCol(_this.props.column)
        that.props.deleteCol(that.props.column)
      },
      onCancel() {}
    })
@@ -47,7 +47,7 @@
      cols: [column]
    }
    let srcid = localStorage.getItem(window.location.href.split('#')[0] + 'srcId')
    let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId')
    if (srcid) {
      val.$srcId = srcid
    }
@@ -195,10 +195,10 @@
        val = '$Index'
      } else if (column.type === 'formula') {
        val = column.formula
        if (column.eval === 'false') {
          val = val.replace(/\n/ig, '<br/>').replace(/\s/ig, '&nbsp;')
          val = <span style={{fontWeight: 'inherit'}} dangerouslySetInnerHTML={{__html: val}}></span>
        }
        // if (column.eval === 'false') {
        //   val = val.replace(/\n/ig, '<br/>').replace(/\s/ig, '&nbsp;')
        //   val = <span style={{fontWeight: 'inherit'}} dangerouslySetInnerHTML={{__html: val}}></span>
        // }
      }
      return (
        <td style={style} className={className}>
@@ -386,7 +386,7 @@
    if (!cell.eleType) {
      if (cell.copyType === 'action') {
        cell.eleType = 'button'
        cell.width = cell.width || 12
        cell.width = typeof(cell.width) === 'number' ? cell.width : 12
      } else {
        cell.eleType = 'text'
      }
@@ -553,7 +553,7 @@
      cols: columns.filter(col => !col.origin)
    }
    let srcid = localStorage.getItem(window.location.href.split('#')[0] + 'srcId')
    let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId')
    if (srcid) {
      val.$srcId = srcid
    }
@@ -597,13 +597,13 @@
      columns.push(cell)
    })
    const _this = this
    const that = this
    confirm({
      content: '确定同步字段集吗?',
      onOk() {
        _this.setState({columns}, () => {
          _this.props.updatecolumn({..._this.props.config, cols: columns})
        that.setState({columns}, () => {
          that.props.updatecolumn({...that.props.config, cols: columns})
        })
      },
      onCancel() {}
@@ -611,13 +611,13 @@
  }
  clear = () => {
    const _this = this
    const that = this
    confirm({
      content: '确定清空显示列吗?',
      onOk() {
        _this.setState({columns: []}, () => {
          _this.props.updatecolumn({..._this.props.config, cols: []})
        that.setState({columns: []}, () => {
          that.props.updatecolumn({...that.props.config, cols: []})
        })
      },
      onCancel() {}