From 129afbc8dc3c5ac61cbdc1acf916c9d8fc18b8cd Mon Sep 17 00:00:00 2001 From: limengnan <420004014@qq.com> Date: Fri, 16 Jan 2026 10:12:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=86=E6=9E=90=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/src/assets/x6/navleft.png | Bin 0 -> 534 bytes .../frontend/src/assets/x6/navleft_active.png | Bin 0 -> 541 bytes .../frontend/src/assets/x6/navright.png | Bin 0 -> 723 bytes .../src/assets/x6/navright_active.png | Bin 0 -> 702 bytes .../src/components/antvx6/adddevice.vue | 518 ++++++++++++++++++ .../frontend/src/components/antvx6/index.vue | 54 +- .../views/business/database/device/index.vue | 107 ++++ 7 files changed, 677 insertions(+), 2 deletions(-) create mode 100644 business-css/frontend/src/assets/x6/navleft.png create mode 100644 business-css/frontend/src/assets/x6/navleft_active.png create mode 100644 business-css/frontend/src/assets/x6/navright.png create mode 100644 business-css/frontend/src/assets/x6/navright_active.png create mode 100644 business-css/frontend/src/components/antvx6/adddevice.vue diff --git a/business-css/frontend/src/assets/x6/navleft.png b/business-css/frontend/src/assets/x6/navleft.png new file mode 100644 index 0000000000000000000000000000000000000000..6270b712f42a9f70a47e8630980b5d0b8936b193 GIT binary patch literal 534 zcmV+x0_pvUP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0jo(wK~!i%?b@+U z0znW4U~gHHE6Cjy6c(6J_yCj?7L*iPNnxUi_#hU>!rC|R5h#5CJDV%)tw~6Zz*T4t zXV*Cr^bR|jN&YW^ow@eU?%uKl2W&o{9~)!t*X#8l2!ca?4F4mi&r4Ahk4cg|e?QvI z2gjkkQkl3O_J=0UO&rHh+}1Mwi)I=P2u+3u9(VG=kv@;GXKtIC&1M~LYn8!uc?1Eh zwI^KGDuV+-XzRM?Zsj-86y6258wgH;s-M6RoDO|=XUesQ;FS1zrbBQ_(0OjmrHA13=q#7Z0oMpl6Pk6K zs!#`&IcDo(S&B*8I`H)L9Eo}6h+bG Y3y{)mFSq51>i_@%07*qoM6N<$f|^6*(*OVf literal 0 HcmV?d00001 diff --git a/business-css/frontend/src/assets/x6/navleft_active.png b/business-css/frontend/src/assets/x6/navleft_active.png new file mode 100644 index 0000000000000000000000000000000000000000..7ff35502de56f06f0422a226a111a98cefb896a6 GIT binary patch literal 541 zcmV+&0^Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0kTO%K~!i%?b|;~ zLSYog@$5*p9e8Jbcm`TDhQ(Go8cj;xSagx+@%q8If z)MYYW0BA#(xg?zNiwn1}%Ul-DL+;Ym{p)mT;XLFnUBxJ(T^%!7IA1Xx>ME0k^A*r) z_PM3gFBZ;c%(+LMh4b6N<^>mZJ;lO#%-y6^-rl*Z;}i?$xd_=eDHhIuTPtT=(e;Fd z^BxxYi}!Sxuy6s$dIV0Vb4LdY7ZU#Q z2+YC-gh9J&$6QL+7A_zlls*^6-_u2|p#6q2Akfn#+y$@BL@%;yf{-MyvgG#u$79o>^iwb<<3T00000NkvXXu0mjf0NL${ literal 0 HcmV?d00001 diff --git a/business-css/frontend/src/assets/x6/navright.png b/business-css/frontend/src/assets/x6/navright.png new file mode 100644 index 0000000000000000000000000000000000000000..706c92455b45b504a8cb6a982bd2aac1a81c281d GIT binary patch literal 723 zcmV;^0xbQBP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0%%D@K~!i%?V7)8 z+&~bxQdHF0(KrGg>jKOZ;(I&DH3p*GKIS|E>fll zBoH4yxZ_TRxj#C8vl<_fPm-^arqbXVr5Ru%+itfHI4y-{9BusIGer#0Q6%i~J zi^u4Q=bRR}aoilwM_*CI&}y|RUFU@(psuz{VW1PfqHf4(ft7G%No@MbsUiRxT^M1{ zI4!Uej#1YM16Q@ucIgi%H>7F0jh6WbN|)MGX&!XJE9kN7oEvb-Q*c}qMHkqlcRE2p zk1)%!7o4uR-72^A6_`BAUV#-_B>`)OlgZ=~VU$-C3BXW~;yC`r>AK@!%`1ranNvjw zx9@ao!VwTpPnW`gnT|O0lnRFv%od8P2$hV>$qO8mqN5JoGL=F)*jUg$9&~g5rQ%1d2OpCFy}1p4>L{`A>8RWw8}Ze(+{k& zINzjIl6Y@8RAg|xk#NqrQ@Cy)Vd)=7N@LLPCHu~~(`)4XvDlG!L`DDr002ovPDHLk FV1g^%J`Ml? literal 0 HcmV?d00001 diff --git a/business-css/frontend/src/assets/x6/navright_active.png b/business-css/frontend/src/assets/x6/navright_active.png new file mode 100644 index 0000000000000000000000000000000000000000..eb945fcbd59d1af589bcf2351161bca6815864e9 GIT binary patch literal 702 zcmV;v0zv(WP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0#ivuK~!i%?b`7N%PPw;ip>E3e2>uwKE`I zsuu6(3))r+03B)VjF3#OXjv&v+)J&U5fa=jEh~i+U|ZJJ-`YC^WSCY*Etlai!%sQ! zR9jFt9ss68pfznvh4@EK+)ACZgXxY|rBZNb=jbgne@{o84M20L#ZB#oq~JbmperA8 zt#hU@S593DF7f5kqT5#=^R(6lgW&cv>@x9ZZJhzK_n80sgIBdJ_&;$`PCj+U1e9-5 z3c)pc*p^L7yxuuGu3dP@^I8uSg4^4~k=(WWJ)J3-;V$3QW}vuK3V#Gve>c@884B)j3-P(-tA6LKnCcZbDMP_UV85p`2ehtLQW{+68FplMd7!N` z0SgyfyrNBcaEU)jF-L}Juv}IKC;u4v!ipO&2CZGX$Fs4n4DL&Y1Bv*(w$1<$X8$z$ zztdGOm4bb_GzYp|rWazX#Ifu)_?w(IqlcUUdCuo*CvI;O$4vBETW16Ut=9$@$-4SR zOJ@X_Zj1~rzSf|nvjS+=UgQ2*YUQ6~@-A!ZCXIP_AaU*8*asU7T07*qoM6N<$f`O|!TL1t6 literal 0 HcmV?d00001 diff --git a/business-css/frontend/src/components/antvx6/adddevice.vue b/business-css/frontend/src/components/antvx6/adddevice.vue new file mode 100644 index 0000000..44dea33 --- /dev/null +++ b/business-css/frontend/src/components/antvx6/adddevice.vue @@ -0,0 +1,518 @@ + + + + + + + + + + + diff --git a/business-css/frontend/src/components/antvx6/index.vue b/business-css/frontend/src/components/antvx6/index.vue index bf3e7ff..faf0bda 100644 --- a/business-css/frontend/src/components/antvx6/index.vue +++ b/business-css/frontend/src/components/antvx6/index.vue @@ -32,6 +32,9 @@ import line3 from '@/assets/x6/line3.png' import line4 from '@/assets/x6/line4.png' import line5 from '@/assets/x6/line5.png' import line6 from '@/assets/x6/line6.png' +import AdddeviceModel from './adddevice.vue'; + + const emit = defineEmits([ 'closeAntvx6']); const props = defineProps({ projectInfo: { @@ -40,6 +43,8 @@ const props = defineProps({ default: {} }, }) +const deviceTypetype:any = ref('') // 设备类型 +const isAdddevice = ref(false) const projectInfo:any = ref(props.projectInfo) // 项目信息 const isScenario = ref(false) //是否展示历史模拟场景 const isDisplay = ref(true) // 是否显示 @@ -282,6 +287,24 @@ onMounted(() => { if(node.store && node.store.data && node.store.data.shape === 'rect'){ return } + nodeId.value = node.id + if(node.store.data.attrs.text.text == '扁平槽'){ + deviceTypetype.value = 'FlatTank' + }else if(node.store.data.attrs.text.text == '圆柱槽'){ + deviceTypetype.value = 'CylindricalTank' + }else if(node.store.data.attrs.text.text == '环形槽'){ + deviceTypetype.value = 'AnnularTank' + }else if(node.store.data.attrs.text.text == '管束槽'){ + deviceTypetype.value = 'TubeBundleTank' + }else if(node.store.data.attrs.text.text == '萃取柱'){ + deviceTypetype.value = 'ExtractionColumn' + }else if(node.store.data.attrs.text.text == '流化床'){ + deviceTypetype.value = 'FluidizedBed' + }else if(node.store.data.attrs.text.text == '锥底环形槽'){ + deviceTypetype.value = 'ACFTank' + } + + // 设置固定大小 node.size(160, 160) // 去掉背景节点 @@ -294,6 +317,11 @@ onMounted(() => { // 删除节点上的文字 node.attr('text/text', '') node.attr('label/text', '') + + + isAdddevice.value = true + + } }) @@ -565,8 +593,6 @@ graph.on('blank:mouseup', (e) => { true, ) -// stencil.load([r1, r2, r3, r4, r5, r6], 'group1') - const imageShapes = [ { label: '圆柱槽', @@ -883,6 +909,11 @@ function bigClick(){ function smallClick(){ graph.zoom(-0.1) } + +const nodeId = ref("") + + + function analysisAdd(){ dialogVisible.value = true; } @@ -897,6 +928,19 @@ function simulationClick() { // 打开模拟分析 function handleClose() { isScenario.value = false; } + +function dialogAdddevice(){ // 打开新增设备弹窗 + graph.undo() + isAdddevice.value = false; +} +const selectedDevice = ref({}) +function closeAdddevice(e:any){ // 关闭新增设备弹窗 + selectedDevice.value = e + let retrievedNode:any = graph.getCellById(nodeId.value) + retrievedNode.store.data.deviceInfo = e + debugger + isAdddevice.value = false; +} diff --git a/business-css/frontend/src/views/business/database/device/index.vue b/business-css/frontend/src/views/business/database/device/index.vue index cf0827f..a531aba 100644 --- a/business-css/frontend/src/views/business/database/device/index.vue +++ b/business-css/frontend/src/views/business/database/device/index.vue @@ -35,6 +35,62 @@ function gettableData() { }; loading.value = true; searchDevicesPage(params).then((result:any) => { + result.records.forEach((item:any) => { + if(queryParams.value.type == 'FlatTank'){ // 扁平槽 + let sizeInfo =JSON.parse(item.size) + item['length'] = sizeInfo.length + item['width'] = sizeInfo.width + item['height'] = sizeInfo.height + } + if(queryParams.value.type == 'CylindricalTank'){ // 圆柱槽 + let sizeInfo =JSON.parse(item.size) + item['diameter'] = sizeInfo.diameter + item['height'] = sizeInfo.height + } + if(queryParams.value.type == 'AnnularTank'){ // 环形槽 + let sizeInfo =JSON.parse(item.size) + item['outer_diameter'] = sizeInfo.outer_diameter + item['height'] = sizeInfo.height + } + + if(queryParams.value.type == 'TubeBundleTank'){ // 管束槽 + let sizeInfo =JSON.parse(item.size) + item['outer_diameter'] = sizeInfo.outer_diameter + item['height'] = sizeInfo.height + } + if(queryParams.value.type == 'ExtractionColumn'){ // 萃取柱 + let sizeInfo =JSON.parse(item.size) + item['upper_expanded_diameter'] = sizeInfo.upper_expanded.diameter + item['upper_expanded_height'] = sizeInfo.upper_expanded.height + item['tray_section_diameter'] = sizeInfo.tray_section.diameter + item['tray_section_height'] = sizeInfo.tray_section.height + item['lower_expanded_diameter'] = sizeInfo.lower_expanded.diameter + item['lower_expanded_height'] = sizeInfo.lower_expanded.height + + } + + if(queryParams.value.type == 'FluidizedBed'){ // 流化床 + let sizeInfo =JSON.parse(item.size) + item['expanded_section_diameter'] = sizeInfo.expanded_section.diameter + item['expanded_section_height'] = sizeInfo.expanded_section.height + + item['transition_section_height'] = sizeInfo.transition_section.height + + + item['reaction_section_diameter'] = sizeInfo.reaction_section.diameter + item['reaction_section_height'] = sizeInfo.reaction_section.height + } + if(queryParams.value.type == 'ACFTank'){ // 锥底环形槽 + let sizeInfo =JSON.parse(item.size) + item['annular_cylinder_outer_diameter'] = sizeInfo.annular_cylinder.outer_diameter + item['annular_cylinder_height'] = sizeInfo.annular_cylinder.height + item['frustum_bottom_bottom_diameter'] = sizeInfo.frustum_bottom.bottom_diameter + item['frustum_bottom_height'] = sizeInfo.frustum_bottom.height + } + + }) + + tableData.value = result.records; total.value = result.total; loading.value = false; @@ -319,6 +375,57 @@ onMounted(() => { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +