| | |
| | | const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent')) |
| | | const PasteComponent = asyncIconComponent(() => import('@/menu/components/share/pastecomponent')) |
| | | const ClockComponent = asyncIconComponent(() => import('@/menu/components/share/clockcomponent')) |
| | | // const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent')) |
| | | const ColumnComponent = asyncComponent(() => import('./columns')) |
| | | |
| | | class TableCardEditComponent extends Component { |
| | |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label3', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 }, |
| | | ], |
| | | scripts: [], |
| | | btnlog: [], |
| | | isNew: true |
| | | } |
| | | |
| | |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('submitModal', this.handleSave) |
| | | // MKEmitter.addListener('logButton', this.logButton) |
| | | MKEmitter.addListener('completeSave', this.completeSave) |
| | | } |
| | | |
| | |
| | | return |
| | | } |
| | | MKEmitter.removeListener('submitModal', this.handleSave) |
| | | // MKEmitter.removeListener('logButton', this.logButton) |
| | | MKEmitter.removeListener('completeSave', this.completeSave) |
| | | } |
| | | |
| | |
| | | this.props.updateConfig(_card) |
| | | } |
| | | |
| | | // logButton = (id, item) => { |
| | | // const { card } = this.state |
| | | |
| | | // if (id !== card.uuid) return |
| | | |
| | | // let btnlog = card.btnlog || [] |
| | | // btnlog.push(item) |
| | | |
| | | // this.updateComponent({...card, btnlog}) |
| | | // } |
| | | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | |
| | | this.updateComponent(card) |
| | | } |
| | | |
| | | // handleLog = (type, logs, item) => { |
| | | // let card = fromJS(this.state.card).toJS() |
| | | |
| | | // if (type === 'revert') { |
| | | // let done = false |
| | | // if (item.$parentId) { |
| | | // card.cols.forEach(col => { |
| | | // if (col.type !== 'action') return |
| | | // if (item.$parentId === col.uuid) { |
| | | // col.elements = col.elements ? [...col.elements, item] : [item] |
| | | // done = true |
| | | // } |
| | | // }) |
| | | // } |
| | | |
| | | // if (!done) { |
| | | // card.action = card.action ? [...card.action, item] : [item] |
| | | // } |
| | | |
| | | // card.btnlog = logs |
| | | |
| | | // this.updateComponent(card) |
| | | // notification.success({ |
| | | // top: 92, |
| | | // message: '恢复成功!', |
| | | // duration: 2 |
| | | // }) |
| | | // } else { |
| | | // card.btnlog = logs |
| | | // this.updateComponent(card) |
| | | // notification.success({ |
| | | // top: 92, |
| | | // message: '清除成功!', |
| | | // duration: 2 |
| | | // }) |
| | | // } |
| | | // } |
| | | |
| | | getWrapForms = () => { |
| | | const { wrap, action, columns, cols } = this.state.card |
| | | |
| | |
| | | <CopyComponent type="normaltable" card={card}/> |
| | | <PasteComponent config={card} options={options} updateConfig={this.updateComponent} /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | {/* <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog} /> */} |
| | | <ClockComponent config={card} updateConfig={this.updateComponent}/> |
| | | <UserComponent config={card}/> |
| | | <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} /> |