| | |
| | | |
| | | 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() {} |
| | | }) |
| | |
| | | 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 |
| | | } |
| | |
| | | val = '$Index' |
| | | } else if (column.type === 'formula') { |
| | | val = column.formula |
| | | if (column.eval === 'false') { |
| | | val = val.replace(/\n/ig, '<br/>').replace(/\s/ig, ' ') |
| | | val = <span style={{fontWeight: 'inherit'}} dangerouslySetInnerHTML={{__html: val}}></span> |
| | | } |
| | | // if (column.eval === 'false') { |
| | | // val = val.replace(/\n/ig, '<br/>').replace(/\s/ig, ' ') |
| | | // val = <span style={{fontWeight: 'inherit'}} dangerouslySetInnerHTML={{__html: val}}></span> |
| | | // } |
| | | } |
| | | return ( |
| | | <td style={{...style}} className={className}> |
| | |
| | | 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 |
| | | } |
| | |
| | | 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() {} |