From 830a5b146495ea7970dc4ceb4793c919320c95fa Mon Sep 17 00:00:00 2001 From: taojinlong Date: Mon, 8 Jul 2024 15:27:02 +0800 Subject: [PATCH 1/7] =?UTF-8?q?fix:=20=E8=A1=8C=E6=9D=83=E9=99=90=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E5=8F=98=E9=87=8F=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataease/dataset/manage/PermissionManage.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/core/core-backend/src/main/java/io/dataease/dataset/manage/PermissionManage.java b/core/core-backend/src/main/java/io/dataease/dataset/manage/PermissionManage.java index 0477ea743e..78a7019ece 100644 --- a/core/core-backend/src/main/java/io/dataease/dataset/manage/PermissionManage.java +++ b/core/core-backend/src/main/java/io/dataease/dataset/manage/PermissionManage.java @@ -195,15 +195,22 @@ public class PermissionManage { DatasetRowPermissionsTreeObj tree = JsonUtil.parseObject(record.getExpressionTree(), DatasetRowPermissionsTreeObj.class); List items = new ArrayList<>(); for (DatasetRowPermissionsTreeItem datasetRowPermissionsTreeItem : tree.getItems()) { - if (StringUtils.isNotEmpty(userEntity.getAccount()) && datasetRowPermissionsTreeItem.getValue().equalsIgnoreCase("\\$\\{sysParams\\.userId}")) { + if (StringUtils.isNotEmpty(userEntity.getAccount()) && datasetRowPermissionsTreeItem.getValue().equalsIgnoreCase("${sysParams.userId}")) { datasetRowPermissionsTreeItem.setValue(userEntity.getAccount()); + items.add(datasetRowPermissionsTreeItem); + continue; } - if (StringUtils.isNotEmpty(userEntity.getEmail()) && datasetRowPermissionsTreeItem.getValue().equalsIgnoreCase("\\$\\{sysParams\\.userEmail}")) { + if (StringUtils.isNotEmpty(userEntity.getEmail()) && datasetRowPermissionsTreeItem.getValue().equalsIgnoreCase("${sysParams.userEmail}")) { datasetRowPermissionsTreeItem.setValue(userEntity.getEmail()); + items.add(datasetRowPermissionsTreeItem); + continue; } - if (StringUtils.isNotEmpty(userEntity.getName()) && datasetRowPermissionsTreeItem.getValue().equalsIgnoreCase("\\$\\{sysParams\\.userName}")) { + if (StringUtils.isNotEmpty(userEntity.getName()) && datasetRowPermissionsTreeItem.getValue().equalsIgnoreCase("${sysParams.userName}")) { datasetRowPermissionsTreeItem.setValue(userEntity.getName()); + items.add(datasetRowPermissionsTreeItem); + continue; } + String value = handleSysVariable(userEntity, datasetRowPermissionsTreeItem.getValue()); if (value == null) { continue; From ef2d3e4f3cc53c0bdd95cef8aec353f08bf550d3 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Mon, 8 Jul 2024 15:51:00 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix:=20=20=E5=B5=8C=E5=85=A5=E5=BC=8F?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=AF=BC=E5=87=BA=EF=BC=8C=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E8=87=B3=E6=9C=AC=E5=9C=B0=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E8=B5=B0=E6=95=B0=E6=8D=AE=E5=AF=BC=E5=87=BA=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/views/chart/components/js/util.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/js/util.ts b/core/core-frontend/src/views/chart/components/js/util.ts index 281397d5ac..222d2eba12 100644 --- a/core/core-frontend/src/views/chart/components/js/util.ts +++ b/core/core-frontend/src/views/chart/components/js/util.ts @@ -4,7 +4,7 @@ import { equalsAny, includesAny } from '../editor/util/StringUtils' import { FeatureCollection } from '@antv/l7plot/dist/esm/plots/choropleth/types' import { useMapStoreWithOut } from '@/store/modules/map' import { getGeoJson } from '@/api/map' -import { toRaw } from 'vue' +import { computed, toRaw } from 'vue' import { Options } from '@antv/g2plot/esm' import { PickOptions } from '@antv/g2plot/esm/core/plot' import { innerExportDetails } from '@/api/chart' @@ -12,6 +12,8 @@ import { ElMessage } from 'element-plus-secondary' import { useI18n } from '@/hooks/web/useI18n' import { useLinkStoreWithOut } from '@/store/modules/link' +const isDataEaseBi = computed(() => appStore.getIsDataEaseBi) + const { t } = useI18n() // 同时支持将hex和rgb,转换成rgba export function hexColorToRGBA(hex, alpha) { @@ -511,7 +513,7 @@ export const exportExcelDownload = (chart, callBack?) => { innerExportDetails(request) .then(res => { - if (linkStore.getLinkToken) { + if (linkStore.getLinkToken || isDataEaseBi.value) { const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }) const link = document.createElement('a') link.style.display = 'none' From 14d7cdaf7b23fb7e4307b3bcd1acb72149067c92 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Mon, 8 Jul 2024 17:31:25 +0800 Subject: [PATCH 3/7] =?UTF-8?q?fix:=20=E6=97=A0=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=9D=83=E9=99=90=E6=97=B6=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=A1=8C=E5=88=97=E6=9D=83=E9=99=90=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- de-xpack | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/de-xpack b/de-xpack index 6295001ace..9695ff5848 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit 6295001ace48d7ca800b42bab215c85a4cb4e4fa +Subproject commit 9695ff58484674dc2e1ba81d564224fc12dad9eb From 01c63652ef823ef47747abb48bf2bcb2d1ae980f Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 8 Jul 2024 18:09:50 +0800 Subject: [PATCH 4/7] =?UTF-8?q?feat(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):?= =?UTF-8?q?=20=E5=9B=BE=E7=89=87=E7=BB=84=E4=BB=B6=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=BB=91=E5=AE=9A=EF=BC=8C=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=BB=84=E4=BB=B6=E7=AD=89=E5=B9=B6=E7=94=B1?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E7=BB=84=E4=BB=B6=E7=82=B9=E5=87=BB=E5=BC=80?= =?UTF-8?q?=E5=90=AF=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-visualization/RealTimeTreeGather.vue | 11 ++++ .../canvas/ComponentWrapper.vue | 11 ++-- .../canvas/ContextMenuDetails.vue | 13 ++++- .../custom-component/common/CommonAttr.vue | 14 +++++ .../custom-component/common/CommonEvent.vue | 56 +++++++++++++++++++ .../src/custom-component/component-list.ts | 15 ++++- .../custom-component/picture/Component.vue | 13 ++++- .../store/modules/data-visualization/event.ts | 11 +++- core/core-frontend/src/utils/canvasUtils.ts | 7 +++ 9 files changed, 141 insertions(+), 10 deletions(-) create mode 100644 core/core-frontend/src/components/data-visualization/RealTimeTreeGather.vue create mode 100644 core/core-frontend/src/custom-component/common/CommonEvent.vue diff --git a/core/core-frontend/src/components/data-visualization/RealTimeTreeGather.vue b/core/core-frontend/src/components/data-visualization/RealTimeTreeGather.vue new file mode 100644 index 0000000000..0a8d203dd1 --- /dev/null +++ b/core/core-frontend/src/components/data-visualization/RealTimeTreeGather.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue index a7a7520bb3..c06fd71c1e 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue @@ -113,11 +113,12 @@ onMounted(() => { }) const onClick = () => { - const events = config.value.events - Object.keys(events).forEach(event => { - currentInstance.ctx[event](events[event]) - }) - eventBus.emit('v-click', config.value.id) + // do event click + // const events = config.value.events + // Object.keys(events).forEach(event => { + // currentInstance.ctx[event](events[event]) + // }) + // eventBus.emit('v-click', config.value.id) } const getComponentStyleDefault = style => { diff --git a/core/core-frontend/src/components/data-visualization/canvas/ContextMenuDetails.vue b/core/core-frontend/src/components/data-visualization/canvas/ContextMenuDetails.vue index 4f258f4683..4936baf5c3 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/ContextMenuDetails.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/ContextMenuDetails.vue @@ -80,7 +80,12 @@ const show = () => { layerStore.showComponent() menuOpt('show') } - +const categoryChange = type => { + if (curComponent.value) { + snapshotStore.recordSnapshotCache() + curComponent.value['category'] = type + } +} const rename = () => { emit('rename') menuOpt('rename') @@ -222,6 +227,12 @@ const editQueryCriteria = () => {
  • 隐藏
  • 取消隐藏
  • +
  • + 转为隐藏组件 +
  • +
  • + 转为基础组件 +
  • 锁定
  • 重命名
  • diff --git a/core/core-frontend/src/custom-component/common/CommonAttr.vue b/core/core-frontend/src/custom-component/common/CommonAttr.vue index 5ab4fd0063..6bad08932a 100644 --- a/core/core-frontend/src/custom-component/common/CommonAttr.vue +++ b/core/core-frontend/src/custom-component/common/CommonAttr.vue @@ -9,6 +9,7 @@ import { useI18n } from '@/hooks/web/useI18n' import elementResizeDetectorMaker from 'element-resize-detector' import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot' import CommonStyleSet from '@/custom-component/common/CommonStyleSet.vue' +import CommonEvent from '@/custom-component/common/CommonEvent.vue' const snapshotStore = snapshotStoreWithOut() const { t } = useI18n() @@ -87,6 +88,10 @@ const colorPickerWidth = computed(() => { } }) +const eventsShow = computed(() => { + return !dashboardActive.value && ['Picture'].includes(element.value.component) +}) + const backgroundCustomShow = computed(() => { return ( dashboardActive.value || @@ -149,6 +154,15 @@ const stopEvent = e => { :element="element" > + + + diff --git a/core/core-frontend/src/custom-component/common/CommonEvent.vue b/core/core-frontend/src/custom-component/common/CommonEvent.vue new file mode 100644 index 0000000000..1961804252 --- /dev/null +++ b/core/core-frontend/src/custom-component/common/CommonEvent.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/core/core-frontend/src/custom-component/component-list.ts b/core/core-frontend/src/custom-component/component-list.ts index 1bc0c1488a..5f39561fd0 100644 --- a/core/core-frontend/src/custom-component/component-list.ts +++ b/core/core-frontend/src/custom-component/component-list.ts @@ -8,6 +8,18 @@ export const commonStyle = { opacity: 1 } +export const BASE_EVENTS = { + checked: false, + type: 'displayChange', // openHidden jump + jump: { + value: null + }, + displayChange: { + value: true, // 事件当前值 false + target: 'all' + } +} + // 流媒体视频信息配置 export const STREAMMEDIALINKS = { videoType: 'flv', @@ -159,12 +171,13 @@ export const COMMON_COMPONENT_BACKGROUND_MAP = { export const commonAttr = { animations: [], canvasId: 'canvas-main', - events: {}, + events: BASE_EVENTS, groupStyle: {}, // 当一个组件成为 Group 的子组件时使用 isLock: false, // 是否锁定组件 maintainRadio: false, // 布局时保持宽高比例 aspectRatio: 1, // 锁定时的宽高比例 isShow: true, // 是否显示组件 + category: 'base', //组件类型 base 基础组件 hidden隐藏组件 // 当前组件动作 dragging: false, resizing: false, diff --git a/core/core-frontend/src/custom-component/picture/Component.vue b/core/core-frontend/src/custom-component/picture/Component.vue index cb1a13f241..293258deeb 100644 --- a/core/core-frontend/src/custom-component/picture/Component.vue +++ b/core/core-frontend/src/custom-component/picture/Component.vue @@ -1,5 +1,5 @@