From 66bdbc1df92e8ec4a5108a4e0323e25a7b9ff8f8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 21 五月 2024 16:37:16 +0800 Subject: [PATCH] Merge branch 'develop' --- src/tabviews/zshare/mutilform/index.jsx | 32 ++++++++++++++++++++++++-------- 1 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index 97da891..1017e55 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -393,11 +393,13 @@ message: item.label + '涓嶅彲涓虹┖!' }] - if (typeof(item.min) === 'number' || typeof(item.max) === 'number') { + if (typeof(item.min) === 'number' || typeof(item.max) === 'number' || item.notZero === 'true') { item.rules.push({ validator: (rule, value, callback) => { if (isNaN(value)) { callback() + } else if (item.notZero === 'true' && value === 0) { + callback(item.label + '涓嶅彲涓�0') } else if (typeof(item.min) === 'number' && value < item.min) { if (item.min < 1e-6) { if (item.min === 1e-6) { @@ -617,7 +619,11 @@ item.supInitVal = '' if (fieldMap.has(item.linkField)) { - item.supInitVal = fieldMap.get(item.linkField).initval || '' + let supitem = fieldMap.get(item.linkField) + item.supInitVal = supitem.initval || '' + if (supitem.$first) { + item.$resetSup = true + } } else if (data.hasOwnProperty(item.linkField.toLowerCase())) { item.supInitVal = data[item.linkField.toLowerCase()] } @@ -1087,7 +1093,11 @@ // if (item.type === 'link') { if (item.linkField) { - item.options = item.oriOptions.filter(option => option.ParentID === item.supInitVal || option.value === '') + let supInitVal = item.supInitVal + if (item.$resetSup) { + supInitVal = this.record[item.linkField] + } + item.options = item.oriOptions.filter(option => option.ParentID === supInitVal || option.value === '') // } else if (['select', 'radio', 'checkbox', 'checkcard', 'multiselect'].includes(item.type)) { } else { item.options = item.oriOptions @@ -1229,11 +1239,17 @@ if (item.hidden) return if (item.type === 'split') { - fields.push( - <Col span={24} key={index}> - <p className="mk-form-split-line" style={item.style}>{item.label}</p> - </Col> - ) + if (item.opacity === 'false') { + fields.push( + <div key={index}></div> + ) + } else { + fields.push( + <Col span={24} key={index}> + <p className="mk-form-split-line" style={item.style}>{item.label}</p> + </Col> + ) + } } else if (item.type === 'hint') { fields.push( <Col span={item.span || 24} key={index}> -- Gitblit v1.8.0