diff --git a/nezha-fronted/src/components/charts/diagram-chart.vue b/nezha-fronted/src/components/charts/diagram-chart.vue index 9dc2a2915..0b3f6e953 100644 --- a/nezha-fronted/src/components/charts/diagram-chart.vue +++ b/nezha-fronted/src/components/charts/diagram-chart.vue @@ -41,7 +41,7 @@
- +
@@ -59,7 +59,7 @@ - + diff --git a/nezha-fronted/src/components/common/ChartDiagram/diagram.vue b/nezha-fronted/src/components/common/ChartDiagram/diagram.vue index 40e4f2be3..fc1021cfc 100644 --- a/nezha-fronted/src/components/common/ChartDiagram/diagram.vue +++ b/nezha-fronted/src/components/common/ChartDiagram/diagram.vue @@ -320,8 +320,8 @@ import { imageTemp, myShape, myAnchors, - myIconRect, - myTextRect, + myIconRect2, + myTextRect2, onChangeAnimate, onChangeAnimateLine, myCubec, @@ -340,7 +340,7 @@ import { getMetricTypeValue } from '../js/tools' import bus from '../../../libs/bus' import CanvasContextMenu from '@/components/common/project/L5/CanvasContextMenu' // 注册到画布 -registerNode('rectangleImg', myShape, myAnchors, myIconRect, myTextRect) +registerNode('rectangleImg', myShape, myAnchors, myIconRect2, null) registerNode('myCube', myCubec, myCubeAnchors, null, null) const canvasOptions = { @@ -506,6 +506,7 @@ export default { }, topoData: {}, + chartInfo: {}, fromChartBox: { type: Boolean, default: false @@ -636,8 +637,11 @@ export default { }) getTopology(this.topologyIndex).resize() getTopology(this.topologyIndex).centerView() - if (this.fromChartBox || this.fromChart) { + if (this.fromChartBox || this.fromChart) { // 是否来自panel 和 chartBox getTopology(this.topologyIndex).fitView(20) + if (this.chartInfo && this.chartInfo.param && this.chartInfo.param.lock) { // 判断节点 以及画布 是否可以拖动 + getTopology(this.topologyIndex).lock(2) + } } this.penToolTipScale = getTopology(this.topologyIndex).data.scale setTimeout(() => { diff --git a/nezha-fronted/src/components/common/project/L5/CanvasProps.vue b/nezha-fronted/src/components/common/project/L5/CanvasProps.vue index 0c43f6cc0..6c6d424f5 100644 --- a/nezha-fronted/src/components/common/project/L5/CanvasProps.vue +++ b/nezha-fronted/src/components/common/project/L5/CanvasProps.vue @@ -50,121 +50,123 @@ - - - - +
+ + + + + - -
-
- - {{$t('project.topology.level')}} - +
+
+ + {{$t('project.topology.level')}} + - - {{$t('project.topology.color')}} - {{$t('project.topology.value')}} - {{$t('project.topology.animation')}} - - + + {{$t('project.topology.color')}} + {{$t('project.topology.value')}} + {{$t('project.topology.animation')}} + + - - + + {{index===0?selection.pen.data.valueMapping.length-1:(item.level-1)}} - + {{item.level}} - - + +
- base -
- - - - - base - - - - - - - - - - - - - - base - - - - - -
+ base +
+ + + + + base + + + + + + + + + + + + + + base + + + + + +
+
+
+
+
-
-
-
@@ -180,7 +182,7 @@ -
+
diff --git a/nezha-fronted/src/components/common/project/L5/services/canvas.js b/nezha-fronted/src/components/common/project/L5/services/canvas.js index 6918097ac..4ea13a410 100644 --- a/nezha-fronted/src/components/common/project/L5/services/canvas.js +++ b/nezha-fronted/src/components/common/project/L5/services/canvas.js @@ -247,6 +247,19 @@ export function myTextRect (node) { ) node.fullTextRect = node.rect } +export function myIconRect2 (node) { + node.iconRect = new Rect(node.rect.x + node.paddingLeft, node.rect.y + node.paddingTop, node.rect.width - (node.paddingLeft + node.paddingRight), node.rect.height - (node.paddingTop + node.paddingBottom)) + node.fullIconRect = node.rect +} +export function myTextRect2 (node) { + node.textRect = new Rect( + node.rect.x + node.paddingLeft, + node.rect.y + node.rect.height - 20 - node.paddingBottom, + 0, + 0 + ) + node.fullTextRect = node.rect +} /* 自定义图片组件 */ /* 自定义立方体 */