Merge branch 'master' of https://gitea.mjm-staging.developers-homelab.net/BIMS/BIMS
This commit is contained in:
commit
16438dea74
@ -1589,6 +1589,7 @@
|
||||
endPageLoading();
|
||||
};
|
||||
forge3DElev.init();
|
||||
subDevice();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
12
Frontend/img/forge/ibms_21.svg
Normal file
12
Frontend/img/forge/ibms_21.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<svg width="164" height="164" viewBox="0 0 164 164" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
|
||||
<defs/><g><path d="M 0 0 L 120 0 L 120 80 L 80 80 L 60 110 L 60 80 L 0 80 Z" fill="#83c100" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
|
||||
style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px;
|
||||
height: 1px; padding-top: 40px; margin-left: 1px;"><div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 60px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: normal;
|
||||
overflow-wrap: normal;">21°</div></div></div></foreignObject><text x="60" y="58" fill="#FFFFFF" font-family="Helvetica" font-size="60px" text-anchor="middle">21°</text>
|
||||
</switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
|
||||
<a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">
|
||||
Text is not SVG - cannot display</text></a></switch>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
1
Frontend/img/forge/ibms_22.svg
Normal file
1
Frontend/img/forge/ibms_22.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="121px" height="111px" viewBox="-0.5 -0.5 121 111"><defs/><g><path d="M 0 0 L 120 0 L 120 80 L 80 80 L 60 110 L 60 80 L 0 80 Z" fill="#92c800" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 40px; margin-left: 1px;"><div data-drawio-colors="color: #FFFFFF; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 60px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">22°</div></div></div></foreignObject><text x="60" y="58" fill="#FFFFFF" font-family="Helvetica" font-size="60px" text-anchor="middle">22°</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
|
After Width: | Height: | Size: 1.5 KiB |
@ -1,8 +1,12 @@
|
||||
<svg width="164" height="164" viewBox="0 0 164 164" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g filter="url(#filter0_d)">
|
||||
<circle cx="81.7363" cy="81.8212" r="70.3389" fill="white"/>
|
||||
<!-- <circle cx="81.7363" cy="81.8212" r="62.3112" stroke="white" stroke-width="16.0554"/> -->
|
||||
|
||||
<g>
|
||||
<circle cx="81.7363" cy="81.8212" r="40" stroke-width="60" style="stroke:grey" />
|
||||
</g>
|
||||
<g filter="url(#filter0_d)">
|
||||
<circle cx="81.7363" cy="81.8212" r="20" stroke="white" stroke-width="60"/>
|
||||
</g>
|
||||
|
||||
<defs>
|
||||
<filter id="filter0_d" x="0.174763" y="0.259602" width="163.123" height="163.123" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
|
Before Width: | Height: | Size: 955 B After Width: | Height: | Size: 938 B |
1
Frontend/img/forge/warning.svg
Normal file
1
Frontend/img/forge/warning.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 24 24" width="512" height="512"><path d="M11,13V7c0-.55,.45-1,1-1s1,.45,1,1v6c0,.55-.45,1-1,1s-1-.45-1-1Zm1,2c-.83,0-1.5,.67-1.5,1.5s.67,1.5,1.5,1.5,1.5-.67,1.5-1.5-.67-1.5-1.5-1.5Zm11.58,4.88c-.7,1.35-2.17,2.12-4.01,2.12H4.44c-1.85,0-3.31-.77-4.01-2.12-.71-1.36-.51-3.1,.5-4.56L8.97,2.6c.71-1.02,1.83-1.6,3.03-1.6s2.32,.58,3,1.57l8.08,12.77c1.01,1.46,1.2,3.19,.49,4.54Zm-2.15-3.42s-.02-.02-.02-.04L13.34,3.67c-.29-.41-.79-.67-1.34-.67s-1.05,.26-1.36,.71L2.59,16.42c-.62,.88-.76,1.84-.4,2.53,.35,.68,1.15,1.05,2.24,1.05h15.12c1.09,0,1.89-.37,2.24-1.05,.36-.69,.22-1.65-.37-2.49Z"/></svg>
|
After Width: | Height: | Size: 674 B |
@ -900,7 +900,6 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
|
||||
"lib/dropzone/dropzone-min",
|
||||
"lib/jstree-master/jstree.min",
|
||||
"lib/notifications/sweetalert2/sweetalert2.bundle",
|
||||
"baja!"
|
||||
], loadedMasterPack);
|
||||
}
|
||||
/**
|
||||
@ -1646,7 +1645,6 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
|
||||
isFlashing = pageAct.sysSubObj.device_close_flashing == "1";
|
||||
break;
|
||||
case "error":
|
||||
|
||||
color =
|
||||
pageAct.sysSubObj.device_error_color ?? "var(--theme-danger)";
|
||||
// isFlashing = pageAct.sysSubObj.device_error_flashing == "1";
|
||||
|
@ -56,6 +56,8 @@ class subscriptionDevices {
|
||||
var sub = new baja.Subscriber();
|
||||
|
||||
sub.attach('changed', function (prop) {
|
||||
// console.log(prop)
|
||||
// console.log(prop.getName())
|
||||
if (prop.getName() === 'out') {
|
||||
var out_value = this.getOutDisplay();
|
||||
var target_device_number = this.$parent.getDisplayName().split('_').slice(0, 5).join('_');
|
||||
@ -96,8 +98,8 @@ class subscriptionDevices {
|
||||
// var building_tag = "H";
|
||||
// var system_tag = "M10";
|
||||
// baja.Ord.make(`ip:greencloud.fic.com.tw|foxs:|station:|slot:/Arena/${building_tag}/${system_tag}|bql:select name, displayname, slotPath, out.value, out from control:ControlPoint`)
|
||||
console.log(`local:|foxs:${port}|station:|slot:/${_this.ordPath.area_tag}/${_this.ordPath.building_tag}/${_this.ordPath.system_tag}/${_this.ordPath.name_tag}${_this.ordPath.flo_tag ? `/${_this.ordPath.flo_tag}` : ""}|bql:select name, displayname, slotPath, out.value, out, facets from control:ControlPoint`);
|
||||
baja.Ord.make(`local:|foxs:${port}|station:|slot:/${_this.ordPath.area_tag}/${_this.ordPath.building_tag}/${_this.ordPath.system_tag}/${_this.ordPath.name_tag}${_this.ordPath.flo_tag ? `/${_this.ordPath.flo_tag}` : ""}|bql:select name, displayname, slotPath, out.value, out, facets from control:ControlPoint`)
|
||||
console.log(`local:|foxs:|station:|slot:/${_this.ordPath.area_tag}/${_this.ordPath.building_tag}/${_this.ordPath.system_tag}/${_this.ordPath.name_tag}|bql:select name, displayname, slotPath, out.value, out, facets from control:ControlPoint`);
|
||||
baja.Ord.make(`local:|foxs:|station:|slot:/${_this.ordPath.area_tag}/${_this.ordPath.building_tag}/${_this.ordPath.system_tag}/${_this.ordPath.name_tag}|bql:select name, displayname, slotPath, out.value, out, facets from control:ControlPoint`)
|
||||
.get(
|
||||
function (table) {
|
||||
var tableStart, tableFinish;
|
||||
@ -158,59 +160,16 @@ class subscriptionDevices {
|
||||
}
|
||||
totalTargetDevice.push(modify_target_device);
|
||||
//取得component當下就更新設備點位
|
||||
// if (_this.changeCallback != undefined && _this.changeCallback != null) {
|
||||
// _this.changeCallback(modify_target_device);
|
||||
// }
|
||||
if (pageAct.sysSubTag === "L1") {
|
||||
if (point_name === "SSC" || point_name === "TRIP" || point_name === "ONOFF") {
|
||||
if (_this.changeCallback != undefined && _this.changeCallback != null) {
|
||||
_this.changeCallback(modify_target_device, true); //第2參數用在平面圖,刷新畫面
|
||||
baja.Ord.make(`local:|foxs:${port}|station:|` + this.getDisplay("slotPath"))
|
||||
_this.changeCallback(modify_target_device);
|
||||
}
|
||||
baja.Ord.make("local:|foxs:|station:|" + this.getDisplay("slotPath"))
|
||||
.get()
|
||||
.then(function (component) {
|
||||
// console.log("component",component)
|
||||
component_index++;
|
||||
var target_device_number = component.$parent.getDisplayName().split('_').slice(0, 5).join('_');
|
||||
|
||||
var out_value = component.getOutDisplay();
|
||||
var target_device_number = component.$parent.getDisplayName().split('_').slice(0, 5).join('_');
|
||||
// console.log(component, component.getDisplayName())
|
||||
var point_name = component.getDisplayName();
|
||||
//依據Facets判斷回傳的內容值為何
|
||||
var facets_split = component.getFacets1().$cEncStr.split('|');
|
||||
var facets_arr = [];
|
||||
facets_split.forEach(function (item, index) {
|
||||
facets_arr.push(item.split('=s:'));
|
||||
});
|
||||
|
||||
var facets = facets_arr.reduce((obj, cur) => ({ ...obj, [cur[0]]: cur[1] }), {})
|
||||
|
||||
var point_out_split = component.getOutDisplay().split(' ');
|
||||
|
||||
let key = Object.keys(facets).find(k => facets[k] === point_out_split[0]);
|
||||
|
||||
if (key == undefined) {
|
||||
key = point_out_split[0];
|
||||
}
|
||||
|
||||
var modify_target_device = {
|
||||
"device_number": target_device_number ? target_device_number : null,
|
||||
"device_number_full": component.$parent.getSlotPath().$names.join("_"),
|
||||
"point_name": point_name ? point_name : null,
|
||||
"value": key
|
||||
}
|
||||
|
||||
if (pageAct.sysSubTag === "L1") {
|
||||
if (point_name === "SSC" || point_name === "TRIP" || point_name === "ONOFF") {
|
||||
if (_this.changeCallback != undefined && _this.changeCallback != null) {
|
||||
_this.changeCallback(modify_target_device, true); //第2參數用在平面圖,刷新畫面
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (_this.changeCallback != undefined && _this.changeCallback != null) {
|
||||
_this.changeCallback(modify_target_device, true); //第2參數用在平面圖,刷新畫面
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// //依據Facets判斷回傳的內容值為何
|
||||
// var facets_split = component.getFacets1().$cEncStr.split('|');
|
||||
@ -245,137 +204,15 @@ class subscriptionDevices {
|
||||
// }
|
||||
// }
|
||||
|
||||
if (pageAct.sysSubTag === "L1") {
|
||||
if (point_name === "SSC" || point_name === "TRIP" || point_name === "ONOFF") {
|
||||
sub.subscribe({
|
||||
comps: component,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
sub.subscribe({
|
||||
comps: component,
|
||||
});
|
||||
}
|
||||
|
||||
// sub.subscribe({
|
||||
// comps: component,
|
||||
// });
|
||||
tolSubList.push(sub);
|
||||
subFinish = new Date(Date.now());
|
||||
$("#sub-end").html(subFinish.toISOString());
|
||||
$("#sub-time").html((subFinish.getTime() - subStart.getTime()) / 1000 + "sec");
|
||||
// console.log("訂閱完成時間", (subFinish.getTime() - subStart.getTime()) / 1000 + "sec");
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (_this.changeCallback != undefined && _this.changeCallback != null) {
|
||||
_this.changeCallback(modify_target_device, true); //第2參數用在平面圖,刷新畫面
|
||||
baja.Ord.make(`local:|foxs:${port}|station:|` + this.getDisplay("slotPath"))
|
||||
.get()
|
||||
.then(function (component) {
|
||||
component_index++;
|
||||
var target_device_number = component.$parent.getDisplayName().split('_').slice(0, 5).join('_');
|
||||
|
||||
var out_value = component.getOutDisplay();
|
||||
var target_device_number = component.$parent.getDisplayName().split('_').slice(0, 5).join('_');
|
||||
var point_name = component.getDisplayName();
|
||||
//依據Facets判斷回傳的內容值為何
|
||||
var facets_split = component.getFacets1().$cEncStr.split('|');
|
||||
var facets_arr = [];
|
||||
facets_split.forEach(function (item, index) {
|
||||
facets_arr.push(item.split('=s:'));
|
||||
});
|
||||
|
||||
var facets = facets_arr.reduce((obj, cur) => ({ ...obj, [cur[0]]: cur[1] }), {})
|
||||
|
||||
var point_out_split = component.getOutDisplay().split(' ');
|
||||
|
||||
let key = Object.keys(facets).find(k => facets[k] === point_out_split[0]);
|
||||
|
||||
if (key == undefined) {
|
||||
key = point_out_split[0];
|
||||
}
|
||||
|
||||
var modify_target_device = {
|
||||
"device_number": target_device_number ? target_device_number : null,
|
||||
"device_number_full": component.$parent.getSlotPath().$names.join("_"),
|
||||
"point_name": point_name ? point_name : null,
|
||||
"value": key
|
||||
}
|
||||
|
||||
if (pageAct.sysSubTag === "L1") {
|
||||
if (point_name === "SSC" || point_name === "TRIP" || point_name === "ONOFF") {
|
||||
if (_this.changeCallback != undefined && _this.changeCallback != null) {
|
||||
_this.changeCallback(modify_target_device, true); //第2參數用在平面圖,刷新畫面
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (_this.changeCallback != undefined && _this.changeCallback != null) {
|
||||
_this.changeCallback(modify_target_device, true); //第2參數用在平面圖,刷新畫面
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// //依據Facets判斷回傳的內容值為何
|
||||
// var facets_split = component.getFacets1().$cEncStr.split('|');
|
||||
// var facets_arr = [];
|
||||
// facets_split.forEach(function (item, index) {
|
||||
// facets_arr.push(item.split('=s:'));
|
||||
// });
|
||||
|
||||
// var facets = facets_arr.reduce((obj, cur) => ({ ...obj, [cur[0]]: cur[1] }), {})
|
||||
|
||||
// var point_out_split = component.getOutDisplay().split(' ');
|
||||
|
||||
// let key = Object.keys(facets).find(k => facets[k] === point_out_split[0]);
|
||||
|
||||
// if (key == undefined) {
|
||||
// key = point_out_split[0];
|
||||
// }
|
||||
|
||||
// var modify_target_device = {
|
||||
// "device_number": target_device_number ? target_device_number : null,
|
||||
// "point_name": point_name ? point_name : null,
|
||||
// "value": key
|
||||
// }
|
||||
|
||||
// //取得component當下就更新設備點位
|
||||
// if (baja_subscribe_device_callback_func != undefined && baja_subscribe_device_callback_func != null) {
|
||||
// if (component_index == total_component_index) {
|
||||
// baja_subscribe_device_callback_func(modify_target_device, true);
|
||||
// }
|
||||
// else {
|
||||
// baja_subscribe_device_callback_func(modify_target_device);
|
||||
// }
|
||||
// }
|
||||
|
||||
if (pageAct.sysSubTag === "L1") {
|
||||
if (point_name === "SSC" || point_name === "TRIP" || point_name === "ONOFF") {
|
||||
sub.subscribe({
|
||||
comps: component,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
sub.subscribe({
|
||||
comps: component,
|
||||
});
|
||||
}
|
||||
|
||||
// sub.subscribe({
|
||||
// comps: component,
|
||||
// });
|
||||
tolSubList.push(sub);
|
||||
subFinish = new Date(Date.now());
|
||||
$("#sub-end").html(subFinish.toISOString());
|
||||
$("#sub-time").html((subFinish.getTime() - subStart.getTime()) / 1000 + "sec");
|
||||
// console.log("訂閱完成時間", (subFinish.getTime() - subStart.getTime()) / 1000 + "sec");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
after: function () {
|
||||
tableFinish = new Date(Date.now());
|
||||
@ -521,8 +358,8 @@ function MyBaja() {
|
||||
// // var building_tag = "H";
|
||||
// // var system_tag = "M10";
|
||||
// // baja.Ord.make(`ip:greencloud.fic.com.tw|foxs:|station:|slot:/Arena/${building_tag}/${system_tag}|bql:select name, displayname, slotPath, out.value, out from control:ControlPoint`)
|
||||
// console.log(`local:|foxs:${port}|station:|slot:/${_this.ordPath.area_tag}/${ordPath.building_tag}/${ordPath.system_tag}/${ordPath.name_tag}|bql:select name, displayname, slotPath, out.value, out, facets from control:ControlPoint`);
|
||||
// baja.Ord.make(`local:|foxs:${port}|station:|slot:/${_this.ordPath.area_tag}/${ordPath.building_tag}/${ordPath.system_tag}/${ordPath.name_tag}|bql:select name, displayname, slotPath, out.value, out, facets from control:ControlPoint`)
|
||||
// console.log(`local:|foxs:|station:|slot:/${_this.ordPath.area_tag}/${ordPath.building_tag}/${ordPath.system_tag}/${ordPath.name_tag}|bql:select name, displayname, slotPath, out.value, out, facets from control:ControlPoint`);
|
||||
// baja.Ord.make(`local:|foxs:|station:|slot:/${_this.ordPath.area_tag}/${ordPath.building_tag}/${ordPath.system_tag}/${ordPath.name_tag}|bql:select name, displayname, slotPath, out.value, out, facets from control:ControlPoint`)
|
||||
// .get(
|
||||
// function (table) {
|
||||
// var tableStart, tableFinish;
|
||||
@ -588,7 +425,7 @@ function MyBaja() {
|
||||
// }
|
||||
|
||||
|
||||
// baja.Ord.make(`local:|foxs:${port}|station:|` + this.getDisplay("slotPath"))
|
||||
// baja.Ord.make("local:|foxs:|station:|" + this.getDisplay("slotPath"))
|
||||
// .get()
|
||||
// .then(function (component) {
|
||||
// component_index++;
|
||||
@ -681,8 +518,8 @@ function BajaSubscribeAlarmsByBql(ordPathForAlarm) {
|
||||
});
|
||||
|
||||
//使用bql語法
|
||||
// console.log(`local:|foxs:${port}|alarm:|bql:select top 1 timestamp, sourceState, normalTime where alarmData.sourceName like '%${ordPathForAlarm.area_tag}_${ordPathForAlarm.building_tag}_${ordPathForAlarm.system_tag}_${ordPathForAlarm.name_tag}_%' order by timestamp desc`);
|
||||
baja.Ord.make(`local:|foxs:${port}|alarm:|bql:select top 1 timestamp, sourceState, alarmData, alarmData.sourceName, normalTime where alarmData.sourceName like '%${ordPathForAlarm.area_tag}_${ordPathForAlarm.building_tag}_${ordPathForAlarm.system_tag}_${ordPathForAlarm.name_tag}_%' order by timestamp desc`)
|
||||
// console.log(`local:|foxs:|alarm:|bql:select top 1 timestamp, sourceState, normalTime where alarmData.sourceName like '%${ordPathForAlarm.area_tag}_${ordPathForAlarm.building_tag}_${ordPathForAlarm.system_tag}_${ordPathForAlarm.name_tag}_%' order by timestamp desc`);
|
||||
baja.Ord.make(`local:|foxs:|alarm:|bql:select top 1 timestamp, sourceState, alarmData, alarmData.sourceName, normalTime where alarmData.sourceName like '%${ordPathForAlarm.area_tag}_${ordPathForAlarm.building_tag}_${ordPathForAlarm.system_tag}_${ordPathForAlarm.name_tag}_%' order by timestamp desc`)
|
||||
.get(
|
||||
function (table) {
|
||||
var tableStart, tableFinish;
|
||||
@ -800,8 +637,8 @@ function BajaSubscribeElectricmeterByBql(ordPathForElectricmeter) {
|
||||
});
|
||||
|
||||
//使用bql語法
|
||||
// console.log(`local:|foxs:${port}|station:|slot:/${ordPathForElectricmeter.devicePath}|bql:select name, out, out.value, slotPath, facets from control:ControlPoint`);
|
||||
baja.Ord.make(`local:|foxs:${port}|station:|slot:/${ordPathForElectricmeter.devicePath}|bql:select name, out, out.value, slotPath, facets from control:ControlPoint`)
|
||||
// console.log(`local:|foxs:|station:|slot:/${ordPathForElectricmeter.devicePath}|bql:select name, out, out.value, slotPath, facets from control:ControlPoint`);
|
||||
baja.Ord.make(`local:|foxs:|station:|slot:/${ordPathForElectricmeter.devicePath}|bql:select name, out, out.value, slotPath, facets from control:ControlPoint`)
|
||||
.get(
|
||||
function (table) {
|
||||
var tableStart, tableFinish;
|
||||
@ -865,7 +702,7 @@ function BajaSubscribeElectricmeterByBql(ordPathForElectricmeter) {
|
||||
}
|
||||
|
||||
|
||||
baja.Ord.make(`local:|foxs:${port}|station:|` + this.getDisplay("slotPath"))
|
||||
baja.Ord.make("local:|foxs:|station:|" + this.getDisplay("slotPath"))
|
||||
.get()
|
||||
.then(function (component) {
|
||||
component_index++;
|
||||
|
Loading…
Reference in New Issue
Block a user