Merge branch 'MCUT' of https://gitea.mjm-staging.developers-homelab.net/BIMS/BIMS into MCUT
This commit is contained in:
commit
f1b138ce7b
@ -54,7 +54,6 @@
|
||||
|
||||
$(function () {
|
||||
$(loadEle).Loading("start");
|
||||
debugger
|
||||
getBuildMenu((arr, data) => {
|
||||
buildMenuData = data;
|
||||
if (arr.indexOf(4) != -1) {
|
||||
@ -195,7 +194,7 @@
|
||||
? parseInt(data.value)
|
||||
: 0;
|
||||
}
|
||||
|
||||
|
||||
if (
|
||||
data.point_name == norDevPoiName &&
|
||||
data.value == matchDevice.device_normal_point_value &&
|
||||
|
@ -17,7 +17,7 @@
|
||||
<div class="d-flex">
|
||||
<div class="col-12 my-3 col-md-6" id="floorLeftBlock">
|
||||
<div id="floChart"
|
||||
style="height: 100%; width: 100%; background-color: #fff"></div>
|
||||
style="height: 80vh; width: 100%; background-color: #fff"></div>
|
||||
</div>
|
||||
<div class="col-12 my-3 col-md-6" id="floorRightBlock">
|
||||
<!-- <div id="forgeViewer" class="position-relative" style="height:100%">
|
||||
@ -42,8 +42,7 @@
|
||||
var lightControl = "device"; // device 群控 node 燈控
|
||||
var zoomToggle = 1.3;
|
||||
$(function () {
|
||||
$(loadEle).Loading("start");
|
||||
if(!pageAct.urn){
|
||||
if(!pageAct.urn || pageAct.urn == "undefined"){
|
||||
$("#floorRightBlock").hide();
|
||||
$("#floorLeftBlock").removeClass("col-md-6");
|
||||
}
|
||||
@ -515,6 +514,7 @@
|
||||
|
||||
//baja 訂閱設備
|
||||
function subDevice() {
|
||||
debugger
|
||||
console.log("subDevice 開始");
|
||||
|
||||
let option = floChart.getOption();
|
||||
@ -535,6 +535,7 @@
|
||||
let deviceScatterNormalArr = [];
|
||||
let deviceScatterCloseArr = [];
|
||||
let deviceScatterErrorArr = [];
|
||||
debugger
|
||||
floMyBaja.setSubscribeDevicesCallBack(function (data) {
|
||||
let matchDevice = currentData.filter(
|
||||
(x) => x.device_number == data.device_number_full
|
||||
@ -729,6 +730,7 @@
|
||||
|
||||
floMyBaja.setSubscribeDeviceEndCallBack(function (data) {
|
||||
endPageLoading();
|
||||
$(loadEle).Loading("close");
|
||||
if (
|
||||
pageAct.sysSubTag !== "M12" &&
|
||||
data.findIndex(
|
||||
@ -1517,58 +1519,61 @@
|
||||
|
||||
// show 3D 模型
|
||||
function show3DModel(urn) {
|
||||
launchViewerForHotspot(urn, (viewer, nodeIds) => {
|
||||
// 隱藏 toolbar
|
||||
document.querySelector("#guiviewer3d-toolbar").style.display = "none";
|
||||
let nextFloor = getNextFloor(pageAct.floGuid);
|
||||
let curFloTag = pageAct.floTag;
|
||||
|
||||
if (!nextFloor) {
|
||||
toast_warning("超出樓層範圍");
|
||||
return;
|
||||
}
|
||||
|
||||
if (curFloTag?.startsWith("U")) {
|
||||
curFloTag = curFloTag.split("U")[1];
|
||||
}
|
||||
if (nextFloor?.startsWith("U")) {
|
||||
nextFloor = nextFloor.split("U")[1];
|
||||
}
|
||||
|
||||
getLevelsData(curFloTag, nextFloor, function () {
|
||||
viewer.model.search(
|
||||
"天花板",
|
||||
(nodeIds) => {
|
||||
// console.log("2",nodeIds)
|
||||
viewer.hide(nodeIds);
|
||||
},
|
||||
(e) => {
|
||||
console.log(e);
|
||||
}
|
||||
);
|
||||
if(typeof launchViewerForHotspot != "undefined"){
|
||||
launchViewerForHotspot(urn, (viewer, nodeIds) => {
|
||||
// 隱藏 toolbar
|
||||
document.querySelector("#guiviewer3d-toolbar").style.display = "none";
|
||||
let nextFloor = getNextFloor(pageAct.floGuid);
|
||||
let curFloTag = pageAct.floTag;
|
||||
|
||||
if (!nextFloor) {
|
||||
toast_warning("超出樓層範圍");
|
||||
return;
|
||||
}
|
||||
|
||||
if (curFloTag?.startsWith("U")) {
|
||||
curFloTag = curFloTag.split("U")[1];
|
||||
}
|
||||
if (nextFloor?.startsWith("U")) {
|
||||
nextFloor = nextFloor.split("U")[1];
|
||||
}
|
||||
|
||||
getLevelsData(curFloTag, nextFloor, function () {
|
||||
viewer.model.search(
|
||||
"天花板",
|
||||
(nodeIds) => {
|
||||
// console.log("2",nodeIds)
|
||||
viewer.hide(nodeIds);
|
||||
},
|
||||
(e) => {
|
||||
console.log(e);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
setHeatMap();
|
||||
|
||||
if (
|
||||
(pageAct.sysSubTag == "M12" || pageAct.sysSubTag == "ELEV") &&
|
||||
elevatorShow
|
||||
) {
|
||||
let elevOption = {
|
||||
viewer: viewer,
|
||||
ordPath: {
|
||||
area_tag: pageAct.AreaTag,
|
||||
building_tag: pageAct.buiTag,
|
||||
},
|
||||
};
|
||||
// 電梯移動訂閱程序載入
|
||||
let forge3DElev = new Forge3DElevFull(elevOption);
|
||||
forge3DElev.bajaEndCallback = function () {
|
||||
endPageLoading();
|
||||
};
|
||||
forge3DElev.init();
|
||||
}
|
||||
});
|
||||
|
||||
setHeatMap();
|
||||
|
||||
if (
|
||||
(pageAct.sysSubTag == "M12" || pageAct.sysSubTag == "ELEV") &&
|
||||
elevatorShow
|
||||
) {
|
||||
let elevOption = {
|
||||
viewer: viewer,
|
||||
ordPath: {
|
||||
area_tag: pageAct.AreaTag,
|
||||
building_tag: pageAct.buiTag,
|
||||
},
|
||||
};
|
||||
// 電梯移動訂閱程序載入
|
||||
let forge3DElev = new Forge3DElevFull(elevOption);
|
||||
forge3DElev.bajaEndCallback = function () {
|
||||
endPageLoading();
|
||||
};
|
||||
forge3DElev.init();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function setHeatMap() {
|
||||
|
@ -1276,6 +1276,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
|
||||
setSysTagForPageAct(this);
|
||||
$("#sysMonTopBtn").YTTab("set");
|
||||
$(`#subSysBtn${pageAct.sysSubTag}`).YTTab("set");
|
||||
debugger
|
||||
if (pageAct.isShowBuildingInMenu) {
|
||||
let building_tag = $(this).data("building-tag");
|
||||
$(`#buildTab${building_tag}`).YTTab("set");
|
||||
@ -1328,7 +1329,6 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
|
||||
pageAct.buiTag = $(this).prop("id").split("buildTab")[1];
|
||||
pageAct.buiName = $(this).text();
|
||||
pageAct.urn = $(this).data("urn");
|
||||
console.log("building");
|
||||
$(this).parents("ul").find("a").removeClass("active");
|
||||
$(this).parent("a").addClass("active");
|
||||
console.log(e, arg);
|
||||
|
@ -797,6 +797,9 @@ function hexToRgb(hex) {
|
||||
|
||||
// 熱點 更換顏色
|
||||
async function changeColorForHotspot(dbId, type = null, OnOff = false) {
|
||||
if(typeof viewer === "undefined"){
|
||||
return;
|
||||
}
|
||||
const dataVizExtn = await viewer.loadExtension("Autodesk.DataVisualization");
|
||||
let spriteColorFocus = new THREE.Color(0xffffff);
|
||||
|
||||
|
@ -3,14 +3,14 @@
|
||||
// var baseImgUrl = "https://localhost:44376"; // 本地開發用
|
||||
|
||||
// Mitsubishi
|
||||
// var baseApiUrl = "http://220.132.206.5:8005"; // production 用
|
||||
var baseApiUrl = "http://220.132.206.5:8005"; // production 用
|
||||
var baseImgUrl = "http://220.132.206.5:8053"; // production 用
|
||||
|
||||
// WSP
|
||||
// var baseApiUrl = "http://192.168.0.136:8005"; // production 用
|
||||
// var baseImgUrl = "http://192.168.0.136:8053"; // production 用
|
||||
|
||||
var baseApiUrl = "http://localhost:3604";
|
||||
// var baseApiUrl = "http://localhost:3604";
|
||||
//var baseImgUrl = "http://localhost:8848";
|
||||
|
||||
var varRegApiUrl = "/reg/api/"; //註冊API路徑
|
||||
|
@ -250,6 +250,7 @@ function getOneDeviceAlarmTop10ByBaja(devicePath, callback) {
|
||||
_index++;
|
||||
},
|
||||
after: function () {
|
||||
$(loadEle).Loading("close");
|
||||
_result = JSON.stringify({ count: _index, data: _ss });
|
||||
if (typeof callback === "function") {
|
||||
callback(_result);
|
||||
@ -258,6 +259,10 @@ function getOneDeviceAlarmTop10ByBaja(devicePath, callback) {
|
||||
limit: -1,
|
||||
offset: 0,
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
$(loadEle).Loading("close");
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -440,6 +440,16 @@ function subscriptionAlarms() {
|
||||
function subscriptionElectricmeter() {
|
||||
// 用BQL的方式去訂閱
|
||||
this.setSubscribeElectricmeterByBql = function (tempOrdPath) {
|
||||
if(tempOrdPath.devicePath?.includes("/")){
|
||||
let newDevPath = [];
|
||||
for(var tag of tempOrdPath.devicePath?.split("/")){
|
||||
if(!isNaN(parseInt(tag.slice(0,1)))){
|
||||
tag = "$3" + tag;
|
||||
}
|
||||
newDevPath.push(tag);
|
||||
}
|
||||
tempOrdPath.devicePath = newDevPath.join("/");
|
||||
}
|
||||
BajaSubscribeElectricmeterByBql(tempOrdPath);
|
||||
};
|
||||
// BQL去訂閱回傳的Function
|
||||
|
@ -38,12 +38,10 @@ function getHistoryDataByBaja(devicePath, startDate_millisecond, endDate_millise
|
||||
var _result = {};
|
||||
var _ss = [];
|
||||
var _index = 0;
|
||||
|
||||
require(['baja!'], function (baja) {
|
||||
console.log('local:|foxs:|history:/' + company + '/' + devicePath + '|bql:select * from control:ControlPoint where timestamp.millis > ' + startDate_millisecond + ' and timestamp.millis < ' + endDate_millisecond);
|
||||
baja.Ord.make('local:|foxs:|history:/' + company + '/' + devicePath + '|bql:select * from control:ControlPoint where timestamp.millis > ' + startDate_millisecond + ' and timestamp.millis < ' + endDate_millisecond).get()
|
||||
.then(function (table) {
|
||||
$(loadEle).Loading("start");
|
||||
return table.cursor({
|
||||
each: function (record) {
|
||||
console.log(record.get('timestamp'))
|
||||
@ -75,6 +73,7 @@ function getHistoryDataByBaja(devicePath, startDate_millisecond, endDate_millise
|
||||
})
|
||||
.catch(()=>{
|
||||
console.log("error");
|
||||
$(loadEle).Loading("close");
|
||||
// const res = JSON.stringify({count:0, data:[]})
|
||||
callback()
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user