From 04e655ad393717e0071cc2d9c1e42b1d8c2cb508 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 12 Mar 2025 19:37:16 +0800 Subject: [PATCH 1/6] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF=E3=80=81?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F=E5=9B=BE=E8=A1=A8=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E6=97=A0=E6=B3=95=E9=80=89=E6=8B=A9tab=E9=A1=B5?= =?UTF-8?q?=E5=86=85=E7=9A=84=E8=BF=87=E6=BB=A4=E6=9D=A1=E4=BB=B6=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20#15203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/chart/components/views/index.vue | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/views/index.vue b/core/core-frontend/src/views/chart/components/views/index.vue index b78f653caf..f8e411fa56 100644 --- a/core/core-frontend/src/views/chart/components/views/index.vue +++ b/core/core-frontend/src/views/chart/components/views/index.vue @@ -450,6 +450,9 @@ const jumpClick = param => { if (isDataEaseBi.value) { embeddedBaseUrl = embeddedStore.baseUrl } + const jumpInfoParam = `&jumpInfoParam=${encodeURIComponent( + Base64.encode(JSON.stringify(param)) + )}` // 内部仪表板跳转 if (jumpInfo.linkType === 'inner') { if (jumpInfo.targetDvId) { @@ -485,13 +488,11 @@ const jumpClick = param => { if (publicLinkStatus.value) { // 判断是否有公共链接ID if (jumpInfo.publicJumpId) { - let url = `${embeddedBaseUrl}#/de-link/${ - jumpInfo.publicJumpId - }?fromLink=true&ignoreParams=true&jumpInfoParam=${encodeURIComponent( - Base64.encode(JSON.stringify(param)) - )}` + let url = `${embeddedBaseUrl}#/de-link/${jumpInfo.publicJumpId}?fromLink=true` if (attachParamsInfo) { - url = url + attachParamsInfo + url = url + attachParamsInfo + jumpInfoParam + } else { + url = url + '&ignoreParams=true' + attachParamsInfo + jumpInfoParam } const currentUrl = window.location.href localStorage.setItem('beforeJumpUrl', currentUrl) @@ -500,13 +501,11 @@ const jumpClick = param => { ElMessage.warning(t('visualization.public_link_tips')) } } else { - let url = `${embeddedBaseUrl}#/preview?dvId=${ - jumpInfo.targetDvId - }&fromLink=true&ignoreParams=true&jumpInfoParam=${encodeURIComponent( - Base64.encode(JSON.stringify(param)) - )}` + let url = `${embeddedBaseUrl}#/preview?dvId=${jumpInfo.targetDvId}&fromLink=true` if (attachParamsInfo) { - url = url + attachParamsInfo + url = url + attachParamsInfo + jumpInfoParam + } else { + url = url + '&ignoreParams=true' + attachParamsInfo + jumpInfoParam } const currentUrl = window.location.href localStorage.setItem('beforeJumpUrl', currentUrl) From c3b95304b748695422608b974e70c29681e3e4b8 Mon Sep 17 00:00:00 2001 From: wisonic-s <51065359+wisonic-s@users.noreply.github.com> Date: Wed, 12 Mar 2025 20:22:03 +0800 Subject: [PATCH 2/6] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E8=A1=A8=E5=A4=B4=E6=8E=92=E5=BA=8F=E5=A4=B1?= =?UTF-8?q?=E6=95=88=20(#15331)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/components/js/panel/types/impl/s2.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-frontend/src/views/chart/components/js/panel/types/impl/s2.ts b/core/core-frontend/src/views/chart/components/js/panel/types/impl/s2.ts index 428cb39093..b7da8c2279 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/types/impl/s2.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/types/impl/s2.ts @@ -144,7 +144,7 @@ export abstract class S2ChartView

