diff --git a/core/core-backend/src/main/java/io/dataease/share/manage/XpackShareManage.java b/core/core-backend/src/main/java/io/dataease/share/manage/XpackShareManage.java index 1a8974802c..5a0584d040 100644 --- a/core/core-backend/src/main/java/io/dataease/share/manage/XpackShareManage.java +++ b/core/core-backend/src/main/java/io/dataease/share/manage/XpackShareManage.java @@ -174,7 +174,7 @@ public class XpackShareManage { return pos.stream().map(po -> new XpackShareGridVO( po.getShareId(), po.getResourceId(), po.getName(), po.getCreator().toString(), - po.getTime(), po.getExp(), 9,po.getExtFlag())).toList(); + po.getTime(), po.getExp(), 9,po.getExtFlag(),po.getType())).toList(); } private XpackShareManage proxy() { diff --git a/core/core-frontend/src/style/index.less b/core/core-frontend/src/style/index.less index a3e1165209..82cb97a7c9 100644 --- a/core/core-frontend/src/style/index.less +++ b/core/core-frontend/src/style/index.less @@ -376,7 +376,7 @@ em { } .color-dataV { - background: rgb(0, 214, 185); + background: rgb(0, 214, 185)!important; } .color-dataset { diff --git a/core/core-frontend/src/views/share/share/ShareGrid.vue b/core/core-frontend/src/views/share/share/ShareGrid.vue index f690c810c9..3140d06983 100644 --- a/core/core-frontend/src/views/share/share/ShareGrid.vue +++ b/core/core-frontend/src/views/share/share/ShareGrid.vue @@ -105,6 +105,29 @@ const getEmptyDesc = (): string => { return '' } + +const handleCellClick = row => { + if (row) { + const sourceId = row.resourceId + if (['dashboard', 'panel'].includes(row.type)) { + window.open('#/panel/index?dvId=' + sourceId, '_self') + } else if (['dataV', 'screen'].includes(row.type)) { + window.open('#/screen/index?dvId=' + sourceId, '_self') + } + } +} + +const iconMap = { + panel: 'icon_dashboard_outlined', + panelMobile: 'dv-dashboard-spine-mobile', + dashboard: 'icon_dashboard_outlined', + dashboardMobile: 'dv-dashboard-spine-mobile', + screen: 'icon_operation-analysis_outlined', + dataV: 'icon_operation-analysis_outlined', + dataset: 'icon_app_outlined', + datasource: 'icon_database_outlined' +} + watch( () => props.activeName, () => { @@ -159,6 +182,7 @@ watch( @sort-change="sortChange" :empty-desc="emptyDesc" :empty-img="imgType" + @cell-click="handleCellClick" class="workbranch-grid" > @@ -167,8 +191,8 @@ watch( - - + + diff --git a/core/core-frontend/src/views/workbranch/ShortcutTable.vue b/core/core-frontend/src/views/workbranch/ShortcutTable.vue index 6c3dc68b8a..512d748c8a 100644 --- a/core/core-frontend/src/views/workbranch/ShortcutTable.vue +++ b/core/core-frontend/src/views/workbranch/ShortcutTable.vue @@ -163,24 +163,25 @@ const sortChange = param => { const handleCellClick = row => { if (row) { + const sourceId = activeName.value === 'recent' ? row.id : row.resourceId if (['dashboard', 'panel'].includes(row.type)) { - window.open('#/panel/index?dvId=' + row.id, '_self') + window.open('#/panel/index?dvId=' + sourceId, '_self') } else if (['dataV', 'screen'].includes(row.type)) { - window.open('#/screen/index?dvId=' + row.id, '_self') + window.open('#/screen/index?dvId=' + sourceId, '_self') } else if (['dataset'].includes(row.type)) { const routeName = embeddedStore.getToken && appStore.getIsIframe ? 'dataset-embedded' : 'dataset' push({ name: routeName, params: { - id: row.id + id: sourceId } }) } else if (['datasource'].includes(row.type)) { push({ name: 'datasource', params: { - id: row.id + id: sourceId } }) } diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/vo/XpackShareGridVO.java b/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/vo/XpackShareGridVO.java index 55b37a69b1..4bc9f9d905 100644 --- a/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/vo/XpackShareGridVO.java +++ b/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/vo/XpackShareGridVO.java @@ -38,4 +38,7 @@ public class XpackShareGridVO implements Serializable { private Integer extFlag; + @Schema(description = "类型") + private String type; + }