| | |
| | | const CardComponent = asyncComponent(() => import('@/templates/modalconfig/dragelement')) |
| | | const MobCardComponent = asyncComponent(() => import('@/mob/components/formdragelement')) |
| | | const FormAction = asyncComponent(() => import('../formaction')) |
| | | // const FormFork = asyncComponent(() => import('@/menu/modalconfig/formfork')) |
| | | const FormFork = asyncComponent(() => import('@/menu/modalconfig/formfork')) |
| | | const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader')) |
| | | const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) |
| | | const PasteForms = asyncIconComponent(() => import('@/menu/components/share/pasteforms')) |
| | |
| | | } trigger="hover"> |
| | | <SwapOutlined /> |
| | | </Popover> : null} |
| | | {/* <FormFork forms={card.subcards[0].fields}/> */} |
| | | <FormFork forms={card.subcards[0].fields}/> |
| | | {/* <CopyOutlined title="复制" onClick={this.triggerCopy} /> */} |
| | | <Switch checkedChildren="开" unCheckedChildren="关" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> |
| | | </div> |
| | |
| | | const MobCardComponent = asyncComponent(() => import('@/mob/components/formdragelement')) |
| | | const FormTitle = asyncComponent(() => import('../dragtitle')) |
| | | const FormAction = asyncComponent(() => import('../formaction')) |
| | | // const FormFork = asyncComponent(() => import('@/menu/modalconfig/formfork')) |
| | | const FormFork = asyncComponent(() => import('@/menu/modalconfig/formfork')) |
| | | const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) |
| | | const PasteComponent = asyncIconComponent(() => import('@/menu/components/share/pastecomponent')) |
| | | const FieldsComponent = asyncComponent(() => import('@/templates/sharecomponent/fieldscomponent')) |
| | |
| | | } trigger="hover"> |
| | | <SwapOutlined /> |
| | | </Popover> : null} |
| | | {/* <FormFork forms={group.fields}/> */} |
| | | <FormFork forms={group.fields}/> |
| | | {/* <CopyOutlined title="复制" onClick={this.triggerCopy} /> */} |
| | | <Switch checkedChildren="开" unCheckedChildren="关" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> |
| | | </div> |
| | |
| | | const MobCardComponent = asyncComponent(() => import('@/mob/components/formdragelement')) |
| | | const FormTitle = asyncComponent(() => import('../dragtitle')) |
| | | const FormAction = asyncComponent(() => import('../formaction')) |
| | | // const FormFork = asyncComponent(() => import('@/menu/modalconfig/formfork')) |
| | | const FormFork = asyncComponent(() => import('@/menu/modalconfig/formfork')) |
| | | const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) |
| | | const PasteComponent = asyncIconComponent(() => import('@/menu/components/share/pastecomponent')) |
| | | const FieldsComponent = asyncComponent(() => import('@/templates/sharecomponent/fieldscomponent')) |
| | |
| | | } trigger="hover"> |
| | | <SwapOutlined /> |
| | | </Popover> : null} |
| | | {/* <FormFork forms={group.fields}/> */} |
| | | <FormFork forms={group.fields}/> |
| | | {/* <CopyOutlined title="复制" onClick={this.triggerCopy} /> */} |
| | | <Switch checkedChildren="开" unCheckedChildren="关" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> |
| | | </div> |
| | |
| | | visible: false, |
| | | empty: false, |
| | | ctrlFields: [], |
| | | ctrlRFields: [], |
| | | subFields: [], |
| | | subRFields: [], |
| | | linkFields: [], |
| | |
| | | delete item.tabField |
| | | } |
| | | |
| | | if (item.supField) { |
| | | if (!fieldMap.has(item.supField)) { |
| | | delete item.supField |
| | | delete item.supvalue |
| | | } else { |
| | | item.supLabel = fieldMap.get(item.supField).label |
| | | } |
| | | } |
| | | if (item.linkField) { |
| | | if (!fieldMap.has(item.linkField)) { |
| | | item.linkLabel = '字段集' |
| | |
| | | } |
| | | |
| | | delete item.enter |
| | | delete item.supField |
| | | delete item.multiple |
| | | delete item.linkSubField |
| | | |
| | |
| | | let _n = [...fieldMap.values()] |
| | | |
| | | let ctrlFields = [] |
| | | let ctrlRFields = [] |
| | | let subFields = [] |
| | | let subRFields = [] |
| | | let _linkFields = [] |
| | |
| | | tail: `${m.values}` |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | if (cell.supField) { |
| | | ctrlRFields.push({ |
| | | field: ['hint', 'split', 'formula'].includes(cell.type) ? '' : cell.field, |
| | | label: cell.label, |
| | | children: [{ |
| | | field: cell.supField, |
| | | label: cell.supLabel, |
| | | tail: `${cell.supvalue}` |
| | | }] |
| | | }) |
| | | } |
| | | |
| | |
| | | forward: 'true', |
| | | empty: type === '', |
| | | ctrlFields, |
| | | ctrlRFields, |
| | | subFields, |
| | | subRFields, |
| | | linkFields: _linkFields, |
| | |
| | | } |
| | | |
| | | getcontent = () => { |
| | | const { ctrlFields, ctrlRFields, subFields, subRFields, linkFields, tabFields, visible, type, forward } = this.state |
| | | const { ctrlFields, subFields, subRFields, linkFields, tabFields, visible, type, forward } = this.state |
| | | |
| | | if (!visible) return null |
| | | |
| | |
| | | let items = [] |
| | | |
| | | if (type === 'ctrl') { |
| | | if (forward === 'true') { |
| | | items = ctrlFields |
| | | } else { |
| | | items = ctrlRFields |
| | | } |
| | | } else if (type === 'input') { |
| | | if (forward === 'true') { |
| | | items = subFields |
| | |
| | | {item.children.map((cell, n) => <div className="fork-item" key={n}> |
| | | <span>{cell.label}</span> |
| | | <span>{cell.field}</span> |
| | | {cell.tail ? <span className="fork-tail">{cell.tail}</span> : null} |
| | | {cell.tail ? <span title={cell.tail} className="fork-tail">{cell.tail}</span> : null} |
| | | </div>)} |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | return <div> |
| | | {header} |
| | | {type === 'ctrl' || type === 'input' ? <div className="forward-wrap"><Radio.Group value={forward} onChange={(e) => this.setState({forward: e.target.value})}> |
| | | <div className="forward-wrap"> |
| | | {type === 'ctrl' ? <div className="legend"><span>主表单</span><span>受控表单</span></div> : null} |
| | | {type === 'input' ? <div className="legend"><span>主表单</span><span>被填入表单</span></div> : null} |
| | | {type === 'link' ? <div className="legend"><span>上级表单</span><span>下级表单</span></div> : null} |
| | | {type === 'switch' ? <div className="legend"><span>源表单</span><span>跳转表单</span></div> : null} |
| | | {type === 'input' ? <Radio.Group value={forward} onChange={(e) => this.setState({forward: e.target.value})}> |
| | | <Radio value="true">正向</Radio> |
| | | <Radio value="false">反向</Radio> |
| | | </Radio.Group></div> : null} |
| | | <div className="fork-wrap"> |
| | | </Radio.Group> : null} |
| | | </div> |
| | | <div className={'fork-wrap fork-' + forward}> |
| | | {content} |
| | | </div> |
| | | </div> |
| | |
| | | } |
| | | } |
| | | .forward-wrap { |
| | | text-align: right; |
| | | position: relative; |
| | | padding: 5px; |
| | | |
| | | .ant-radio-group { |
| | | position: absolute; |
| | | top: 5px; |
| | | right: 0px; |
| | | } |
| | | |
| | | .legend { |
| | | span { |
| | | display: inline-block; |
| | | margin-right: 20px; |
| | | position: relative; |
| | | margin-left: 60px; |
| | | } |
| | | span::before { |
| | | content: ' '; |
| | | display: block; |
| | | position: absolute; |
| | | width: 50px; |
| | | height: 6px; |
| | | left: -55px; |
| | | top: 10px; |
| | | } |
| | | span:first-child::before { |
| | | background: #8E44AD; |
| | | } |
| | | span:last-child::before { |
| | | background: rgb(38, 194, 129); |
| | | } |
| | | } |
| | | } |
| | | .fork-wrap { |
| | | padding-top: 15px; |
| | | } |
| | | .fork-wrap.fork-false { |
| | | .fork-item-wrap { |
| | | .fork-left { |
| | | .fork-item { |
| | | border-color: rgb(38, 194, 129); |
| | | color: #26c281; |
| | | } |
| | | } |
| | | .fork-right { |
| | | .fork-item { |
| | | border-color: #8E44AD; |
| | | color: #8E44AD; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .fork-item-wrap { |
| | | display: inline-flex; |
| | | width: 50%; |
| | | margin-bottom: 15px; |
| | | margin-bottom: 20px; |
| | | |
| | | .fork-left { |
| | | position: relative; |
| | | display: flex; |
| | | width: 50%; |
| | | align-items: center; |
| | | |
| | | .fork-item { |
| | | border-color: #8E44AD; |
| | | color: #8E44AD; |
| | | } |
| | | .fork-item::before { |
| | | content: ''; |
| | | display: block; |
| | | border-top: 1px solid #bcbcbc; |
| | | position: absolute; |
| | | top: 28px; |
| | | width: 58px; |
| | | right: -58px; |
| | | } |
| | | } |
| | | .fork-right { |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 50%; |
| | | padding-left: 30px; |
| | | |
| | | .fork-item { |
| | | border-color: rgb(38, 194, 129); |
| | | color: #26c281; |
| | | } |
| | | .fork-item:not(:last-child) { |
| | | margin-bottom: 10px; |
| | | } |
| | | .fork-item::before { |
| | | content: ''; |
| | | display: block; |
| | | border-top: 1px solid #bcbcbc; |
| | | position: absolute; |
| | | top: 28px; |
| | | width: 56px; |
| | | left: -56px; |
| | | } |
| | | } |
| | | .fork-right::before { |
| | | content: ''; |
| | | display: block; |
| | | border-left: 1px solid #bcbcbc; |
| | | position: absolute; |
| | | top: 29px; |
| | | bottom: 27px; |
| | | left: -26px; |
| | | } |
| | | |
| | | .fork-item { |
| | |
| | | width: 130px; |
| | | border: 1px solid #bcbcbc; |
| | | padding: 5px 10px; |
| | | height: 55px; |
| | | height: 56px; |
| | | border-radius: 4px; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | span:not(.fork-tail) { |
| | | display: block; |
| | | white-space: nowrap; |
| | |
| | | .fork-tail { |
| | | display: inline-block; |
| | | position: absolute; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | top: 10px; |
| | | right: 140px; |
| | | right: 135px; |
| | | max-width: 45px; |
| | | display: block; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | } |
| | | } |
| | | } |
| | |
| | | const TableComponent = asyncComponent(() => import('./tablecomponent')) |
| | | const ModalForm = asyncComponent(() => import('@/templates/zshare/modalform')) |
| | | const PasteForms = asyncComponent(() => import('@/menu/components/share/pasteforms')) |
| | | // const FormFork = asyncComponent(() => import('@/menu/modalconfig/formfork')) |
| | | const FormFork = asyncComponent(() => import('@/menu/modalconfig/formfork')) |
| | | const DragElement = asyncComponent(() => import('@/templates/modalconfig/dragelement')) |
| | | const FieldsComponent = asyncComponent(() => import('@/templates/sharecomponent/fieldscomponent')) |
| | | |
| | |
| | | } trigger="hover"> |
| | | <SwapOutlined /> |
| | | </Popover> |
| | | {/* <FormFork forms={config.fields}/> */} |
| | | <FormFork forms={config.fields}/> |
| | | <CopyOutlined title="复制" onClick={this.triggerCopy} /> |
| | | <Switch checkedChildren="开" unCheckedChildren="关" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> |
| | | </div> |