This commit is contained in:
dev01 2023-05-15 17:10:24 +08:00
commit a8e836451a
6 changed files with 16 additions and 23 deletions

View File

@ -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": {

View File

@ -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({

View File

@ -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");
}
});

View File

@ -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;

View File

@ -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(); } }
/// <summary>

View File

@ -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"