From 6dd965723be9dc245105296198c25a80cfe51b54 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 27 四月 2023 10:51:50 +0800 Subject: [PATCH] 2023-04-27 --- src/menu/components/share/actioncomponent/formconfig.jsx | 159 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 134 insertions(+), 25 deletions(-) diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index efedf7a..8167d07 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -1,4 +1,4 @@ -import { btnCustomClasses, btnClasses } from '@/utils/option.js' +import { btnClasses } from '@/utils/option.js' /** @@ -9,20 +9,20 @@ * @param {*} usefulFields 瀛樺偍杩囩▼鍙敤鐨勫紑濮嬪瓧娈� * @param {*} type 鎸夐挳绫诲瀷锛岀敤浜庡尯鍒嗗彲閫夌殑鎵撳紑鏂瑰紡 */ -export function getActionForm (card, functip, config, usefulFields, modules = [], anchors = []) { +export function getActionForm (card, functip, config, usefulFields, modules = [], anchors = [], side) { let appType = sessionStorage.getItem('appType') let viewType = sessionStorage.getItem('editMenuType') // 寮圭獥 popview let printTemps = sessionStorage.getItem('printTemps') printTemps = printTemps ? JSON.parse(printTemps) : [] let setting = config.setting || {} - let columns = config.columns || [] + let columns = side === 'sub' && config.subColumns ? config.subColumns : (config.columns || []) let appMenus = [] let menulist = [] let type = '' if (card.eleType === 'button') { type = 'card' - } else if (config.subtype === 'datacard' || config.subtype === 'tablecard') { + } else if (config.subtype === 'datacard' || config.subtype === 'tablecard' || config.subtype === 'dualdatacard') { type = 'datacard' } else if (config.type === 'line' || config.type === 'bar' || config.type === 'scatter') { type = 'chart' @@ -126,7 +126,7 @@ } } if (appType === 'mob') { - opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'excelOut', 'innerpage', 'funcbutton'].includes(item.value)) + opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'excelOut', 'popview', 'innerpage', 'funcbutton'].includes(item.value)) funTypes = [ { value: 'print', text: '鏍囩鎵撳嵃' }, { value: 'scan', text: '鎵爜' }, @@ -137,6 +137,7 @@ { value: 'mkUnBinding', text: '鐢ㄦ埛瑙g粦' }, { value: 'mkUnsubscribe', text: '娉ㄩ攢璐︽埛' }, { value: 'reAuth', text: '鍒囨崲绯荤粺锛堟竻绌虹紦瀛�-灏忕▼搴忥級' }, + { value: 'clearCache', text: '娓呯┖鏈湴閰嶇疆' }, { value: 'copyurl', text: '澶嶅埗閾炬帴鍦板潃' }, { value: 'logout', text: '閫�鍑�' }, { value: 'goBack', text: '杩斿洖' }, @@ -157,6 +158,12 @@ { value: 'pay', text: '鏀粯' }, { value: 'custom', text: '閾炬帴' } ] + } else { + if (card.pageTemplate === 'print') { // 鍘熺被鍨嬫敮鎸� + pageTemps.unshift({ value: 'print', text: '鏍囩鎵撳嵃妯℃澘' }) + } else if (card.pageTemplate === 'billprintTemp') { // 鍘熺被鍨嬫敮鎸� + pageTemps.unshift({ value: 'billprintTemp', text: '鍗曟嵁鎵撳嵃妯℃澘' }) + } } if (type === 'chart' && appType !== 'mob') { @@ -265,6 +272,9 @@ }, { value: 'radio', text: '鍕鹃�夋' + }, { + value: 'counter', + text: '璁℃暟鍣�' }, ...formTypes] }, @@ -382,6 +392,14 @@ required: true, extendName: 'MenuNo', options: isApp ? appMenus : menulist + }, + { + type: 'text', + key: 'prefix', + label: '鍓嶇紑', + initVal: card.prefix || '', + tooltip: '鎵爜淇℃伅灏嗕笌鍓嶇紑鎷兼帴鍚庢墽琛屻�傛敞锛氳烦杞彍鍗曢渶浠kbid寮�澶淬��', + required: false }, { type: 'textarea', @@ -523,7 +541,7 @@ key: 'execSuccess', label: '鎴愬姛鍚�', initVal: card.execSuccess || 'grid', - tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆�', + tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭腑鍖呭惈@close_tab@銆丂close_popup@銆丂goback@ 浼氭墽琛岋紙鍏抽棴鏍囩-绠$悊绯荤粺锛夈�侊紙鍏抽棴寮圭獥锛夈�侊紙杩斿洖涓婁竴椤�-瀛愬簲鐢級绛夊姩浣溿��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭腑鍖呭惈@close_tab@銆丂close_popup@銆丂goback@ 浼氭墽琛岋紙鍏抽棴鏍囩-绠$悊绯荤粺锛夈�侊紙鍏抽棴寮圭獥锛夈�侊紙杩斿洖涓婁竴椤�-瀛愬簲鐢級绛夊姩浣溿��', required: true, options: [{ value: 'never', @@ -546,7 +564,7 @@ key: 'execError', label: '澶辫触鍚�', initVal: card.execError || 'never', - tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍硷紝娉細涓婄骇缁勪欢鍦ㄦ暟鎹簮涓坊鍔犮��', + tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭腑鍖呭惈@close_tab@銆丂close_popup@銆丂goback@ 浼氭墽琛岋紙鍏抽棴鏍囩-绠$悊绯荤粺锛夈�侊紙鍏抽棴寮圭獥锛夈�侊紙杩斿洖涓婁竴椤�-瀛愬簲鐢級绛夊姩浣溿��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍硷紝娉細涓婄骇缁勪欢鍦ㄦ暟鎹簮涓坊鍔犮�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭腑鍖呭惈@close_tab@銆丂close_popup@銆丂goback@ 浼氭墽琛岋紙鍏抽棴鏍囩-绠$悊绯荤粺锛夈�侊紙鍏抽棴寮圭獥锛夈�侊紙杩斿洖涓婁竴椤�-瀛愬簲鐢級绛夊姩浣溿��', required: true, options: [{ value: 'never', @@ -659,7 +677,7 @@ tooltip: '姝ら鑹蹭负鎸夐挳鍒濆鍖栭鑹诧紝鍙湪鏍峰紡璋冩暣涓慨鏀广��', required: false, forbid: type === 'datacard' && appType === 'mob', // 绉诲姩绔紝婊戝姩鏄剧ず鐨勬寜閽笉璁剧疆閫氱敤棰滆壊 - options: btnCustomClasses + options: btnClasses }, { type: 'radio', @@ -683,6 +701,9 @@ }, { value: 'light', text: '鐏�' + }, { + value: 'system', + text: '绯荤粺' }] }, { @@ -829,23 +850,13 @@ }, { value: 'drawer', text: '鎶藉眽' - }] - }, - { - type: 'number', - key: 'ratio', - min: 1, - max: 3000, - precision: 0, - label: '姣斾緥', - initVal: card.ratio || 85, - tooltip: '妯℃�佹鎴栨娊灞夌殑瀹藉害锛屽皬浜�100涓虹獥鍙e搴︼紙鎴栭珮搴︼級鐧惧垎姣旓紝澶т簬100涓哄儚绱犲�笺��', - required: true + }], + forbid: appType === 'mob', }, { type: 'radio', key: 'placement', - label: '鎶藉眽鏂瑰悜', + label: '寮瑰嚭鏂瑰悜', initVal: card.placement || 'right', required: false, options: [{ @@ -863,6 +874,17 @@ }] }, { + type: 'number', + key: 'ratio', + min: 1, + max: 3000, + precision: 0, + label: '姣斾緥', + initVal: card.ratio || 85, + tooltip: '妯℃�佹鎴栨娊灞夌殑瀹藉害锛屽皬浜�100涓虹獥鍙e搴︼紙鎴栭珮搴︼級鐧惧垎姣旓紝澶т簬100涓哄儚绱犲�笺��', + required: true + }, + { type: 'radio', key: 'clickouter', label: '鐐瑰嚮钂欏眰', @@ -875,6 +897,36 @@ value: 'close', text: '鍏抽棴' }] + }, + { + type: 'radio', + key: 'maskStyle', + label: '钂欏眰鏍峰紡', + initVal: card.maskStyle || 'default', + required: false, + options: [{ + value: 'default', + text: '榛樿' + }, { + value: 'transparent', + text: '閫忔槑' + }], + forbid: appType !== 'mob' + }, + { + type: 'radio', + key: 'closeButton', + label: '鍏抽棴鎸夐挳', + initVal: card.closeButton || 'false', + required: false, + options: [{ + value: 'false', + text: '闅愯棌' + }, { + value: 'true', + text: '鏄剧ず' + }], + forbid: appType !== 'mob' }, { type: 'radio', @@ -986,7 +1038,7 @@ { type: 'radio', key: 'size', - label: '寮�鍏冲昂瀵�', + label: '灏哄', initVal: card.size || 'default', options: [{ value: 'large', @@ -1021,6 +1073,27 @@ required: false }, { + type: 'number', + key: 'min', + label: '鏈�灏忓��', + initVal: card.min, + required: false + }, + { + type: 'number', + key: 'max', + label: '鏈�澶у��', + initVal: card.max, + required: false + }, + { + type: 'number', + key: 'decimal', + label: '灏忔暟浣�', + initVal: card.decimal || 0, + required: true + }, + { type: 'text', key: 'closeVal', label: '鍏抽棴鍊�', @@ -1041,6 +1114,21 @@ label: '鍏抽棴鎻愮ず', initVal: card.closeText || '', required: false, + }, + { + type: 'radio', + key: 'execType', + label: '璇锋眰鏂瑰紡', + initVal: card.execType || 'multi', + tooltip: '閫変腑澶氭潯鏁版嵁鏃剁殑璇锋眰鏂瑰紡锛屾敞锛氬綋閫変腑鏁版嵁瓒呰繃20鏉℃椂灏嗛�愭潯璇锋眰銆�', + required: false, + options: [{ + value: 'multi', + text: '鎵归噺璇锋眰' + }, { + value: 'single', + text: '閫愭潯璇锋眰' + }] }, { type: 'radio', @@ -1114,6 +1202,12 @@ { value: 'pay', text: '鏀粯' }, { value: 'custom', text: '鑷畾涔�' } ] + + if (card.pageTemplate === 'print') { // 鍘熺被鍨嬫敮鎸� + pageTemps.unshift({ value: 'print', text: '鏍囩鎵撳嵃妯℃澘' }) + } else if (card.pageTemplate === 'billprintTemp') { // 鍘熺被鍨嬫敮鎸� + pageTemps.unshift({ value: 'billprintTemp', text: '鍗曟嵁鎵撳嵃妯℃澘' }) + } let funTypes = [ { value: 'print', text: '鏍囩鎵撳嵃' }, @@ -1437,7 +1531,7 @@ key: 'execSuccess', label: '鎴愬姛鍚�', initVal: card.execSuccess || 'grid', - tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆�', + tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭腑鍖呭惈@close_tab@銆丂close_popup@銆丂goback@ 浼氭墽琛岋紙鍏抽棴鏍囩-绠$悊绯荤粺锛夈�侊紙鍏抽棴寮圭獥锛夈�侊紙杩斿洖涓婁竴椤�-瀛愬簲鐢級绛夊姩浣溿��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭腑鍖呭惈@close_tab@銆丂close_popup@銆丂goback@ 浼氭墽琛岋紙鍏抽棴鏍囩-绠$悊绯荤粺锛夈�侊紙鍏抽棴寮圭獥锛夈�侊紙杩斿洖涓婁竴椤�-瀛愬簲鐢級绛夊姩浣溿��', required: true, options: [{ value: 'never', @@ -1459,7 +1553,7 @@ key: 'execError', label: '澶辫触鍚�', initVal: card.execError || 'never', - tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍硷紝娉細涓婄骇缁勪欢鍦ㄦ暟鎹簮涓坊鍔犮��', + tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊鍝竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭腑鍖呭惈@close_tab@銆丂close_popup@銆丂goback@ 浼氭墽琛岋紙鍏抽棴鏍囩-绠$悊绯荤粺锛夈�侊紙鍏抽棴寮圭獥锛夈�侊紙杩斿洖涓婁竴椤�-瀛愬簲鐢級绛夊姩浣溿��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍硷紝娉細涓婄骇缁勪欢鍦ㄦ暟鎹簮涓坊鍔犮�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭腑鍖呭惈@close_tab@銆丂close_popup@銆丂goback@ 浼氭墽琛岋紙鍏抽棴鏍囩-绠$悊绯荤粺锛夈�侊紙鍏抽棴寮圭獥锛夈�侊紙杩斿洖涓婁竴椤�-瀛愬簲鐢級绛夊姩浣溿��', required: true, options: [{ value: 'never', @@ -1678,7 +1772,7 @@ { type: 'radio', key: 'placement', - label: '鎶藉眽鏂瑰悜', + label: '寮瑰嚭鏂瑰悜', initVal: card.placement || 'right', required: false, options: [{ @@ -1773,6 +1867,21 @@ }, { type: 'radio', + key: 'execType', + label: '璇锋眰鏂瑰紡', + initVal: card.execType || 'multi', + tooltip: '閫変腑澶氭潯鏁版嵁鏃剁殑璇锋眰鏂瑰紡锛屾敞锛氬綋閫変腑鏁版嵁瓒呰繃20鏉℃椂灏嗛�愭潯璇锋眰銆�', + required: false, + options: [{ + value: 'multi', + text: '鎵归噺璇锋眰' + }, { + value: 'single', + text: '閫愭潯璇锋眰' + }] + }, + { + type: 'radio', key: 'progress', label: '杩涘害鎻愮ず', initVal: card.progress || 'number', -- Gitblit v1.8.0