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 @@