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 | 234 ++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 130 insertions(+), 104 deletions(-) diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index e37705d..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', @@ -506,7 +524,7 @@ 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: '鍒锋柊涓婄骇缁勪欢' }] }, { @@ -861,7 +890,7 @@ initVal: card.hover || '', tooltip: '榧犳爣鎮诞鎸夐挳涓婃柟鏃剁殑棰滆壊鍙樺寲銆�', required: false, - forbid: type === 'card' || appType === 'mob', + forbid: appType === 'mob', options: [{ value: '', text: '鏃�' @@ -935,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: '琛ㄥ悕', @@ -997,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 || [], @@ -1035,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', @@ -1060,7 +1075,7 @@ key: 'tipTitle', label: '纭鎻愮ず', initVal: card.tipTitle || '', - tooltip: '娉細寮圭獥锛堣〃鍗曪級鍦ㄦ樉绀轰负鏄惁妗嗘椂鏈夋晥銆�', + tooltip: '鎻愮ず妗嗙殑纭鎻愮ず淇℃伅銆�', required: false }, { @@ -1259,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: '鏁版嵁绠$悊鍛�' }] }, { @@ -1320,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', @@ -1517,10 +1532,13 @@ required: false, options: [{ value: '', - text: '绌�' + text: '缁勪欢BID' }, { value: 'js', text: '鍓嶇鐢熸垚' + }, { + value: 'empty', + text: '绌�' }] }, { @@ -1692,6 +1710,14 @@ card.OpenType = 'pop' } + let extraParam = [] + if (card.recordUser === 'true') { + extraParam.push('recordUser') + } + if (card.dataM === 'true') { + extraParam.push('dataM') + } + let forms = [ { type: 'select', @@ -1859,7 +1885,8 @@ 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 }, { @@ -1867,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 }, { @@ -2053,6 +2081,9 @@ }, { value: 'mainline', text: '鍒锋柊涓婄骇缁勪欢 - 琛�' + }, { + value: 'maingrid', + text: '鍒锋柊涓婄骇缁勪欢' }, ...refresh] }, @@ -2078,6 +2109,9 @@ }, { value: 'mainline', text: '鍒锋柊涓婄骇缁勪欢 - 琛�' + }, { + value: 'maingrid', + text: '鍒锋柊涓婄骇缁勪欢' }, ...refresh] }, @@ -2096,6 +2130,9 @@ }, { value: 'mainline', text: '鍒锋柊涓婄骇缁勪欢 - 琛�' + }, { + value: 'maingrid', + text: '鍒锋柊涓婄骇缁勪欢' }] }, { @@ -2228,20 +2265,6 @@ options: btnClasses }, { - type: 'radio', - key: 'joint', - label: '鎷兼帴鍙傛暟', - initVal: card.joint || 'true', - required: false, - options: [{ - value: 'true', - text: '鏄�' - }, { - value: 'false', - text: '鍚�' - }] - }, - { type: 'text', key: 'sheet', label: '琛ㄥ悕', @@ -2322,7 +2345,7 @@ key: 'tipTitle', label: '纭鎻愮ず', initVal: card.tipTitle || '', - tooltip: '娉細寮圭獥锛堣〃鍗曪級鍦ㄦ樉绀轰负鏄惁妗嗘椂鏈夋晥銆�', + tooltip: '鎻愮ず妗嗙殑纭鎻愮ず淇℃伅銆�', required: false }, { @@ -2442,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: '鏁版嵁绠$悊鍛�' }] }, { @@ -2503,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', @@ -2605,10 +2628,13 @@ required: false, options: [{ value: '', - text: '绌�' + text: '缁勪欢BID' }, { value: 'js', text: '鍓嶇鐢熸垚' + }, { + value: 'empty', + text: '绌�' }] }, { -- Gitblit v1.8.0