From fa381753ef2a2b25b1c0722549ac17e333da79be Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 06 九月 2022 22:50:54 +0800 Subject: [PATCH] 2022-09-06 --- src/templates/zshare/formconfig.jsx | 609 +++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 457 insertions(+), 152 deletions(-) diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index f81c734..ef844cd 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -13,6 +13,17 @@ export function getTreeSettingForm (setting, usefulFields = [], MenuID) { let str = '^(' + usefulFields.join('|') + ')' let _patten = new RegExp(str + formRule.func.innerPattern + '$', 'g') + let rules = [{ + max: formRule.func.max, + message: formRule.func.maxMessage + }] + + if (usefulFields.length > 0) { + rules.push({ + pattern: _patten, + message: formRule.func.innerMessage + }) + } return [ { @@ -103,19 +114,11 @@ key: 'innerFunc', label: Formdict['header.form.innerFunc'], initVal: setting.innerFunc || '', - tooltip: '寮�澶村彲鐢ㄥ瓧绗︼細' + usefulFields.join(', '), + tooltip: usefulFields.length ? '寮�澶村彲鐢ㄥ瓧绗︼細' + usefulFields.join(', ') : '', placement: 'bottomLeft', required: false, readonly: false, - rules: [ - { - pattern: _patten, - message: formRule.func.innerMessage - }, { - max: formRule.func.max, - message: formRule.func.maxMessage - } - ] + rules: rules }, { type: 'datasource', @@ -286,7 +289,7 @@ * @param {object} card // 鎼滅储鏉′欢瀵硅薄 * @param {Array} linkableFields // 鍙叧鑱斿瓧娈� */ -export function getSearchForm (card, linkableFields) { +export function getSearchForm (card, linkableFields, columns, position) { let roleList = sessionStorage.getItem('sysRoles') let appType = sessionStorage.getItem('appType') if (roleList) { @@ -318,7 +321,7 @@ text: '閫夐」鍗�' }, { value: 'date', - text: Formdict['model.form.dateday'] + text: '鏃ユ湡锛堝ぉ锛�' }, { value: 'datemonth', text: Formdict['model.form.datemonth'] @@ -345,10 +348,10 @@ text: '閫夐」鍗�' }, { value: 'date', - text: Formdict['model.form.dateday'] + text: '鏃ユ湡锛堝ぉ锛�' }, { value: 'dateweek', - text: Formdict['model.form.dateweek'] + text: '鏃ユ湡锛堝懆锛�' }, { value: 'datemonth', text: Formdict['model.form.datemonth'] @@ -396,7 +399,8 @@ key: 'field', label: Formdict['model.form.field'], initVal: card.field || '', - required: true + required: true, + options: columns }, { type: 'select', @@ -460,6 +464,9 @@ }, { value: 'picture', text: '鍥剧墖' + }, { + value: 'color', + text: '鑹插潡' }] }, { @@ -786,8 +793,8 @@ key: 'advanced', label: '楂樼骇鎼滅储', initVal: card.advanced || 'false', - tooltip: '鍦ㄩ殣钘忔悳绱㈡寜閽椂锛岄珮绾ф悳绱㈡棤鏁堛��', - forbid: appType === 'mob', + tooltip: '鍦ㄩ珮绾ф悳绱互妯℃�佹鎴栨娊灞夊睍寮�鏃讹紝鎼滅储鏉′欢鍦ㄥ紑鍙戠晫闈㈠崰姣斾负6锛屽疄闄呮晥鏋滆鍦ㄨ繍琛屾椂鏌ョ湅銆�', + forbid: appType === 'mob' || position === 'header', options: [{ value: 'true', text: Formdict['model.true'] @@ -826,19 +833,29 @@ }] }, { + type: 'radio', + key: 'selectStyle', + label: '閫変腑鏁堟灉', + tooltip: '鑳屾櫙鍙婃枃瀛楀彉鍖栨椂浼氫娇鐢ㄧ郴缁熻壊銆�', + initVal: card.selectStyle || (card.backgroundColor ? 'custom' : 'background'), + options: [{ + value: 'background', + text: '鑳屾櫙鍙樺寲' + }, { + value: 'font', + text: '鏂囧瓧鍙樺寲' + }, { + value: 'custom', + text: '鑷畾涔�' + }] + }, + { type: 'color', key: 'backgroundColor', label: '鑳屾櫙鑹�', initVal: card.backgroundColor || '', tooltip: '璁剧疆鑳屾櫙鑹插悗锛岄�変腑鏁堟灉鐢辫儗鏅鑹叉帶鍒躲��', - required: false - }, - { - type: 'color', - key: 'borderColor', - label: '杈规棰滆壊', - initVal: card.borderColor || '', - required: false + required: true }, { type: 'multiselect', @@ -846,7 +863,8 @@ label: Formdict['header.form.blacklist'], initVal: card.blacklist || [], required: false, - options: roleList || [] + options: roleList || [], + forbid: appType === 'mob' } ] } @@ -920,6 +938,8 @@ value: 'equaltab', text: '鍒锋柊鍚岀骇鏍囩' }) + } else if (card.execSuccess === 'maingrid') { + card.execSuccess = 'grid' } if (card.OpenType === 'blank') { @@ -927,6 +947,10 @@ } if (!card.control && card.controlField) { card.control = 'disabled' + } + + if (card.intertype === 'outer' && !card.procMode && !card.innerFunc) { // 鍏煎澶栭儴鍑芥暟鐩翠紶绫诲瀷 + card.procMode = 'none' } return [ @@ -939,23 +963,37 @@ options: opentypes }, { + type: 'text', + key: 'label', + label: '鎸夐挳鍚嶇О', + initVal: card.label, + required: true, + readonly: false + }, + { type: 'select', key: 'funcType', label: '鍔熻兘绫诲瀷', initVal: card.funcType || '', required: true, options: [{ - value: 'changeuser', - text: '鍒囨崲鐢ㄦ埛' - }, { value: 'print', text: '鏍囩鎵撳嵃' + }, { + value: 'refund', + text: '閫�娆�' + }, { + value: 'changeuser', + text: '鍒囨崲鐢ㄦ埛' }, { value: 'closetab', text: '鏍囩鍏抽棴' }, { value: 'megvii', text: '鏃疯闈㈡澘鏈�' + }, { + value: 'filezip', + text: '鏂囦欢鍘嬬缉鍖�' }] }, { // 鏃疯闈㈡澘鏈烘帴鍙� 寰呮墿灞� @@ -997,7 +1035,8 @@ type: 'radio', key: 'procMode', label: '鍙傛暟澶勭悊', - initVal: card.procMode || 'system', + initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'), + tooltip: '褰撹繑鍥炲�煎瓨鍦� mk_ex_invoke 涓斿�间负 false 鏃讹紝涓嶄細璋冪敤澶栭儴鎺ュ彛銆�', required: true, options: [{ value: 'system', @@ -1005,6 +1044,9 @@ }, { value: 'inner', text: '鍐呴儴鍑芥暟' + }, { + value: 'none', + text: '鏃�' }] }, { @@ -1014,14 +1056,6 @@ initVal: card.sqlType || '', required: true, options: [] - }, - { - type: 'text', - key: 'label', - label: '鎸夐挳鍚嶇О', - initVal: card.label, - required: true, - readonly: false }, { type: 'text', @@ -1035,9 +1069,18 @@ key: 'innerFunc', label: Formdict['header.form.innerFunc'], initVal: card.innerFunc || '', - tooltip: `鍑芥暟鍚嶇О闇�浠�${usefulFields.join(', ')}绛夊瓧绗﹀紑濮嬨�俙, + tooltip: usefulFields.length ? `鍑芥暟鍚嶇О闇�浠�${usefulFields.join(', ')}绛夊瓧绗﹀紑濮嬨�俙 : '', fields: usefulFields, required: card.intertype === 'inner', + readonly: false + }, + { + type: 'text', + key: 'urlkey', + label: '鍦板潃瀛楁', + initVal: card.urlkey || '', + tooltip: '鍥剧墖锛堟枃浠讹級閾炬帴鐨勫瓧娈靛悕銆�', + required: false, readonly: false }, { @@ -1163,7 +1206,7 @@ type: 'radio', key: 'callbackType', label: '鍥炶皟鏂瑰紡', - initVal: card.callbackType || 'script', + initVal: card.callbackType || (card.callbackFunc ? 'func' : 'none'), tooltip: '浣跨敤鍚庡彴鑴氭湰鎵ц鏃讹紝闇�瑕侀厤鍚堣鍒掍换鍔°��', required: true, options: [{ @@ -1172,6 +1215,12 @@ }, { value: 'default', text: '鍚庡彴鑴氭湰' + }, { + value: 'func', + text: '鍥炶皟鍑芥暟' + }, { + value: 'none', + text: '鏃�' }] }, { @@ -1186,7 +1235,7 @@ key: 'callbackFunc', label: Formdict['header.form.callbackFunc'], initVal: card.callbackFunc || '', - required: false, + required: true, readonly: false }, { @@ -1322,7 +1371,7 @@ type: 'text', key: 'output', label: '杩斿洖鍊�', - tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺�備緥濡傦細@id', + tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺�傜郴缁熷嚱鏁板彲鎸囧畾杩斿洖鐨勫彉閲忥紙浠绗﹀紑澶达紝濡侤id锛夛紱鑷畾涔夊嚱鏁板彲鎸囧畾杩斿洖瀛楁锛堝id锛夈��', initVal: card.output || '', required: false }, @@ -1447,7 +1496,7 @@ key: 'preFunc', label: '鍓嶇疆鍑芥暟', initVal: card.preFunc || '', - tooltip: `鍑芥暟鍚嶇О闇�浠�${usefulFields.join(', ')}绛夊瓧绗﹀紑濮嬶紱鍓嶇疆鍑芥暟鎵ц瀹屾垚鍚庯紝缁撴灉浼氫紶鍏ュ唴閮ㄥ嚱鏁颁腑锛屾鏃跺唴閮ㄥ嚱鏁颁細寮傛鎵ц锛涘綋鍓嶇疆鍑芥暟杩斿洖涓璄rrCode绛変簬-1鏃讹紝灏嗕笉鍐嶆墽琛屽唴閮ㄥ嚱鏁般�俙, + tooltip: usefulFields.length ? `鍑芥暟鍚嶇О闇�浠�${usefulFields.join(', ')}绛夊瓧绗﹀紑濮嬶紱鍓嶇疆鍑芥暟鎵ц瀹屾垚鍚庯紝缁撴灉浼氫紶鍏ュ唴閮ㄥ嚱鏁颁腑锛屾鏃跺唴閮ㄥ嚱鏁颁細寮傛鎵ц锛涘綋鍓嶇疆鍑芥暟杩斿洖涓璄rrCode绛変簬-1鏃讹紝灏嗕笉鍐嶆墽琛屽唴閮ㄥ嚱鏁般�俙 : '', fields: usefulFields, required: false, readonly: false @@ -1507,6 +1556,20 @@ value: 'true', text: '鏄�' }] + }, + { + type: 'radio', + key: 'progress', + label: '杩涘害鎻愮ず', + initVal: card.progress || 'number', + required: false, + options: [{ + value: 'number', + text: '鍓╀綑鏁�' + }, { + value: 'progressbar', + text: '杩涘害鏉�' + }] } ] } @@ -1563,6 +1626,9 @@ }, { value: 'picture', text: Formdict['model.form.picture'] + }, { + value: 'video', + text: '瑙嗛' }, { value: 'link', text: Formdict['model.form.href'] @@ -1652,6 +1718,26 @@ }] }, { + type: 'number', + key: 'startTime', + precision: 0, + label: '寮�濮嬫椂闂�', + initVal: card.startTime || 0, + tooltip: '瑙嗛寮�濮嬫挱鏀剧殑鏃堕棿锛岀敤浜庤皟鏁磋棰戝垵濮嬪寲灞曠ず鐨勭晫闈€��', + required: false + }, + { + type: 'select', + key: 'aspectRatio', + label: '闀垮姣�', + initVal: card.aspectRatio || '16:9', + required: true, + options: [ + { value: '4:3', text: '4:3' }, + { value: '16:9', text: '16:9' } + ] + }, + { type: 'radio', key: 'rowspan', label: '琛屽悎骞�', @@ -1702,10 +1788,10 @@ type: 'select', key: 'format', label: Formdict['header.form.format'], - initVal: card.format || '', + initVal: card.format || 'none', options: [{ - value: '', - text: Formdict['model.empty'] + value: 'none', + text: '鏃�' }, { value: 'thdSeparator', text: '鍗冨垎浣�' @@ -1722,10 +1808,13 @@ type: 'select', key: 'textFormat', label: Formdict['header.form.format'], - initVal: card.textFormat || '', + initVal: card.textFormat || 'none', options: [{ - value: '', - text: Formdict['model.empty'] + value: 'none', + text: '鏃�' + }, { + value: 'encryption', + text: '鍔犲瘑' }, { value: 'YYYY-MM-DD', text: 'YYYY-MM-DD' @@ -1754,15 +1843,39 @@ }, { type: 'number', - key: 'maxHeight', + key: 'span', min: 1, - max: 1000, - decimal: 0, - label: '鏈�澶ч珮搴�', - tooltip: '鍥剧墖鍦ㄨ〃鏍间腑鏄剧ず鐨勬渶澶ч珮搴�', - tooltipClass: 'middle', - initVal: card.maxHeight || 128, + max: 24, + precision: 0, + label: '鍥剧墖瀹藉害', + initVal: card.span || 24, + tooltip: '鏍呮牸甯冨眬锛岀瓑鍒嗕负24浠姐��', required: true + }, + { + type: 'select', + key: 'lenWidRadio', + label: '闀垮姣�', + initVal: card.lenWidRadio || '1:1', + required: true, + options: [ + { value: '1:1', text: '1:1' }, + { value: '4:3', text: '4:3' }, + { value: '3:2', text: '3:2' }, + { value: '16:9', text: '16:9' }, + { value: '2:1', text: '2:1' }, + { value: '3:1', text: '3:1' }, + { value: '4:1', text: '4:1' }, + { value: '5:1', text: '5:1' }, + { value: '6:1', text: '6:1' }, + { value: '7:1', text: '7:1' }, + { value: '8:1', text: '8:1' }, + { value: '9:1', text: '9:1' }, + { value: '10:1', text: '10:1' }, + { value: '3:4', text: '3:4' }, + { value: '2:3', text: '2:3' }, + { value: '9:16', text: '9:16' }, + ] }, { type: 'radio', @@ -2318,6 +2431,9 @@ value: 'select', text: Formdict['model.form.select'] }, { + value: 'textarea', + text: '澶氳鏂囨湰' + }, { value: 'multiselect', text: Formdict['model.form.multiselect'] }, { @@ -2337,10 +2453,10 @@ text: '閫夐」鍗�' }, { value: 'fileupload', - text: Formdict['header.form.fileupload'] + text: '鏂囦欢涓婁紶' }, { value: 'date', - text: Formdict['model.form.dateday'] + text: '鏃ユ湡锛堝ぉ锛�' }, { value: 'datemonth', text: Formdict['model.form.datemonth'] @@ -2348,8 +2464,8 @@ // value: 'datetime', // text: '鏃ユ湡锛堝垎/绉掞級' }, { - value: 'textarea', - text: Formdict['model.form.textarea'] + value: 'cascader', + text: '绾ц仈鑿滃崟' }, { value: 'rate', text: '璇勫垎' @@ -2371,6 +2487,9 @@ }, { value: 'linkMain', text: '鍏宠仈涓昏〃' + }, { + value: 'formula', + text: '鍏紡' }] let _fieldlength = 50 @@ -2402,10 +2521,10 @@ text: '閫夐」鍗�' }, { value: 'fileupload', - text: Formdict['header.form.fileupload'] + text: '鏂囦欢涓婁紶' }, { value: 'date', - text: Formdict['model.form.dateday'] + text: '鏃ユ湡锛堝ぉ锛�' }, { value: 'datemonth', text: Formdict['model.form.datemonth'] @@ -2415,6 +2534,9 @@ }, { value: 'textarea', text: Formdict['model.form.textarea'] + }, { + value: 'cascader', + text: '绾ц仈鑿滃崟' }, { value: 'rate', text: '璇勫垎' @@ -2430,6 +2552,9 @@ }, { value: 'linkMain', text: '鍏宠仈涓昏〃' + }, { + value: 'formula', + text: '鍏紡' }] } @@ -2539,10 +2664,10 @@ required: true, options: [{ value: '0', - text: Formdict['header.form.custom'] + text: '鑷畾涔�' }, { value: '1', - text: Formdict['header.form.datasource'] + text: '鏁版嵁婧�' }] }, { @@ -2557,6 +2682,9 @@ }, { value: 'picture', text: '鍥剧墖' + }, { + value: 'color', + text: '鑹插潡' }] }, { @@ -2588,9 +2716,9 @@ }, { type: 'radio', - key: 'ratio', + key: 'picratio', label: '鍥剧墖姣斾緥', - initVal: card.ratio || '1:1', + initVal: card.picratio || card.ratio || '1:1', required: true, options: [{ value: '1:1', @@ -2669,6 +2797,14 @@ }, { type: 'text', + key: 'topmark', + label: '椤剁骇鏍囪瘑', + initVal: card.topmark || '', + tooltip: '鍏宠仈瀛楁鍊间笌椤剁骇鏍囪瘑鐩稿悓鏃讹紝瑙嗕负椤剁骇鑺傜偣銆�', + required: false + }, + { + type: 'text', key: 'valueField', label: '鍊悸峰瓧娈�', initVal: card.valueField || '', @@ -2712,16 +2848,6 @@ tooltip: '璁剧疆绂佺敤瀛楁锛屼笖瀛楁鍊间负true鏃讹紝閫夐」涓嶅彲閫夈��', required: false, readonly: false - }, - { - type: 'number', - key: 'decimal', - min: 0, - max: 18, - precision: 0, - label: Formdict['header.form.decimal'], - initVal: card.decimal || 0, - required: true }, { type: 'number', @@ -2857,6 +2983,53 @@ }] }, { + type: 'radio', + key: 'declareType', + label: '鏁版嵁绫诲瀷', + tooltip: '澹版槑鍙橀噺鏃剁殑绫诲瀷锛屾椂闂存牸寮廳atetime鎴栨枃鏈牸寮弉varchar(50)銆�', + initVal: card.declareType || 'datetime', + options: [{ + value: 'datetime', + text: 'datetime' + }, { + value: 'nvarchar(50)', + text: 'nvarchar(50)' + }] + }, + { + type: 'text', + key: 'separator', + label: '杩炴帴绗�', + initVal: card.separator === undefined ? '/' : card.separator, + tooltip: '琛ㄥ崟鎻愪氦鏃朵俊鎭箣闂寸殑杩炴帴绗︺�傛敞锛氳繛鎺ョ涓虹┖鏃讹紝鍒濆鍖栨椂濉厖鍏朵粬琛ㄥ崟鏃犳晥銆�', + required: false, + readonly: false + }, + { + type: 'radio', + key: 'declare', + label: '鏁版嵁绫诲瀷', + initVal: card.declare || 'nvarchar', + tooltip: '澹版槑鍙橀噺鏃剁殑绫诲瀷銆備娇鐢� decimal 鏃讹紝璇风‘璁alue涓烘暟鍊硷紝涓斾笉鍙负绌恒��', + options: [{ + value: 'nvarchar', + text: 'nvarchar' + }, { + value: 'decimal', + text: 'decimal' + }] + }, + { + type: 'number', + key: 'decimal', + min: 0, + max: 18, + precision: 0, + label: Formdict['header.form.decimal'], + initVal: card.decimal || 0, + required: true + }, + { type: 'number', key: 'fieldlength', min: 1, @@ -2885,19 +3058,25 @@ initVal: card.regular || '', options: [{ value: '', - text: Formdict['model.empty'] + text: '绌�' }, { value: 'number', - text: Formdict['model.form.number'] + text: '鏁板瓧' }, { value: 'letter', - text: Formdict['header.form.letter'] + text: '瀛楁瘝' + }, { + value: 'letter_number', + text: '鏁板瓧鎴栧瓧姣�' }, { value: 'letter&number', - text: '瀛楁瘝+鏁板瓧' + text: '鏁板瓧銆佸瓧姣嶄互鍙夽_.' }, { value: 'phone', text: '鎵嬫満鍙�' + }, { + value: 'email', + text: '閭' }] }, { @@ -2932,15 +3111,15 @@ }, { type: 'radio', - key: 'allowHalf', - label: '鍗婇��', - initVal: card.allowHalf || 'false', + key: 'hidden', + label: "闅愯棌", + initVal: card.hidden || 'false', options: [{ value: 'true', - text: '鏀寔' + text: Formdict['model.true'] }, { value: 'false', - text: '涓嶆敮鎸�' + text: Formdict['model.false'] }] }, { @@ -2959,21 +3138,8 @@ { type: 'radio', key: 'required', - label: Formdict['model.required'], + label: "蹇呭~", initVal: card.required || 'true', - options: [{ - value: 'true', - text: Formdict['model.true'] - }, { - value: 'false', - text: Formdict['model.false'] - }] - }, - { - type: 'radio', - key: 'hidden', - label: Formdict['model.hidden'], - initVal: card.hidden || 'false', options: [{ value: 'true', text: Formdict['model.true'] @@ -3030,14 +3196,14 @@ type: 'radio', key: 'readin', label: '鑷姩濉厖', - tooltip: '鏄惁灏嗚〃鏍奸�変腑鐨勬暟鎹嚜鍔ㄥ~鍏呭埌琛ㄥ崟锛堝瓧娈电浉鍚岋級', + tooltip: '灏嗚〃鏍奸�変腑鐨勬暟鎹嚜鍔ㄥ~鍏呭埌琛ㄥ崟涓�傛敞锛氬湪鎵归噺鎿嶄綔鏃讹紝濡傛兂瑕佹墍閫夎锛堝綋鍓嶅瓧娈碉級鍏ㄩ儴淇敼璇疯涓哄惁鎴栭琛屻��', initVal: card.readin || 'true', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }, { value: 'top', text: '棣栬' @@ -3056,6 +3222,26 @@ value: 'false', text: Formdict['model.false'] }] + }, + { + type: 'radio', + key: 'allowHalf', + label: '鍗婇��', + initVal: card.allowHalf || 'false', + options: [{ + value: 'true', + text: '鏀寔' + }, { + value: 'false', + text: '涓嶆敮鎸�' + }] + }, + { + type: 'color', + key: 'color', + label: '棰滆壊', + initVal: card.color || '#fadb14', + required: true }, { type: 'number', @@ -3117,33 +3303,29 @@ }] }, { + type: 'radio', + key: 'selectStyle', + label: '閫変腑鏁堟灉', + tooltip: '鑳屾櫙鍙婃枃瀛楀彉鍖栨椂浼氫娇鐢ㄧ郴缁熻壊銆�', + initVal: card.selectStyle || (card.backgroundColor ? 'custom' : 'background'), + options: [{ + value: 'background', + text: '鑳屾櫙鍙樺寲' + }, { + value: 'font', + text: '鏂囧瓧鍙樺寲' + }, { + value: 'custom', + text: '鑷畾涔�' + }] + }, + { type: 'color', key: 'backgroundColor', label: '鑳屾櫙鑹�', initVal: card.backgroundColor || '', tooltip: '璁剧疆鑳屾櫙鑹插悗锛岄�変腑鏁堟灉鐢辫儗鏅鑹叉帶鍒躲��', - required: false - }, - { - type: 'color', - key: 'borderColor', - label: '杈规棰滆壊', - initVal: card.borderColor || '', - required: false - }, - { - type: 'radio', - key: 'declareType', - label: '鏁版嵁绫诲瀷', - tooltip: '澹版槑鍙橀噺鏃剁殑绫诲瀷锛屾椂闂存牸寮廳atetime鎴栨枃鏈牸寮弉varchar(50)銆�', - initVal: card.declareType || 'datetime', - options: [{ - value: 'datetime', - text: 'datetime' - }, { - value: 'nvarchar(50)', - text: 'nvarchar(50)' - }] + required: true }, // { // type: 'radio', @@ -3164,12 +3346,16 @@ key: 'encryption', label: '鍔犲瘑浼犺緭', initVal: card.type === 'brafteditor' ? (card.encryption || 'true') : (card.encryption || 'false'), + tooltip: '浣跨敤md5鍔犲瘑鏃讹紝鍔犲瘑鍓嶅唴瀹逛細杞负灏忓啓锛屽姞瀵嗗悗鐨刴d5鍊间负32浣嶅ぇ鍐欍��', options: [{ - value: 'true', - text: Formdict['model.true'] - }, { value: 'false', - text: Formdict['model.false'] + text: '鏃�' + }, { + value: 'true', + text: 'base64鍔犲瘑' + }, { + value: 'md5', + text: 'md5鍔犲瘑' }] }, { @@ -3185,6 +3371,37 @@ value: 'false', text: Formdict['model.false'] }] + }, + { + type: 'textarea', + key: 'formula', + label: '鍏紡', + initVal: card.formula || '', + tooltip: '鍔ㄦ�佹浛鎹㈢浉搴旂殑瀛楁锛屽睍绀鸿幏寰楃殑缁撴灉銆傚彲浣跨敤JS鐨勪竴浜涜娉曪紝濡傦細涓夊厓琛ㄨ揪寮� @field1@ > @field2@ ? 0 : 1锛汳ath瀵硅薄锛屽彇缁濆鍊� Math.abs(@field@)銆佸洓鑸嶄簲鍏� Math.round(@field@)绛�', + rows: 2, + required: true + }, + { + type: 'radio', + key: 'eval', + label: '瑙f瀽', + initVal: card.eval || 'true', + tooltip: '褰撳叕寮忓唴瀹规秹鍙婅绠楁椂璇烽�夋嫨鈥滄槸鈥濓紝褰撳叕寮忓唴瀹逛负瀛楁鎷兼帴鏃惰閫夋嫨鈥滃惁鈥濄��', + required: false, + options: [{ + value: 'true', + text: '鏄�' + }, { + value: 'false', + text: '鍚�' + }] + }, + { + type: 'text', + key: 'postfix', + label: '鍚庣紑', + initVal: card.postfix || '', + required: false }, { type: 'radio', @@ -3238,13 +3455,16 @@ tooltip: '鏂囦欢鍘嬬缉鎴朾ase64蹇呴』涓哄浘鐗囷紝鍥剧墖鏍煎紡涓簀pg銆乸ng銆乬if 鎴� jpeg銆傛敞锛歜ase64鍙彲涓婁紶涓�寮犲浘鐗囥��', options: [{ value: 'false', - text: '鏃�' + text: '榛樿' }, { value: 'true', text: '鍘嬬缉' }, { value: 'base64', text: 'base64' + }, { + value: 'oss', + text: 'oss涓婁紶' }] }, { @@ -3257,6 +3477,90 @@ initVal: card.limit || 2, tooltip: '鍘嬬缉璧风偣锛屽皬浜庤捣鐐瑰�肩殑鏂囦欢涓嶈繘琛屽帇缂┿��', required: true + }, + { + type: 'radio', + key: 'miniSet', + label: '灏忕▼搴忚缃�', + initVal: card.miniSet || 'default', + options: [{ + value: 'default', + text: '榛樿' + }, { + value: 'custom', + text: '鑷畾涔�' + }], + forbid: appType !== 'mob' + }, + { + type: 'checkbox', + key: 'mediaType', + label: '鏂囦欢绫诲瀷', + initVal: card.mediaType || ['image', 'video'], + options: [{ + value: 'image', + text: '鍥剧墖' + }, { + value: 'video', + text: '瑙嗛' + }], + required: true, + forbid: appType !== 'mob' + }, + { + type: 'checkbox', + key: 'sourceType', + label: '鏂囦欢鏉ユ簮', + initVal: card.sourceType || ['album', 'camera'], + options: [{ + value: 'album', + text: '鐩稿唽閫夋嫨' + }, { + value: 'camera', + text: '鐩告満鎷嶆憚' + }], + required: true, + forbid: appType !== 'mob' + }, + { + type: 'radio', + key: 'sizeType', + label: '鍥剧墖鍘嬬缉', + initVal: card.sizeType || 'compressed', + options: [{ + value: 'compressed', + text: '鏄�' + }, { + value: 'original', + text: '鍚�' + }], + forbid: appType !== 'mob' + }, + { + type: 'number', + key: 'maxDuration', + label: '鎷嶆憚鏃堕暱', + initVal: card.maxDuration || 10, + tooltip: '鎷嶆憚瑙嗛鏈�闀挎媿鎽勬椂闂达紝鍗曚綅绉掋�傛椂闂磋寖鍥翠负 3s 鑷� 60s 涔嬮棿銆備笉闄愬埗鐩稿唽銆�', + min: 3, + max: 60, + precision: 0, + required: true, + forbid: appType !== 'mob' + }, + { + type: 'radio', + key: 'camera', + label: '鎽勫儚澶�', + initVal: card.camera || 'back', + options: [{ + value: 'back', + text: '鍚庣疆' + }, { + value: 'front', + text: '鍓嶇疆' + }], + forbid: appType !== 'mob' }, { type: 'number', @@ -3456,35 +3760,36 @@ initVal: card.linkSubField || [], options: inputfields }, - { - type: 'number', - key: 'marginTop', - label: '涓婅竟璺濓紙px锛�', - initVal: card.marginTop || 0, - min: -100, - max: 1000, - precision: 0, - required: false, - forbid: appType !== 'mob' - }, - { - type: 'number', - key: 'marginBottom', - label: '涓嬭竟璺濓紙px锛�', - initVal: card.marginBottom || 0, - min: -100, - max: 1000, - precision: 0, - required: false, - forbid: appType !== 'mob' - }, + // { + // type: 'number', + // key: 'marginTop', + // label: '涓婅竟璺濓紙px锛�', + // initVal: card.marginTop || 0, + // min: -100, + // max: 1000, + // precision: 0, + // required: false, + // forbid: appType !== 'mob' + // }, + // { + // type: 'number', + // key: 'marginBottom', + // label: '涓嬭竟璺濓紙px锛�', + // initVal: card.marginBottom || 0, + // min: -100, + // max: 1000, + // precision: 0, + // required: false, + // forbid: appType !== 'mob' + // }, { type: 'multiselect', key: 'blacklist', label: Formdict['header.form.blacklist'], initVal: card.blacklist || [], required: false, - options: roleList + options: roleList, + forbid: appType === 'mob' } ] } -- Gitblit v1.8.0