From 66bdbc1df92e8ec4a5108a4e0323e25a7b9ff8f8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 21 五月 2024 16:37:16 +0800 Subject: [PATCH] Merge branch 'develop' --- src/tabviews/custom/components/card/cardcellList/index.jsx | 70 ++++++++++++++++++++++------------- 1 files changed, 44 insertions(+), 26 deletions(-) diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index d092bd8..16ec710 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -25,7 +25,7 @@ const FuncMegvii = asyncComponent(() => import('@/tabviews/zshare/actionList/funcMegvii')) const FuncZip = asyncComponent(() => import('@/tabviews/zshare/actionList/funczip')) const ExportPdf = asyncComponent(() => import('@/tabviews/zshare/actionList/exportPdf')) -const ShareLink = asyncComponent(() => import('@/tabviews/zshare/actionList/shareLink')) +const FuncButton = asyncComponent(() => import('@/tabviews/zshare/actionList/funcbutton')) const EditLine = asyncComponent(() => import('@/tabviews/zshare/actionList/editLine')) const BarCode = asyncComponent(() => import('@/components/barcode')) const QrCode = asyncComponent(() => import('@/components/qrcode')) @@ -106,7 +106,7 @@ if (card.linkType === 'linkmenu') { if (card.linkThdMenu) { let __param = { - $BID: data.$$uuid + $BID: data.$$uuid || '' } if (card.field) { @@ -114,16 +114,11 @@ __param.$searchval = data[card.field] || '' } - if (card.joint === 'true' && card.linkThdMenu.urlFields) { - let lower = {} - Object.keys(data).forEach(key => { - lower[key.toLowerCase()] = data[key] - }) - - card.linkThdMenu.urlFields.split(',').forEach(field => { - __param[field] = lower[field.toLowerCase()] || '' - }) - } + Object.keys(data).forEach(key => { + if (/^\$/.test(key)) return + if (key === 'children') return + __param[key] = data[key] + }) let tabmenu = card.linkThdMenu @@ -240,15 +235,13 @@ d.click() d.remove() } else { + let Id = data.$$uuid || '' + + if (cards.subtype === 'propcard' && cardCell) { + Id = cardCell.setting.primaryId || '' + } + if (card.joint === 'true') { - let Id = '' - - if (cards.subtype === 'propcard' && cardCell) { - Id = cardCell.setting.primaryId || '' - } else { - Id = data[cards.setting.primaryKey] || '' - } - let con = '?' if (/\?/ig.test(url)) { @@ -256,6 +249,17 @@ } url = url + `${con}id=${Id}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}` + } else if (/@/.test(url)) { + url = url.replace(/@id@/ig, Id) + url = url.replace(/@appkey@/ig, window.GLOB.appkey) + url = url.replace(/@userid@/ig, sessionStorage.getItem('UserID')) + url = url.replace(/@LoginUID@/ig, sessionStorage.getItem('LoginUID')) + + Object.keys(data).forEach(key => { + if (/^\$/.test(key)) return + let reg = new RegExp('@' + key + '@', 'ig') + url = url.replace(reg, data[key]) + }) } window.open(url) @@ -1156,12 +1160,14 @@ } let MkButton = null + let lid = (data.$$uuid || '') + (data.$Index || '') if (['exec', 'prompt', 'pop', 'form'].includes(card.OpenType)) { MkButton = <NormalButton btn={card} name={name} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1172,6 +1178,7 @@ MkButton = <ExcelInButton btn={card} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1181,6 +1188,7 @@ MkButton = <ExcelOutButton btn={card} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1191,6 +1199,7 @@ btn={card} name={name} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1201,6 +1210,7 @@ btn={card} name={name} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} selectedData={_data} @@ -1210,6 +1220,7 @@ btn={card} name={name} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} selectedData={_data} @@ -1219,6 +1230,7 @@ MkButton = <ChangeUserButton btn={card} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1228,6 +1240,7 @@ MkButton = <PrintButton btn={card} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1238,6 +1251,7 @@ MkButton = <FuncMegvii btn={card} BID={data.$$BID} + LID={lid} disabled={_disabled} setting={cards.setting} selectedData={_data} @@ -1246,6 +1260,7 @@ MkButton = <FuncZip btn={card} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1254,12 +1269,7 @@ } else if (card.funcType === 'expPdf') { MkButton = <ExportPdf btn={card} - /> - } else if (card.funcType === 'shareLink') { - MkButton = <ShareLink - BID={data.$$BID} - btn={card} - selectedData={_data} + LID={lid} /> } else if (card.funcType === 'addline' || card.funcType === 'delline') { MkButton = <EditLine @@ -1267,6 +1277,14 @@ disabled={_disabled} selectedData={_data} /> + } else { + MkButton = <FuncButton + BID={data.$$BID} + disabled={_disabled} + LID={lid} + btn={card} + selectedData={_data} + /> } } -- Gitblit v1.8.0