| | |
| | | setting: { interType: 'system' }, |
| | | wrap: { bordered: 'true', tableType: 'checkbox', show: 'true' }, |
| | | style: {}, |
| | | headerStyle: { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' }, |
| | | headerStyle: {}, |
| | | columns: [], |
| | | cols: [ |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label1', field: '', Hide: 'false', type: 'text', Width: 120 }, |
| | |
| | | } |
| | | MKEmitter.removeListener('completeSave', this.completeSave) |
| | | } |
| | | |
| | | // updateFix = (card) => { |
| | | // let fixs = {} |
| | | |
| | | // card.cols.forEach(col => { |
| | | // if (!col.field) return |
| | | // if (col.postfix || col.prefix) { |
| | | // fixs[col.field] = col |
| | | // } |
| | | // }) |
| | | |
| | | // card.cols.forEach(col => { |
| | | // if (col.type === 'custom') { |
| | | // col.elements.forEach(cell => { |
| | | // if (cell.datatype === 'dynamic') { |
| | | // cell.height = '' |
| | | // cell.innerHeight = 'auto' |
| | | |
| | | // if (fixs[cell.field]) { |
| | | // if (!cell.prefix && fixs[cell.field].prefix) { |
| | | // cell.prefix = fixs[cell.field].prefix |
| | | // } |
| | | // if (!cell.postfix && fixs[cell.field].postfix) { |
| | | // cell.postfix = fixs[cell.field].postfix |
| | | // } |
| | | // } |
| | | // } |
| | | // }) |
| | | // } |
| | | // }) |
| | | |
| | | // return card |
| | | // } |
| | | |
| | | completeSave = () => { |
| | | const { card } = this.state |
| | |
| | | this.updateComponent(config) |
| | | } |
| | | |
| | | parseComponent = (config, type) => { |
| | | if (type === 'cols') { |
| | | this.updatecolumn(config) |
| | | } |
| | | this.updateComponent(config) |
| | | } |
| | | |
| | | render() { |
| | | const { card } = this.state |
| | | let options = ['action', 'search', 'form', 'cols'] |
| | |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> |
| | | <CopyComponent type="basetable" card={card}/> |
| | | <PasteComponent config={card} options={options} updateConfig={this.updateComponent} /> |
| | | <PasteComponent config={card} options={options} updateConfig={this.parseComponent} /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | <SettingComponent config={card} updateConfig={this.updateComponent} /> |
| | | </div> |