extends AntVAbstractCha ] const shape = s2Instance.container.getShape(relativePosition[0], relativePosition[1]) // 图片单元格,表头排序图标点击放大图片 - if (['GuiIcon2', 'ImageCell'].includes(shape.cfg?.parent.constructor.name)) { + if (shape.cfg?.type === 'image') { return } const callback = () => { From 6438399f33ecbaf45279f8e5ab1a867f24f8b3f9 Mon Sep 17 00:00:00 2001 From: wisonic-s <51065359+wisonic-s@users.noreply.github.com> Date: Wed, 12 Mar 2025 20:45:48 +0800 Subject: [PATCH 3/6] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=B1=87=E6=80=BB=E8=A1=A8=E5=BA=8F=E5=88=97=E5=8F=B7?= =?UTF-8?q?=E6=96=91=E9=A9=AC=E7=BA=B9=E6=97=A0=E6=95=88=20(#15332)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/components/js/panel/charts/table/table-normal.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-normal.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-normal.ts index 3a8bf91d34..d7c5ff2138 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-normal.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-normal.ts @@ -16,6 +16,7 @@ import { S2Options, ScrollbarPositionType, TableColCell, + TableDataCell, TableSheet, ViewMeta } from '@antv/s2' @@ -172,6 +173,9 @@ export class TableNormal extends S2ChartView { col.value = indexLabel } } + s2Options.dataCell = meta => { + return new TableDataCell(meta, meta.spreadsheet) + } } // tooltip this.configTooltip(chart, s2Options) From e6a8d0e24172f7f643eaa5cb9754f8474ab26e51 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 12 Mar 2025 23:53:58 +0800 Subject: [PATCH 4/6] =?UTF-8?q?refactor(=E4=BB=AA=E8=A1=A8=E6=9D=BF?= =?UTF-8?q?=E3=80=81=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E8=B7=B3=E8=BD=AC=E9=93=BE=E6=8E=A5url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/views/chart/components/views/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/views/index.vue b/core/core-frontend/src/views/chart/components/views/index.vue index f8e411fa56..eac3a70154 100644 --- a/core/core-frontend/src/views/chart/components/views/index.vue +++ b/core/core-frontend/src/views/chart/components/views/index.vue @@ -492,7 +492,7 @@ const jumpClick = param => { if (attachParamsInfo) { url = url + attachParamsInfo + jumpInfoParam } else { - url = url + '&ignoreParams=true' + attachParamsInfo + jumpInfoParam + url = url + '&ignoreParams=true' + jumpInfoParam } const currentUrl = window.location.href localStorage.setItem('beforeJumpUrl', currentUrl) @@ -505,7 +505,7 @@ const jumpClick = param => { if (attachParamsInfo) { url = url + attachParamsInfo + jumpInfoParam } else { - url = url + '&ignoreParams=true' + attachParamsInfo + jumpInfoParam + url = url + '&ignoreParams=true' + jumpInfoParam } const currentUrl = window.location.href localStorage.setItem('beforeJumpUrl', currentUrl) From df0252952fa8b064a2fc5295d1d79bb117b9b1aa Mon Sep 17 00:00:00 2001 From: taojinlong Date: Thu, 13 Mar 2025 00:35:56 +0800 Subject: [PATCH 5/6] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=20ftp=20?= =?UTF-8?q?=E4=B8=AD=E6=96=87=E5=90=8D=E7=A7=B0=E7=9A=84=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=A4=B1=E8=B4=A5=20(#15335)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: taojinlong --- .../datasource/provider/ExcelUtils.java | 36 +++++++++++++------ 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/core/core-backend/src/main/java/io/dataease/datasource/provider/ExcelUtils.java b/core/core-backend/src/main/java/io/dataease/datasource/provider/ExcelUtils.java index 6f1a43facf..6015cd38ec 100644 --- a/core/core-backend/src/main/java/io/dataease/datasource/provider/ExcelUtils.java +++ b/core/core-backend/src/main/java/io/dataease/datasource/provider/ExcelUtils.java @@ -30,6 +30,8 @@ import org.springframework.util.CollectionUtils; import org.springframework.web.multipart.MultipartFile; import java.io.*; +import java.net.URL; +import java.net.URLConnection; import java.nio.charset.StandardCharsets; import java.util.*; import java.util.regex.Matcher; @@ -761,6 +763,12 @@ public class ExcelUtils { DEException.throwException(Translator.get("i18n_invalid_address")); } } + if(StringUtils.isNotEmpty(remoteExcelRequest.getUserName())){ + username = remoteExcelRequest.getUserName(); + } + if(StringUtils.isNotEmpty(remoteExcelRequest.getPasswd())){ + password = remoteExcelRequest.getPasswd(); + } filePath = filePath.startsWith("/") ? filePath.substring(1) : filePath; String suffix = filePath.substring(filePath.lastIndexOf(".") + 1); if (!Arrays.asList("csv", "xlsx", "xls").contains(suffix)) { @@ -772,20 +780,26 @@ public class ExcelUtils { fileNames.put("tranName", tranName); try { - String command = "curl -o " + localFilePath; // 在Unix/Linux系统中 - if (StringUtils.isNotEmpty(remoteExcelRequest.getUserName()) && StringUtils.isNotEmpty(remoteExcelRequest.getPasswd())) { - command = command + " -u " + remoteExcelRequest.getUserName() + ":" + remoteExcelRequest.getPasswd(); + URL url; + if(StringUtils.isNotEmpty(username) && StringUtils.isNotEmpty(password)){ + url= new URL("ftp://" + username + ":" +password + "@" + serverAddress + "/" + filePath); + }else { + url= new URL("ftp://" + serverAddress + "/" + filePath); } - command = command + " " + remoteExcelRequest.getUrl(); - Process process = Runtime.getRuntime().exec(command); - int exitValue = process.waitFor(); - if (exitValue != 0) { - DEException.throwException(Translator.get("i18n_file_download_failed")); + + URLConnection conn = url.openConnection(); + InputStream inputStream = conn.getInputStream(); + FileOutputStream outputStream = new FileOutputStream(localFilePath); + byte[] buffer = new byte[4096]; + int bytesRead; + while ((bytesRead = inputStream.read(buffer)) != -1) { + outputStream.write(buffer, 0, bytesRead); } + inputStream.close(); + outputStream.close(); + } catch (IOException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - throw new RuntimeException(e); + DEException.throwException(Translator.get("i18n_file_download_failed")); } return fileNames; } From 7aaa2c5c8edb30dbc9eb532d08e06f76c8e97fa5 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Thu, 13 Mar 2025 00:57:01 +0800 Subject: [PATCH 6/6] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E6=95=B0=E6=8D=AE=E6=BA=90-=E8=BF=9C=E7=A8=8Bexcel/CS?= =?UTF-8?q?V-=E5=A1=AB=E5=86=99=E4=BF=A1=E6=81=AF=E6=AD=A3=E7=A1=AE-?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=A0=A1=E9=AA=8C=E6=8F=90=E7=A4=BA=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E6=88=90=E5=8A=9F=E4=BD=86=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/visualized/data/datasource/form/index.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/views/visualized/data/datasource/form/index.vue b/core/core-frontend/src/views/visualized/data/datasource/form/index.vue index 73ac6017ce..1b38056be1 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/form/index.vue +++ b/core/core-frontend/src/views/visualized/data/datasource/form/index.vue @@ -402,7 +402,16 @@ const doValidateDs = request => { excelRequest.userName = Base64.encode(request.userName) excelRequest.passwd = Base64.encode(request.passwd) return loadRemoteFile(excelRequest) - .then(() => { + .then(res => { + dsLoading.value = false + if (!res) { + ElMessage.warning(res.msg) + return + } + if (res?.code !== 0) { + ElMessage.warning(res.msg) + return + } ElMessage.success(t('datasource.validate_success')) dsLoading.value = false })