⏳ 正在極速建構樹狀圖,請稍候...
`;
document.body.style.cursor = 'wait';
// 因為內部有 await apiGetScanStatus,所以這裡使用 async () => {}
setTimeout(async () => {
treeContainer.innerHTML = buildTree(finalTreeData, '', false, configType);
if (loadingMsg) loadingMsg.style.display = 'none';
document.body.style.cursor = 'default';
// 🌟 拔除 configType,檢查設備級別的掃描狀態
const isSomeoneScanning = await apiGetScanStatus(connInfo.host);
if (isSomeoneScanning) {
alert("💡 提示:系統正在背景更新設備選項快取,部分選單題示內容可能稍後才會顯示完整。");
lockScanButton(60000);
} else {
enableGlobalScanButton();
if (needAutoScan) {
// 🌟 呼叫新的全域掃描函數
setTimeout(() => scanMissingOptions(), 500);
}
}
}, 20);
}
} catch (error) {
if (treeContainer) treeContainer.innerHTML = `