[Frontend][系統監控] 3D 模型 更改載入時機

This commit is contained in:
wanli 2022-11-29 23:44:22 +08:00
parent c2ebd6eb3a
commit 730654dc66

View File

@ -54,7 +54,7 @@
<button class="btn btn-secondary btn-sm active" data-tabname="floShowType" data-target="#2dDiv"> <button class="btn btn-secondary btn-sm active" data-tabname="floShowType" data-target="#2dDiv">
2D 2D
</button> </button>
<button class="btn btn-secondary btn-sm" data-tabname="floShowType" data-target="#3dDiv"> <button class="btn btn-secondary btn-sm" data-tabname="floShowType" data-target="#3dDiv" onclick="show3D()">
3D 3D
</button> </button>
</div> </div>
@ -909,6 +909,7 @@
var allDeviceRowData = []; //所有設備原始資料 var allDeviceRowData = []; //所有設備原始資料
var global_emergency_alarm_device_number = []; var global_emergency_alarm_device_number = [];
var zoomToggle = 3; var zoomToggle = 3;
var isFirstLoad3D = true;
$(function () { $(function () {
initChart(); initChart();
@ -916,8 +917,6 @@
setCards(); setCards();
subDeviceSetStatus(); subDeviceSetStatus();
setEleManTable(); setEleManTable();
console.log("--- load 3d ---");
load3DModel();
}) })
function getFloDevList() { function getFloDevList() {
@ -2301,7 +2300,14 @@
//載入3D模型 //載入3D模型
function load3DModel() { function load3DModel() {
console.log("launchViewer~");
launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6LW1vZGVsX3Rlc3QxMTIxLyVFMyU4MCU5MFRFU1QlRTMlODAlOTEubndk'); launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6LW1vZGVsX3Rlc3QxMTIxLyVFMyU4MCU5MFRFU1QlRTMlODAlOTEubndk');
} }
function show3D() {
if (isFirstLoad3D) {
isFirstLoad3D = false;
load3DModel();
}
}
</script> </script>