From 5046d0d13dc6a8563b8e54e31913bc44cfa1072f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 26 四月 2022 19:23:18 +0800 Subject: [PATCH] 2022-04-26 --- src/templates/zshare/formconfig.jsx | 180 +++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 161 insertions(+), 19 deletions(-) diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index dfcd692..5761a1e 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -302,6 +302,14 @@ let typeOptions = [] if (appType === 'mob') { + // let adapters = sessionStorage.getItem('adapter') + // if (adapters) { + // adapters = adapters.split(',') + // } else { + // adapters = [] + // } + // (adapters.includes('wxmini') ? '(灏忕▼搴忔殏涓嶆敮鎸�)' : '') + typeOptions = [{ value: 'range', text: '鏁板�硷紙鍖洪棿锛�' @@ -318,6 +326,7 @@ // value: 'daterange', // text: Formdict['model.form.daterange'] }] + } else { typeOptions = [{ value: 'text', @@ -506,7 +515,7 @@ required: true }, { - type: 'textarea', + type: 'codemirror', key: 'dataSource', label: Formdict['header.form.datasource'], initVal: card.dataSource || '', @@ -650,6 +659,37 @@ required: false }, { + type: 'number', + key: 'labelwidth', + min: 1, + max: 100, + precision: 1, + label: '鍚嶇О瀹藉害', + initVal: card.labelwidth || 33.3, + tooltip: '鍚嶇О鍗犳嵁鎼滅储鏉′欢瀹藉害鐨勭櫨鍒嗘瘮銆傛敞锛氬瓨鍦ㄥ鍒楁悳绱㈡椂锛屽綋鍓嶆悳绱㈠鏋滄兂瑕佸崰鎹暣琛屽彲鍙傜収浠ヤ笅姣斾緥锛屼袱鍒楋紙16.5锛夈�佷笁鍒楋紙10.8锛夈�佸洓鍒楋紙8锛�', + required: true, + forbid: appType === 'mob' + }, + { + type: 'radio', + key: 'precision', + label: '绮剧‘搴�', + initVal: card.precision || 'day', + options: [{ + value: 'day', + text: '澶�' + }, { + value: 'hour', + text: '灏忔椂' + }, { + value: 'minute', + text: '鍒嗛挓' + }, { + value: 'second', + text: '绉�' + }] + }, + { type: 'radio', key: 'required', label: Formdict['model.required'], @@ -746,6 +786,7 @@ key: 'advanced', label: '楂樼骇鎼滅储', initVal: card.advanced || 'false', + tooltip: '鍦ㄩ殣钘忔悳绱㈡寜閽椂锛岄珮绾ф悳绱㈡棤鏁堛��', forbid: appType === 'mob', options: [{ value: 'true', @@ -1177,18 +1218,18 @@ type: refresh.length === 0 ? 'radio' : 'select', key: 'execSuccess', label: Formdict['model.form.afterSuccess'], - initVal: card.execSuccess || 'never', + initVal: card.execSuccess || 'grid', tooltip: '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺��', required: true, options: [{ value: 'never', text: '涓嶅埛鏂�' }, { - value: 'grid', - text: '鍒锋柊琛ㄦ牸' - }, { value: 'line', text: '鍒锋柊琛�' + }, { + value: 'grid', + text: '鍒锋柊琛ㄦ牸' }, ...refresh] }, @@ -1203,11 +1244,11 @@ value: 'never', text: '涓嶅埛鏂�' }, { - value: 'grid', - text: '鍒锋柊琛ㄦ牸' - }, { value: 'line', text: '鍒锋柊琛�' + }, { + value: 'grid', + text: '鍒锋柊琛ㄦ牸' }, ...refresh] }, @@ -1268,8 +1309,16 @@ type: 'text', key: 'output', label: '杩斿洖鍊�', - tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺��', + tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺�備緥濡傦細@id', initVal: card.output || '', + required: false + }, + { + type: 'text', + key: 'tipTitle', + label: '纭鎻愮ず', + initVal: card.tipTitle || '', + tooltip: '娉細寮圭獥锛堣〃鍗曪級鍦ㄦ樉绀轰负鏄惁妗嗘椂鏈夋晥銆�', required: false }, { @@ -1422,6 +1471,13 @@ label: '鎺у埗鍊�', tooltip: '褰撻�夋嫨鎺у埗瀛楁锛屼笖瀛楁鍊间笌鎺у埗鍊肩浉绛夋椂锛屾寜閽細闅愯棌鎴栫鐢紝澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�', initVal: card.controlVal || '', + required: false + }, + { + type: 'text', + key: 'reason', + label: '绂佺敤鍘熷洜', + initVal: card.reason || '', required: false }, ] @@ -2260,9 +2316,9 @@ }, { value: 'datemonth', text: Formdict['model.form.datemonth'] - }, { - value: 'datetime', - text: Formdict['model.form.datetime'] + // }, { + // value: 'datetime', + // text: '鏃ユ湡锛堝垎/绉掞級' }, { value: 'textarea', text: Formdict['model.form.textarea'] @@ -2325,9 +2381,9 @@ }, { value: 'datemonth', text: Formdict['model.form.datemonth'] - }, { - value: 'datetime', - text: Formdict['model.form.datetime'] + // }, { + // value: 'datetime', + // text: '鏃ユ湡锛堝垎/绉掞級' }, { value: 'textarea', text: Formdict['model.form.textarea'] @@ -2343,6 +2399,9 @@ }, { value: 'split', text: '鍒嗛殧绾�' + }, { + value: 'linkMain', + text: '鍏宠仈涓昏〃' }] } @@ -2350,6 +2409,9 @@ _fieldlength = 512 } else if (['textarea', 'brafteditor'].includes(card.type)) { _fieldlength = 8000 + } else if (card.type === 'datetime') { + card.type = 'date' + card.precision = 'second' } let options = card.options || [] @@ -2367,6 +2429,10 @@ initval = card.initval === true } else if (card.type === 'number') { initval = card.initval || 0 + } + + if (appType === 'mob' && ![24, 12, 8, 6].includes(card.span)) { + card.span = 24 } return [ @@ -2744,6 +2810,25 @@ }] }, { + type: 'radio', + key: 'precision', + label: '绮剧‘搴�', + initVal: card.precision || 'day', + options: [{ + value: 'day', + text: '澶�' + }, { + value: 'hour', + text: '灏忔椂' + }, { + value: 'minute', + text: '鍒嗛挓' + }, { + value: 'second', + text: '绉�' + }] + }, + { type: 'number', key: 'fieldlength', min: 1, @@ -2752,7 +2837,7 @@ label: Formdict['model.form.field'] + Formdict['model.length'], // tooltip: '鏂囨湰銆佷笅鎷夋銆佹棩鏈熺瓑瀛楁榛樿闀垮害涓�50锛屽琛屾枃鏈笌鏂囦欢涓婁紶瀛楁榛樿闀垮害涓�512', initVal: card.fieldlength || _fieldlength, - required: false + required: true }, { type: 'number', @@ -3063,7 +3148,7 @@ type: 'radio', key: 'interception', label: '鎴彇绌烘牸', - initVal: card.interception || 'false', + initVal: card.interception || 'true', tooltip: '鎻愪氦鏃讹紝鏄惁鎴彇棣栧熬鐨勭┖鐧藉瓧绗︺��', options: [{ value: 'true', @@ -3155,6 +3240,46 @@ forbid: appType === 'mob' }, { + type: 'radio', + key: 'span', + label: '琛ㄥ崟瀹藉害', + initVal: card.span || 24, + tooltip: '鏍呮牸甯冨眬鏁磋24绛夊垎銆�', + required: true, + forbid: appType !== 'mob', + options: [{ + value: 24, + text: 24 + }, { + value: 12, + text: 12 + }, { + value: 8, + text: 8 + }, { + value: 6, + text: 6 + }] + }, + { + type: 'radio', + key: 'lenControl', + label: '闀垮害鎺у埗', + initVal: card.lenControl || 'limit', + tooltip: '鍦ㄨ缃瓧娈甸暱搴﹀悗锛屽闀垮害鐨勬帶鍒舵柟寮忋��', + required: false, + options: [{ + value: 'limit', + text: '闄愬埗杈撳叆' + }, { + value: 'left', + text: '宸︽埅' + }, { + value: 'right', + text: '鍙虫埅' + }] + }, + { type: 'number', key: 'labelwidth', min: 1, @@ -3210,6 +3335,7 @@ { type: 'text', key: 'supvalue', + max: 512, label: '鏄剧ず鍊�', tooltip: '璇峰~鍐欐樉绀哄�硷紝鍙湁涓婄骇琛ㄥ崟鍊间笌鏄剧ず鍊肩浉鍚屾椂锛岃琛ㄥ崟鎵嶄細鏄剧ず锛屾敞锛�1銆佸涓�肩敤閫楀彿鍒嗛殧锛�2銆佷笂绾ц〃鍗曞垵濮嬪�间负$first鏃舵殏鏈鐞嗐��', initVal: card.supvalue || '', @@ -3233,6 +3359,22 @@ initVal: card.extra || '', required: false, forbid: appType === 'mob' + }, + { + type: 'radio', + key: 'enterReplace', + label: '鍥炶溅绗︽浛鎹�', + tooltip: '鍥炶溅绗︿細鏇挎崲涓鸿嫳鏂囬�楀彿銆�', + initVal: card.enterReplace || 'false', + required: false, + forbid: appType !== 'mob', + options: [{ + value: 'false', + text: '鍚�' + }, { + value: 'true', + text: '鏄�' + }] }, { type: 'text', @@ -3288,7 +3430,7 @@ key: 'marginTop', label: '涓婅竟璺濓紙px锛�', initVal: card.marginTop || 0, - min: 0, + min: -100, max: 1000, precision: 0, required: false, @@ -3299,7 +3441,7 @@ key: 'marginBottom', label: '涓嬭竟璺濓紙px锛�', initVal: card.marginBottom || 0, - min: 0, + min: -100, max: 1000, precision: 0, required: false, -- Gitblit v1.8.0