diff --git a/Backend/Properties/launchSettings.json b/Backend/Properties/launchSettings.json index 6f40118..c3d3bd5 100644 --- a/Backend/Properties/launchSettings.json +++ b/Backend/Properties/launchSettings.json @@ -15,8 +15,8 @@ "ASPNETCORE_ENVIRONMENT": "Development", "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation", "FORGE_CALLBACK_URL": "http://localhost:3000/api/forge/callback/oauth", - "FORGE_CLIENT_ID": "VeGoOgZcAVCBkiThYvLRSVrCTH6TTwyh", - "FORGE_CLIENT_SECRET": "Rl1KHJIAI8GSAfhK" + "FORGE_CLIENT_ID": "zO4ZGuyALhjrL5o81vA39Pkdgr82WAmq", + "FORGE_CLIENT_SECRET": "Bz5KyXqP6UqgGhxm" } }, "Backend": { diff --git a/Backend/Views/BuildInfo/Index.cshtml b/Backend/Views/BuildInfo/Index.cshtml index e4ad6fb..a498f85 100644 --- a/Backend/Views/BuildInfo/Index.cshtml +++ b/Backend/Views/BuildInfo/Index.cshtml @@ -278,7 +278,7 @@ var file = input3Dfile; var formData = new FormData(); formData.append('fileToUpload', file); - formData.append('bucketKey', "vegoogzcavcbkithyvlrsvrcth6ttwyh-202302_ibms");//forge上傳平台-資料夾 + formData.append('bucketKey', "zo4zguyalhjrl5o81va39pkdgr82wamq-202305_bim");//forge上傳平台-資料夾 $.ajax({ url: '/api/forge/oss/objects', @@ -454,7 +454,7 @@ var file = input3Dfile; var formData = new FormData(); formData.append('fileToUpload', file); - formData.append('bucketKey', "vegoogzcavcbkithyvlrsvrcth6ttwyh-202302_ibms");//forge上傳平台-資料夾 + formData.append('bucketKey', "zo4zguyalhjrl5o81va39pkdgr82wamq-202305_bim");//forge上傳平台-資料夾 $.ajax({ url: '/api/forge/oss/objects', @@ -962,7 +962,7 @@ function translateObject(urn) { $("#forgeViewer").empty(); //if (node == null) node = $('#appBuckets').jstree(true).get_selected(true)[0]; - var bucketKey = "vegoogzcavcbkithyvlrsvrcth6ttwyh-202302_ibms";//forge上傳平台-資料夾 + var bucketKey = "zo4zguyalhjrl5o81va39pkdgr82wamq-202305_bim";//forge上傳平台-資料夾 var objectKey = urn; jQuery.post({ diff --git a/Frontend/_sysMonFloor.html b/Frontend/_sysMonFloor.html index 969b9de..63b40e6 100644 --- a/Frontend/_sysMonFloor.html +++ b/Frontend/_sysMonFloor.html @@ -43,16 +43,14 @@ var zoomToggle = 1.3; $(function () { $(loadEle).Loading("start"); + $("#topLight").html(setTopLight()); + setLightColor(); initChart(); getFloData(); drawHeatBar(); getHotspotPoint(() => { show3DModel(pageAct.urn); }); - if (tempSubTag.includes(pageAct.sysSubTag)) { - $("#topLight").html(setTopLight()); - setLightColor(); - } }); onEvent("click", "#resChartZoom", function () { @@ -358,7 +356,6 @@ currentData.length > 0 ) { resetData(); - subDevice(); } var ordPath = { @@ -414,6 +411,7 @@ }); onEvent("autodesk:complete:sprite", "#forgeViewer", function (e, obj) { + console.log("Current", obj.myDataList); let option = floChart.getOption(); option.series.forEach(function (series) { @@ -448,6 +446,8 @@ }); }); floChart.setOption(option); + + subDevice(); }); //floChart.on('selectchanged', function (params) { @@ -565,11 +565,9 @@ ? parseInt(data.value) : 0; } - if (data.point_name == "ONOFF" && pageAct.sysSubTag === "L1") { const lightOn = data.value.includes("true"); setLightOpenOrClose(lightOn, matchDevice.device_guid); - // console.log("Forge 渲染",data.point_name,lightOn) if (lightOn && matchDevice.spriteDbid) { // setLightValues(matchDevice.device_guid, 200, 0xe1cf18); // changeColorForHotspot(matchDevice.spriteDbid, null, lightOn); @@ -585,9 +583,6 @@ ); heatMap?.changeTemp(matchDevice.device_number, 40); } else if (matchDevice.spriteDbid) { - // console.log(lightOn, matchDevice); - // setLightValues(matchDevice.device_guid, 0, 0xffffff); - // changeColorForHotspot(matchDevice.spriteDbid, null, lightOn); if ( !lightOffHotColorArr.some( ({ spriteDbid }) => spriteDbid === matchDevice.spriteDbid @@ -601,7 +596,6 @@ heatMap?.changeTemp(matchDevice.device_number, 0); } } - if ( data.point_name == norDevPoiName && data.value == matchDevice.device_normal_point_value @@ -647,7 +641,6 @@ (device) => device.spriteDbid !== matchDevice.spriteDbid ); } - setForgeHotSpotColor(matchDevice); if ( option.series[0].data.length === lightOnHotColorArr.length + lightOffHotColorArr.length @@ -685,7 +678,6 @@ null, false ); - $(loadEle).Loading("close"); } else if ( deviceScatterCloseArr.length + @@ -726,6 +718,7 @@ }); floChart.setOption(option); + setForgeHotSpotColor(matchDevice); $(loadEle).Loading("close"); } }); diff --git a/FrontendWebApi/ApiControllers/OAuthController.cs b/FrontendWebApi/ApiControllers/OAuthController.cs index 96c6edd..af9d0d4 100644 --- a/FrontendWebApi/ApiControllers/OAuthController.cs +++ b/FrontendWebApi/ApiControllers/OAuthController.cs @@ -49,8 +49,8 @@ namespace FrontendWebApi.ApiControllers TwoLeggedApi oauth = new TwoLeggedApi(); string grantType = "client_credentials"; dynamic bearer = await oauth.AuthenticateAsync( - "VeGoOgZcAVCBkiThYvLRSVrCTH6TTwyh", - "Rl1KHJIAI8GSAfhK", + "zO4ZGuyALhjrL5o81vA39Pkdgr82WAmq", + "Bz5KyXqP6UqgGhxm", grantType, scopes); return bearer; diff --git a/FrontendWebApi/ApiControllers/OSSController.cs b/FrontendWebApi/ApiControllers/OSSController.cs index b3758e7..bc2a2c8 100644 --- a/FrontendWebApi/ApiControllers/OSSController.cs +++ b/FrontendWebApi/ApiControllers/OSSController.cs @@ -13,7 +13,7 @@ namespace FrontendWebApi.ApiControllers { private IWebHostEnvironment _env; public OSSController(IWebHostEnvironment env) { _env = env; } - string id = "VeGoOgZcAVCBkiThYvLRSVrCTH6TTwyh"; + string id = "zO4ZGuyALhjrL5o81vA39Pkdgr82WAmq"; public string ClientId { get { return id.ToLower(); } } /// diff --git a/FrontendWebApi/Properties/launchSettings.json b/FrontendWebApi/Properties/launchSettings.json index f1e9f15..0747994 100644 --- a/FrontendWebApi/Properties/launchSettings.json +++ b/FrontendWebApi/Properties/launchSettings.json @@ -15,8 +15,8 @@ "ASPNETCORE_ENVIRONMENT": "Development", "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation", "FORGE_CALLBACK_URL": "http://localhost:3000/api/forge/callback/oauth", - "FORGE_CLIENT_ID": "VeGoOgZcAVCBkiThYvLRSVrCTH6TTwyh", - "FORGE_CLIENT_SECRET": "Rl1KHJIAI8GSAfhK", + "FORGE_CLIENT_ID": "zO4ZGuyALhjrL5o81vA39Pkdgr82WAmq", + "FORGE_CLIENT_SECRET": "Bz5KyXqP6UqgGhxm", "ASPNETCORE_URLS": "http://localhost:5500" }, "applicationUrl": "https://localhost:5001;http://localhost:5000"