diff --git a/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue b/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue index 279c7cb8f8..42940643b5 100644 --- a/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue +++ b/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue @@ -200,6 +200,15 @@ + + 显示辅助网格 + diff --git a/core/core-frontend/src/components/data-visualization/DeGrid.vue b/core/core-frontend/src/components/data-visualization/DeGrid.vue new file mode 100644 index 0000000000..b4673faddc --- /dev/null +++ b/core/core-frontend/src/components/data-visualization/DeGrid.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue index 8a929df9d0..fe1e1ad056 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue @@ -45,6 +45,7 @@ import DragInfo from '@/components/visualization/common/DragInfo.vue' import { activeWatermarkCheckUser } from '@/components/watermark/watermark' import PopArea from '@/custom-component/pop-area/Component.vue' import DatasetParamsComponent from '@/components/visualization/DatasetParamsComponent.vue' +import DeGrid from '@/components/data-visualization/DeGrid.vue' const snapshotStore = snapshotStoreWithOut() const dvMainStore = dvMainStoreWithOut() @@ -56,6 +57,10 @@ const { curComponent, dvInfo, editMode, tabMoveOutComponentId, canvasState } = const { editorMap, areaData } = storeToRefs(composeStore) const emits = defineEmits(['scrollCanvasToTop']) const props = defineProps({ + themes: { + type: String, + default: 'dark' + }, isEdit: { type: Boolean, default: true @@ -168,7 +173,6 @@ const props = defineProps({ default: true } }) -const userInfo = ref(null) const { baseWidth, @@ -187,7 +191,8 @@ const { canvasId, canvasStyleData, componentData, - canvasViewInfo + canvasViewInfo, + themes } = toRefs(props) const editorX = ref(0) @@ -275,6 +280,13 @@ const initWatermark = (waterDomId = 'editor-canvas-main') => { } } +const matrixStyle = computed(() => { + return { + width: baseWidth.value, + height: baseHeight.value + } +}) + const dragInfoShow = computed(() => { return ( dvInfo.value.type === 'dashboard' && @@ -1409,6 +1421,10 @@ const contextMenuShow = computed(() => { const markLineShow = computed(() => isMainCanvas(canvasId.value)) +const showGrid = computed(() => { + return Boolean(canvasStyleData.value.dashboard.showGrid) && isMainCanvas(canvasId.value) +}) + // 批量设置 const dataVBatchOptAdaptor = () => { @@ -1540,6 +1556,7 @@ defineExpose({ :show-position="'popEdit'" > +
显示弹窗区查询按钮 @@ -27,7 +27,7 @@ size="small" :effect="themes" v-model="canvasStyleData.suspensionButtonAvailable" - @change="onPopButtonChange" + @change="onThemeChange" >
显示放大、导出等悬浮按钮 @@ -42,6 +42,16 @@
+ + + 显示辅助网格 +
@@ -51,14 +61,14 @@ import icon_info_outlined from '@/assets/svg/icon_info_outlined.svg' import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot' import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' import { storeToRefs } from 'pinia' -import { ElIcon } from 'element-plus-secondary' +import { ElFormItem, ElIcon } from 'element-plus-secondary' import Icon from '../icon-custom/src/Icon.vue' const snapshotStore = snapshotStoreWithOut() const dvMainStore = dvMainStoreWithOut() const { canvasStyleData } = storeToRefs(dvMainStore) -const onPopButtonChange = () => { +const onThemeChange = () => { snapshotStore.recordSnapshotCache() } diff --git a/core/core-frontend/src/utils/canvasUtils.ts b/core/core-frontend/src/utils/canvasUtils.ts index 1e76287636..e01fff11d9 100644 --- a/core/core-frontend/src/utils/canvasUtils.ts +++ b/core/core-frontend/src/utils/canvasUtils.ts @@ -227,6 +227,8 @@ export function historyAdaptor( canvasVersion ) { //历史字段适配 + canvasStyleResult.dashboard['showGrid'] = canvasStyleResult.dashboard['showGrid'] || false + canvasStyleResult.dashboard['matrixBase'] = canvasStyleResult.dashboard['matrixBase'] || 4 canvasStyleResult.component['seniorStyleSetting'] = canvasStyleResult.component['seniorStyleSetting'] || deepCopy(SENIOR_STYLE_SETTING_LIGHT) canvasStyleResult['suspensionButtonAvailable'] = diff --git a/core/core-frontend/src/views/chart/components/editor/util/dataVisualization.ts b/core/core-frontend/src/views/chart/components/editor/util/dataVisualization.ts index 21a1dfaac2..69ab686328 100644 --- a/core/core-frontend/src/views/chart/components/editor/util/dataVisualization.ts +++ b/core/core-frontend/src/views/chart/components/editor/util/dataVisualization.ts @@ -61,6 +61,8 @@ export const MOBILE_SETTING_DARK = { export const DEFAULT_DASHBOARD_STYLE_BASE = { gap: 'yes', gapSize: 5, + showGrid: false, + matrixBase: 4, // 当前matrix的基数 (是pcMatrixCount的几倍) resultMode: 'all', // 图表结果显示模式 all 图表 custom 仪表板自定义 resultCount: 1000 // 图表结果显示条数 }