From d63e517b3c4aa60b97c9ccfb1033f208811fc54b Mon Sep 17 00:00:00 2001 From: dev01 Date: Wed, 11 Jan 2023 10:18:20 +0800 Subject: [PATCH] =?UTF-8?q?[Forntend]=20Forge=20=E7=87=88=E5=85=89?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frontend/_sysMonAll.html | 7 +-- Frontend/index.html | 95 +++++++++++++++++---------------- Frontend/js/forge/forgemodel.js | 2 +- 3 files changed, 53 insertions(+), 51 deletions(-) diff --git a/Frontend/_sysMonAll.html b/Frontend/_sysMonAll.html index f9e15b1..f52f202 100644 --- a/Frontend/_sysMonAll.html +++ b/Frontend/_sysMonAll.html @@ -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(); diff --git a/Frontend/index.html b/Frontend/index.html index 0095295..34c8456 100644 --- a/Frontend/index.html +++ b/Frontend/index.html @@ -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 = `
-
- 異常編號:001 -
-
- 異常等級:2 -
-
- 異常類別:S01 -
-
- 設備名稱:電表01 -
-
- 異常訊息:壞掉 -
+ //if ($("#toast-container .toast").length < 2) { + // let strConHtml = `
+ //
+ // 異常編號:001 + //
+ //
+ // 異常等級:2 + //
+ //
+ // 異常類別:S01 + //
+ //
+ // 設備名稱:電表01 + //
+ //
+ // 異常訊息:壞掉 + //
-
`; - let titleHtml = `
-
- 異常通知 - 2023/01/01 12:00:00 -
-
` - toastr.warning(strConHtml, titleHtml, options) - } + //
`; + // let titleHtml = `
+ //
+ // 異常通知 + // 2023/01/01 12:00:00 + //
+ //
` + // toastr.warning(strConHtml, titleHtml, options) + //} } diff --git a/Frontend/js/forge/forgemodel.js b/Frontend/js/forge/forgemodel.js index bf6cef7..b633566 100644 --- a/Frontend/js/forge/forgemodel.js +++ b/Frontend/js/forge/forgemodel.js @@ -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);