| | |
| | | const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) |
| | | const NormalForm = asyncIconComponent(() => import('@/components/normalform')) |
| | | const CardComponent = asyncComponent(() => import('../cardcomponent')) |
| | | const Nodes = asyncComponent(() => import('./node-wrap')) |
| | | const MobPagination = asyncIconComponent(() => import('@/menu/components/share/mobPagination')) |
| | | const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent')) |
| | | const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) |
| | |
| | | getWrapForms = () => { |
| | | const { card } = this.state |
| | | |
| | | return getWrapForm(card.wrap, card.subtype, card.columns) |
| | | return getWrapForm(card.wrap, card.subtype, card.columns, card.uuid, card.supNodes) |
| | | } |
| | | |
| | | updateWrap = (res) => { |
| | | this.updateComponent({...this.state.card, wrap: res}) |
| | | let _card = {...this.state.card, wrap: res} |
| | | |
| | | if (res.supNodes) { |
| | | _card.supNodes = res.supNodes |
| | | _card.supNodes = _card.supNodes.map(item => { |
| | | item.componentId = item.nodes[item.nodes.length - 1] |
| | | return item |
| | | }) |
| | | |
| | | delete res.supNodes |
| | | } else { |
| | | delete _card.supNodes |
| | | } |
| | | |
| | | this.updateComponent(_card) |
| | | } |
| | | |
| | | pasteComponent = (res, resolve) => { |
| | |
| | | } |
| | | } |
| | | |
| | | updateSupNodes = (res) => { |
| | | const { card } = this.state |
| | | |
| | | this.setState({ |
| | | card: {...card, supNodes: res} |
| | | }) |
| | | |
| | | this.updateComponent({...card, supNodes: res}) |
| | | } |
| | | |
| | | render() { |
| | | const { card, appType } = this.state |
| | | |
| | |
| | | <NormalForm title="数据卡设置" width={800} update={this.updateWrap} getForms={this.getWrapForms}> |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> |
| | | {card.wrap.supType === 'multi' && appType !== 'mob' ? <Nodes card={card} updateMenus={this.updateSupNodes}/> : null} |
| | | <CopyComponent type="datacard" card={card}/> |
| | | <PasteComponent options={['action', 'search', 'form', 'cardcell']} updateConfig={this.pasteComponent} /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |