From d1f19b794216b37417e114b71c1cd7a2ac3d7748 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 02 三月 2023 01:14:29 +0800 Subject: [PATCH] 2023-03-02 --- src/templates/zshare/formconfig.jsx | 862 +++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 568 insertions(+), 294 deletions(-) diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index 3d624c3..d211ba0 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -1,8 +1,4 @@ -import zhCN from '@/locales/zh-CN/model.js' -import enUS from '@/locales/en-US/model.js' import { formRule, btnClasses } from '@/utils/option.js' - -const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS /** * @description 鑾峰彇鏍戝舰椤甸潰璁剧疆琛ㄥ崟閰嶇疆淇℃伅 @@ -57,31 +53,32 @@ { type: 'radio', key: 'interType', - label: Formdict['header.form.intertype'], + label: '鎺ュ彛绫诲瀷', initVal: setting.interType || 'inner', required: false, readonly: false, options: [ - { value: 'inner', text: Formdict['model.interface.inner'] }, - { value: 'outer', text: Formdict['model.interface.outer'] } + { value: 'inner', text: '鍐呴儴' }, + { value: 'outer', text: '澶栭儴' } ] }, { type: 'radio', key: 'sysInterface', - label: Formdict['header.form.sysInterface'], + label: '绯荤粺鎺ュ彛', initVal: setting.sysInterface || 'false', + tooltip: '鍗曠偣鐧诲綍绯荤粺', required: false, readonly: false, options: [ - { value: 'true', text: Formdict['model.true'] }, - { value: 'false', text: Formdict['model.false'] } + { value: 'true', text: '鏄�' }, + { value: 'false', text: '鍚�' } ] }, { type: 'text', key: 'interface', - label: Formdict['header.form.interface'], + label: '鎺ュ彛鍦板潃', initVal: setting.sysInterface === 'true' ? (window.GLOB.mainSystemApi || '') : (setting.interface || ''), required: true, readonly: setting.sysInterface === 'true', @@ -95,7 +92,7 @@ { type: 'text', key: 'outerFunc', - label: Formdict['header.form.outerFunc'], + label: '澶栭儴鍑芥暟', initVal: setting.outerFunc || '', required: false, readonly: false, @@ -112,7 +109,7 @@ { type: 'text', key: 'innerFunc', - label: Formdict['header.form.innerFunc'], + label: '鍐呴儴鍑芥暟', initVal: setting.innerFunc || '', tooltip: usefulFields.length ? '寮�澶村彲鐢ㄥ瓧绗︼細' + usefulFields.join(', ') : '', placement: 'bottomLeft', @@ -265,8 +262,8 @@ required: false, readonly: false, options: [ - { value: 'true', text: Formdict['model.true'] }, - { value: 'false', text: Formdict['model.false'] } + { value: 'true', text: '鏄�' }, + { value: 'false', text: '鍚�' } ] }, { @@ -277,8 +274,8 @@ required: false, readonly: false, options: [ - { value: 'true', text: Formdict['model.true'] }, - { value: 'false', text: Formdict['model.false'] } + { value: 'true', text: '鏄�' }, + { value: 'false', text: '鍚�' } ] } ] @@ -289,7 +286,7 @@ * @param {object} card // 鎼滅储鏉′欢瀵硅薄 * @param {Array} linkableFields // 鍙叧鑱斿瓧娈� */ -export function getSearchForm (card, linkableFields, columns) { +export function getSearchForm (card, linkableFields, columns, position) { let roleList = sessionStorage.getItem('sysRoles') let appType = sessionStorage.getItem('appType') if (roleList) { @@ -321,46 +318,43 @@ text: '閫夐」鍗�' }, { value: 'date', - text: Formdict['model.form.dateday'] + text: '鏃ユ湡锛堝ぉ锛�' }, { value: 'datemonth', - text: Formdict['model.form.datemonth'] - // }, { - // value: 'daterange', - // text: Formdict['model.form.daterange'] + text: '鏃ユ湡锛堟湀锛�' }] } else { typeOptions = [{ value: 'text', - text: Formdict['model.form.text'] + text: '鏂囨湰' }, { value: 'select', - text: Formdict['model.form.select'] + text: '涓嬫媺閫夋嫨' }, { value: 'multiselect', - text: Formdict['model.form.multiselect'] + text: '涓嬫媺澶氶��' }, { value: 'link', - text: Formdict['model.form.link'] + text: '鑱斿姩鑿滃崟' }, { value: 'checkcard', text: '閫夐」鍗�' }, { value: 'date', - text: Formdict['model.form.dateday'] + text: '鏃ユ湡锛堝ぉ锛�' }, { value: 'dateweek', - text: Formdict['model.form.dateweek'] + text: '鏃ユ湡锛堝懆锛�' }, { value: 'datemonth', - text: Formdict['model.form.datemonth'] + text: '鏃ユ湡锛堟湀锛�' }, { value: 'daterange', - text: Formdict['model.form.daterange'] + text: '鏃ユ湡锛堝尯闂达級' }, { value: 'group', - text: Formdict['model.form.dategroup'] + text: '鏃ユ湡锛堢粍鍚堬級' }] } @@ -390,14 +384,14 @@ { type: 'text', key: 'label', - label: Formdict['model.name'], + label: '鍚嶇О', initVal: card.label || '', required: true }, { type: 'text', key: 'field', - label: Formdict['model.form.field'], + label: '瀛楁', initVal: card.field || '', required: true, options: columns @@ -405,7 +399,7 @@ { type: 'select', key: 'type', - label: Formdict['model.form.type'], + label: '绫诲瀷', initVal: card.type, required: true, options: typeOptions @@ -420,7 +414,7 @@ { type: 'text', key: 'initval', - label: Formdict['header.form.initval'], + label: '鍒濆鍊�', tooltip: '绫诲瀷涓轰笅鎷夎彍鍗曟椂锛屽垵濮嬪�煎簲涓烘暟鎹殑Value鍊硷紙浣跨敤鏁版嵁婧愭椂锛屽簲涓恒�婂�悸峰瓧娈点�嬬殑鍊硷級;绫诲瀷涓烘暟鍊硷紙鍖洪棿锛夋椂锛屽垵濮嬪�间娇鐢ㄩ�楀彿鎷兼帴锛屼緥濡� 3,10', initVal: card.initval, required: false @@ -433,10 +427,10 @@ required: true, options: [{ value: '0', - text: Formdict['header.form.custom'] + text: '鑷畾涔�' }, { value: '1', - text: Formdict['header.form.datasource'] + text: '鏁版嵁婧�' }] }, // { @@ -446,10 +440,10 @@ // initVal: card.setAll || 'true', // options: [{ // value: 'true', - // text: Formdict['model.true'] + // text: '鏄�' // }, { // value: 'false', - // text: Formdict['model.false'] + // text: '鍚�' // }] // }, { @@ -495,6 +489,13 @@ required: true }, { + type: 'text', + key: 'colorField', + label: '鑹插�煎瓧娈�', + initVal: card.colorField || '', + required: true + }, + { type: 'radio', key: 'picratio', label: '鍥剧墖姣斾緥', @@ -524,7 +525,7 @@ { type: 'codemirror', key: 'dataSource', - label: Formdict['header.form.datasource'], + label: '鏁版嵁婧�', initVal: card.dataSource || '', required: true }, @@ -612,34 +613,19 @@ initVal: card.orderType || 'asc', options: [{ value: 'asc', - text: Formdict['header.form.asc'] + text: '姝e簭' }, { value: 'desc', - text: Formdict['header.form.desc'] + text: '鍊掑簭' }] }, { type: 'select', key: 'match', - label: Formdict['header.form.match'], + label: '鍖归厤妯″紡', initVal: card.match || 'like', required: true, - options: [{ - value: 'like', - text: 'like' - }, { - value: 'equal', - text: 'equal' - }, { - value: 'greater', - text: '>' - }, { - value: 'less', - text: '<' - }, { - value: 'greaterequal', - text: '>=' - }] + options: [] }, { type: 'radio', @@ -659,7 +645,7 @@ key: 'ratio', min: 1, max: 24, - label: Formdict['header.form.ratio'], + label: '姣斾緥', tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��', initVal: card.ratio || 6, forbid: appType === 'mob', @@ -699,27 +685,27 @@ { type: 'radio', key: 'required', - label: Formdict['model.required'], + label: '蹇呭~', initVal: card.required || 'false', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'radio', key: 'Hide', - label: Formdict['model.hidden'], + label: '闅愯棌', initVal: card.Hide || 'false', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -744,10 +730,10 @@ // tooltip: '鏁版嵁鏌ヨ鏃讹紝绫诲瀷瀛楁鏄惁浣滀负鍙傛暟浼犻�掞紝绫诲瀷瀛楁瀵瑰簲鍊间负 {"鏃�": "day", "鍛�": "week", "鏈�": "month", "瀛�": "quarter", "骞�": "year", "鑷畾涔�": "customized"}銆�', // options: [{ // value: 'true', - // text: Formdict['model.true'] + // text: '鏄�' // }, { // value: 'false', - // text: Formdict['model.false'] + // text: '鍚�' // }] // }, { @@ -793,14 +779,14 @@ 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'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -860,7 +846,7 @@ { type: 'multiselect', key: 'blacklist', - label: Formdict['header.form.blacklist'], + label: '榛戝悕鍗�', initVal: card.blacklist || [], required: false, options: roleList || [], @@ -882,31 +868,31 @@ let opentypes = [ { value: 'pop', - text: Formdict['model.form.popform'] + text: '寮圭獥锛堣〃鍗曪級' }, { value: 'prompt', - text: Formdict['model.form.prompt'] + text: '鎻愮ず妗�' }, { value: 'exec', - text: Formdict['model.form.exec'] + text: '鐩存帴鎵ц' }, { value: 'excelIn', - text: Formdict['model.form.excelIn'] + text: '瀵煎叆Excel' }, { value: 'excelOut', - text: Formdict['model.form.excelOut'] + text: '瀵煎嚭Excel' }, { value: 'popview', - text: Formdict['model.form.popview'] + text: '寮圭獥锛堟爣绛撅級' }, { value: 'tab', - text: Formdict['model.form.tab'] + text: '鏍囩椤�' }, { value: 'innerpage', - text: Formdict['model.form.newpage'] + text: '鏂伴〉闈�' }, { value: 'funcbutton', - text: Formdict['model.form.funcbutton'] + text: '鍔熻兘鎸夐挳' } ] @@ -938,6 +924,8 @@ value: 'equaltab', text: '鍒锋柊鍚岀骇鏍囩' }) + } else if (card.execSuccess === 'maingrid') { + card.execSuccess = 'grid' } if (card.OpenType === 'blank') { @@ -947,14 +935,26 @@ card.control = 'disabled' } + if (card.intertype === 'outer' && !card.procMode && !card.innerFunc) { // 鍏煎澶栭儴鍑芥暟鐩翠紶绫诲瀷 + card.procMode = 'none' + } + return [ { type: 'select', key: 'OpenType', - label: Formdict['header.form.openType'], + label: '鎵撳紑鏂瑰紡', initVal: card.OpenType, required: true, options: opentypes + }, + { + type: 'text', + key: 'label', + label: '鎸夐挳鍚嶇О', + initVal: card.label, + required: true, + readonly: false }, { type: 'select', @@ -963,11 +963,14 @@ initVal: card.funcType || '', required: true, options: [{ - value: 'changeuser', - text: '鍒囨崲鐢ㄦ埛' - }, { value: 'print', text: '鏍囩鎵撳嵃' + }, { + value: 'refund', + text: '閫�娆�' + }, { + value: 'changeuser', + text: '鍒囨崲鐢ㄦ埛' }, { value: 'closetab', text: '鏍囩鍏抽棴' @@ -992,24 +995,24 @@ { type: 'select', key: 'execMode', - label: Formdict['model.form.execMode'], + label: '鎵ц鏂瑰紡', initVal: card.execMode || 'exec', required: true, options: [{ value: 'exec', - text: Formdict['model.form.exec'] + text: '鐩存帴鎵ц' }, { value: 'prompt', - text: Formdict['model.form.prompt'] + text: '鎻愮ず妗�' }, { value: 'pop', - text: Formdict['model.form.popform'] + text: '寮圭獥锛堣〃鍗曪級' }] }, { type: 'radio', key: 'intertype', - label: Formdict['header.form.intertype'], + label: '鎺ュ彛绫诲瀷', initVal: card.intertype || 'system', required: true, options: [] @@ -1018,7 +1021,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', @@ -1026,35 +1030,30 @@ }, { value: 'inner', text: '鍐呴儴鍑芥暟' + }, { + value: 'none', + text: '鏃�' }] }, { type: 'radio', key: 'sqlType', - label: Formdict['header.form.action.type'], + label: '鎿嶄綔绫诲瀷', initVal: card.sqlType || '', required: true, options: [] }, { type: 'text', - key: 'label', - label: '鎸夐挳鍚嶇О', - initVal: card.label, - required: true, - readonly: false - }, - { - type: 'text', key: 'sql', - label: Formdict['model.form.tablename'], + label: '琛ㄥ悕', initVal: card.sql || config.setting.tableName || '', required: true }, { type: 'text', key: 'innerFunc', - label: Formdict['header.form.innerFunc'], + label: '鍐呴儴鍑芥暟', initVal: card.innerFunc || '', tooltip: usefulFields.length ? `鍑芥暟鍚嶇О闇�浠�${usefulFields.join(', ')}绛夊瓧绗﹀紑濮嬨�俙 : '', fields: usefulFields, @@ -1087,7 +1086,7 @@ { type: 'select', key: 'pageTemplate', - label: Formdict['model.form.newpage.type'], + label: '椤甸潰绫诲瀷', initVal: card.pageTemplate || '', required: true, options: [{ @@ -1101,10 +1100,10 @@ text: '鍗曟嵁鎵撳嵃' }, { value: 'pay', - text: Formdict['model.pay'] + text: '鏀粯' }, { value: 'custom', - text: Formdict['header.form.custom'] + text: '鑷畾涔�' }] }, { @@ -1118,28 +1117,29 @@ { type: 'text', key: 'url', - label: Formdict['model.pageUrl'], + label: '椤甸潰鍦板潃', initVal: card.url || '', required: true }, { type: 'radio', key: 'sysInterface', - label: Formdict['header.form.sysInterface'], + label: '绯荤粺鎺ュ彛', initVal: card.sysInterface || 'false', + tooltip: '鍗曠偣鐧诲綍绯荤粺', required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'text', key: 'outerFunc', - label: Formdict['header.form.outerFunc'], + label: '澶栭儴鍑芥暟', initVal: card.outerFunc || '', required: false, readonly: false @@ -1193,7 +1193,7 @@ type: 'radio', key: 'callbackType', label: '鍥炶皟鏂瑰紡', - initVal: card.callbackType || 'script', + initVal: card.callbackType || (card.callbackFunc ? 'func' : 'none'), tooltip: '浣跨敤鍚庡彴鑴氭湰鎵ц鏃讹紝闇�瑕侀厤鍚堣鍒掍换鍔°��', required: true, options: [{ @@ -1202,6 +1202,12 @@ }, { value: 'default', text: '鍚庡彴鑴氭湰' + }, { + value: 'func', + text: '鍥炶皟鍑芥暟' + }, { + value: 'none', + text: '鏃�' }] }, { @@ -1214,9 +1220,9 @@ { type: 'text', key: 'callbackFunc', - label: Formdict['header.form.callbackFunc'], + label: '鍥炶皟鍑芥暟', initVal: card.callbackFunc || '', - required: false, + required: true, readonly: false }, { @@ -1227,16 +1233,16 @@ required: true, options: [{ value: 'toolbar', - text: Formdict['header.form.toolbar'] + text: '宸ュ叿鏍�' }, { value: 'grid', - text: Formdict['header.form.grid'] + text: '琛ㄦ牸' }] }, { type: 'select', key: 'Ot', - label: Formdict['header.form.isRequired'], + label: '琛岃缃�', initVal: card.Ot || 'requiredSgl', required: true, options: [] @@ -1244,7 +1250,7 @@ { type: 'cascader', key: 'linkmenu', - label: Formdict['model.form.linkmenu'], + label: '鍏宠仈鑿滃崟', initVal: card.linkmenu || [], required: true, options: menulist @@ -1260,9 +1266,9 @@ { type: refresh.length === 0 ? 'radio' : 'select', key: 'execSuccess', - label: Formdict['model.form.afterSuccess'], + label: '鎴愬姛鍚�', initVal: card.execSuccess || 'grid', - tooltip: '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺��', + tooltip: '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓��', required: true, options: [{ value: 'never', @@ -1279,9 +1285,9 @@ { type: refresh.length === 0 ? 'radio' : 'select', key: 'execError', - label: Formdict['model.form.afterError'], + label: '澶辫触鍚�', initVal: card.execError || 'never', - tooltip: '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺��', + tooltip: '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓��', required: true, options: [{ value: 'never', @@ -1298,7 +1304,7 @@ { type: refresh.length === 0 ? 'radio' : 'select', key: 'popClose', - label: Formdict['header.form.popClose'], + label: '鍏抽棴鍚�', initVal: card.popClose || 'never', required: true, options: [{ @@ -1327,14 +1333,14 @@ { type: 'icon', key: 'icon', - label: Formdict['model.icon'], + label: '鍥炬爣', initVal: card.icon, required: false }, { type: 'select', key: 'class', - label: Formdict['model.form.color'], + label: '棰滆壊', initVal: card.class, required: false, options: btnClasses @@ -1352,7 +1358,7 @@ type: 'text', key: 'output', label: '杩斿洖鍊�', - tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺�傜郴缁熷嚱鏁板彲鎸囧畾杩斿洖鐨勫彉閲忥紙浠绗﹀紑澶达紝濡侤id锛夛紱鑷畾涔夊嚱鏁板彲鎸囧畾杩斿洖瀛楁锛堝id锛夈��', + tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺�傜郴缁熷嚱鏁板彲鎸囧畾杩斿洖鐨勫彉閲忥紙浠绗﹀紑澶达紝杩斿洖id鏃跺彲浣跨敤@id@锛夛紱鑷畾涔夊嚱鏁板彲鎸囧畾杩斿洖瀛楁锛堝id锛夈��', initVal: card.output || '', required: false }, @@ -1367,21 +1373,21 @@ { type: 'radio', key: 'joint', - label: Formdict['model.form.paramJoint'], + label: '鎷兼帴鍙傛暟', initVal: card.joint || 'true', required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'text', key: 'sheet', - label: Formdict['model.form.tablename'], + label: '琛ㄥ悕', initVal: card.sheet || config.setting.tableName || '', required: true }, @@ -1393,10 +1399,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -1441,7 +1447,7 @@ { type: 'radio', key: 'placement', - label: '鎶藉眽鏂瑰悜', + label: '寮瑰嚭鏂瑰悜', initVal: card.placement || 'right', required: false, options: [{ @@ -1580,14 +1586,14 @@ { type: 'text', key: 'label', - label: Formdict['model.name'], + label: '鍚嶇О', initVal: card.label, required: true }, { type: 'text', key: 'field', - label: Formdict['model.form.field'], + label: '瀛楁', initVal: card.field, required: true, readonly: false @@ -1595,24 +1601,27 @@ { type: 'select', key: 'type', - label: Formdict['model.form.type'], + label: '绫诲瀷', initVal: card.type, required: true, options: [{ value: 'text', - text: Formdict['model.form.text'] + text: '鏂囨湰' }, { value: 'number', - text: Formdict['model.form.number'] + text: '鏁板瓧' }, { value: 'picture', - text: Formdict['model.form.picture'] + text: '鍥剧墖' + }, { + value: 'video', + text: '瑙嗛' }, { value: 'link', - text: Formdict['model.form.href'] + text: '閾炬帴' }, { value: 'textarea', - text: Formdict['model.form.textarea'] + text: '澶氳鏂囨湰' }, { value: 'index', text: '搴忓彿' @@ -1621,7 +1630,7 @@ { type: 'text', key: 'nameField', - label: Formdict['model.name'] + Formdict['model.form.field'], + label: '鍚嶇О瀛楁', initVal: card.nameField, required: false, readonly: false @@ -1632,68 +1641,88 @@ min: 1, max: 1000, decimal: 0, - label: Formdict['model.form.columnWidth'], + label: '鍒楀', initVal: card.Width, required: true }, { type: 'radio', key: 'joint', - label: Formdict['model.form.paramJoint'], + label: '鎷兼帴鍙傛暟', initVal: card.joint || 'true', required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'radio', key: 'Hide', - label: Formdict['model.hidden'], + label: '闅愯棌', initVal: card.Hide || 'false', required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'radio', key: 'IsSort', - label: Formdict['model.sort'], + label: '鎺掑簭', initVal: card.IsSort || 'true', required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'radio', key: 'Align', - label: Formdict['model.form.align'], + label: '瀵归綈鏂瑰紡', initVal: card.Align || 'left', required: true, options: [{ value: 'left', - text: Formdict['model.form.alignLeft'] + text: '宸﹀榻�' }, { value: 'center', - text: Formdict['model.form.alignCenter'] + text: '灞呬腑' }, { value: 'right', - text: Formdict['model.form.alignRight'] + text: '鍙冲榻�' }] + }, + { + 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', @@ -1704,10 +1733,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -1719,10 +1748,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -1731,25 +1760,25 @@ min: 0, max: 18, decimal: 0, - label: Formdict['header.form.decimal'], + label: '灏忔暟浣�', initVal: card.decimal || 0, required: true }, { type: 'number', key: 'fieldlength', - label: Formdict['model.form.field'] + Formdict['model.length'], + label: '瀛楁闀垮害', initVal: card.fieldlength || (card.type === 'text' ? 50 : 512), required: true }, { type: 'select', key: 'format', - label: Formdict['header.form.format'], - initVal: card.format || '', + label: '鏍煎紡鍖�', + initVal: card.format || 'none', options: [{ - value: '', - text: Formdict['model.empty'] + value: 'none', + text: '鏃�' }, { value: 'thdSeparator', text: '鍗冨垎浣�' @@ -1765,11 +1794,14 @@ { type: 'select', key: 'textFormat', - label: Formdict['header.form.format'], - initVal: card.textFormat || '', + label: '鏍煎紡鍖�', + initVal: card.textFormat || 'none', options: [{ - value: '', - text: Formdict['model.empty'] + value: 'none', + text: '鏃�' + }, { + value: 'encryption', + text: '鍔犲瘑' }, { value: 'YYYY-MM-DD', text: 'YYYY-MM-DD' @@ -1782,7 +1814,7 @@ { type: 'text', key: 'prefix', - label: Formdict['header.form.prefix'], + label: '鍓嶇紑', initVal: card.prefix || '', required: false, readonly: false @@ -1790,7 +1822,7 @@ { type: 'text', key: 'postfix', - label: Formdict['header.form.postfix'], + label: '鍚庣紑', initVal: card.postfix || '', tooltipClass: 'middle', required: false, @@ -1798,15 +1830,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', @@ -1816,10 +1872,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -1841,7 +1897,7 @@ { type: 'cascader', key: 'linkmenu', - label: Formdict['model.menu'], + label: '鑿滃崟', initVal: card.linkmenu || [], required: true, options: menulist @@ -1864,7 +1920,7 @@ { type: 'multiselect', key: 'blacklist', - label: Formdict['header.form.blacklist'], + label: '榛戝悕鍗�', initVal: card.blacklist || [], required: false, options: roleList @@ -1916,7 +1972,7 @@ { type: 'text', key: 'title', - label: Formdict['header.form.title'], + label: '鏍囬', initVal: card.title, required: false }, @@ -1942,15 +1998,15 @@ { type: 'radio', key: 'Hide', - label: Formdict['model.hidden'], + label: '闅愯棌', initVal: card.Hide, required: true, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -2028,7 +2084,7 @@ { type: 'multiselect', key: 'blacklist', - label: Formdict['header.form.blacklist'], + label: '榛戝悕鍗�', initVal: card.blacklist || [], required: false, options: roleList @@ -2218,10 +2274,10 @@ forbid: !['line', 'bar'].includes(card.chartType), options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -2327,12 +2383,12 @@ /** * @description 鑾峰彇琛ㄥ崟閰嶇疆淇℃伅 * @param {*} card // 琛ㄥ崟瀵硅薄 - * @param {*} inputfields // 鍙叧鑱旇〃鍗� + * @param {*} inputfields // 鍙啓鍏ヨ〃鍗� * @param {*} tabfields // 鍙垏鎹㈣〃鍗� * @param {*} linkableFields // 鍙叧鑱旇〃鍗� * @param {*} linksupFields // 涓婄骇琛ㄥ崟 */ -export function getModalForm (card, inputfields = [], tabfields = [], linkableFields, linksupFields) { +export function getModalForm (card, inputfields = [], tabfields = [], linkableFields, linksupFields, columns = []) { let appType = sessionStorage.getItem('appType') let roleList = sessionStorage.getItem('sysRoles') if (roleList) { @@ -2351,22 +2407,46 @@ } else { roleList = [] } + + inputfields = inputfields.map((item, index) => { + item.label = `${index + 1}銆�${item.field || ''}锛�${item.label}锛塦 + return item + }) + tabfields = tabfields.map((item, index) => { + item.label = `${index + 1}銆�${item.field || ''}锛�${item.label}锛塦 + return item + }) + + tabfields.unshift({field: '', label: '鍘熻〃鍗�'}) + + linkableFields = linkableFields.map((item, index) => { + item.label = `${index + 1}銆�${item.field || ''}锛�${item.label}锛塦 + return item + }) + + linksupFields = linksupFields.map((item, index) => { + item.label = `${index + 1}銆�${item.field || ''}锛�${item.label}锛塦 + return item + }) let _openType = [{ value: 'text', - text: Formdict['model.form.text'] + text: '鏂囨湰' }, { value: 'number', - text: Formdict['model.form.number'] + text: '鏁板瓧' }, { value: 'select', - text: Formdict['model.form.select'] + text: '涓嬫媺閫夋嫨' + }, { + value: 'textarea', + text: '澶氳鏂囨湰' }, { value: 'multiselect', - text: Formdict['model.form.multiselect'] + text: '涓嬫媺澶氶��' }, { value: 'link', - text: Formdict['model.form.link'] + text: '鑱斿姩鑿滃崟' }, { value: 'switch', text: '寮�鍏�' @@ -2381,31 +2461,31 @@ text: '閫夐」鍗�' }, { value: 'fileupload', - text: Formdict['header.form.fileupload'] + text: '鏂囦欢涓婁紶' }, { value: 'date', - text: Formdict['model.form.dateday'] + text: '鏃ユ湡锛堝ぉ锛�' }, { value: 'datemonth', - text: Formdict['model.form.datemonth'] + text: '鏃ユ湡锛堟湀锛�' // }, { // value: 'datetime', // text: '鏃ユ湡锛堝垎/绉掞級' }, { - value: 'textarea', - text: Formdict['model.form.textarea'] + value: 'cascader', + text: '绾ц仈鑿滃崟' }, { value: 'rate', text: '璇勫垎' }, { value: 'color', - text: Formdict['model.form.color'] + text: '棰滆壊' }, { value: 'brafteditor', text: '瀵屾枃鏈�' }, { value: 'funcvar', - text: Formdict['header.form.funcvar'] + text: '鍑芥暟鍙橀噺' }, { value: 'hint', text: '鎻愮ず' @@ -2425,16 +2505,19 @@ if (appType === 'mob') { _openType = [{ value: 'text', - text: Formdict['model.form.text'] + text: '鏂囨湰' }, { value: 'number', - text: Formdict['model.form.number'] + text: '鏁板瓧' }, { value: 'select', text: '閫夋嫨鍣�' }, { value: 'link', - text: Formdict['model.form.link'] + text: '鑱斿姩鑿滃崟' + }, { + value: 'textarea', + text: '澶氳鏂囨湰' }, { value: 'switch', text: '寮�鍏�' @@ -2449,25 +2532,22 @@ text: '閫夐」鍗�' }, { value: 'fileupload', - text: Formdict['header.form.fileupload'] + text: '鏂囦欢涓婁紶' }, { value: 'date', - text: Formdict['model.form.dateday'] + text: '鏃ユ湡锛堝ぉ锛�' }, { value: 'datemonth', - text: Formdict['model.form.datemonth'] - // }, { - // value: 'datetime', - // text: '鏃ユ湡锛堝垎/绉掞級' + text: '鏃ユ湡锛堟湀锛�' }, { - value: 'textarea', - text: Formdict['model.form.textarea'] + value: 'cascader', + text: '绾ц仈鑿滃崟' }, { value: 'rate', text: '璇勫垎' }, { value: 'funcvar', - text: Formdict['header.form.funcvar'] + text: '鍑芥暟鍙橀噺' }, { value: 'hint', text: '鎻愮ず' @@ -2517,7 +2597,7 @@ { type: 'text', key: 'label', - label: Formdict['model.name'], + label: '鍚嶇О', initVal: card.label, required: true, readonly: false @@ -2525,15 +2605,16 @@ { type: 'text', key: 'field', - label: Formdict['model.form.field'], + label: '瀛楁', initVal: card.field || '', required: true, - readonly: false + readonly: false, + options: columns }, { type: 'select', key: 'type', - label: Formdict['model.form.type'], + label: '绫诲瀷', initVal: card.type, required: true, options: _openType @@ -2541,7 +2622,7 @@ { type: 'text', key: 'initval', - label: Formdict['header.form.initval'], + label: '鍒濆鍊�', initVal: initval, required: false }, @@ -2589,10 +2670,10 @@ required: true, options: [{ value: '0', - text: Formdict['header.form.custom'] + text: '鑷畾涔�' }, { value: '1', - text: Formdict['header.form.datasource'] + text: '鏁版嵁婧�' }] }, { @@ -2640,6 +2721,13 @@ readonly: false }, { + type: 'text', + key: 'colorField', + label: '鑹插�煎瓧娈�', + initVal: card.colorField || '', + required: true + }, + { type: 'radio', key: 'picratio', label: '鍥剧墖姣斾緥', @@ -2666,10 +2754,10 @@ // initVal: card.setAll || 'false', // options: [{ // value: 'true', - // text: Formdict['model.true'] + // text: '鏄�' // }, { // value: 'false', - // text: Formdict['model.false'] + // text: '鍚�' // }] // }, { @@ -2691,7 +2779,7 @@ { type: 'codemirror', key: 'dataSource', - label: Formdict['header.form.datasource'], + label: '鏁版嵁婧�', initVal: card.dataSource || '', required: true, readonly: false @@ -2719,6 +2807,14 @@ readonly: false, allowClear: true, options: linkableFields + }, + { + type: 'text', + key: 'topmark', + label: '椤剁骇鏍囪瘑', + initVal: card.topmark || '', + tooltip: '鍏宠仈瀛楁鍊间笌椤剁骇鏍囪瘑鐩稿悓鏃讹紝瑙嗕负椤剁骇鑺傜偣銆�', + required: false }, { type: 'text', @@ -2751,10 +2847,10 @@ initVal: card.orderType || 'asc', options: [{ value: 'asc', - text: Formdict['header.form.asc'] + text: '姝e簭' }, { value: 'desc', - text: Formdict['header.form.desc'] + text: '鍊掑簭' }] }, { @@ -2914,6 +3010,15 @@ }] }, { + type: 'text', + key: 'separator', + label: '杩炴帴绗�', + initVal: card.separator === undefined ? '/' : card.separator, + tooltip: '琛ㄥ崟鎻愪氦鏃朵俊鎭箣闂寸殑杩炴帴绗︺�傛敞锛氳繛鎺ョ涓虹┖鏃讹紝鍒濆鍖栨椂濉厖鍏朵粬琛ㄥ崟鏃犳晥銆�', + required: false, + readonly: false + }, + { type: 'radio', key: 'declare', label: '鏁版嵁绫诲瀷', @@ -2933,7 +3038,7 @@ min: 0, max: 18, precision: 0, - label: Formdict['header.form.decimal'], + label: '灏忔暟浣�', initVal: card.decimal || 0, required: true }, @@ -2943,7 +3048,7 @@ min: 1, max: 100000, precision: 0, - label: Formdict['model.form.field'] + Formdict['model.length'], + label: '瀛楁闀垮害', // tooltip: '鏂囨湰銆佷笅鎷夋銆佹棩鏈熺瓑瀛楁榛樿闀垮害涓�50锛屽琛屾枃鏈笌鏂囦欢涓婁紶瀛楁榛樿闀垮害涓�512', initVal: card.fieldlength || _fieldlength, required: true @@ -2974,8 +3079,11 @@ value: 'letter', text: '瀛楁瘝' }, { + value: 'letter_number', + text: '鏁板瓧鎴栧瓧姣�' + }, { value: 'letter&number', - text: '鏁板瓧銆佸瓧姣嶄互鍙奯@_.' + text: '鏁板瓧銆佸瓧姣嶄互鍙夽_.' }, { value: 'phone', text: '鎵嬫満鍙�' @@ -3016,15 +3124,15 @@ }, { type: 'radio', - key: 'allowHalf', - label: '鍗婇��', - initVal: card.allowHalf || 'false', + key: 'hidden', + label: "闅愯棌", + initVal: card.hidden || 'false', options: [{ value: 'true', - text: '鏀寔' + text: '鏄�' }, { value: 'false', - text: '涓嶆敮鎸�' + text: '鍚�' }] }, { @@ -3034,36 +3142,23 @@ initVal: card.readonly || 'false', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { type: 'radio', key: 'required', - label: Formdict['model.required'], + label: "蹇呭~", initVal: card.required || 'true', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { 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'] - }, { - value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -3114,14 +3209,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: '棣栬' @@ -3135,11 +3230,44 @@ initVal: card.writein || 'true', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] + }, + { + type: 'radio', + key: 'colorType', + label: '棰滆壊绫诲瀷', + initVal: card.colorType || 'hex', + options: [{ + value: 'hex', + text: '16杩涘埗' + }, { + value: 'rgba', + text: 'RGBA' + }] + }, + { + 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', @@ -3180,10 +3308,10 @@ initVal: card.hidelabel || 'false', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -3244,12 +3372,30 @@ 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鍔犲瘑' + }] + }, + { + type: 'radio', + key: 'inputType', + label: '鍔犲瘑鏄剧ず', + initVal: card.inputType || 'text', + required: false, + options: [{ + value: 'text', + text: '鍚�' + }, { + value: 'password', + text: '鏄�' }] }, { @@ -3260,10 +3406,10 @@ tooltip: '鎻愪氦鏃讹紝鏄惁鎴彇棣栧熬鐨勭┖鐧藉瓧绗︺��', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -3349,13 +3495,16 @@ tooltip: '鏂囦欢鍘嬬缉鎴朾ase64蹇呴』涓哄浘鐗囷紝鍥剧墖鏍煎紡涓簀pg銆乸ng銆乬if 鎴� jpeg銆傛敞锛歜ase64鍙彲涓婁紶涓�寮犲浘鐗囥��', options: [{ value: 'false', - text: '鏃�' + text: '榛樿' }, { value: 'true', text: '鍘嬬缉' }, { value: 'base64', text: 'base64' + }, { + value: 'oss', + text: 'oss涓婁紶' }] }, { @@ -3368,6 +3517,119 @@ 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', + key: 'maxSize', + min: 0.01, + max: 1024, + precision: 2, + label: '鏈�澶у�硷紙M锛�', + initVal: card.maxSize, + tooltip: '鏂囦欢鏈�澶у�硷紝瓒呭嚭鏃朵笉鍏佽涓婁紶锛屽�间负绌烘椂涓嶉檺鍒躲��', + required: false + }, + { + type: 'radio', + key: 'lenControl', + label: '闀垮害鎺у埗', + initVal: card.lenControl || 'limit', + tooltip: '鍦ㄨ缃瓧娈甸暱搴﹀悗锛屽闀垮害鐨勬帶鍒舵柟寮忋��', + required: false, + options: [{ + value: 'limit', + text: '闄愬埗杈撳叆' + }, { + value: 'left', + text: '宸︽埅' + }, { + value: 'right', + text: '鍙虫埅' + }] }, { type: 'number', @@ -3401,24 +3663,6 @@ }, { 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: '鍙虫埅' }] }, { @@ -3486,6 +3730,24 @@ }, { type: 'text', + key: 'regularExtra', + label: '姝e垯鎵╁睍绗�', + initVal: card.regularExtra || '', + tooltip: '姝e垯楠岃瘉鏃跺厑璁告坊鍔犵殑鑷畾涔夊瓧绗︼紝鍖呮嫭~!@#$%^&*()_+:;{}<>,.-', + required: false, + readonly: false + }, + { + type: 'text', + key: 'regularText', + label: '姝e垯鎻愮ず', + initVal: card.regularText || '', + tooltip: '姝e垯楠岃瘉鏃剁殑鎻愮ず淇℃伅銆�', + required: false, + readonly: false + }, + { + type: 'text', key: 'tooltip', label: '鎮诞鎻愮ず', tooltip: '榧犳爣鎮诞浜庢彁绀烘枃瀛椾笂鏂规椂锛屾樉绀烘彁绀轰俊鎭��', @@ -3521,7 +3783,7 @@ { type: 'text', key: 'placeholder', - label: '鎻愮ず淇℃伅', + label: '杈撳叆鎻愮ず', tooltip: '瀛楁棰勬湡鍊肩殑鎻愮ず淇℃伅銆�', initVal: card.placeholder || '', required: false @@ -3590,9 +3852,21 @@ // forbid: appType !== 'mob' // }, { + type: 'radio', + key: 'empty', + label: '绌哄�奸殣钘�', + initVal: card.empty || 'show', + tooltip: '褰撻�夐」涓虹┖鏃讹紝闅愯棌璇ヨ〃鍗曘��', + required: false, + options: [ + {value: 'show', text: '鍚�'}, + {value: 'hidden', text: '鏄�'}, + ] + }, + { type: 'multiselect', key: 'blacklist', - label: Formdict['header.form.blacklist'], + label: '榛戝悕鍗�', initVal: card.blacklist || [], required: false, options: roleList, @@ -3615,14 +3889,14 @@ { type: 'text', key: 'label', - label: Formdict['header.menu.tabName'], + label: '鏍囩鍚嶇О', initVal: card.label || '', required: true }, { type: 'select', key: 'linkTab', - label: Formdict['header.form.linkTab'], + label: '鍏宠仈鏍囩', initVal: card.linkTab || '', required: false, options: [] @@ -3630,7 +3904,7 @@ { type: 'icon', key: 'icon', - label: Formdict['model.icon'], + label: '鍥炬爣', initVal: card.icon || '', required: false, forbid: type === 'CalendarPage' @@ -3638,7 +3912,7 @@ { type: 'select', key: 'supMenu', - label: Formdict['header.form.supTab'], + label: '涓婄骇鏍囩', initVal: supMenu, required: false, options: menus, @@ -3647,7 +3921,7 @@ { type: 'mutilselect', key: 'equalTab', - label: Formdict['header.form.equalTab'], + label: '鍚岀骇鏍囩', tooltip: '濡傛灉瀛愭爣绛句腑鍚湁鍒锋柊鍚岀骇鏍囩鐨勬寜閽紝鍦ㄦ澶勬坊鍔犻渶瑕佸埛鏂扮殑鏍囩銆�', initVal: equalTab, required: false, -- Gitblit v1.8.0