From 4546530b83c119280a3631be82b5f070c8713c03 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 16 七月 2023 12:19:38 +0800 Subject: [PATCH] 2023-07-16 --- src/menu/components/share/actioncomponent/formconfig.jsx | 353 +++++++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 282 insertions(+), 71 deletions(-) diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index 8167d07..2c40947 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -97,7 +97,6 @@ { value: 'print', text: '鏍囩鎵撳嵃' }, { value: 'refund', text: '閫�娆�' }, { value: 'closetab', text: '鏍囩鍏抽棴' }, - { value: 'changeuser', text: '鍒囨崲鐢ㄦ埛' }, { value: 'megvii', text: '鏃疯闈㈡澘鏈�' }, { value: 'filezip', text: '鏂囦欢鍘嬬缉鍖�' }, ] @@ -113,6 +112,7 @@ } else { appMenus = [] } + appMenus.push({value: 'goback', text: '杩斿洖锛堜笂涓�椤碉級'}) } else { menulist = sessionStorage.getItem('fstMenuList') if (menulist) { @@ -150,7 +150,6 @@ opentypes = opentypes.filter(item => item.value !== 'tab') funTypes = [ { value: 'print', text: '鏍囩鎵撳嵃' }, - { value: 'changeuser', text: '鍒囨崲鐢ㄦ埛' }, ] pageTemps = [ { value: 'linkpage', text: '鍏宠仈鑿滃崟' }, @@ -165,6 +164,23 @@ pageTemps.unshift({ value: 'billprintTemp', text: '鍗曟嵁鎵撳嵃妯℃澘' }) } } + + if (card.$fixed) { + opentypes = opentypes.filter(item => item.value === card.OpenType) + } + + if (card.funcType === 'changeuser') { // 鍘熺被鍨嬫敮鎸� + funTypes.unshift({ value: 'changeuser', text: '鍒囨崲鐢ㄦ埛' }) + } + + if (config.subtype === 'editable') { // 缂栬緫琛ㄧ殑娣诲姞銆佸垹闄� + funTypes.push( + { value: 'addline', text: '澧炲姞琛岋紙缂栬緫琛級' }, + { value: 'delline', text: '鍒犻櫎琛岋紙缂栬緫琛級' } + ) + } else if (card.funcType === 'addline' || card.funcType === 'delline') { + card.funcType = '' + } if (type === 'chart' && appType !== 'mob') { opentypes = opentypes.filter(item => item.value === 'excelIn' || item.value === 'excelOut') @@ -176,7 +192,10 @@ let refresh = [] if (viewType === 'popview') { // 寮圭獥鏍囩 - opentypes = opentypes.filter(item => item.value !== 'popview' && item.value !== 'funcbutton') + opentypes = opentypes.filter(item => item.value !== 'popview') + + funTypes = funTypes.filter(item => item.value !== 'print') + refresh.push({ value: 'closepoptab', // 鍏抽棴寮圭獥鏍囩 text: '鍏抽棴寮圭獥' @@ -230,7 +249,7 @@ { type: 'select', key: 'OpenType', - label: '鎵撳紑鏂瑰紡', + label: '鎸夐挳绫诲瀷', initVal: card.OpenType, required: true, options: opentypes @@ -261,7 +280,7 @@ ] }, { - type: 'radio', + type: formTypes.length ? 'select' : 'radio', key: 'formType', label: '琛ㄥ崟绫诲瀷', initVal: card.formType || 'switch', @@ -275,6 +294,9 @@ }, { value: 'counter', text: '璁℃暟鍣�' + }, { + value: 'count_line', + text: '璁℃暟鍣�(鏈湴)' }, ...formTypes] }, @@ -322,7 +344,7 @@ key: 'procMode', label: '鍙傛暟澶勭悊', initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'), - tooltip: '褰撹繑鍥炲�煎瓨鍦� mk_ex_invoke 涓斿�间负 false 鏃讹紝涓嶄細璋冪敤澶栭儴鎺ュ彛銆�', + tooltip: '褰撹繑鍥炲�煎瓨鍦� mk_ex_invoke 涓斿�间负 false 鏃讹紝涓嶄細璋冪敤澶栭儴鎺ュ彛銆傛敞锛氬綋閫夆�滄棤鈥濇椂锛屾寜閽�夎鏃朵細浼犻�掍富閿紝瀛樺湪琛ㄥ崟鏃朵細浼犻�掕〃鍗曞瓧娈碉紝瀛樺湪BID鏃朵細浼燘ID瀛楁銆�', required: true, options: [{ value: 'system', @@ -406,7 +428,16 @@ key: 'url', label: '椤甸潰鍦板潃', initVal: card.url || '', + tooltip: appType === '' ? '鍦板潃鏍煎紡涓猴細http://******/admin/index.html#/iframe/menuId/loginuid/BID 浼氭墦寮�鏍囩椤点�傛敞锛氫娇鐢ˊloginuid@鏃惰嚜鍔ㄦ浛鎹负褰撳墠绯荤粺鐨刲oginuid锛涢�夋嫨鍗曡涓旀嫾鎺ュ弬鏁版椂浼氭嫾鎺ID銆�' : '', required: true + }, + { + type: 'textarea', + key: 'proUrl', + label: '姝e紡鍦板潃', + initVal: card.proUrl || '', + tooltip: appType === '' ? '鍦板潃鏍煎紡涓猴細http://******/admin/index.html#/iframe/menuId/loginuid/BID 浼氭墦寮�鏍囩椤点�傛敞锛氫娇鐢ˊloginuid@鏃惰嚜鍔ㄦ浛鎹负褰撳墠绯荤粺鐨刲oginuid锛涢�夋嫨鍗曡涓旀嫾鎺ュ弬鏁版椂浼氭嫾鎺ID銆�' : '', + required: false }, { type: 'radio', @@ -466,35 +497,6 @@ }, { type: 'radio', - key: 'method', - label: '璇锋眰鏂瑰紡', - initVal: card.method || 'post', - required: true, - options: [{ - value: 'get', - text: 'GET' - }, { - value: 'post', - text: 'POST' - }] - }, - { - type: 'radio', - key: 'cross', - label: '璺ㄥ煙璇锋眰', - initVal: card.cross || 'true', - tooltip: '濡傛灉鑷畾涔夋帴鍙d笉鏀寔璺ㄥ煙璇锋眰锛屼細閫氳繃褰撳墠绯荤粺杞彂銆�', - required: false, - options: [{ - value: 'true', - text: '鏀寔' - }, { - value: 'false', - text: '涓嶆敮鎸�' - }] - }, - { - type: 'radio', key: 'callbackType', label: '鍥炶皟鏂瑰紡', initVal: card.callbackType || (card.callbackFunc ? 'func' : 'none'), @@ -527,6 +529,60 @@ label: '鍥炶皟鍑芥暟', initVal: card.callbackFunc || '', required: true + }, + { + type: 'radio', + key: 'method', + label: '璇锋眰鏂瑰紡', + initVal: card.method || 'post', + required: true, + options: [{ + value: 'get', + text: 'GET' + }, { + value: 'post', + text: 'POST' + }] + }, + { + type: 'radio', + key: 'cross', + label: '鎺ュ彛璺ㄥ煙', + initVal: card.cross || 'true', + tooltip: '濡傛灉鑷畾涔夋帴鍙d笉鏀寔璺ㄥ煙璇锋眰锛屼細閫氳繃褰撳墠绯荤粺杞彂銆�', + required: false, + options: [{ + value: 'true', + text: '鏀寔' + }, { + value: 'false', + text: '涓嶆敮鎸�' + }] + }, + { + type: 'radio', + key: 'stringify', + label: '搴忓垪鍖�', + initVal: card.stringify || 'text', + required: false, + options: [{ + value: 'text', + text: 'Text' + }, { + value: 'JSON', + text: 'JSON' + }, { + value: 'qs', + text: 'qs' + }] + }, + { + type: 'text', + key: 'ContentType', + label: 'Content-Type', + initVal: card.ContentType || '', + tooltip: '榛樿鍊硷細application/x-www-form-urlencoded;charset=UTF-8', + required: false }, { type: 'select', @@ -734,7 +790,7 @@ initVal: card.syncComponent || [], tooltip: '鎵ц鎴愬姛鍚庯紙鎴栧脊绐楁爣绛惧叧闂椂锛夛紝闇�瑕佸悓姝ュ埛鏂扮殑缁勪欢銆傛敞锛氶�夋嫨褰撳墠缁勪欢鐨勪笂绾х粍浠舵棤鏁堬紝鍒锋柊涓婄骇缁勪欢璇烽�夋嫨鎴愬姛鍚庘�滃埛鏂颁笂绾х粍浠� - 琛屸�濄��', required: false, - options: modules + options: modules.length ? [...modules, {value: 'multiComponent', label: '澶氱粍浠�'}] : [] }, { type: 'radio', @@ -805,7 +861,7 @@ extendName: 'MenuNo', required: false, allowClear: true, - options: appType === 'mob' || appType === 'pc' ? [...appMenus, {value: 'goback', text: '杩斿洖锛堜笂涓�椤碉級'}] : menulist, + options: appType === 'mob' || appType === 'pc' ? appMenus : menulist, forbid: viewType === 'popview' }, { @@ -836,6 +892,19 @@ options: [ {value: 'blank', text: appType !== 'mob' ? '鏂扮獥鍙�' : '鏂伴〉闈�'}, {value: 'self', text: appType !== 'mob' ? '褰撳墠绐楀彛' : '褰撳墠椤甸潰'}, + ] + }, + { + type: 'radio', + key: 'openTab', + label: '鎵撳紑鏂瑰紡', + initVal: card.openTab || 'newtab', + tooltip: '鑿滃崟鎵撳紑鏂瑰紡銆�', + forbid: appType !== '', + options: [ + {value: 'newtab', text: '鏍囩椤�'}, + // {value: 'newpage', text: '鏂伴〉闈紙鏍囩椤碉級'}, + {value: 'view', text: '鏂伴〉闈紙鍏ㄥ睆锛�'} ] }, { @@ -900,6 +969,22 @@ }, { type: 'radio', + key: 'popshow', + label: '寮圭獥灞曠ず', + initVal: card.popshow || 'default', + tooltip: '灏忕獥鍙e睍绀哄皢闅愯棌鏍囬鍙婂簳閮ㄦ寜閽��', + required: false, + options: [{ + value: 'default', + text: '榛樿' + }, { + value: 'miniview', + text: '灏忕獥鍙�' + }], + forbid: appType === 'mob' + }, + { + type: 'radio', key: 'maskStyle', label: '钂欏眰鏍峰紡', initVal: card.maskStyle || 'default', @@ -958,6 +1043,15 @@ value: 'bottom', text: '搴曢儴' }] + }, + { + type: 'text', + key: 'preFunc', + label: '鍓嶇疆鍑芥暟', + initVal: card.preFunc || '', + tooltip: '鍓嶇疆鍑芥暟鎵ц瀹屾垚鍚庯紝缁撴灉浼氫紶鍏ュ唴閮ㄥ嚱鏁颁腑锛屾鏃跺唴閮ㄥ嚱鏁颁細寮傛鎵ц锛涘綋鍓嶇疆鍑芥暟杩斿洖涓璄rrCode绛変簬-1鏃讹紝灏嗕笉鍐嶆墽琛屽唴閮ㄥ嚱鏁般��', + required: false, + forbid: appType === 'mob' }, { type: 'radio', @@ -1144,6 +1238,27 @@ value: 'progressbar', text: '杩涘害鏉�' }] + }, + { + type: 'table', + key: 'syncComponents', + label: '缁勪欢鍒楄〃', + initVal: card.syncComponents || [], + required: true, + actions: [], + columns: [ + { + title: '缁勪欢', + dataIndex: 'syncComId', + inputType: 'cascader', + editable: true, + required: true, + extends: [{key: 'label', value: 'label'}], + width: '70%', + render: (text, record) => record.label, + options: modules + } + ] } ] @@ -1213,10 +1328,13 @@ { value: 'print', text: '鏍囩鎵撳嵃' }, { value: 'refund', text: '閫�娆�' }, { value: 'closetab', text: '鏍囩鍏抽棴' }, - { value: 'changeuser', text: '鍒囨崲鐢ㄦ埛' }, { value: 'megvii', text: '鏃疯闈㈡澘鏈�' }, { value: 'filezip', text: '鏂囦欢鍘嬬缉鍖�' }, ] + + if (card.funcType === 'changeuser') { // 鍘熺被鍨嬫敮鎸� + funTypes.unshift({ value: 'changeuser', text: '鍒囨崲鐢ㄦ埛' }) + } let menulist = sessionStorage.getItem('fstMenuList') if (menulist) { @@ -1231,7 +1349,10 @@ let refresh = [] if (viewType === 'popview') { // 寮圭獥鏍囩 - opentypes = opentypes.filter(item => item.value !== 'popview' && item.value !== 'funcbutton') + opentypes = opentypes.filter(item => item.value !== 'popview') + + funTypes = funTypes.filter(item => item.value !== 'print') + refresh.push({ value: 'closepoptab', // 鍏抽棴寮圭獥鏍囩 text: '鍏抽棴寮圭獥' @@ -1246,7 +1367,7 @@ { type: 'select', key: 'OpenType', - label: '鎵撳紑鏂瑰紡', + label: '鎸夐挳绫诲瀷', initVal: card.OpenType, required: true, options: opentypes @@ -1320,7 +1441,7 @@ key: 'procMode', label: '鍙傛暟澶勭悊', initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'), - tooltip: '褰撹繑鍥炲�煎瓨鍦� mk_ex_invoke 涓斿�间负 false 鏃讹紝涓嶄細璋冪敤澶栭儴鎺ュ彛銆�', + tooltip: '褰撹繑鍥炲�煎瓨鍦� mk_ex_invoke 涓斿�间负 false 鏃讹紝涓嶄細璋冪敤澶栭儴鎺ュ彛銆傛敞锛氬綋閫夆�滄棤鈥濇椂锛屾寜閽�夎鏃朵細浼犻�掍富閿紝瀛樺湪琛ㄥ崟鏃朵細浼犻�掕〃鍗曞瓧娈碉紝瀛樺湪BID鏃朵細浼燘ID瀛楁銆�', required: true, options: [{ value: 'system', @@ -1396,7 +1517,16 @@ key: 'url', label: '椤甸潰鍦板潃', initVal: card.url || '', + tooltip: '鍦板潃鏍煎紡涓猴細http://******/admin/index.html#/iframe/menuId/loginuid/BID 浼氭墦寮�鏍囩椤点�傛敞锛氫娇鐢ˊloginuid@鏃惰嚜鍔ㄦ浛鎹负褰撳墠绯荤粺鐨刲oginuid锛涢�夋嫨鍗曡涓旀嫾鎺ュ弬鏁版椂浼氭嫾鎺ID銆�', required: true + }, + { + type: 'textarea', + key: 'proUrl', + label: '姝e紡鍦板潃', + initVal: card.proUrl || '', + tooltip: '鍦板潃鏍煎紡涓猴細http://******/admin/index.html#/iframe/menuId/loginuid/BID 浼氭墦寮�鏍囩椤点�傛敞锛氫娇鐢ˊloginuid@鏃惰嚜鍔ㄦ浛鎹负褰撳墠绯荤粺鐨刲oginuid锛涢�夋嫨鍗曡涓旀嫾鎺ュ弬鏁版椂浼氭嫾鎺ID銆�', + required: false }, { type: 'radio', @@ -1456,35 +1586,6 @@ }, { type: 'radio', - key: 'method', - label: '璇锋眰鏂瑰紡', - initVal: card.method || 'post', - required: true, - options: [{ - value: 'get', - text: 'GET' - }, { - value: 'post', - text: 'POST' - }] - }, - { - type: 'radio', - key: 'cross', - label: '璺ㄥ煙璇锋眰', - initVal: card.cross || 'true', - tooltip: '濡傛灉鑷畾涔夋帴鍙d笉鏀寔璺ㄥ煙璇锋眰锛屼細閫氳繃褰撳墠绯荤粺杞彂銆�', - required: false, - options: [{ - value: 'true', - text: '鏀寔' - }, { - value: 'false', - text: '涓嶆敮鎸�' - }] - }, - { - type: 'radio', key: 'callbackType', label: '鍥炶皟鏂瑰紡', initVal: card.callbackType || (card.callbackFunc ? 'func' : 'none'), @@ -1517,6 +1618,60 @@ label: '鍥炶皟鍑芥暟', initVal: card.callbackFunc || '', required: true + }, + { + type: 'radio', + key: 'method', + label: '璇锋眰鏂瑰紡', + initVal: card.method || 'post', + required: true, + options: [{ + value: 'get', + text: 'GET' + }, { + value: 'post', + text: 'POST' + }] + }, + { + type: 'radio', + key: 'cross', + label: '鎺ュ彛璺ㄥ煙', + initVal: card.cross || 'true', + tooltip: '濡傛灉鑷畾涔夋帴鍙d笉鏀寔璺ㄥ煙璇锋眰锛屼細閫氳繃褰撳墠绯荤粺杞彂銆�', + required: false, + options: [{ + value: 'true', + text: '鏀寔' + }, { + value: 'false', + text: '涓嶆敮鎸�' + }] + }, + { + type: 'radio', + key: 'stringify', + label: '搴忓垪鍖�', + initVal: card.stringify || 'text', + required: false, + options: [{ + value: 'text', + text: 'Text' + }, { + value: 'JSON', + text: 'JSON' + }, { + value: 'qs', + text: 'qs' + }] + }, + { + type: 'text', + key: 'ContentType', + label: 'Content-Type', + initVal: card.ContentType || '', + tooltip: '榛樿鍊硷細application/x-www-form-urlencoded;charset=UTF-8', + required: false }, { type: 'select', @@ -1674,7 +1829,7 @@ initVal: card.syncComponent || [], tooltip: '鎵ц鎴愬姛鍚庯紙鎴栧脊绐楁爣绛惧叧闂椂锛夛紝闇�瑕佸悓姝ュ埛鏂扮殑缁勪欢銆傛敞锛氶�夋嫨褰撳墠缁勪欢鐨勪笂绾х粍浠舵棤鏁堬紝鍒锋柊涓婄骇缁勪欢璇烽�夋嫨鎴愬姛鍚庘�滃埛鏂颁笂绾х粍浠� - 琛屸�濄��', required: false, - options: modules + options: modules.length ? [...modules, {value: 'multiComponent', label: '澶氱粍浠�'}] : [] }, { type: 'radio', @@ -1746,6 +1901,18 @@ }, { type: 'radio', + key: 'openTab', + label: '鎵撳紑鏂瑰紡', + initVal: card.openTab || 'newtab', + tooltip: '鑿滃崟鎵撳紑鏂瑰紡銆�', + options: [ + {value: 'newtab', text: '鏍囩椤�'}, + // {value: 'newpage', text: '鏂伴〉闈紙鏍囩椤碉級'}, + {value: 'view', text: '鏂伴〉闈紙鍏ㄥ睆锛�'} + ] + }, + { + type: 'radio', key: 'display', label: '鏄剧ず鏂瑰紡', initVal: card.display || 'modal', @@ -1802,6 +1969,29 @@ value: 'close', text: '鍏抽棴' }] + }, + { + type: 'radio', + key: 'popshow', + label: '寮圭獥灞曠ず', + initVal: card.popshow || 'default', + tooltip: '灏忕獥鍙e睍绀哄皢闅愯棌鏍囬鍙婂簳閮ㄦ寜閽��', + required: false, + options: [{ + value: 'default', + text: '榛樿' + }, { + value: 'miniview', + text: '灏忕獥鍙�' + }] + }, + { + type: 'text', + key: 'preFunc', + label: '鍓嶇疆鍑芥暟', + initVal: card.preFunc || '', + tooltip: '鍓嶇疆鍑芥暟鎵ц瀹屾垚鍚庯紝缁撴灉浼氫紶鍏ュ唴閮ㄥ嚱鏁颁腑锛屾鏃跺唴閮ㄥ嚱鏁颁細寮傛鎵ц锛涘綋鍓嶇疆鍑芥暟杩斿洖涓璄rrCode绛変簬-1鏃讹紝灏嗕笉鍐嶆墽琛屽唴閮ㄥ嚱鏁般��', + required: false }, { type: 'radio', @@ -1893,6 +2083,27 @@ value: 'progressbar', text: '杩涘害鏉�' }] + }, + { + type: 'table', + key: 'syncComponents', + label: '缁勪欢鍒楄〃', + initVal: card.syncComponents || [], + required: true, + actions: [], + columns: [ + { + title: '缁勪欢', + dataIndex: 'syncComId', + inputType: 'cascader', + editable: true, + required: true, + extends: [{key: 'label', value: 'label'}], + width: '70%', + render: (text, record) => record.label, + options: modules + } + ] } ] -- Gitblit v1.8.0