| | |
| | | |
| | | 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() {} |
| | | }) |
| | |
| | | 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() {} |
| | |
| | | } |
| | | |
| | | 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() {} |