From c8a83aab3bcbc1e87941b7efc7a771605d218ae6 Mon Sep 17 00:00:00 2001 From: huangjinysf Date: Wed, 24 Dec 2025 10:03:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AE=BE=E5=A4=87=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E7=94=9F=E4=BA=A7=E8=AE=A1=E7=AE=97=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E6=AF=8F=E5=A4=A9=E9=87=8D=E9=87=8F?= =?UTF-8?q?=E5=92=8C=E7=AE=B1=E6=95=B0=E8=AE=A1=E7=AE=97=EF=BC=8C=E6=94=B9?= =?UTF-8?q?=E8=BF=9B=E7=BB=B4=E4=BF=AE=E8=AE=B0=E5=BD=95=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E6=A1=86=E5=88=86=E6=9E=90=E7=BB=93=E6=9E=9C=E6=B8=85=E7=90=86?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/eq/RepairSummary.vue | 4 ++ src/views/plan/EquipmentStatus.vue | 62 +++++++++++++++++++++++++++++- 2 files changed, 64 insertions(+), 2 deletions(-) diff --git a/src/views/eq/RepairSummary.vue b/src/views/eq/RepairSummary.vue index cd710e2..a15116e 100644 --- a/src/views/eq/RepairSummary.vue +++ b/src/views/eq/RepairSummary.vue @@ -247,6 +247,8 @@ function handleSummary() { // 显示设备维修记录 const showRepairRecords = (equipmentCode) => { selectedEquipmentCode.value = equipmentCode + // 清空之前的分析结果 + analysisResult.value = '' repairRecordsDialogVisible.value = true fetchRepairRecords(equipmentCode) } @@ -317,6 +319,8 @@ const filterRecordsByBreakdownName = (value) => { // 关闭维修记录对话框 const handleRepairRecordsClose = () => { repairRecordsDialogVisible.value = false + // 清空分析结果 + analysisResult.value = '' } // 检查维修日期是否是最近的(30天内) diff --git a/src/views/plan/EquipmentStatus.vue b/src/views/plan/EquipmentStatus.vue index 28d4038..2c4ed66 100644 --- a/src/views/plan/EquipmentStatus.vue +++ b/src/views/plan/EquipmentStatus.vue @@ -139,9 +139,20 @@ {{ calculateAxlesPerHour() }} 轴
- 每天轴数: - {{ calculateAxlesPerDay() }} 轴 + 每天重量: + {{ calculateDailyWeight() }} kg
+
+
+ 每天轴数: + {{ calculateAxlesPerDay() }} 轴 +
+
+ 每天箱数: + {{ calculateBoxesPerDay() }} 箱 +
+
+ @@ -707,6 +718,38 @@ const calculateAxlesPerDay = () => { return (axlesPerHour * 24).toFixed(2); }; +// 计算每天重量 = 产速 * 24小时 * 总轴数 +const calculateDailyWeight = () => { + if (!productionScheduleData.value || !productionScheduleData.value.axle_final_average_speed || !editableTotalQuantity.value) { + return 0; + } + + const speed = productionScheduleData.value.axle_final_average_speed; + const totalQuantity = editableTotalQuantity.value; + // 公式:产速 * 24小时 * 总轴数 + const result = speed * 24 * totalQuantity; + return result.toFixed(2); +}; + +// 计算每天箱数,根据wire_disc进行判断 +const calculateBoxesPerDay = () => { + const axlesPerDay = calculateAxlesPerDay(); + + // 如果没有选中轴或者没有线盘信息,返回0 + if (!selectedAxle.value || !selectedAxle.value.raw_wire_disc) { + return 0; + } + + // 根据wire_disc判断计算方法 + if (selectedAxle.value.wire_disc === 'PT-25') { + // 如果是'PT-25',则每天轴数/4 + return (axlesPerDay / 4).toFixed(2); + } else { + // 其他情况,每天轴数/1 + return axlesPerDay.toFixed(2); + } +}; + // 总轴数变更处理函数 const onTotalQuantityChange = (newValue) => { // 更新计算结果 @@ -1305,6 +1348,21 @@ const updateCharts = () => { margin-top: 10px; } +/* 每天生产数据在同一行显示的特殊样式 */ +.daily-production-row { + flex-wrap: wrap; +} + +.daily-production-item { + min-width: 45%; + margin-right: 10px; + display: flex; +} + +.daily-production-item .detail-label { + margin-right: 5px; +} + /* 可编辑输入框样式 */ .editable-input { width: 100px;