From cbeffcc0902631909c0373f274752a97ddaf2d4e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 06 八月 2022 01:41:54 +0800 Subject: [PATCH] 2022-08-06 --- src/menu/components/share/actioncomponent/formconfig.jsx | 149 +++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 124 insertions(+), 25 deletions(-) diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index 97dac96..d981ba5 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -12,7 +12,7 @@ * @param {*} usefulFields 瀛樺偍杩囩▼鍙敤鐨勫紑濮嬪瓧娈� * @param {*} type 鎸夐挳绫诲瀷锛岀敤浜庡尯鍒嗗彲閫夌殑鎵撳紑鏂瑰紡 */ -export function getActionForm (card, functip, config, usefulFields, type, menulist = [], modules = []) { +export function getActionForm (card, functip, config, usefulFields, type, menulist = [], modules = [], anchors = []) { let appType = sessionStorage.getItem('appType') let viewType = sessionStorage.getItem('editMenuType') // 寮圭獥 popview let printTemps = sessionStorage.getItem('printTemps') @@ -88,6 +88,8 @@ { value: 'changeuser', text: '鍒囨崲鐢ㄦ埛' }, { value: 'print', text: '鏍囩鎵撳嵃' }, { value: 'closetab', text: '鏍囩鍏抽棴' }, + { value: 'megvii', text: '鏃疯闈㈡澘鏈�' }, + { value: 'filezip', text: '鏂囦欢鍘嬬缉鍖�' }, ] if (isApp) { @@ -106,11 +108,14 @@ opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'innerpage', 'funcbutton'].includes(item.value)) funTypes = [ { value: 'scan', text: '鎵爜' }, - { value: 'logout', text: '閫�鍑�' }, + { value: 'pay', text: '鏀粯' }, + { value: 'resetPwd', text: '淇敼瀵嗙爜'}, { value: 'mkBinding', text: '寮�閫氭壂鐮佺櫥褰�' }, { value: 'mkUnBinding', text: '鐢ㄦ埛瑙g粦' }, { value: 'mkUnsubscribe', text: '娉ㄩ攢璐︽埛' }, { value: 'reAuth', text: '鍒囨崲绯荤粺锛堟竻绌虹紦瀛�-灏忕▼搴忥級' }, + { value: 'copyurl', text: '澶嶅埗閾炬帴鍦板潃' }, + { value: 'logout', text: '閫�鍑�' }, { value: 'goBack', text: '杩斿洖' }, ] pageTemps = [ @@ -161,6 +166,19 @@ card.control = '' } + if (card.execSuccess === 'goback') { + card.openmenu = 'goback' + card.execSuccess = 'never' + } + + let closetab = [] + if (!appType) { + closetab = [{ + value: 'closetab', + text: '鍏抽棴鏍囩' + }] + } + let forms = [ { type: 'select', @@ -171,12 +189,29 @@ options: opentypes }, { + type: 'text', + key: 'label', + label: '鎸夐挳鍚嶇О', + initVal: card.label, + required: true, + }, + { type: 'select', key: 'funcType', label: '鍔熻兘绫诲瀷', initVal: card.funcType || '', required: true, options: funTypes + }, + { + type: 'radio', + key: 'subFunc', + label: '鎺ュ彛鍚嶇О', + initVal: card.subFunc || 'addUser', + required: true, + options: [ + { value: 'addUser', text: '娣诲姞鐢ㄦ埛' }, + ] }, { type: 'radio', @@ -218,11 +253,18 @@ options: [] }, { - type: 'text', - key: 'label', - label: '鎸夐挳鍚嶇О', - initVal: card.label, + type: 'checkbox', + key: 'payType', + label: '鏀粯鏂瑰紡', + initVal: card.payType || [], required: true, + options: [{ + value: 'wxpay', + text: '寰俊' + }, { + value: 'alipay', + text: '鏀粯瀹�' + }] }, { type: 'radio', @@ -236,6 +278,9 @@ }, { value: 'inner', text: '鍐呴儴鍑芥暟' + }, { + value: 'none', + text: '鏃�' }] }, { @@ -261,6 +306,15 @@ tooltip: functip, fields: usefulFields, required: false, + }, + { + type: 'text', + key: 'urlkey', + label: '鍦板潃瀛楁', + initVal: card.urlkey || '', + tooltip: '鍥剧墖锛堟枃浠讹級閾炬帴鐨勫瓧娈靛悕銆�', + required: false, + readonly: false }, { type: 'select', @@ -373,6 +427,12 @@ }, { value: 'default', text: '鍚庡彴鑴氭湰' + }, { + value: 'func', + text: '鍥炶皟鍑芥暟' + }, { + value: 'none', + text: '鏃�' }] }, { @@ -387,7 +447,7 @@ key: 'callbackFunc', label: Formdict['header.form.callbackFunc'], initVal: card.callbackFunc || '', - required: false, + required: true }, { type: 'select', @@ -416,10 +476,8 @@ }, { value: 'mainline', text: '鍒锋柊涓婄骇缁勪欢 - 琛�' - }, { - value: !appType ? 'closetab' : 'goback', - text: !appType ? '鍏抽棴鏍囩' : '杩斿洖锛堜笂涓�涓〉闈級' - }, + }, + ...closetab, ...refresh] }, { @@ -620,7 +678,7 @@ key: 'syncComponent', label: '鍒锋柊缁勪欢', initVal: card.syncComponent || [], - tooltip: '鎵ц鎴愬姛鍚庯紙鎴栧脊绐楁爣绛惧叧闂椂锛夛紝闇�瑕佸悓姝ュ埛鏂扮殑缁勪欢', + tooltip: '鎵ц鎴愬姛鍚庯紙鎴栧脊绐楁爣绛惧叧闂椂锛夛紝闇�瑕佸悓姝ュ埛鏂扮殑缁勪欢銆傛敞锛氶�夋嫨褰撳墠缁勪欢鐨勪笂绾х粍浠舵棤鏁堛��', required: false, options: modules }, @@ -629,9 +687,18 @@ key: 'switchTab', label: '鍒囨崲鏍囩', initVal: card.switchTab || [], - tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佸垏鎹㈢殑鏍囩椤�', + tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佸垏鎹㈢殑鏍囩椤点��' + (appType === 'mob' ? '娉細灏忕▼搴忎腑鏃犳晥' : ''), required: false, options: tabs + }, + { + type: 'cascader', + key: 'anchors', + label: '璺宠浆閿氱偣', + initVal: card.anchors || [], + tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佽烦杞殑閿氱偣銆�' + (appType === 'mob' ? '娉細灏忕▼搴忎腑鏃犳晥' : ''), + required: false, + options: anchors }, { type: 'cascader', @@ -649,16 +716,17 @@ label: '鎵撳紑鑿滃崟', tooltip: '鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勮彍鍗曘��', initVal: card.openmenu || (!appType ? [] : ''), + help: appType === 'mob' || appType === 'pc' ? '鍙繑鍥炰笂涓�椤点��' : null, required: false, allowClear: true, - options: appType === 'mob' ? [...appMenus, {value: 'goback', text: '杩斿洖锛堜笂涓�椤碉級'}] : (appType === 'pc' ? appMenus : menulist), + options: appType === 'mob' || appType === 'pc' ? [...appMenus, {value: 'goback', text: '杩斿洖锛堜笂涓�椤碉級'}] : menulist, forbid: viewType === 'popview' }, { type: 'text', key: 'output', label: '杩斿洖鍊�', - tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺��', + tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺�傜郴缁熷嚱鏁板彲鎸囧畾杩斿洖鐨勫彉閲忥紙浠绗﹀紑澶达紝濡侤id锛夛紱鑷畾涔夊嚱鏁板彲鎸囧畾杩斿洖瀛楁锛堝id锛夈��', initVal: card.output || '', required: false, forbid: viewType === 'popview' @@ -676,15 +744,13 @@ key: 'open', label: '鎵撳紑鏂瑰紡', initVal: card.open || 'blank', + tooltip: '鑿滃崟鎵撳紑鏂瑰紡銆�', required: true, - forbid: appType !== 'pc', - options: [{ - value: 'blank', - text: '鏂扮獥鍙�' - }, { - value: 'self', - text: '褰撳墠绐楀彛' - }] + forbid: appType !== 'pc' && appType !== 'mob', + options: [ + {value: 'blank', text: appType !== 'mob' ? '鏂扮獥鍙�' : '鏂伴〉闈�'}, + {value: 'self', text: appType !== 'mob' ? '褰撳墠绐楀彛' : '褰撳墠椤甸潰'}, + ] }, { type: 'radio', @@ -708,7 +774,7 @@ precision: 0, label: '姣斾緥', initVal: card.ratio || 85, - tooltip: '灏忎簬100涓哄搴︼紙鎴栭珮搴︼級鐧惧垎姣旓紝澶т簬100涓哄儚绱犲�笺��', + tooltip: '妯℃�佹鎴栨娊灞夌殑瀹藉害锛屽皬浜�100涓虹獥鍙e搴︼紙鎴栭珮搴︼級鐧惧垎姣旓紝澶т簬100涓哄儚绱犲�笺��', required: true }, { @@ -840,8 +906,11 @@ label: '寮�鍏冲昂瀵�', initVal: card.size || 'default', options: [{ - value: 'default', + value: 'large', text: '澶�' + }, { + value: 'default', + text: '涓�' }, { value: 'small', text: '灏�' @@ -877,6 +946,36 @@ initVal: card.closeText || '', required: false, }, + { + type: 'radio', + key: 'hidden', + label: '闅愯棌', + initVal: card.hidden || 'false', + tooltip: '闅愯棌鍚庢寜閽湪椤甸潰涓笉鏄剧ず锛屼笖涓嶅弬涓庢潈闄愬垎閰嶃��', + required: false, + options: [{ + value: 'false', + text: '鍚�' + }, { + value: 'true', + text: '鏄�' + }] + }, + { + type: 'radio', + key: 'progress', + label: '杩涘害鎻愮ず', + initVal: card.progress || 'number', + required: false, + forbid: appType === 'mob', + options: [{ + value: 'number', + text: '鍓╀綑鏁�' + }, { + value: 'progressbar', + text: '杩涘害鏉�' + }] + } ] return forms -- Gitblit v1.8.0