From 08cce3334a2dc81d690b518136b0aaea64e48b0b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 14 六月 2023 09:55:50 +0800 Subject: [PATCH] 2023-06-14 --- src/templates/zshare/formconfig.jsx | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 106 insertions(+), 13 deletions(-) diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index 635f5a6..9512ea7 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -355,6 +355,12 @@ }, { value: 'group', text: '鏃ユ湡锛堢粍鍚堬級' + }, { + value: 'switch', + text: '寮�鍏�' + }, { + value: 'check', + text: '鍕鹃�夋' }] } @@ -834,6 +840,42 @@ value: 'custom', text: '鑷畾涔�' }] + }, + { + type: 'text', + key: 'openVal', + label: '寮�鍚��', + initVal: card.openVal || '', + required: false + }, + { + type: 'text', + key: 'closeVal', + label: '鍏抽棴鍊�', + initVal: card.closeVal || '', + required: false + }, + { + type: 'text', + key: 'openText', + label: '寮�鍚彁绀�', + initVal: card.openText || '', + required: false + }, + { + type: 'text', + key: 'closeText', + label: '鍏抽棴鎻愮ず', + initVal: card.closeText || '', + required: false + }, + { + type: 'text', + key: 'checkTip', + label: '鎻愮ず', + initVal: card.checkTip || '', + tooltip: '鍕鹃�夋鍚庣殑鎻愮ず鏂囧瓧', + required: false }, { type: 'color', @@ -1477,16 +1519,6 @@ value: 'close', text: '鍏抽棴' }] - }, - { - type: 'text', - key: 'preFunc', - label: '鍓嶇疆鍑芥暟', - initVal: card.preFunc || '', - tooltip: usefulFields.length ? `鍑芥暟鍚嶇О闇�浠�${usefulFields.join(', ')}绛夊瓧绗﹀紑濮嬶紱鍓嶇疆鍑芥暟鎵ц瀹屾垚鍚庯紝缁撴灉浼氫紶鍏ュ唴閮ㄥ嚱鏁颁腑锛屾鏃跺唴閮ㄥ嚱鏁颁細寮傛鎵ц锛涘綋鍓嶇疆鍑芥暟杩斿洖涓璄rrCode绛変簬-1鏃讹紝灏嗕笉鍐嶆墽琛屽唴閮ㄥ嚱鏁般�俙 : '', - fields: usefulFields, - required: false, - readonly: false }, { type: 'radio', @@ -2468,6 +2500,9 @@ value: 'switch', text: '寮�鍏�' }, { + value: 'check', + text: '鍕鹃�夋' + }, { value: 'checkbox', text: '澶氶�夋' }, { @@ -2542,6 +2577,9 @@ value: 'switch', text: '寮�鍏�' }, { + value: 'check', + text: '鍕鹃�夋' + }, { value: 'checkbox', text: '澶氶�夋' }, { @@ -2595,6 +2633,10 @@ card.precision = 'second' } + if (!card.place && appType === 'mob') { + card.place = ['checkbox', 'radio', 'checkcard', 'textarea'].includes(card.type) ? 'up_down' : 'left_right' + } + let options = card.options || [] if (['select', 'radio', 'link'].includes(card.type) && card.setAll === 'true') { // 鍏煎 options.unshift({ @@ -2606,7 +2648,7 @@ } let initval = card.initval || '' - if (card.type === 'switch') { + if (card.type === 'switch' || card.type === 'check') { initval = card.initval === true } else if (card.type === 'number') { initval = card.initval || 0 @@ -2683,6 +2725,14 @@ key: 'closeText', label: '鍏抽棴鎻愮ず', initVal: card.closeText || '', + required: false + }, + { + type: 'text', + key: 'checkTip', + label: '鎻愮ず', + initVal: card.checkTip || '', + tooltip: '鍕鹃�夋鍚庣殑鎻愮ず鏂囧瓧', required: false }, { @@ -2804,6 +2854,7 @@ key: 'dataSource', label: '鏁版嵁婧�', initVal: card.dataSource || '', + placeholder: '绯荤粺鍙橀噺锛歮k_departmentcode銆乵k_organization銆乵k_user_type銆�', required: true, readonly: false }, @@ -3369,6 +3420,20 @@ }] }, { + type: 'radio', + key: 'unchecked', + label: '鏈�変腑椤�', + initVal: card.unchecked || 'show', + tooltip: '濡傛灉娌℃湁閫変腑椤癸紝璇ヨ〃鍗曞皢琚殣钘忋��', + options: [{ + value: 'show', + text: '鏄剧ず' + }, { + value: 'hidden', + text: '闅愯棌' + }] + }, + { type: 'color', key: 'backgroundColor', label: '鑳屾櫙鑹�', @@ -3448,7 +3513,7 @@ type: 'radio', key: 'eval', label: '瑙f瀽', - initVal: card.eval || 'true', + initVal: card.eval || 'false', tooltip: '褰撳叕寮忓唴瀹规秹鍙婅绠楁椂璇烽�夋嫨鈥滄槸鈥濓紝褰撳叕寮忓唴瀹逛负瀛楁鎷兼帴鏃惰閫夋嫨鈥滃惁鈥濄��', required: false, options: [{ @@ -3494,7 +3559,7 @@ key: 'place', label: '鎺掑垪', initVal: card.place || 'left_right', - tooltip: '鎻愮ず鏂囧瓧涓庤緭鍏ユ鐨勪綅缃叧绯汇�傛敞锛氶�夋嫨鍣ㄣ�佹棩鏈熻〃鍗曞湪琛ㄥ崟鏍峰紡涓洪槾褰辨椂鏈夋晥', + tooltip: '鎻愮ず鏂囧瓧涓庤緭鍏ユ鐨勪綅缃叧绯汇��', forbid: appType !== 'mob', options: [{ value: 'left_right', @@ -3661,6 +3726,20 @@ }, { value: 'right', text: '鍙虫埅' + }] + }, + { + type: 'radio', + key: 'constant', + label: 'Unicode甯搁噺', + tooltip: '浣跨敤鏃跺皢鍦ㄦ彁浜ゅ唴瀹瑰墠鍔犱笂 N锛屼唬琛ㄥ瓨鍏ユ暟鎹簱鏃朵互 Unicode 鏍煎紡瀛樺偍銆�', + initVal: card.constant || 'false', + options: [{ + value: 'true', + text: '浣跨敤' + }, { + value: 'false', + text: '涓嶄娇鐢�' }] }, { @@ -3917,6 +3996,20 @@ // }, { type: 'radio', + key: 'pickerMode', + label: '寮圭獥鏍峰紡', + initVal: card.pickerMode || 'default', + required: false, + options: [ + {value: 'default', text: '榛樿'}, + {value: 'board', text: '闈㈡澘'}, + {value: 'board-block', text: '闈㈡澘2'}, + {value: 'dropdown', text: '涓嬫媺妗�'}, + ], + forbid: appType !== 'mob' + }, + { + type: 'radio', key: 'empty', label: '绌哄�奸殣钘�', initVal: card.empty || 'show', -- Gitblit v1.8.0