From d979b5523a099482b3ab7ce2b126ea01f8c422f9 Mon Sep 17 00:00:00 2001 From: limengnan <420004014@qq.com> Date: Mon, 18 May 2026 18:09:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A1=E7=AE=97=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E9=80=BB=E8=BE=91=EF=BC=8C=E5=8A=A8=E6=80=81=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E8=AE=BE=E5=A4=87=E7=89=A9=E6=96=99=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/src/components/antvx6/viewx6.vue | 109 +++++------------- .../views/business/database/device/index.vue | 1 - 2 files changed, 29 insertions(+), 81 deletions(-) diff --git a/business-css/frontend/src/components/antvx6/viewx6.vue b/business-css/frontend/src/components/antvx6/viewx6.vue index f829600..d9da0e5 100644 --- a/business-css/frontend/src/components/antvx6/viewx6.vue +++ b/business-css/frontend/src/components/antvx6/viewx6.vue @@ -208,81 +208,21 @@ function addAttrText(item:any,index:any,useData:any){ let tempData:any = [] if(item.scenarioResults[index].attrState){ let attrState = JSON.parse(item.scenarioResults[index].attrState) - debugger for (const key in attrState) { if (!Object.hasOwn(attrState, key)) continue; const element = attrState[key]; tempData.push({ name: key, - value: element + value: element, + deviceType: item.scenarioResults[index].deviceType, + deviceTypeResultant: item.scenarioResults[index].deviceType + key, + }) } } appendAttrText(item,tempData,useData) } -function getName(code:any) { - let name = '' - switch (code) { - case 'width': - return name = "宽度cm"; - break; - case 'outer_diameter': - return name = "外径cm"; - break; - case 'height': - return name = "高度cm"; - break; - case 'length': - return name = "长度cm"; - break; - case 'diameter': - return name = "外径cm"; - break; - case 'volume': - return name = "体积(单位:L)"; - break; - case 'flow_rate': - return name = "流量(单位:m3/h)"; - break; - case 'pulse_velocity': - return name = "脉冲速度(单位:Hz)"; - break; - case 'u_concentration': - return name = "铀浓度(g/L)"; - break; - case 'uo2_density': - return name = "氧化铀密度(g/cm3)"; - break; - case 'u_enrichment': - return name = "铀富集度"; - break; - case 'pu_concentration': - return name = "钚浓度(g/L)"; - break; - case 'puo2_density': - return name = "氧化钚密度(g/cm3)"; - break; - case 'pu_isotope': - return name = "钚同位素比例(PU-240占比)"; - break; - case 'hno3_acidity': - return name = "硝酸酸度(mol/L)"; - break; - case 'h2c2o4_concentration': - return name = "草酸浓度(mol/L)"; - break; - case 'organic_ratio': - return name = "有机相比例"; - break; - case 'moisture_content': - return name = "含水率"; - break; - default: - return name = ""; - } - return name - } function appendAttrText(item:any,data:any,useData:any){ if(useData.length == 0){ return @@ -290,7 +230,9 @@ function appendAttrText(item:any,data:any,useData:any){ if(isDisplay.value == false){ return } - const result = data.filter((item:any) => useData.includes(item.name)); + const materialResult = data.filter((item:any) => useData.includes(item.name)); + const deviceResult = data.filter((item:any) => useData.includes(item.deviceTypeResultant)); +const result = [...deviceResult,...materialResult] for(let i = 0;i { + if(item.key == name){ + tempName = item.name + } + }) + } + + + } + + return tempName + + + +} function groupByDeviceId(data:any) { // 按设备id分组 // 边界检查:确保输入是数组 if (!Array.isArray(data)) { @@ -859,20 +822,6 @@ function dialogAttributeDialog(){ // 关闭变动设置弹窗 function confirmClick(){ let tempData:any = [] - // for(let i = 0;i { if(items.checked == true){ 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 193c1e0..d91e452 100644 --- a/business-css/frontend/src/views/business/database/device/index.vue +++ b/business-css/frontend/src/views/business/database/device/index.vue @@ -311,7 +311,6 @@ onMounted(() => { }); const handleInput = (val: string) => { - debugger // 正则规则:匹配非负整数或小数(支持最多两位小数,可根据需求调整) const reg = /^\d+(\.\d{0,2})?$/;