From cec96a86ed6b3fba6a10d6d46818e9755ac3b5ca Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 10 三月 2023 11:13:51 +0800 Subject: [PATCH] 2023-03-10 --- src/tabviews/zshare/mutilform/index.jsx | 23 ++++++++++++++--------- 1 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index 479a3d3..a1ea659 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -104,6 +104,12 @@ delete item.style.marginRight } + if (item.type === 'split' && item.splitctrl) { + if (data.hasOwnProperty(item.splitctrl.toLowerCase()) && data[item.splitctrl.toLowerCase()] === '') { + return false + } + } + if (item.type === 'split' || item.type === 'formula') return true if (item.type === 'hint') { if (item.field && data[item.field.toLowerCase()]) { @@ -165,6 +171,10 @@ }) } item.oriOptions = fromJS(item.options).toJS() + + if (item.empty === 'hidden' && item.oriOptions.length === 0) { + item.hidden = true + } } let newval = '$empty' @@ -810,6 +820,10 @@ }) } } + + if (item.empty === 'hidden' && item.oriOptions.length > 0) { + item.hidden = false + } } return item @@ -901,17 +915,8 @@ formlist.forEach((item, index) => { if (item.hidden) return - if (item.empty === 'hidden' && item.oriOptions.length === 0) return if (item.type === 'split') { - if (item.splitctrl) { - let cell = formlist.filter(m => m.field === item.splitctrl)[0] - - if (cell && (cell.hidden || (cell.empty === 'hidden' && !cell.oriOptions.length))) { - return null - } - } - fields.push( <Col span={24} key={index}> <p className="mk-form-split-line" style={item.style}>{item.label}</p> -- Gitblit v1.8.0