From 06d93889b363c2639e15f23e25aeb9cfc4576a55 Mon Sep 17 00:00:00 2001 From: sky121113 Date: Thu, 4 Jun 2026 13:13:20 +0800 Subject: [PATCH] =?UTF-8?q?[FEAT]=20=E4=BE=9D=E6=93=9A=E7=92=B0=E5=A2=83?= =?UTF-8?q?=E6=BA=AB=E5=BA=A6=E7=9B=A3=E6=B8=AC=E5=95=9F=E7=94=A8=E7=8B=80?= =?UTF-8?q?=E6=85=8B=E5=8B=95=E6=85=8B=E9=A1=AF=E7=A4=BA=E6=97=A5=E8=AA=8C?= =?UTF-8?q?=20Tab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 在 machines/index.blade.php 的 Alpine x-data 中新增 currentMachineAmbientTempEnabled 屬性。 2. 修改 openLogPanel 方法以傳入機台的環境溫度監測啟用狀態。 3. 於機台列表所有呼叫 openLogPanel 處帶入 ambient_temp_monitoring_enabled。 4. 在「環境溫度回傳」Tab 的按鈕上加入 x-show 與 x-cloak,使該 Tab 僅在機台啟用監測時顯示,避免非必要 Tab 的干擾與界面閃爍。 --- resources/views/admin/machines/index.blade.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/resources/views/admin/machines/index.blade.php b/resources/views/admin/machines/index.blade.php index d0a0572..5e184f7 100644 --- a/resources/views/admin/machines/index.blade.php +++ b/resources/views/admin/machines/index.blade.php @@ -42,6 +42,7 @@ }, currentMachineSn: '', currentMachineName: '', + currentMachineAmbientTempEnabled: false, logs: [], loading: false, inventoryLoading: false, @@ -86,10 +87,11 @@ }); }, - async openLogPanel(id, sn, name) { + async openLogPanel(id, sn, name, ambientTempEnabled = false) { this.currentMachineId = id; this.currentMachineSn = sn; this.currentMachineName = name; + this.currentMachineAmbientTempEnabled = ambientTempEnabled === true || ambientTempEnabled === 1 || ambientTempEnabled === '1' || ambientTempEnabled === 'true'; this.slots = []; this.showLogPanel = true; this.activeTab = 'status'; @@ -474,7 +476,7 @@ + @click="openLogPanel('{{ $machine->id }}', '{{ $machine->serial_no }}', '{{ addslashes($machine->name) }}', {{ $machine->ambient_temp_monitoring_enabled ? 1 : 0 }})">
@@ -621,7 +623,7 @@