From b8e1395f02c929eaa96b949cf6027ee2a43856a6 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 06 九月 2022 19:03:37 +0800 Subject: [PATCH] 2022-09-06 --- src/menu/components/share/actioncomponent/formconfig.jsx | 96 ++++++++++++++++++++++++++++++++---------------- 1 files changed, 64 insertions(+), 32 deletions(-) diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index 7146b69..789803c 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -52,15 +52,28 @@ ] let getTabs = (list) => { - return list.filter(item => { - if (item.type !== 'tabs') return false + let _list = [] + list.forEach(item => { + if (item.type !== 'tabs') return - item.children = item.children.map(cell => { - cell.children = getTabs(cell.children) - return cell + _list.push({ + value: item.uuid, + label: item.name, + children: item.subtabs.map(cell => { + let children = getTabs(cell.components) + + if (children.length === 0) { + children = null + } + return { + value: cell.uuid, + label: cell.label, + children: children + } + }) }) - return item }) + return _list } // if (type === 'editable') { @@ -74,21 +87,22 @@ // } // ] // } - - let tabs = getTabs(JSON.parse(JSON.stringify(modules))) + let tabs = getTabs(JSON.parse(JSON.stringify(window.GLOB.customMenu.components))) let pageTemps = [ { value: 'billprint', text: '鍗曟嵁鎵撳嵃' }, - { value: 'pay', text: Formdict['model.pay'] }, - { value: 'custom', text: Formdict['header.form.custom'] } + { value: 'pay', text: '鏀粯' }, + { value: 'custom', text: '鑷畾涔�' } ] const isApp = ['pc', 'mob'].includes(appType) let funTypes = [ - { value: 'changeuser', text: '鍒囨崲鐢ㄦ埛' }, { value: 'print', text: '鏍囩鎵撳嵃' }, + { value: 'refund', text: '閫�娆�' }, { value: 'closetab', text: '鏍囩鍏抽棴' }, + { value: 'changeuser', text: '鍒囨崲鐢ㄦ埛' }, { value: 'megvii', text: '鏃疯闈㈡澘鏈�' }, + { value: 'filezip', text: '鏂囦欢鍘嬬缉鍖�' }, ] if (isApp) { @@ -108,12 +122,14 @@ funTypes = [ { value: 'scan', text: '鎵爜' }, { value: 'pay', text: '鏀粯' }, - { value: 'logout', text: '閫�鍑�' }, + { value: 'refund', 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 = [ @@ -123,6 +139,7 @@ } else if (appType === 'pc') { opentypes = opentypes.filter(item => item.value !== 'tab') funTypes = [ + { value: 'refund', text: '閫�娆�' }, { value: 'changeuser', text: '鍒囨崲鐢ㄦ埛' }, ] pageTemps = [ @@ -187,6 +204,13 @@ options: opentypes }, { + type: 'text', + key: 'label', + label: '鎸夐挳鍚嶇О', + initVal: card.label, + required: true, + }, + { type: 'select', key: 'funcType', label: '鍔熻兘绫诲瀷', @@ -244,13 +268,6 @@ options: [] }, { - type: 'text', - key: 'label', - label: '鎸夐挳鍚嶇О', - initVal: card.label, - required: true, - }, - { type: 'checkbox', key: 'payType', label: '鏀粯鏂瑰紡', @@ -268,7 +285,7 @@ type: 'radio', key: 'procMode', label: '鍙傛暟澶勭悊', - initVal: card.procMode || 'system', + initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'), required: true, options: [{ value: 'system', @@ -276,6 +293,9 @@ }, { value: 'inner', text: '鍐呴儴鍑芥暟' + }, { + value: 'none', + text: '鏃�' }] }, { @@ -301,6 +321,15 @@ tooltip: functip, fields: usefulFields, required: false, + }, + { + type: 'text', + key: 'urlkey', + label: '鍦板潃瀛楁', + initVal: card.urlkey || '', + tooltip: '鍥剧墖锛堟枃浠讹級閾炬帴鐨勫瓧娈靛悕銆�', + required: false, + readonly: false }, { type: 'select', @@ -404,7 +433,7 @@ type: 'radio', key: 'callbackType', label: '鍥炶皟鏂瑰紡', - initVal: card.callbackType || 'script', + initVal: card.callbackType || (card.callbackFunc ? 'func' : 'none'), tooltip: '浣跨敤鍚庡彴鑴氭湰鎵ц鏃讹紝闇�瑕侀厤鍚堣鍒掍换鍔°��', required: true, options: [{ @@ -413,6 +442,12 @@ }, { value: 'default', text: '鍚庡彴鑴氭湰' + }, { + value: 'func', + text: '鍥炶皟鍑芥暟' + }, { + value: 'none', + text: '鏃�' }] }, { @@ -427,7 +462,7 @@ key: 'callbackFunc', label: Formdict['header.form.callbackFunc'], initVal: card.callbackFunc || '', - required: false, + required: true }, { type: 'select', @@ -658,7 +693,7 @@ key: 'syncComponent', label: '鍒锋柊缁勪欢', initVal: card.syncComponent || [], - tooltip: '鎵ц鎴愬姛鍚庯紙鎴栧脊绐楁爣绛惧叧闂椂锛夛紝闇�瑕佸悓姝ュ埛鏂扮殑缁勪欢銆傛敞锛氶�夋嫨褰撳墠缁勪欢鐨勪笂绾х粍浠舵棤鏁堛��', + tooltip: '鎵ц鎴愬姛鍚庯紙鎴栧脊绐楁爣绛惧叧闂椂锛夛紝闇�瑕佸悓姝ュ埛鏂扮殑缁勪欢銆傛敞锛氶�夋嫨褰撳墠缁勪欢鐨勪笂绾х粍浠舵棤鏁堬紝鍒锋柊涓婄骇缁勪欢璇烽�夋嫨鎴愬姛鍚庘�滃埛鏂颁笂绾х粍浠� - 琛屸�濄��', required: false, options: modules }, @@ -706,7 +741,7 @@ type: 'text', key: 'output', label: '杩斿洖鍊�', - tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺�備緥濡傦細@id', + tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺�傜郴缁熷嚱鏁板彲鎸囧畾杩斿洖鐨勫彉閲忥紙浠绗﹀紑澶达紝濡侤id锛夛紱鑷畾涔夊嚱鏁板彲鎸囧畾杩斿洖瀛楁锛堝id锛夈��', initVal: card.output || '', required: false, forbid: viewType === 'popview' @@ -724,16 +759,13 @@ key: 'open', label: '鎵撳紑鏂瑰紡', initVal: card.open || 'blank', - tooltip: '鑿滃崟鎵撳紑鏂瑰紡銆傛敞锛氱Щ鍔ㄧ鍙湪灏忕▼搴忔垨app涓湁鏁堛��', + tooltip: '鑿滃崟鎵撳紑鏂瑰紡銆�', required: true, forbid: appType !== 'pc' && appType !== 'mob', - options: [{ - value: 'blank', - text: '鏂扮獥鍙�' - }, { - value: 'self', - text: '褰撳墠绐楀彛' - }] + options: [ + {value: 'blank', text: appType !== 'mob' ? '鏂扮獥鍙�' : '鏂伴〉闈�'}, + {value: 'self', text: appType !== 'mob' ? '褰撳墠绐楀彛' : '褰撳墠椤甸潰'}, + ] }, { type: 'radio', -- Gitblit v1.8.0