From 8a6ce370f1aa1c061b76fa3e9d2d4d1df53ca4c5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 21 五月 2024 16:38:09 +0800 Subject: [PATCH] Merge branch 'master' into positec --- 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 0926a50..d0eb21a 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 @@ -239,15 +234,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)) { @@ -255,6 +248,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) @@ -1155,12 +1159,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} @@ -1171,6 +1177,7 @@ MkButton = <ExcelInButton btn={card} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1180,6 +1187,7 @@ MkButton = <ExcelOutButton btn={card} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1190,6 +1198,7 @@ btn={card} name={name} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1200,6 +1209,7 @@ btn={card} name={name} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} selectedData={_data} @@ -1209,6 +1219,7 @@ btn={card} name={name} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} selectedData={_data} @@ -1218,6 +1229,7 @@ MkButton = <ChangeUserButton btn={card} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1227,6 +1239,7 @@ MkButton = <PrintButton btn={card} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1237,6 +1250,7 @@ MkButton = <FuncMegvii btn={card} BID={data.$$BID} + LID={lid} disabled={_disabled} setting={cards.setting} selectedData={_data} @@ -1245,6 +1259,7 @@ MkButton = <FuncZip btn={card} BID={data.$$BID} + LID={lid} BData={data.$$BData || ''} disabled={_disabled} setting={cards.setting} @@ -1253,12 +1268,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 @@ -1266,6 +1276,14 @@ disabled={_disabled} selectedData={_data} /> + } else { + MkButton = <FuncButton + BID={data.$$BID} + disabled={_disabled} + LID={lid} + btn={card} + selectedData={_data} + /> } } -- Gitblit v1.8.0