diff --git a/Backend/wwwroot/forgeDemo.html b/Backend/wwwroot/forgeDemo.html index 0e8b9fc..6bbdccb 100644 --- a/Backend/wwwroot/forgeDemo.html +++ b/Backend/wwwroot/forgeDemo.html @@ -184,7 +184,6 @@ \ No newline at end of file diff --git a/Frontend/_sysMonAll.html b/Frontend/_sysMonAll.html index add0bb0..c7473f0 100644 --- a/Frontend/_sysMonAll.html +++ b/Frontend/_sysMonAll.html @@ -45,7 +45,9 @@ setLightColor(); } if (arr.indexOf(3) != -1) { + getHotspotPoint(() => { + getLightDevice(); show3DModel(data.urn_3D); }); @@ -335,11 +337,50 @@ } + async function getLightDevice() {//callback = null + getLightData(null); + let url = baseApiUrl + "/api/GetDevNodeForCor"; + let sendData = { + "device_area_tag": pageAct.AreaTag, + "device_building_tag": pageAct.buiTag, + "device_system_tag": pageAct.sysMainTag, + "device_name_tag": pageAct.sysSubTag, + }; + objSendData.Data = sendData; + ytAjax = new YourTeam.Ajax(url, objSendData, function (res) { + if (!res || res.code != "0000" || !res.data) { + + } else { + + let myLightList = []; + $.each(res.data, (idx, data) => { + let item = {}; + item.position = {}; + if (data.device_node_coordinate_3d != null && isJSON(data.device_node_coordinate_3d)) { + item.position = JSON.parse(data.device_node_coordinate_3d); + } + $.extend(item, data); + myLightList.push(item); + }) + + console.log("2", myLightList); + setLightList(myLightList); + //callback ? callback() : ""; + } + }, null, "POST").send(); + + } + function setHotspotPoint(myDataList = []) { console.log(myDataList) getHopspotPoint(myDataList); } + async function setLightList(myDataList = []) { + console.log(myDataList); + getLightData(myDataList); + } + var parentEle = ""; onEvent("autodesk:click:sprite", "[name=forgeViewer]", function (e, obj) { forgeUnFocusAll(); diff --git a/Frontend/index.html b/Frontend/index.html index e8a92ed..a9afa74 100644 --- a/Frontend/index.html +++ b/Frontend/index.html @@ -140,7 +140,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li