From 432b788acf901b0720184b8ee8bc81a2e6fa47e0 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 28 九月 2021 18:22:02 +0800 Subject: [PATCH] 2021-09-28 --- src/templates/zshare/formconfig.jsx | 902 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 718 insertions(+), 184 deletions(-) diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index d592fe9..c9c8963 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -288,14 +288,80 @@ */ export function getSearchForm (card, linkableFields) { let roleList = sessionStorage.getItem('sysRoles') + let appType = sessionStorage.getItem('appType') if (roleList) { try { roleList = JSON.parse(roleList) - } catch { + } catch (e) { roleList = [] } } else { roleList = [] + } + + let typeOptions = [] + + if (appType === 'mob') { + typeOptions = [{ + value: 'range', + text: '鏁板�硷紙鍖洪棿锛�' + }, { + value: 'checkcard', + text: '閫夐」鍗�' + }, { + value: 'date', + text: Formdict['model.form.dateday'] + }, { + value: 'datemonth', + text: Formdict['model.form.datemonth'] + }, { + value: 'daterange', + text: Formdict['model.form.daterange'] + }] + } else { + typeOptions = [{ + value: 'text', + text: Formdict['model.form.text'] + }, { + value: 'select', + text: Formdict['model.form.select'] + }, { + value: 'multiselect', + text: Formdict['model.form.multiselect'] + }, { + value: 'link', + text: Formdict['model.form.link'] + }, { + value: 'checkcard', + text: '閫夐」鍗�' + }, { + value: 'date', + text: Formdict['model.form.dateday'] + }, { + value: 'dateweek', + text: Formdict['model.form.dateweek'] + }, { + value: 'datemonth', + text: Formdict['model.form.datemonth'] + }, { + value: 'daterange', + text: Formdict['model.form.daterange'] + }, { + value: 'group', + text: Formdict['model.form.dategroup'] + }] + } + + if (card.focus) { + if (['text', 'multiselect'].includes(card.type)) { + card.match = 'like' + } else if (['select', 'link', 'checkcard'].includes(card.type)) { + card.match = '=' + } else if (card.type === 'date') { + card.match = '>=' + } else if (['datemonth', 'dateweek', 'daterange', 'range'].includes(card.type)) { + card.match = 'between' + } } return [ @@ -322,34 +388,7 @@ label: Formdict['model.form.type'], initVal: card.type, required: true, - options: [{ - value: 'text', - text: Formdict['model.form.text'] - }, { - value: 'select', - text: Formdict['model.form.select'] - }, { - value: 'multiselect', - text: Formdict['model.form.multiselect'] - }, { - value: 'link', - text: Formdict['model.form.link'] - }, { - value: 'date', - text: Formdict['model.form.dateday'] - }, { - value: 'dateweek', - text: Formdict['model.form.dateweek'] - }, { - value: 'datemonth', - text: Formdict['model.form.datemonth'] - }, { - value: 'daterange', - text: Formdict['model.form.daterange'] - }, { - value: 'group', - text: Formdict['model.form.dategroup'] - }] + options: typeOptions }, { type: 'text', @@ -363,7 +402,7 @@ type: 'text', key: 'initval', label: Formdict['header.form.initval'], - tooltip: '绫诲瀷涓轰笅鎷夎彍鍗曟椂锛屽垵濮嬪�煎簲涓烘暟鎹殑Value鍊硷紙浣跨敤鏁版嵁婧愭椂锛屽簲涓恒�婂�悸峰瓧娈点�嬬殑鍊硷級', + tooltip: '绫诲瀷涓轰笅鎷夎彍鍗曟椂锛屽垵濮嬪�煎簲涓烘暟鎹殑Value鍊硷紙浣跨敤鏁版嵁婧愭椂锛屽簲涓恒�婂�悸峰瓧娈点�嬬殑鍊硷級;绫诲瀷涓烘暟鍊硷紙鍖洪棿锛夋椂锛屽垵濮嬪�间娇鐢ㄩ�楀彿鎷兼帴锛屼緥濡� 3,10', initVal: card.initval, required: false }, @@ -395,6 +434,75 @@ }] }, { + type: 'radio', + key: 'display', + label: '鏄剧ず', + initVal: card.display || 'text', + required: true, + options: [{ + value: 'text', + text: '鏂囨湰' + }, { + value: 'picture', + text: '鍥剧墖' + }] + }, + { + type: 'number', + key: 'width', + min: 1, + max: 24, + precision: 0, + label: '鍏冪礌瀹藉害', + initVal: card.width || 4, + tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��', + required: true + }, + { + type: 'text', + key: 'cardValField', + label: Formdict['header.form.valueField'], + initVal: card.cardValField || 'Value', + required: true, + readonly: false + }, + { + type: 'text', + key: 'urlField', + label: '鍦板潃瀛楁', + initVal: card.urlField || '', + required: true, + readonly: false + }, + { + type: 'radio', + key: 'picratio', + label: '鍥剧墖姣斾緥', + initVal: card.picratio || '1:1', + required: true, + options: [{ + value: '1:1', + text: '1:1' + }, { + value: '3:2', + text: '3:2' + }, { + value: '4:3', + text: '4:3' + }, { + value: '16:9', + text: '16:9' + }] + }, + { + type: 'fields', + key: 'fields', + label: '瀛楁闆�', + initVal: card.fields || [], + required: true, + readonly: false + }, + { type: 'textarea', key: 'dataSource', label: Formdict['header.form.datasource'], @@ -405,7 +513,7 @@ { type: 'options', key: 'options', - label: '', + label: '閫夐」', initVal: card.options || [], required: true, readonly: false @@ -506,20 +614,6 @@ text: '>=' }] }, - // { - // type: 'select', - // key: 'display', - // label: Formdict['header.form.display'], - // initVal: card.display || 'dropdown', - // required: true, - // options: [{ - // value: 'dropdown', - // text: Formdict['header.form.dropdown'] - // // }, { - // // value: 'button', - // // text: Formdict['header.form.button'] - // }] - // }, { type: 'radio', key: 'database', @@ -540,8 +634,23 @@ max: 24, label: Formdict['header.form.ratio'], tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��', - initVal: card.ratio, + initVal: card.ratio || 6, + forbid: appType === 'mob', required: false + }, + { + type: 'radio', + key: 'multiple', + label: '鍙閫�', + initVal: card.multiple || 'false', + required: true, + options: [{ + value: 'true', + text: '鏄�' + }, { + value: 'false', + text: '鍚�' + }] }, { type: 'radio', @@ -569,19 +678,44 @@ text: Formdict['model.false'] }] }, + // { + // type: 'radio', + // key: 'transfer', + // label: '浼犻��', + // initVal: card.transfer || 'false', + // tooltip: '鏁版嵁鏌ヨ鏃讹紝绫诲瀷瀛楁鏄惁浣滀负鍙傛暟浼犻�掞紝绫诲瀷瀛楁瀵瑰簲鍊间负 {"鏃�": "day", "鍛�": "week", "鏈�": "month", "瀛�": "quarter", "骞�": "year", "鑷畾涔�": "customized"}銆�', + // options: [{ + // value: 'true', + // text: Formdict['model.true'] + // }, { + // value: 'false', + // text: Formdict['model.false'] + // }] + // }, { - type: 'radio', - key: 'transfer', - label: '浼犻��', - initVal: card.transfer || 'false', - tooltip: '鏁版嵁鏌ヨ鏃讹紝绫诲瀷瀛楁鏄惁浣滀负鍙傛暟浼犻�掞紝绫诲瀷瀛楁瀵瑰簲鍊间负 {"鏃�": "day", "鍛�": "week", "鏈�": "month", "瀛�": "quarter", "骞�": "year", "鑷畾涔�": "customized"}銆�', - options: [{ - value: 'true', - text: Formdict['model.true'] - }, { - value: 'false', - text: Formdict['model.false'] - }] + type: 'number', + key: 'maxValue', + label: '鏈�澶у��', + initVal: card.maxValue, + forbid: appType !== 'mob', + required: true + }, + { + type: 'number', + key: 'minValue', + label: '鏈�灏忓��', + initVal: card.minValue, + forbid: appType !== 'mob', + required: true + }, + { + type: 'number', + key: 'step', + label: '姝ラ暱', + initVal: card.step, + tooltip: '姝ラ暱鍙栧�煎繀椤诲ぇ浜� 0锛屽苟涓斿彲琚� (max - min) 鏁撮櫎', + forbid: appType !== 'mob', + required: true }, { type: 'radio', @@ -597,6 +731,64 @@ }] }, { + type: 'radio', + key: 'advanced', + label: '楂樼骇鎼滅储', + initVal: card.advanced || 'false', + forbid: appType === 'mob', + options: [{ + value: 'true', + text: Formdict['model.true'] + }, { + value: 'false', + text: Formdict['model.false'] + }] + }, + { + type: 'radio', + key: 'dropdown', + label: '涓嬫媺妗�', + initVal: card.dropdown || 'true', + forbid: appType === 'mob', + options: [{ + value: 'true', + text: '瀹氬' + }, { + value: 'false', + text: '鑷�傚簲' + }] + }, + { + type: 'radio', + key: 'inputType', + label: '杈撳叆鏍峰紡', + initVal: card.inputType || 'input', + tooltip: '浣跨敤楂樼骇鎼滅储鏃舵棤鏁堛��', + required: false, + options: [{ + value: 'input', + text: '杈撳叆妗�' + }, { + value: 'search', + text: '鎼滅储妗�' + }] + }, + { + type: 'color', + key: 'backgroundColor', + label: '鑳屾櫙鑹�', + initVal: card.backgroundColor || '', + tooltip: '璁剧疆鑳屾櫙鑹插悗锛岄�変腑鏁堟灉鐢辫儗鏅鑹叉帶鍒躲��', + required: false + }, + { + type: 'color', + key: 'borderColor', + label: '杈规棰滆壊', + initVal: card.borderColor || '', + required: false + }, + { type: 'multiselect', key: 'blacklist', label: Formdict['header.form.blacklist'], @@ -610,12 +802,13 @@ /** * @description 鑾峰彇鎸夐挳琛ㄥ崟閰嶇疆淇℃伅 * @param {*} card 缂栬緫鎸夐挳 - * @param {*} functip 鐢熸垚瀛樺偍杩囩▼鎻愮ず * @param {*} config 椤甸潰閰嶇疆 * @param {*} usefulFields 瀛樺偍杩囩▼鍙敤鐨勫紑濮嬪瓧娈� * @param {*} type 鎸夐挳绫诲瀷锛岀敤浜庡尯鍒嗗彲閫夌殑鎵撳紑鏂瑰紡 */ -export function getActionForm (card, functip, config, usefulFields, type, menulist = [], printTemps = []) { +export function getActionForm (card, config, usefulFields, type, menulist = [], printTemps = []) { + let columns = (config.columns || []).filter(col => col.field) + let opentypes = [ { value: 'pop', @@ -691,7 +884,7 @@ options: opentypes }, { - type: 'radio', + type: 'select', key: 'funcType', label: Formdict['header.form.funcType'], initVal: card.funcType || '', @@ -702,6 +895,9 @@ }, { value: 'print', text: '鏍囩鎵撳嵃' + }, { + value: 'closetab', + text: '鏍囩鍏抽棴' }] }, { @@ -771,23 +967,12 @@ key: 'innerFunc', label: Formdict['header.form.innerFunc'], initVal: card.innerFunc || '', - tooltip: functip, + tooltip: `鍑芥暟鍚嶇О闇�浠�${usefulFields.join(', ')}绛夊瓧绗﹀紑濮嬨�俙, fields: usefulFields, tooltipClass: 'middle', required: card.intertype === 'inner', readonly: false }, - // { - // type: 'select', - // key: 'tabType', - // label: Formdict['model.form.tabType'], - // initVal: card.tabType || 'SubTable', - // required: true, - // options: [{ - // value: 'SubTable', - // text: Formdict['model.menu.tab.subtable'] - // }] - // }, { type: 'select', key: 'linkTab', @@ -976,6 +1161,14 @@ options: menulist }, { + type: 'cascader', + key: 'refreshTab', + label: '鍒锋柊鏍囩', + initVal: card.refreshTab || [], + required: false, + options: menulist + }, + { type: 'radio', key: 'afterExecSuccess', label: Formdict['header.form.afterExecSuccess'], @@ -1079,6 +1272,23 @@ options: [] }, { + type: 'cascader', + key: 'openmenu', + label: '鎵撳紑鑿滃崟', + initVal: card.openmenu || [], + tooltip: '鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勮彍鍗曘��', + required: false, + options: menulist + }, + { + type: 'text', + key: 'output', + label: '杩斿洖鍊�', + tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺��', + initVal: card.output || '', + required: false + }, + { type: 'radio', key: 'joint', label: Formdict['model.form.paramJoint'], @@ -1126,7 +1336,81 @@ value: 'false', text: '闈炲繀濉�' }] - } + }, + { + type: 'select', + key: 'controlField', + label: '鎺у埗瀛楁', + tooltip: '绂佺敤鎺у埗瀛楁锛屽彲鏍规嵁鏁版嵁鎺у埗鎸夐挳鏄惁绂佺敤銆�', + initVal: card.controlField || '', + required: false, + options: [{label: '鏃�', field: ''}, ...columns] + }, + { + type: 'text', + key: 'controlVal', + label: '鎺у埗鍊�', + tooltip: '褰撻�夋嫨鎺у埗瀛楁锛屼笖瀛楁鍊间笌鎺у埗鍊肩浉绛夋椂锛屾寜閽細绂佺敤锛屽涓�肩敤閫楀彿鍒嗛殧銆�', + initVal: card.controlVal || '', + required: false + }, + { + type: 'radio', + key: 'display', + label: '鏄剧ず鏂瑰紡', + initVal: card.display || 'modal', + required: true, + options: [{ + value: 'modal', + text: '妯℃�佹' + }, { + value: 'drawer', + text: '鎶藉眽' + }] + }, + { + type: 'number', + key: 'ratio', + min: 1, + max: 24, + precision: 0, + label: '姣斾緥', + initVal: card.ratio || 85, + tooltip: '灏忎簬100涓哄搴︼紙鎴栭珮搴︼級鐧惧垎姣旓紝澶т簬100涓哄儚绱犲�笺��', + required: true + }, + { + type: 'radio', + key: 'placement', + label: '鎶藉眽鏂瑰悜', + initVal: card.placement || 'right', + tooltip: '浣跨敤鎶藉眽鏃舵湁鏁堛��', + required: false, + options: [{ + value: 'right', + text: '鍙充晶' + }, { + value: 'left', + text: '宸︿晶' + }, { + value: 'top', + text: '涓婁晶' + }, { + value: 'bottom', + text: '涓嬩晶' + }] + }, + { + type: 'text', + key: 'preFunc', + label: '鍓嶇疆鍑芥暟', + initVal: card.preFunc || '', + tooltip: `鍑芥暟鍚嶇О闇�浠�${usefulFields.join(', ')}绛夊瓧绗﹀紑濮嬶紱鍓嶇疆鍑芥暟鎵ц瀹屾垚鍚庯紝缁撴灉浼氫紶鍏ュ唴閮ㄥ嚱鏁颁腑锛屾鏃跺唴閮ㄥ嚱鏁颁細寮傛鎵ц銆俙, + fields: usefulFields, + tooltipClass: 'middle', + required: false, + readonly: false + }, ] } @@ -1140,7 +1424,7 @@ if (roleList) { try { roleList = JSON.parse(roleList) - } catch { + } catch (e) { roleList = [] } } else { @@ -1188,6 +1472,9 @@ }, { value: 'textarea', text: Formdict['model.form.textarea'] + }, { + value: 'index', + text: '搴忓彿' }] }, { @@ -1456,7 +1743,7 @@ if (roleList) { try { roleList = JSON.parse(roleList) - } catch { + } catch (e) { roleList = [] } } else { @@ -1906,6 +2193,7 @@ * @param {*} subtable // 鏄惁涓哄瓙琛ㄨ〃鍗� */ export function getModalForm (card, inputfields = [], tabfields = [], linkableFields, linksupFields, subtable = false) { + let appType = sessionStorage.getItem('appType') let roleList = sessionStorage.getItem('sysRoles') if (roleList) { try { @@ -1917,25 +2205,133 @@ label: role.text } }) - } catch { + } catch (e) { roleList = [] } } else { roleList = [] } - let _openType = [] + let _openType = [{ + value: 'text', + text: Formdict['model.form.text'] + }, { + value: 'number', + text: Formdict['model.form.number'] + }, { + value: 'select', + text: Formdict['model.form.select'] + }, { + value: 'multiselect', + text: Formdict['model.form.multiselect'] + }, { + value: 'link', + text: Formdict['model.form.link'] + }, { + value: 'switch', + text: '寮�鍏�' + }, { + value: 'checkbox', + text: '澶氶�夋' + }, { + value: 'radio', + text: '鍗曢�夋' + }, { + value: 'checkcard', + text: '閫夐」鍗�' + }, { + value: 'fileupload', + text: Formdict['header.form.fileupload'] + }, { + value: 'date', + text: Formdict['model.form.dateday'] + }, { + value: 'datemonth', + text: Formdict['model.form.datemonth'] + }, { + value: 'datetime', + text: Formdict['model.form.datetime'] + }, { + value: 'textarea', + text: Formdict['model.form.textarea'] + }, { + value: 'color', + text: Formdict['model.form.color'] + }, { + value: 'brafteditor', + text: '瀵屾枃鏈�' + }, { + value: 'funcvar', + text: Formdict['header.form.funcvar'] + }, { + value: 'hint', + text: '鎻愮ず' + }, { + value: 'split', + text: '鍒嗛殧绾�' + }, { + value: 'linkMain', + text: Formdict['header.form.linkMain'] + }] + let _fieldlength = 50 - if (subtable) { - _openType.push({ - value: 'linkMain', - text: Formdict['header.form.linkMain'] - }) + if (appType === 'mob') { + _openType = [{ + value: 'text', + text: Formdict['model.form.text'] + }, { + value: 'number', + text: Formdict['model.form.number'] + }, { + value: 'select', + text: '閫夋嫨鍣�' + }, { + value: 'link', + text: Formdict['model.form.link'] + }, { + value: 'switch', + text: '寮�鍏�' + }, { + value: 'checkbox', + text: '澶氶�夋' + }, { + value: 'radio', + text: '鍗曢�夋' + }, { + value: 'checkcard', + text: '閫夐」鍗�' + }, { + value: 'fileupload', + text: Formdict['header.form.fileupload'] + }, { + value: 'date', + text: Formdict['model.form.dateday'] + }, { + value: 'datemonth', + text: Formdict['model.form.datemonth'] + }, { + value: 'datetime', + text: Formdict['model.form.datetime'] + }, { + value: 'textarea', + text: Formdict['model.form.textarea'] + }, { + value: 'funcvar', + text: Formdict['header.form.funcvar'] + }, { + value: 'hint', + text: '鎻愮ず' + }, { + value: 'split', + text: '鍒嗛殧绾�' + }] } - if (['textarea', 'fileupload', 'multiselect', 'checkbox', 'brafteditor'].includes(card.type)) { + if (['fileupload', 'multiselect', 'checkbox'].includes(card.type)) { _fieldlength = 512 + } else if (['textarea', 'brafteditor'].includes(card.type)) { + _fieldlength = 8000 } return [ @@ -1961,65 +2357,7 @@ label: Formdict['model.form.type'], initVal: card.type, required: true, - options: [{ - value: 'text', - text: Formdict['model.form.text'] - }, { - value: 'number', - text: Formdict['model.form.number'] - }, { - value: 'select', - text: Formdict['model.form.select'] - }, { - value: 'multiselect', - text: Formdict['model.form.multiselect'] - }, { - value: 'link', - text: Formdict['model.form.link'] - }, { - value: 'switch', - text: '寮�鍏�' - }, { - value: 'checkbox', - text: '澶氶�夋' - }, { - value: 'radio', - text: '鍗曢�夋' - }, { - value: 'checkcard', - text: '閫夐」鍗�' - }, { - value: 'fileupload', - text: Formdict['header.form.fileupload'] - }, { - value: 'date', - text: Formdict['model.form.dateday'] - }, { - value: 'datemonth', - text: Formdict['model.form.datemonth'] - }, { - value: 'datetime', - text: Formdict['model.form.datetime'] - }, { - value: 'textarea', - text: Formdict['model.form.textarea'] - }, { - value: 'color', - text: Formdict['model.form.color'] - }, { - value: 'brafteditor', - text: '瀵屾枃鏈�' - }, { - value: 'funcvar', - text: Formdict['header.form.funcvar'] - }, { - value: 'hint', - text: '鎻愮ず' - }, { - value: 'split', - text: '鍒嗛殧绾�' - }, - ..._openType] + options: _openType }, { type: 'text', @@ -2056,14 +2394,16 @@ key: 'openText', label: '寮�鍚彁绀�', initVal: card.openText || '', - required: false + required: false, + forbid: appType === 'mob' }, { type: 'text', key: 'closeText', label: '鍏抽棴鎻愮ず', initVal: card.closeText || '', - required: false + required: false, + forbid: appType === 'mob' }, { type: 'radio', @@ -2099,7 +2439,7 @@ min: 1, max: 24, precision: 0, - label: '鍗$墖瀹藉害', + label: '鍏冪礌瀹藉害', initVal: card.width || 4, tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��', required: true @@ -2224,6 +2564,15 @@ }] }, { + type: 'text', + key: 'disableField', + label: '绂佺敤路瀛楁', + initVal: card.disableField || '', + tooltip: '璁剧疆绂佺敤瀛楁锛屼笖瀛楁鍊间负true鏃讹紝閫夐」涓嶅彲閫夈��', + required: false, + readonly: false + }, + { type: 'radio', key: 'multiple', label: '鍙閫�', @@ -2275,11 +2624,12 @@ { type: 'number', key: 'maxRows', - min: 2, + min: 1, max: 100, precision: 0, - label: Formdict['header.form.maxRows'], - initVal: card.maxRows || 6, + label: appType === 'mob' ? '琛屾暟' : Formdict['header.form.maxRows'], + tooltip: appType === 'mob' ? '琛屾暟涓虹┖鏃讹紝楂樺害鑷�傚簲' : '', + initVal: card.maxRows || (appType === 'mob' ? '' : 6), required: false }, { @@ -2299,46 +2649,37 @@ }, { value: 'letter&number', text: Formdict['header.form.letter&number'] + }, { + value: 'phone', + text: '鎵嬫満鍙�' }] }, { type: 'select', key: 'fileType', label: '鏄剧ず鏂瑰紡', - initVal: card.fileType || 'text', + initVal: card.fileType || (appType === 'mob' ? 'picture-card' : 'text'), options: [{ + value: 'text', + text: '鏂囦欢' + }, { value: 'picture', text: '鍥炬枃淇℃伅' }, { value: 'picture-card', text: '鍥剧墖鍗�' - }, { - value: 'text', - text: '鏂囦欢' }] }, { type: 'number', key: 'maxfile', - min: 1, - max: 1000000, + min: 0, + max: 1000, precision: 0, label: '鏈�澶ф枃浠舵暟', initVal: card.maxfile || '', + tooltip: '绛変簬0鏃朵笉鍋氶檺鍒躲��', required: false - }, - { - type: 'radio', - key: 'hidelabel', - label: '闅愯棌鍚嶇О', - initVal: card.hidelabel || 'false', - options: [{ - value: 'true', - text: Formdict['model.true'] - }, { - value: 'false', - text: Formdict['model.false'] - }] }, { type: 'radio', @@ -2394,9 +2735,40 @@ }, { type: 'radio', + key: 'cursor', + label: '鍏夋爣', + initVal: card.cursor || 'left', + options: [{ + value: 'right', + text: '鍙冲榻�' + }, { + value: 'left', + text: '宸﹀榻�' + }], + forbid: appType !== 'mob' + }, + { + type: 'radio', + key: 'scan', + label: '鎵爜', + initVal: card.scan || 'false', + options: [{ + value: 'false', + text: '绂佺敤' + }, { + value: 'simple', + text: '鍗曟' + }, { + value: 'multi', + text: '杩炵画' + }], + forbid: appType !== 'mob' + }, + { + type: 'radio', key: 'readin', label: Formdict['header.form.readin'], - tooltip: Formdict['header.form.readin.tooltip'], + tooltip: '鏄惁灏嗚〃鏍奸�変腑鐨勬暟鎹嚜鍔ㄥ~鍏呭埌琛ㄥ崟锛堝瓧娈电浉鍚岋級', initVal: card.readin || 'true', options: [{ value: 'true', @@ -2404,6 +2776,9 @@ }, { value: 'false', text: Formdict['model.false'] + }, { + value: 'top', + text: '棣栬' }] }, { @@ -2421,6 +2796,90 @@ }] }, { + type: 'radio', + key: 'dropdown', + label: '涓嬫媺妗�', + initVal: card.dropdown || 'true', + forbid: appType === 'mob', + options: [{ + value: 'true', + text: '瀹氬' + }, { + value: 'false', + text: '鑷�傚簲' + }] + }, + { + type: 'radio', + key: 'hidelabel', + label: '闅愯棌鍚嶇О', + initVal: card.hidelabel || 'false', + options: [{ + value: 'true', + text: Formdict['model.true'] + }, { + value: 'false', + text: Formdict['model.false'] + }] + }, + { + type: 'radio', + key: 'arrange', + label: '鍏冪礌鎺掑垪', + initVal: card.arrange || 'adaptive', + forbid: appType !== 'mob', + options: [{ + value: 'line', + text: '鏁磋' + }, { + value: 'adaptive', + 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)' + }] + }, + { + type: 'radio', + key: 'mode', + label: '妯″紡', + initVal: card.mode || 'picker', + options: [{ + value: 'picker', + text: '閫夋嫨鍣�' + }, { + value: 'calendar', + text: '鏃ュ巻' + }], + forbid: appType !== 'mob' + }, + { type: 'number', key: 'span', min: 1, @@ -2429,7 +2888,8 @@ label: '琛ㄥ崟瀹藉害', initVal: card.span || (['textarea', 'hint', 'checkcard', 'brafteditor'].includes(card.type) ? 24 : 12), tooltip: '鏍呮牸甯冨眬鏁磋24绛夊垎銆�', - required: true + required: true, + forbid: appType === 'mob' }, { type: 'number', @@ -2440,7 +2900,53 @@ label: '鍚嶇О瀹藉害', initVal: card.labelwidth || 33.3, tooltip: '鍚嶇О鍗犳嵁琛ㄥ崟瀹藉害鐨勭櫨鍒嗘瘮銆傛敞锛氬瓨鍦ㄥ鍒楄〃鍗曟椂锛屽綋鍓嶈〃鍗曞鏋滄兂瑕佸崰鎹暣琛屽彲鍙傜収浠ヤ笅姣斾緥锛屼袱鍒楋紙16.2锛夈�佷笁鍒楋紙10.5锛夈�佸洓鍒楋紙7.7锛�', + required: true, + forbid: appType === 'mob' + }, + { + type: 'radio', + key: 'compress', + label: '鍘嬬缉', + initVal: card.compress || 'false', + tooltip: '鏂囦欢鍘嬬缉蹇呴』涓哄浘鐗囷紝鍥剧墖鏍煎紡涓簀pg銆乸ng銆乬if 鎴� jpeg', + options: [{ + value: 'true', + text: Formdict['model.true'] + }, { + value: 'false', + text: Formdict['model.false'] + }] + }, + { + type: 'number', + key: 'limit', + min: 0.01, + max: 1000, + precision: 2, + label: '璧风偣锛圡锛�', + initVal: card.limit || 2, + tooltip: '鍘嬬缉璧风偣锛屽皬浜庤捣鐐瑰�肩殑鏂囦欢涓嶈繘琛屽帇缂┿��', required: true + }, + { + type: 'textarea', + key: 'rduri', + label: '杞瓨鎺ュ彛', + rows: 1, + initVal: card.rduri || '', + tooltip: '鍥剧墖杞瓨鍦ㄥ悓涓�鍗曠偣鏈嶅姟鍣ㄤ笅鐨勫叾浠栦笟鍔$郴缁熴��', + required: false, + readonly: false + }, + { + type: 'textarea', + key: 'proRduri', + label: '姝e紡鎺ュ彛', + rows: 1, + initVal: card.proRduri || '', + tooltip: '姝e紡绯荤粺杞瓨鎺ュ彛锛屽浘鐗囪浆瀛樺湪鍚屼竴鍗曠偣鏈嶅姟鍣ㄤ笅鐨勫叾浠栦笟鍔$郴缁熴��', + required: false, + readonly: false }, { type: 'text', @@ -2479,6 +2985,35 @@ }] }, { + type: 'radio', + key: 'splitline', + label: '鍒嗗壊绾�', + initVal: card.splitline || 'true', + forbid: appType !== 'mob', + options: [{ + value: 'true', + text: '鏄剧ず' + }, { + value: 'false', + text: '闅愯棌' + }] + }, + { + type: 'radio', + key: 'count', + label: '璁℃暟鍔熻兘', + initVal: card.count || 'false', + tooltip: '鏄剧ず杈撳叆鐨勫瓧绗︽暟锛岃缃鏁版椂鐢熸晥锛屾敞锛氬姞瀵嗕紶杈撴椂鏈�澶у�间笌瀛楁闀垮害涓嶇瓑銆�', + options: [{ + value: 'true', + text: '寮�鍚�' + }, { + value: 'false', + text: '鍏抽棴' + }], + forbid: appType !== 'mob' + }, + { type: 'select', key: 'supField', label: '涓婄骇琛ㄥ崟', @@ -2492,7 +3027,7 @@ type: 'text', key: 'supvalue', label: '鏄剧ず鍊�', - tooltip: '璇峰~鍐欐樉绀哄�硷紝鍙湁涓婄骇琛ㄥ崟鍊间笌鏄剧ず鍊肩浉鍚屾椂锛岃琛ㄥ崟鎵嶄細鏄剧ず锛屾敞锛氬涓�肩敤閫楀彿鍒嗛殧銆�', + tooltip: '璇峰~鍐欐樉绀哄�硷紝鍙湁涓婄骇琛ㄥ崟鍊间笌鏄剧ず鍊肩浉鍚屾椂锛岃琛ㄥ崟鎵嶄細鏄剧ず锛屾敞锛�1銆佸涓�肩敤閫楀彿鍒嗛殧锛�2銆佷笂绾ц〃鍗曞垵濮嬪�间负$first鏃舵殏鏈鐞嗐��', initVal: card.supvalue || '', required: true, readonly: false @@ -2503,7 +3038,8 @@ label: '鎮诞鎻愮ず', tooltip: '榧犳爣鎮诞浜庢彁绀烘枃瀛椾笂鏂规椂锛屾樉绀烘彁绀轰俊鎭��', initVal: card.tooltip || '', - required: false + required: false, + forbid: appType === 'mob' }, { type: 'text', @@ -2511,6 +3047,15 @@ label: '搴曢儴鎻愮ず', tooltip: '鏄剧ず浜庤〃鍗曞簳閮ㄣ��', initVal: card.extra || '', + required: false, + forbid: appType === 'mob' + }, + { + type: 'text', + key: 'placeholder', + label: '鎻愮ず淇℃伅', + tooltip: '瀛楁棰勬湡鍊肩殑鎻愮ず淇℃伅銆�', + initVal: card.placeholder || '', required: false }, { @@ -2550,7 +3095,7 @@ type: 'multiselect', key: 'linkSubField', label: Formdict['model.form.linkform'], - tooltip: '鍦ㄥ垏鎹㈤�夐」鏃朵細鎶婁俊鎭嚜鍔ㄥ~鍏ュ叧鑱旂殑琛ㄥ崟锛堟枃鏈垨鏁板瓧琛ㄥ崟锛変腑銆�', + tooltip: '鍦ㄥ垏鎹㈤�夐」鏃朵細鎶婁俊鎭嚜鍔ㄥ~鍏ュ叧鑱旂殑琛ㄥ崟锛堟枃鏈垨鏁板瓧琛ㄥ崟锛変腑銆傛敞锛氫娇鐢ㄩ�夐」鍗′笖璁句负鍙閫夋椂鏃犳晥銆�', initVal: card.linkSubField || [], options: inputfields }, @@ -2583,17 +3128,6 @@ initVal: card.label || '', required: true }, - // { - // type: 'select', - // key: 'type', - // label: Formdict['model.form.tabType'], - // initVal: card.type || 'SubTable', - // required: true, - // options: [{ - // value: 'SubTable', - // text: Formdict['model.menu.tab.subtable'] - // }] - // }, { type: 'select', key: 'linkTab', -- Gitblit v1.8.0