From 75623dd039b742dbb44fb4c6b4af563404ed9c7f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 03 二月 2020 16:06:04 +0800 Subject: [PATCH] 2020-02-03 --- src/templates/formtabconfig/modalform/index.jsx | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/templates/formtabconfig/modalform/index.jsx b/src/templates/formtabconfig/modalform/index.jsx index ff106e1..9ed3ea8 100644 --- a/src/templates/formtabconfig/modalform/index.jsx +++ b/src/templates/formtabconfig/modalform/index.jsx @@ -26,12 +26,12 @@ let type = formlist.filter(cell => cell.key === 'type')[0].initVal let resourceType = formlist.filter(cell => cell.key === 'resourceType')[0].initVal - let _options = ['label', 'field', 'initval', 'type', 'readonly', 'required'] // 榛樿鏄剧ず椤� + let _options = ['label', 'field', 'initval', 'type', 'readonly', 'required', 'hidden'] // 榛樿鏄剧ず椤� if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '0') { // 閫夋嫨绫诲瀷銆佽嚜瀹氫箟璧勬簮 _options = [..._options, 'resourceType', 'options'] } else if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '1') { // 閫夋嫨绫诲瀷銆佹暟鎹簮 - _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType'] + _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database'] } else if (type === 'number') { _options = [..._options, 'decimal', 'min', 'max'] } else if (type === 'fileupload') { @@ -55,7 +55,6 @@ form.type = 'select' } else if (type === 'number' && form.key === 'initval') { form.type = 'number' - form.initVal = 0 } form.hidden = !_options.includes(form.key) return form @@ -78,12 +77,12 @@ openTypeChange = (key, value) => { if (key === 'type') { - let _options = ['label', 'field', 'initval', 'type', 'readonly', 'required'] + let _options = ['label', 'field', 'initval', 'type', 'readonly', 'required', 'hidden'] if ((value === 'multiselect' || value === 'select' || value === 'link') && this.state.resourceType === '0') { // 閫夋嫨绫诲瀷銆佽嚜瀹氫箟璧勬簮 _options = [..._options, 'resourceType', 'options'] } else if ((value === 'multiselect' || value === 'select' || value === 'link') && this.state.resourceType === '1') { // 閫夋嫨绫诲瀷銆佹暟鎹簮 - _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType'] + _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database'] } else if (value === 'number') { _options = [..._options, 'decimal', 'min', 'max'] } else if (value === 'fileupload') { @@ -139,7 +138,7 @@ if (value === '0') { _options = [..._options, 'options'] } else if (value === '1') { - _options = [..._options, 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType'] + _options = [..._options, 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database'] } if (openType === 'select') { -- Gitblit v1.8.0