[Forntend] Forge 燈光程序調整

This commit is contained in:
dev01 2023-01-11 10:18:20 +08:00
parent f0af802f0d
commit d63e517b3c
3 changed files with 53 additions and 51 deletions

View File

@ -367,9 +367,6 @@
function show3DModel(urn) {
$(loadEle).Loading("start");
if (pageAct.sysMainTag == "LT") {
setLightPoint(allDevList);
}
launchViewerForHotspot(urn, (viewer, nodeIds) => {
let devDbIds = allDevList.map(x => x.forge_dbid);
/*hideAllObjects(devDbIds);*/
@ -475,6 +472,10 @@
})
setHotspotPoint(myDataList);
if (pageAct.sysMainTag == "LT") {
setLightPoint(myDataList);
console.log("myDataList", myDataList)
}
callback ? callback() : "";
}
}, null, "POST").send();

View File

@ -782,6 +782,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
"lib/chart.js/Chart.min",
"lib/dropzone/dropzone-min",
"lib/jstree-master/jstree.min",
"lib/notifications/sweetalert2/sweetalert2.bundle",
], loadedMasterPack);
}
@ -992,7 +993,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
})
$(window).on("timeout:3s", function () {
debugger
getSystemAlarmByBaja((data) => {
if (typeof getAlarmSub != "undefined" && getAlarmSub) {
getAlarmSub(data);
@ -1027,7 +1028,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
dataType: 'json',
success: function (rel) {
if (rel.code != "0000") {
toast_error(rel.msg || "系統內部發生錯誤,請聯絡系統管理員");
toast_error(rel.msg || common.SysErr);
return;
}
else {
@ -1037,7 +1038,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
}
},
error: function (xhr, textStatus, thrownError) {
alert(textStatus);
alert(common.SysErr);
}
});
@ -1602,52 +1603,52 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
}
function showWarToast() {
let options = {
"closeButton": false,
"debug": false,
"newestOnTop": true,
"progressBar": false,
"positionClass": "toast-top-right",
"preventDuplicates": false,
"onclick": null,
"showDuration": "300",
"hideDuration": "1000",
"timeOut": 0,
"extendedTimeOut": 0,
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut",
"tapToDismiss": false
}
//let options = {
// "closeButton": false,
// "debug": false,
// "newestOnTop": true,
// "progressBar": false,
// "positionClass": "toast-top-right",
// "preventDuplicates": false,
// "onclick": null,
// "showDuration": "300",
// "hideDuration": "1000",
// "timeOut": 0,
// "extendedTimeOut": 0,
// "showEasing": "swing",
// "hideEasing": "linear",
// "showMethod": "fadeIn",
// "hideMethod": "fadeOut",
// "tapToDismiss": false
//}
if ($("#toast-container .toast").length < 2) {
let strConHtml = `<div class="col-12">
<div class="row m-0">
<span class="m-0">異常編號:<span>001</span></span>
</div>
<div class="row m-0">
<span class="m-0">異常等級:<span>2</span></span>
</div>
<div class="row m-0">
<span class="m-0">異常類別:<span>S01</span></span>
</div>
<div class="row m-0">
<span class="m-0">設備名稱:<span>電表01</span></span>
</div>
<div class="row m-0">
<span class="m-0">異常訊息:<span>壞掉</span></span>
</div>
//if ($("#toast-container .toast").length < 2) {
// let strConHtml = `<div class="col-12">
// <div class="row m-0">
// <span class="m-0">異常編號:<span>001</span></span>
// </div>
// <div class="row m-0">
// <span class="m-0">異常等級:<span>2</span></span>
// </div>
// <div class="row m-0">
// <span class="m-0">異常類別:<span>S01</span></span>
// </div>
// <div class="row m-0">
// <span class="m-0">設備名稱:<span>電表01</span></span>
// </div>
// <div class="row m-0">
// <span class="m-0">異常訊息:<span>壞掉</span></span>
// </div>
</div>`;
let titleHtml = `<div class="col-12">
<div class="row m-0">
<span class="fs-1">異常通知</span>
<span class="ml-auto">2023/01/01 12:00:00</span>
</div>
</div>`
toastr.warning(strConHtml, titleHtml, options)
}
// </div>`;
// let titleHtml = `<div class="col-12">
// <div class="row m-0">
// <span class="fs-1">異常通知</span>
// <span class="ml-auto">2023/01/01 12:00:00</span>
// </div>
// </div>`
// toastr.warning(strConHtml, titleHtml, options)
//}
}
</script>

View File

@ -728,7 +728,7 @@ async function testNewLight(dataList) {
dataList.forEach((myData, index) => {
const position = JSON.parse(myData.device_coordinate_3d);
if (lightList.findIndex(x => x.device_guid == myData.device_guid) == -1) {
lightList.push({ dbid: myData.forge_dbid, device_guid: myData.device_guid, lightObject: new THREE.SpotLight(0xffffff, 200, 20, 0.6, 0.5, 10) });
lightList.push({ dbid: myData.forge_dbid, device_guid: myData.device_guid, lightObject: new THREE.SpotLight(0xff0000, 200, 20, 0.6, 0.5, 10) });
}
lightList[index].lightObject.position.set(position.x, position.y, position.z);