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 | 475 ++++++++++++++++++++++++++++++++++------------------------- 1 files changed, 274 insertions(+), 201 deletions(-) diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index 0195364..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: '鍚�' } ] } ] @@ -324,10 +321,7 @@ text: '鏃ユ湡锛堝ぉ锛�' }, { value: 'datemonth', - text: Formdict['model.form.datemonth'] - // }, { - // value: 'daterange', - // text: Formdict['model.form.daterange'] + text: '鏃ユ湡锛堟湀锛�' }] } else { @@ -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: '鍚�' // }] // }, { @@ -797,10 +783,10 @@ 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: '鍔熻兘鎸夐挳' } ] @@ -957,7 +943,7 @@ { type: 'select', key: 'OpenType', - label: Formdict['header.form.openType'], + label: '鎵撳紑鏂瑰紡', initVal: card.OpenType, required: true, options: opentypes @@ -1009,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: [] @@ -1052,7 +1038,7 @@ { type: 'radio', key: 'sqlType', - label: Formdict['header.form.action.type'], + label: '鎿嶄綔绫诲瀷', initVal: card.sqlType || '', required: true, options: [] @@ -1060,14 +1046,14 @@ { 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, @@ -1100,7 +1086,7 @@ { type: 'select', key: 'pageTemplate', - label: Formdict['model.form.newpage.type'], + label: '椤甸潰绫诲瀷', initVal: card.pageTemplate || '', required: true, options: [{ @@ -1114,10 +1100,10 @@ text: '鍗曟嵁鎵撳嵃' }, { value: 'pay', - text: Formdict['model.pay'] + text: '鏀粯' }, { value: 'custom', - text: Formdict['header.form.custom'] + text: '鑷畾涔�' }] }, { @@ -1131,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 @@ -1233,7 +1220,7 @@ { type: 'text', key: 'callbackFunc', - label: Formdict['header.form.callbackFunc'], + label: '鍥炶皟鍑芥暟', initVal: card.callbackFunc || '', required: true, readonly: false @@ -1246,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: [] @@ -1263,7 +1250,7 @@ { type: 'cascader', key: 'linkmenu', - label: Formdict['model.form.linkmenu'], + label: '鍏宠仈鑿滃崟', initVal: card.linkmenu || [], required: true, options: menulist @@ -1279,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', @@ -1298,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', @@ -1317,7 +1304,7 @@ { type: refresh.length === 0 ? 'radio' : 'select', key: 'popClose', - label: Formdict['header.form.popClose'], + label: '鍏抽棴鍚�', initVal: card.popClose || 'never', required: true, options: [{ @@ -1346,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 @@ -1386,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 }, @@ -1412,10 +1399,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -1460,7 +1447,7 @@ { type: 'radio', key: 'placement', - label: '鎶藉眽鏂瑰悜', + label: '寮瑰嚭鏂瑰悜', initVal: card.placement || 'right', required: false, options: [{ @@ -1599,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 @@ -1614,27 +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: '搴忓彿' @@ -1643,7 +1630,7 @@ { type: 'text', key: 'nameField', - label: Formdict['model.name'] + Formdict['model.form.field'], + label: '鍚嶇О瀛楁', initVal: card.nameField, required: false, readonly: false @@ -1654,67 +1641,67 @@ 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: '鍙冲榻�' }] }, { @@ -1746,10 +1733,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -1761,10 +1748,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -1773,21 +1760,21 @@ 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'], + label: '鏍煎紡鍖�', initVal: card.format || 'none', options: [{ value: 'none', @@ -1807,7 +1794,7 @@ { type: 'select', key: 'textFormat', - label: Formdict['header.form.format'], + label: '鏍煎紡鍖�', initVal: card.textFormat || 'none', options: [{ value: 'none', @@ -1827,7 +1814,7 @@ { type: 'text', key: 'prefix', - label: Formdict['header.form.prefix'], + label: '鍓嶇紑', initVal: card.prefix || '', required: false, readonly: false @@ -1835,7 +1822,7 @@ { type: 'text', key: 'postfix', - label: Formdict['header.form.postfix'], + label: '鍚庣紑', initVal: card.postfix || '', tooltipClass: 'middle', required: false, @@ -1885,10 +1872,10 @@ required: false, options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -1910,7 +1897,7 @@ { type: 'cascader', key: 'linkmenu', - label: Formdict['model.menu'], + label: '鑿滃崟', initVal: card.linkmenu || [], required: true, options: menulist @@ -1933,7 +1920,7 @@ { type: 'multiselect', key: 'blacklist', - label: Formdict['header.form.blacklist'], + label: '榛戝悕鍗�', initVal: card.blacklist || [], required: false, options: roleList @@ -1985,7 +1972,7 @@ { type: 'text', key: 'title', - label: Formdict['header.form.title'], + label: '鏍囬', initVal: card.title, required: false }, @@ -2011,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: '鍚�' }] }, { @@ -2097,7 +2084,7 @@ { type: 'multiselect', key: 'blacklist', - label: Formdict['header.form.blacklist'], + label: '榛戝悕鍗�', initVal: card.blacklist || [], required: false, options: roleList @@ -2287,10 +2274,10 @@ forbid: !['line', 'bar'].includes(card.chartType), options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -2396,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) { @@ -2420,6 +2407,27 @@ } 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', @@ -2589,7 +2597,7 @@ { type: 'text', key: 'label', - label: Formdict['model.name'], + label: '鍚嶇О', initVal: card.label, required: true, readonly: false @@ -2597,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 @@ -2613,7 +2622,7 @@ { type: 'text', key: 'initval', - label: Formdict['header.form.initval'], + label: '鍒濆鍊�', initVal: initval, required: false }, @@ -2712,6 +2721,13 @@ readonly: false }, { + type: 'text', + key: 'colorField', + label: '鑹插�煎瓧娈�', + initVal: card.colorField || '', + required: true + }, + { type: 'radio', key: 'picratio', label: '鍥剧墖姣斾緥', @@ -2738,10 +2754,10 @@ // initVal: card.setAll || 'false', // options: [{ // value: 'true', - // text: Formdict['model.true'] + // text: '鏄�' // }, { // value: 'false', - // text: Formdict['model.false'] + // text: '鍚�' // }] // }, { @@ -2763,7 +2779,7 @@ { type: 'codemirror', key: 'dataSource', - label: Formdict['header.form.datasource'], + label: '鏁版嵁婧�', initVal: card.dataSource || '', required: true, readonly: false @@ -2831,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: '鍊掑簭' }] }, { @@ -3022,7 +3038,7 @@ min: 0, max: 18, precision: 0, - label: Formdict['header.form.decimal'], + label: '灏忔暟浣�', initVal: card.decimal || 0, required: true }, @@ -3032,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 @@ -3113,10 +3129,10 @@ initVal: card.hidden || 'false', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -3126,10 +3142,10 @@ initVal: card.readonly || 'false', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -3139,10 +3155,10 @@ initVal: card.required || 'true', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -3214,10 +3230,23 @@ 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' }] }, { @@ -3279,10 +3308,10 @@ initVal: card.hidelabel || 'false', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -3357,16 +3386,30 @@ }, { type: 'radio', + key: 'inputType', + label: '鍔犲瘑鏄剧ず', + initVal: card.inputType || 'text', + required: false, + options: [{ + value: 'text', + text: '鍚�' + }, { + value: 'password', + text: '鏄�' + }] + }, + { + type: 'radio', key: 'interception', label: '鎴彇绌烘牸', initVal: card.interception || 'true', tooltip: '鎻愪氦鏃讹紝鏄惁鎴彇棣栧熬鐨勭┖鐧藉瓧绗︺��', options: [{ value: 'true', - text: Formdict['model.true'] + text: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + text: '鍚�' }] }, { @@ -3571,6 +3614,24 @@ 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', key: 'span', min: 1, @@ -3602,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: '鍙虫埅' }] }, { @@ -3687,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: '榧犳爣鎮诞浜庢彁绀烘枃瀛椾笂鏂规椂锛屾樉绀烘彁绀轰俊鎭��', @@ -3722,7 +3783,7 @@ { type: 'text', key: 'placeholder', - label: '鎻愮ず淇℃伅', + label: '杈撳叆鎻愮ず', tooltip: '瀛楁棰勬湡鍊肩殑鎻愮ず淇℃伅銆�', initVal: card.placeholder || '', required: false @@ -3791,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, @@ -3816,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: [] @@ -3831,7 +3904,7 @@ { type: 'icon', key: 'icon', - label: Formdict['model.icon'], + label: '鍥炬爣', initVal: card.icon || '', required: false, forbid: type === 'CalendarPage' @@ -3839,7 +3912,7 @@ { type: 'select', key: 'supMenu', - label: Formdict['header.form.supTab'], + label: '涓婄骇鏍囩', initVal: supMenu, required: false, options: menus, @@ -3848,7 +3921,7 @@ { type: 'mutilselect', key: 'equalTab', - label: Formdict['header.form.equalTab'], + label: '鍚岀骇鏍囩', tooltip: '濡傛灉瀛愭爣绛句腑鍚湁鍒锋柊鍚岀骇鏍囩鐨勬寜閽紝鍦ㄦ澶勬坊鍔犻渶瑕佸埛鏂扮殑鏍囩銆�', initVal: equalTab, required: false, -- Gitblit v1.8.0