From 26de84817be400897d467931a7eb09ba29c0a0cc Mon Sep 17 00:00:00 2001 From: limengnan <420004014@qq.com> Date: Wed, 20 May 2026 10:49:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AE=A1=E7=AE=97=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E5=9B=BE=E5=BD=A2=E5=8C=96=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/src/components/antvx6/index.vue | 4 +- .../src/components/antvx6/tableModel.vue | 4 -- .../frontend/src/components/antvx6/viewx6.vue | 41 ++++++------------- 3 files changed, 14 insertions(+), 35 deletions(-) diff --git a/business-css/frontend/src/components/antvx6/index.vue b/business-css/frontend/src/components/antvx6/index.vue index fd9fd42..0f9d374 100644 --- a/business-css/frontend/src/components/antvx6/index.vue +++ b/business-css/frontend/src/components/antvx6/index.vue @@ -211,7 +211,6 @@ onMounted(() => { rowHeight: 100, }, getDragNode: (sourceNode:any) => { - console.log('1111') let node:any = sourceNode if (node.data && node.data.lineStyle) { // 应用管线样式到连接线 @@ -342,12 +341,11 @@ onMounted(() => { if(node.store.data.attrs.text.text == '圆柱槽'){ deviceTypetype.value = 'CylindricalTank' node.size(110, 140) - const width = node.size().width node.attr('image/xlink:href', '/assets/11.png') node.attr('image/width', 105) node.attr('image/height', 135) node.attr('label/refY', 140) - node.attr('label/refX', width/2) + node.attr('label/refX', 0.5) node.attr('label/textAnchor', 'middle') }else if(node.store.data.attrs.text.text == '扁平槽'){ deviceTypetype.value = 'FlatTank' diff --git a/business-css/frontend/src/components/antvx6/tableModel.vue b/business-css/frontend/src/components/antvx6/tableModel.vue index 1c27366..c2c2e19 100644 --- a/business-css/frontend/src/components/antvx6/tableModel.vue +++ b/business-css/frontend/src/components/antvx6/tableModel.vue @@ -128,10 +128,6 @@ function exportExportsClick(){ {{ scope.row[item.key] }} - diff --git a/business-css/frontend/src/components/antvx6/viewx6.vue b/business-css/frontend/src/components/antvx6/viewx6.vue index 47cebeb..74f01aa 100644 --- a/business-css/frontend/src/components/antvx6/viewx6.vue +++ b/business-css/frontend/src/components/antvx6/viewx6.vue @@ -135,8 +135,10 @@ function getScenarioResults(){ } sliderIndex.value = customImageData.value[i].scenarioResults.length - 1 selecteTime.value = customImageData.value[i].scenarioResults[sliderIndex.value].step - sliderValues.value = tempSliderValues - addAttrText(customImageData.value[i],sliderIndex.value,selectedData.value) + sliderValues.value = tempSliderValues + addAttrText(customImageData.value[i],sliderIndex.value,selectedData.value) + + } } } @@ -149,7 +151,7 @@ function addAttrText(item:any,index:any,useData:any){ graph.addNode({ shape: 'rect-text', x: item.position.x , - y: item.position.y + 160, + y: item.position.y + item.attrs.label.refY + 20, width: 100, height: 30, attrs: { @@ -170,7 +172,7 @@ function addAttrText(item:any,index:any,useData:any){ graph.addNode({ shape: 'image-node', x: item.position.x + 135 , - y: item.position.y + 166, + y: item.position.y + item.attrs.label.refY + 26, width: 14, height: 14, correlationId: item.id, @@ -190,7 +192,7 @@ function addAttrText(item:any,index:any,useData:any){ graph.addNode({ shape: 'image-node', x: item.position.x + 110 , - y: item.position.y + 166, + y: item.position.y + item.attrs.label.refY + 26, width: 14, height: 14, correlationId: item.id, @@ -199,8 +201,8 @@ function addAttrText(item:any,index:any,useData:any){ attrs: { img: { width: 14, - height: 14, - 'xlink:href': textimg, + height: 14, + 'xlink:href': textimg, }, label: { text: '', @@ -239,7 +241,7 @@ const result = [...deviceResult,...materialResult] graph.addNode({ shape: 'rect-text', x: item.position.x, - y: item.position.y + 183 + i * 25, + y: item.position.y + item.attrs.label.refY + 44 + i * 25, width: 260, height: 30, // label: data[i].name + ':' + data[i].value, @@ -493,9 +495,9 @@ onMounted(() => { refY: 0, }, label: { - refX: 45, + refX: 0.5, refY: 80, - textAnchor: 'start', + textAnchor: 'middle', textVerticalAnchor: 'top', fontSize: 14, fill: '#000', @@ -882,12 +884,6 @@ function dialogAttributeDialog(){ // 关闭变动设置弹窗
-
显示设置
@@ -940,18 +936,7 @@ function dialogAttributeDialog(){ // 关闭变动设置弹窗 -
- - +