From 7b44b73244c5ab3524807b9f926dff4765272f58 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Mon, 29 Apr 2024 16:29:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E9=9B=86):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E9=87=8D=E5=91=BD=E5=90=8D=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?SQL=EF=BC=8C=E5=91=BD=E9=95=BF=E8=BE=83=E9=95=BF=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=AD=97=E6=AE=B5=E9=80=89=E6=8B=A9=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=20SQL=20=E5=90=8D=E7=A7=B0=E6=98=BE=E7=A4=BA=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/common/DeResourceTree.vue | 55 +++++++++---------- .../data/dataset/form/DatasetUnion.vue | 6 +- 2 files changed, 30 insertions(+), 31 deletions(-) diff --git a/core/core-frontend/src/views/common/DeResourceTree.vue b/core/core-frontend/src/views/common/DeResourceTree.vue index 21e35b971e..2f85eb4625 100644 --- a/core/core-frontend/src/views/common/DeResourceTree.vue +++ b/core/core-frontend/src/views/common/DeResourceTree.vue @@ -117,22 +117,15 @@ const resourceTypeList = computed(() => { label: '使用模板新建', svgName: 'dv-use-template', command: 'newFromTemplate' + }, + { + label: '新建文件夹', + divided: true, + svgName: 'dv-folder', + command: 'newFolder' } ] - - const del = { - label: '新建文件夹', - divided: true, - svgName: 'dv-folder', - command: 'newFolder' - } - - if (isDataEaseBi.value) { - del.divided = false - return [del] - } - - return [...list, del] + return list }) const menuList = computed(() => { @@ -152,10 +145,7 @@ const menuList = computed(() => { command: 'delete', svgName: 'dv-delete', divided: true - } - ] - - const edit = [ + }, { label: '编辑', command: 'edit', @@ -167,12 +157,7 @@ const menuList = computed(() => { svgName: 'dv-copy-dark' } ] - - if (isDataEaseBi.value) { - return list - } - - return [...list, ...edit] + return list }) const dvId = embeddedStore.dvId || router.currentRoute.value.query.dvId @@ -298,7 +283,11 @@ const operation = (cmd: string, data: BusiTreeNode, nodeType: string) => { curCanvasType.value === 'dataV' ? `#/dvCanvas?opt=copy&pid=${params.pid}&dvId=${data.data}` : `#/dashboard?opt=copy&pid=${params.pid}&resourceId=${data.data}` - const newWindow = window.open(baseUrl, '_blank') + let embeddedBaseUrl = '' + if (isDataEaseBi.value) { + embeddedBaseUrl = embeddedStore.baseUrl + } + const newWindow = window.open(embeddedBaseUrl + baseUrl, '_blank') initOpenHandler(newWindow) }) } else { @@ -345,7 +334,11 @@ function createNewObject() { const resourceEdit = resourceId => { const baseUrl = curCanvasType.value === 'dataV' ? '#/dvCanvas?dvId=' : '#/dashboard?resourceId=' - const newWindow = window.open(baseUrl + resourceId, '_blank') + let embeddedBaseUrl = '' + if (isDataEaseBi.value) { + embeddedBaseUrl = embeddedStore.baseUrl + } + const newWindow = window.open(embeddedBaseUrl + baseUrl + resourceId, '_blank') initOpenHandler(newWindow) } @@ -361,10 +354,14 @@ const resourceCreateFinish = templateData => { ? '#/dvCanvas?opt=create&createType=template' : '#/dashboard?opt=create&createType=template' let newWindow = null + let embeddedBaseUrl = '' + if (isDataEaseBi.value) { + embeddedBaseUrl = embeddedStore.baseUrl + } if (state.templateCreatePid) { - newWindow = window.open(baseUrl + `&pid=${state.templateCreatePid}`, '_blank') + newWindow = window.open(embeddedBaseUrl + baseUrl + `&pid=${state.templateCreatePid}`, '_blank') } else { - newWindow = window.open(baseUrl, '_blank') + newWindow = window.open(embeddedBaseUrl + baseUrl, '_blank') } initOpenHandler(newWindow) } @@ -580,7 +577,7 @@ defineExpose({ > diff --git a/core/core-frontend/src/views/visualized/data/dataset/form/DatasetUnion.vue b/core/core-frontend/src/views/visualized/data/dataset/form/DatasetUnion.vue index 7e542ba35c..52334cb225 100644 --- a/core/core-frontend/src/views/visualized/data/dataset/form/DatasetUnion.vue +++ b/core/core-frontend/src/views/visualized/data/dataset/form/DatasetUnion.vue @@ -1030,8 +1030,8 @@ const emits = defineEmits(['addComplete', 'joinEditor', 'updateAllfields', 'chan >