From b69b5f6329ca5f87932436b7a6c1ddfc3377e10f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 16 五月 2024 10:56:41 +0800 Subject: [PATCH] 2024-05-16 --- src/menu/components/share/actioncomponent/formconfig.jsx | 411 ++++++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 308 insertions(+), 103 deletions(-) diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index fa273e6..8b93c3b 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -318,6 +318,24 @@ width = +width.replace(/x/, '.5') } + let extraParam = [] + if (card.recordUser === 'true') { + extraParam.push('recordUser') + } + if (card.dataM === 'true') { + extraParam.push('dataM') + } + + if (!appType) { + if (typeof(card.openmenu) === 'string') { + card.openmenu = [] + } + } else { + if (typeof(card.openmenu) !== 'string') { + card.openmenu = '' + } + } + let forms = [ { type: 'select', @@ -499,14 +517,14 @@ initVal: card.linkmenu || (isApp ? '' : []), required: true, extendName: 'MenuNo', - options: isApp ? appMenus : menulist + options: isApp ? appMenus : (menulist.length ? [...menulist, {value: 'multiMenu', label: '澶氳彍鍗�'}] : []) }, { type: 'text', key: 'prefix', label: '鍓嶇紑', initVal: card.prefix || '', - tooltip: '鎵爜淇℃伅灏嗕笌鍓嶇紑鎷兼帴鍚庢墽琛屻�傛敞锛氳烦杞彍鍗曢渶浠kbid寮�澶淬��', + tooltip: '鎵爜淇℃伅灏嗕笌鍓嶇紑鎷兼帴鍚庢墽琛屻�傛敞锛氳烦杞彍鍗曢渶浠kbid锛�:鎴�,锛夊紑澶达紝mkbid锛�:鎴�,锛夎烦杞悗灏嗚鍘婚櫎銆備緥濡傦細mkbid:123456 璺宠浆鍚庨〉闈ID涓� 123456銆�', required: false }, { @@ -514,7 +532,8 @@ key: 'url', label: '椤甸潰鍦板潃', initVal: card.url || '', - tooltip: appType === '' ? '鍦板潃鏍煎紡涓猴細http://******/admin/index.html#/iframe/menuId/loginuid/BID 浼氭墦寮�鏍囩椤点�傛敞锛氫娇鐢ˊloginuid@鏃惰嚜鍔ㄦ浛鎹负褰撳墠绯荤粺鐨刲oginuid锛涢�夋嫨鍗曡涓旀嫾鎺ュ弬鏁版椂浼氭嫾鎺ID銆�' : '', + tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�' + (appType === '' ? '鍦板潃鏍煎紡涓猴細******/admin/index.html#/iframe/menuId/@loginuid@ 浼氭墦寮�鏍囩椤点��' : ''), + toolWidth: 350, required: true }, { @@ -522,7 +541,8 @@ key: 'proUrl', label: '姝e紡鍦板潃', initVal: card.proUrl || '', - tooltip: appType === '' ? '鍦板潃鏍煎紡涓猴細http://******/admin/index.html#/iframe/menuId/loginuid/BID 浼氭墦寮�鏍囩椤点�傛敞锛氫娇鐢ˊloginuid@鏃惰嚜鍔ㄦ浛鎹负褰撳墠绯荤粺鐨刲oginuid锛涢�夋嫨鍗曡涓旀嫾鎺ュ弬鏁版椂浼氭嫾鎺ID銆�' : '', + tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�' + (appType === '' ? '鍦板潃鏍煎紡涓猴細******/admin/index.html#/iframe/menuId/@loginuid@ 浼氭墦寮�鏍囩椤点��' : ''), + toolWidth: 350, required: false }, { @@ -710,6 +730,9 @@ }, { value: 'mainline', text: '鍒锋柊涓婄骇缁勪欢 - 琛�' + }, { + value: 'maingrid', + text: '鍒锋柊涓婄骇缁勪欢' }, ...closetab, ...refresh] @@ -738,6 +761,9 @@ }, { value: 'mainline', text: '鍒锋柊涓婄骇缁勪欢 - 琛�' + }, { + value: 'maingrid', + text: '鍒锋柊涓婄骇缁勪欢' }, ...refresh] }, @@ -756,6 +782,9 @@ }, { value: 'mainline', text: '鍒锋柊涓婄骇缁勪欢 - 琛�' + }, { + value: 'maingrid', + text: '鍒锋柊涓婄骇缁勪欢' }] }, { @@ -856,6 +885,25 @@ }, { type: 'radio', + key: 'hover', + label: '鎮诞鏁堟灉', + initVal: card.hover || '', + tooltip: '榧犳爣鎮诞鎸夐挳涓婃柟鏃剁殑棰滆壊鍙樺寲銆�', + required: false, + forbid: appType === 'mob', + options: [{ + value: '', + text: '鏃�' + }, { + value: 'mk-btn-hover-bg', + text: '鑳屾櫙鍙樺寲' + }, { + value: 'mk-btn-hover-border', + text: '杈规鍙樺寲' + }] + }, + { + type: 'radio', key: 'swipe', label: "婊戝姩鏄剧ず", initVal: card.swipe === 'false' ? 'left' : (card.swipe || 'left'), // 绉诲姩绔粎淇濈暀婊戝姩鏄剧ず鎸夐挳 @@ -916,20 +964,6 @@ }] }, { - type: 'radio', - key: 'joint', - label: '鎷兼帴鍙傛暟', - initVal: card.joint || 'true', - required: false, - options: [{ - value: 'true', - text: '鏄�' - }, { - value: 'false', - text: '鍚�' - }] - }, - { type: 'text', key: 'sheet', label: '琛ㄥ悕', @@ -978,24 +1012,6 @@ }, { type: 'cascader', - key: 'switchTab', - label: '鍒囨崲鏍囩', - initVal: card.switchTab || [], - tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佸垏鎹㈢殑鏍囩椤点��' + (appType === 'mob' ? '娉細灏忕▼搴忎腑鏃犳晥' : ''), - required: false, - options: tabs - }, - { - type: 'cascader', - key: 'anchors', - label: '璺宠浆閿氱偣', - initVal: card.anchors || [], - tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佽烦杞殑閿氱偣銆�' + (appType === 'mob' ? '娉細灏忕▼搴忎腑鏃犳晥' : ''), - required: false, - options: anchors - }, - { - type: 'cascader', key: 'refreshTab', label: '鍒锋柊鑿滃崟', initVal: card.refreshTab || [], @@ -1016,6 +1032,24 @@ allowClear: true, options: appType === 'mob' || appType === 'pc' ? appMenus : menulist, forbid: viewType === 'popview' + }, + { + type: 'cascader', + key: 'switchTab', + label: '鍒囨崲鏍囩', + initVal: card.switchTab || [], + tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佸垏鎹㈢殑鏍囩椤点��' + (appType === 'mob' ? '娉細灏忕▼搴忎腑鏃犳晥' : ''), + required: false, + options: tabs + }, + { + type: 'cascader', + key: 'anchors', + label: '璺宠浆閿氱偣', + initVal: card.anchors || [], + tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佽烦杞殑閿氱偣銆�' + (appType === 'mob' ? '娉細灏忕▼搴忎腑鏃犳晥' : ''), + required: false, + options: anchors }, { type: 'select', @@ -1041,7 +1075,7 @@ key: 'tipTitle', label: '纭鎻愮ず', initVal: card.tipTitle || '', - tooltip: '娉細寮圭獥锛堣〃鍗曪級鍦ㄦ樉绀轰负鏄惁妗嗘椂鏈夋晥銆�', + tooltip: '鎻愮ず妗嗙殑纭鎻愮ず淇℃伅銆�', required: false }, { @@ -1240,18 +1274,18 @@ forbid: appType === 'mob' }, { - type: 'radio', - key: 'recordUser', - label: '璁板綍鐢ㄦ埛', - initVal: card.recordUser || 'false', - tooltip: '褰撻�夋嫨鈥滄槸鈥濇椂锛屽唴閮ㄥ嚱鏁扮殑浼犲弬浼氬鍔� username 涓� fullname銆�', + type: 'checkbox', + key: 'extraParam', + label: '鎵╁睍鍙傛暟', + initVal: extraParam, + tooltip: '閫夋嫨鈥滅敤鎴蜂俊鎭�濇椂锛屽唴閮ㄥ嚱鏁扮殑浼犲弬浼氬鍔� username 涓� fullname銆傞�夋嫨鈥滄暟鎹鐞嗗憳鈥濇椂锛屽唴閮ㄥ嚱鏁扮殑浼犲弬浼氬鍔� dataM 锛岀鐞嗗憳鍊间负鈥淵鈥濓紝鏅�氱敤鎴蜂负绌恒��', required: false, options: [{ - value: 'false', - text: '鍚�' + value: 'recordUser', + text: '鐢ㄦ埛淇℃伅' }, { - value: 'true', - text: '鏄�' + value: 'dataM', + text: '鏁版嵁绠$悊鍛�' }] }, { @@ -1301,21 +1335,21 @@ initVal: card.reason || '', required: false }, - { - type: 'radio', - key: 'formCache', - label: '琛ㄥ崟缂撳瓨', - initVal: card.formCache || 'false', - tooltip: '涓昏鐢ㄤ簬鏁版嵁淇敼鍚庯紝鏇存柊鐩稿叧琛ㄥ崟鐨勯�夐」锛屾竻绌虹紦瀛樺悗琛ㄥ崟鍐嶆鎵撳紑鏃舵暟鎹細閲嶆柊鍔犺浇銆�', - required: false, - options: [{ - value: 'false', - text: '涓嶆竻绌�' - }, { - value: 'clear', - text: '娓呯┖' - }] - }, + // { + // type: 'radio', + // key: 'formCache', + // label: '琛ㄥ崟缂撳瓨', + // initVal: card.formCache || 'false', + // tooltip: '涓昏鐢ㄤ簬鏁版嵁淇敼鍚庯紝鏇存柊鐩稿叧琛ㄥ崟鐨勯�夐」锛屾竻绌虹紦瀛樺悗琛ㄥ崟鍐嶆鎵撳紑鏃舵暟鎹細閲嶆柊鍔犺浇銆�', + // required: false, + // options: [{ + // value: 'false', + // text: '涓嶆竻绌�' + // }, { + // value: 'clear', + // text: '娓呯┖' + // }] + // }, { type: 'radio', key: 'hidden', @@ -1330,6 +1364,18 @@ value: 'true', text: '鏄�' }] + }, + { + type: 'radio', + key: 'permission', + label: '鏉冮檺楠岃瘉', + initVal: card.permission || 'true', + required: false, + options: [ + {value: 'true', text: '缁ф壙鑿滃崟'}, + {value: 'false', text: '绂佺敤'}, + ], + forbid: viewType === 'popview' }, { type: 'splitLine', @@ -1479,6 +1525,68 @@ }, { type: 'radio', + key: 'sysId', + label: '鑷畾涔塈D', + initVal: card.sysId || '', + tooltip: '涓嶉�夎鎸夐挳鍙湪鍓嶇鐢熸垚ID鍊�(32浣�)锛屼綔涓哄悗缁彍鍗曠殑BID锛屽瓨鍦ㄦ爣璁版椂锛孖D鍊煎悗灏嗘嫾鎺ユ爣璁板�笺��', + required: false, + options: [{ + value: '', + text: '缁勪欢BID' + }, { + value: 'js', + text: '鍓嶇鐢熸垚' + }, { + value: 'empty', + text: '绌�' + }] + }, + { + type: 'text', + key: 'sign', + label: '鏍囪', + initVal: card.sign || '', + required: false + }, + { + type: 'table', + key: 'multiMenus', + label: '鑿滃崟鍒楄〃', + initVal: card.multiMenus || [], + required: true, + actions: ['edit', 'del', 'add', 'move'], + columns: [ + { + title: '鍚嶇О', + dataIndex: 'name', + inputType: 'text', + editable: true, + required: false, + width: '30%' + }, + { + title: '鑿滃崟', + dataIndex: 'menuId', + inputType: 'cascader', + editable: true, + required: true, + extends: [{key: 'label', value: 'label', mutilLabel: 'name'}], + width: '30%', + render: (text, record) => record.label, + options: menulist + }, + { + title: '鏍囪', + dataIndex: 'sign', + inputType: 'text', + editable: true, + required: false, + width: '20%' + } + ] + }, + { + type: 'radio', key: 'preHandle', label: '鑷畾涔夎剼鏈�', initVal: card.preHandle || 'false', @@ -1600,6 +1708,14 @@ if (card.OpenType === 'form') { // 鎷栨嫿娣诲姞绫诲瀷杞崲 card.OpenType = 'pop' + } + + let extraParam = [] + if (card.recordUser === 'true') { + extraParam.push('recordUser') + } + if (card.dataM === 'true') { + extraParam.push('dataM') } let forms = [ @@ -1762,14 +1878,15 @@ initVal: card.linkmenu || [], required: true, extendName: 'MenuNo', - options: menulist + options: menulist.length ? [...menulist, {value: 'multiMenu', label: '澶氳彍鍗�'}] : [] }, { type: 'textarea', key: 'url', label: '椤甸潰鍦板潃', initVal: card.url || '', - tooltip: '鍦板潃鏍煎紡涓猴細http://******/admin/index.html#/iframe/menuId/loginuid/BID 浼氭墦寮�鏍囩椤点�傛敞锛氫娇鐢ˊloginuid@鏃惰嚜鍔ㄦ浛鎹负褰撳墠绯荤粺鐨刲oginuid锛涢�夋嫨鍗曡涓旀嫾鎺ュ弬鏁版椂浼氭嫾鎺ID銆�', + tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆傚湴鍧�鏍煎紡涓猴細******/admin/index.html#/iframe/menuId/@loginuid@ 浼氭墦寮�鏍囩椤点��', + toolWidth: 350, required: true }, { @@ -1777,7 +1894,8 @@ key: 'proUrl', label: '姝e紡鍦板潃', initVal: card.proUrl || '', - tooltip: '鍦板潃鏍煎紡涓猴細http://******/admin/index.html#/iframe/menuId/loginuid/BID 浼氭墦寮�鏍囩椤点�傛敞锛氫娇鐢ˊloginuid@鏃惰嚜鍔ㄦ浛鎹负褰撳墠绯荤粺鐨刲oginuid锛涢�夋嫨鍗曡涓旀嫾鎺ュ弬鏁版椂浼氭嫾鎺ID銆�', + tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆傚湴鍧�鏍煎紡涓猴細******/admin/index.html#/iframe/menuId/@loginuid@ 浼氭墦寮�鏍囩椤点��', + toolWidth: 350, required: false }, { @@ -1963,6 +2081,9 @@ }, { value: 'mainline', text: '鍒锋柊涓婄骇缁勪欢 - 琛�' + }, { + value: 'maingrid', + text: '鍒锋柊涓婄骇缁勪欢' }, ...refresh] }, @@ -1988,6 +2109,9 @@ }, { value: 'mainline', text: '鍒锋柊涓婄骇缁勪欢 - 琛�' + }, { + value: 'maingrid', + text: '鍒锋柊涓婄骇缁勪欢' }, ...refresh] }, @@ -2006,6 +2130,9 @@ }, { value: 'mainline', text: '鍒锋柊涓婄骇缁勪欢 - 琛�' + }, { + value: 'maingrid', + text: '鍒锋柊涓婄骇缁勪欢' }] }, { @@ -2104,6 +2231,24 @@ }] }, { + type: 'radio', + key: 'hover', + label: '鎮诞鏁堟灉', + initVal: card.hover || '', + tooltip: '榧犳爣鎮诞鎸夐挳涓婃柟鏃剁殑棰滆壊鍙樺寲銆�', + required: false, + options: [{ + value: '', + text: '鏃�' + }, { + value: 'mk-btn-hover-bg', + text: '鑳屾櫙鍙樺寲' + }, { + value: 'mk-btn-hover-border', + text: '杈规鍙樺寲' + }] + }, + { type: 'icon', key: 'icon', label: '鍥炬爣', @@ -2118,20 +2263,6 @@ initVal: card.class, required: false, options: btnClasses - }, - { - type: 'radio', - key: 'joint', - label: '鎷兼帴鍙傛暟', - initVal: card.joint || 'true', - required: false, - options: [{ - value: 'true', - text: '鏄�' - }, { - value: 'false', - text: '鍚�' - }] }, { type: 'text', @@ -2214,7 +2345,7 @@ key: 'tipTitle', label: '纭鎻愮ず', initVal: card.tipTitle || '', - tooltip: '娉細寮圭獥锛堣〃鍗曪級鍦ㄦ樉绀轰负鏄惁妗嗘椂鏈夋晥銆�', + tooltip: '鎻愮ず妗嗙殑纭鎻愮ず淇℃伅銆�', required: false }, { @@ -2334,18 +2465,18 @@ required: false }, { - type: 'radio', - key: 'recordUser', - label: '璁板綍鐢ㄦ埛', - initVal: card.recordUser || 'false', - tooltip: '褰撻�夋嫨鈥滄槸鈥濇椂锛屽唴閮ㄥ嚱鏁扮殑浼犲弬浼氬鍔� username 涓� fullname銆�', + type: 'checkbox', + key: 'extraParam', + label: '鎵╁睍鍙傛暟', + initVal: extraParam, + tooltip: '閫夋嫨鈥滅敤鎴蜂俊鎭�濇椂锛屽唴閮ㄥ嚱鏁扮殑浼犲弬浼氬鍔� username 涓� fullname銆傞�夋嫨鈥滄暟鎹鐞嗗憳鈥濇椂锛屽唴閮ㄥ嚱鏁扮殑浼犲弬浼氬鍔� dataM 锛岀鐞嗗憳鍊间负鈥淵鈥濓紝鏅�氱敤鎴蜂负绌恒��', required: false, options: [{ - value: 'false', - text: '鍚�' + value: 'recordUser', + text: '鐢ㄦ埛淇℃伅' }, { - value: 'true', - text: '鏄�' + value: 'dataM', + text: '鏁版嵁绠$悊鍛�' }] }, { @@ -2395,21 +2526,21 @@ initVal: card.reason || '', required: false }, - { - type: 'radio', - key: 'formCache', - label: '琛ㄥ崟缂撳瓨', - initVal: card.formCache || 'false', - tooltip: '涓昏鐢ㄤ簬鏁版嵁淇敼鍚庯紝鏇存柊鐩稿叧琛ㄥ崟鐨勯�夐」锛屾竻绌虹紦瀛樺悗琛ㄥ崟鍐嶆鎵撳紑鏃舵暟鎹細閲嶆柊鍔犺浇銆�', - required: false, - options: [{ - value: 'false', - text: '涓嶆竻绌�' - }, { - value: 'clear', - text: '娓呯┖' - }] - }, + // { + // type: 'radio', + // key: 'formCache', + // label: '琛ㄥ崟缂撳瓨', + // initVal: card.formCache || 'false', + // tooltip: '涓昏鐢ㄤ簬鏁版嵁淇敼鍚庯紝鏇存柊鐩稿叧琛ㄥ崟鐨勯�夐」锛屾竻绌虹紦瀛樺悗琛ㄥ崟鍐嶆鎵撳紑鏃舵暟鎹細閲嶆柊鍔犺浇銆�', + // required: false, + // options: [{ + // value: 'false', + // text: '涓嶆竻绌�' + // }, { + // value: 'clear', + // text: '娓呯┖' + // }] + // }, { type: 'radio', key: 'hidden', @@ -2424,6 +2555,18 @@ value: 'true', text: '鏄�' }] + }, + { + type: 'radio', + key: 'permission', + label: '鏉冮檺楠岃瘉', + initVal: card.permission || 'true', + required: false, + options: [ + {value: 'true', text: '鍚敤'}, + {value: 'false', text: '绂佺敤'}, + ], + forbid: viewType === 'popview' }, { type: 'radio', @@ -2478,6 +2621,68 @@ }, { type: 'radio', + key: 'sysId', + label: '鑷畾涔塈D', + initVal: card.sysId || '', + tooltip: '涓嶉�夎鎸夐挳鍙湪鍓嶇鐢熸垚ID鍊�(32浣�)锛屼綔涓哄悗缁彍鍗曠殑BID锛屽瓨鍦ㄦ爣璁版椂锛孖D鍊煎悗灏嗘嫾鎺ユ爣璁板�笺��', + required: false, + options: [{ + value: '', + text: '缁勪欢BID' + }, { + value: 'js', + text: '鍓嶇鐢熸垚' + }, { + value: 'empty', + text: '绌�' + }] + }, + { + type: 'text', + key: 'sign', + label: '鏍囪', + initVal: card.sign || '', + required: false + }, + { + type: 'table', + key: 'multiMenus', + label: '鑿滃崟鍒楄〃', + initVal: card.multiMenus || [], + required: true, + actions: ['edit', 'del', 'add', 'move'], + columns: [ + { + title: '鍚嶇О', + dataIndex: 'name', + inputType: 'text', + editable: true, + required: false, + width: '30%' + }, + { + title: '鑿滃崟', + dataIndex: 'menuId', + inputType: 'cascader', + editable: true, + required: true, + extends: [{key: 'label', value: 'label', mutilLabel: 'name'}], + width: '30%', + render: (text, record) => record.label, + options: menulist + }, + { + title: '鏍囪', + dataIndex: 'sign', + inputType: 'text', + editable: true, + required: false, + width: '20%' + } + ] + }, + { + type: 'radio', key: 'preHandle', label: '鑷畾涔夎剼鏈�', initVal: card.preHandle || 'false', -- Gitblit v1.8.0