From 96916ae2777d63b008435dd83d89f77e2485f51d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 24 五月 2024 23:11:35 +0800 Subject: [PATCH] 2024-05-24 --- src/menu/modalconfig/formfork/index.jsx | 49 +++++++++++++++---------------------------------- 1 files changed, 15 insertions(+), 34 deletions(-) diff --git a/src/menu/modalconfig/formfork/index.jsx b/src/menu/modalconfig/formfork/index.jsx index 30a865c..b7d8834 100644 --- a/src/menu/modalconfig/formfork/index.jsx +++ b/src/menu/modalconfig/formfork/index.jsx @@ -15,7 +15,6 @@ visible: false, empty: false, ctrlFields: [], - ctrlRFields: [], subFields: [], subRFields: [], linkFields: [], @@ -169,14 +168,6 @@ 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 = '瀛楁闆�' @@ -186,6 +177,7 @@ } delete item.enter + delete item.supField delete item.multiple delete item.linkSubField @@ -215,7 +207,6 @@ let _n = [...fieldMap.values()] let ctrlFields = [] - let ctrlRFields = [] let subFields = [] let subRFields = [] let _linkFields = [] @@ -233,17 +224,6 @@ 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}` - }] }) } @@ -296,7 +276,6 @@ forward: 'true', empty: type === '', ctrlFields, - ctrlRFields, subFields, subRFields, linkFields: _linkFields, @@ -306,7 +285,7 @@ } 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 @@ -320,11 +299,7 @@ let items = [] if (type === 'ctrl') { - if (forward === 'true') { - items = ctrlFields - } else { - items = ctrlRFields - } + items = ctrlFields } else if (type === 'input') { if (forward === 'true') { items = subFields @@ -349,7 +324,7 @@ {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> @@ -357,11 +332,17 @@ return <div> {header} - {type === 'ctrl' || type === 'input' ? <div className="forward-wrap"><Radio.Group value={forward} onChange={(e) => this.setState({forward: e.target.value})}> - <Radio value="true">姝e悜</Radio> - <Radio value="false">鍙嶅悜</Radio> - </Radio.Group></div> : null} - <div className="fork-wrap"> + <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">姝e悜</Radio> + <Radio value="false">鍙嶅悜</Radio> + </Radio.Group> : null} + </div> + <div className={'fork-wrap fork-' + forward}> {content} </div> </div> -- Gitblit v1.8.0