[前台]30 平面圖原點顏色修正
This commit is contained in:
parent
86548b7fb6
commit
2aafffb001
@ -1964,7 +1964,7 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
.fail(function () {
|
.fail(function () {
|
||||||
toast_warning("查無該樓層地圖")
|
// toast_warning("查無該樓層地圖")
|
||||||
floChart.clear();
|
floChart.clear();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@
|
|||||||
let cloDevPoiName = matchDevice.device_close_point_name;
|
let cloDevPoiName = matchDevice.device_close_point_name;
|
||||||
let errDevPoiName = matchDevice.device_error_point_name;
|
let errDevPoiName = matchDevice.device_error_point_name;
|
||||||
|
|
||||||
if (data.point_name == "ONOFF" && pageAct.sysSubTag === "L1") {
|
if (data.point_name == "SSC" && pageAct.sysSubTag === "L1") {
|
||||||
const lightOn = data.value.includes("true");
|
const lightOn = data.value.includes("true");
|
||||||
|
|
||||||
setLightOpenOrClose(lightOn, matchDevice.device_guid);
|
setLightOpenOrClose(lightOn, matchDevice.device_guid);
|
||||||
@ -254,6 +254,160 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// function subDevice() {
|
||||||
|
// let myBaja = new subscriptionDevices();
|
||||||
|
// var ordPath = {
|
||||||
|
// area_tag: pageAct.AreaTag,
|
||||||
|
// building_tag: pageAct.buiTag,
|
||||||
|
// system_tag: pageAct.sysMainTag,
|
||||||
|
// name_tag: pageAct.sysSubTag,
|
||||||
|
// };
|
||||||
|
// myBaja.setSubscribeDevicesByBql(ordPath);
|
||||||
|
|
||||||
|
// // 燈熱點用
|
||||||
|
// let lightOnHotColorArr = [];
|
||||||
|
// let lightOffHotColorArr = [];
|
||||||
|
// // 燈光圈用
|
||||||
|
// let lightOnGuidArr = [];
|
||||||
|
// let lightOffGuidArr = [];
|
||||||
|
|
||||||
|
// myBaja.setSubscribeDevicesCallBack(function (data) {
|
||||||
|
// // console.log(data)
|
||||||
|
// let matchDevice = allDevList.filter(
|
||||||
|
// (x) => x.device_number == data.device_number_full
|
||||||
|
// )[0];
|
||||||
|
// if (!matchDevice) {
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //將訂閱值塞入 subDeviceData
|
||||||
|
// if (
|
||||||
|
// subDeviceData.findIndex(
|
||||||
|
// (x) => x.device_number == matchDevice.device_number
|
||||||
|
// ) == -1
|
||||||
|
// ) {
|
||||||
|
// let obj = {};
|
||||||
|
// obj.device_number = matchDevice.device_number;
|
||||||
|
// obj.dbid = matchDevice.forge_dbid;
|
||||||
|
// subDeviceData.push(obj);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// let subData = subDeviceData.filter(
|
||||||
|
// (x) => x.device_number == matchDevice.device_number
|
||||||
|
// )[0];
|
||||||
|
|
||||||
|
// if (subData) {
|
||||||
|
// subData[data.point_name] = data.value;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// let norDevPoiName = matchDevice.device_normal_point_name;
|
||||||
|
// let cloDevPoiName = matchDevice.device_close_point_name;
|
||||||
|
// let errDevPoiName = matchDevice.device_error_point_name;
|
||||||
|
|
||||||
|
// if (data.point_name == "ONOFF" && pageAct.sysSubTag === "L1") {
|
||||||
|
// const lightOn = data.value.includes("true");
|
||||||
|
|
||||||
|
// setLightOpenOrClose(lightOn, matchDevice.device_guid);
|
||||||
|
// if (lightOn) {
|
||||||
|
// setLightValues(matchDevice.device_guid, 200, 0xe1cf18);
|
||||||
|
// // changeColorForHotspot(matchDevice.spriteDbid, null, true)
|
||||||
|
// if (
|
||||||
|
// !lightOnHotColorArr.some(
|
||||||
|
// ({ spriteDbid }) => spriteDbid === matchDevice.spriteDbid
|
||||||
|
// )
|
||||||
|
// ) {
|
||||||
|
// lightOnHotColorArr.push(matchDevice);
|
||||||
|
// }
|
||||||
|
// lightOffHotColorArr = lightOffHotColorArr.filter(
|
||||||
|
// (light) => light.spriteDbid !== matchDevice.spriteDbid
|
||||||
|
// );
|
||||||
|
// heatMap?.changeTemp(matchDevice.device_number, 40);
|
||||||
|
// } else {
|
||||||
|
// setLightValues(matchDevice.device_guid, 0, 0xffffff);
|
||||||
|
// // changeColorForHotspot(matchDevice.spriteDbid)
|
||||||
|
// if (
|
||||||
|
// !lightOffHotColorArr.some(
|
||||||
|
// ({ spriteDbid }) => spriteDbid === matchDevice.spriteDbid
|
||||||
|
// )
|
||||||
|
// ) {
|
||||||
|
// lightOffHotColorArr.push(matchDevice);
|
||||||
|
// }
|
||||||
|
// lightOnHotColorArr = lightOnHotColorArr.filter(
|
||||||
|
// (light) => light.spriteDbid !== matchDevice.spriteDbid
|
||||||
|
// );
|
||||||
|
|
||||||
|
// heatMap?.changeTemp(matchDevice.device_number, 0);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (data.point_name == "Temp") {
|
||||||
|
// heatMap?.changeTemp(
|
||||||
|
// data.device_number_full,
|
||||||
|
// !isNaN(parseInt(data.value)) ? parseInt(data.value) : 0
|
||||||
|
// );
|
||||||
|
// let devIdx = allDevList.findIndex(
|
||||||
|
// (x) => x.device_number == data.device_number_full
|
||||||
|
// );
|
||||||
|
// allDevList[devIdx]._temp = !isNaN(parseInt(data.value))
|
||||||
|
// ? parseInt(data.value)
|
||||||
|
// : 0;
|
||||||
|
// }
|
||||||
|
// if (
|
||||||
|
// data.point_name == norDevPoiName &&
|
||||||
|
// data.value == matchDevice.device_normal_point_value
|
||||||
|
// ) {
|
||||||
|
// //顯示正常燈號
|
||||||
|
// $(`#${matchDevice.device_number}_status`)
|
||||||
|
// .attr("data-light-type", "normal")
|
||||||
|
// .data("light-type", "normal");
|
||||||
|
// } else if (
|
||||||
|
// data.point_name == cloDevPoiName &&
|
||||||
|
// data.value == matchDevice.device_close_point_value
|
||||||
|
// ) {
|
||||||
|
// $(`#${matchDevice.device_number}_status`)
|
||||||
|
// .attr("data-light-type", "close")
|
||||||
|
// .data("light-type", "close");
|
||||||
|
// } else if (
|
||||||
|
// data.point_name == errDevPoiName &&
|
||||||
|
// data.value == matchDevice.device_error_point_value
|
||||||
|
// ) {
|
||||||
|
// $(`#${matchDevice.device_number}_status`)
|
||||||
|
// .attr("data-light-type", "error")
|
||||||
|
// .data("light-type", "error");
|
||||||
|
// }
|
||||||
|
// if (
|
||||||
|
// allDevList.length ===
|
||||||
|
// lightOnHotColorArr.length + lightOffHotColorArr.length
|
||||||
|
// ) {
|
||||||
|
// changeColorForHotspot(
|
||||||
|
// lightOnHotColorArr.map(({ spriteDbid }) => spriteDbid),
|
||||||
|
// null,
|
||||||
|
// true
|
||||||
|
// );
|
||||||
|
// changeColorForHotspot(
|
||||||
|
// lightOffHotColorArr.map(({ spriteDbid }) => spriteDbid),
|
||||||
|
// null,
|
||||||
|
// false
|
||||||
|
// );
|
||||||
|
|
||||||
|
// }
|
||||||
|
// $(loadEle).Loading("close");
|
||||||
|
|
||||||
|
// setLightColor();
|
||||||
|
// setForgeHotSpotColor(matchDevice);
|
||||||
|
// lightDevForgeSpotLig(matchDevice);
|
||||||
|
// // 從設備訂閱更新每個設備卡片即時點位
|
||||||
|
// setDevItemPoiValBySub(data);
|
||||||
|
// });
|
||||||
|
|
||||||
|
// myBaja.setSubscribeDeviceEndCallBack(function (data) {
|
||||||
|
// endPageLoading();
|
||||||
|
// if (data.findIndex((x) => x.point_name == "Temp") != -1) {
|
||||||
|
// // 顯示溫度條
|
||||||
|
// showHeat("[name=forgeHeatBar]");
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
function lightDevForgeSpotLig(devObj) { }
|
function lightDevForgeSpotLig(devObj) { }
|
||||||
|
|
||||||
|
@ -16,8 +16,10 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<div class="col-6 my-3">
|
<div class="col-6 my-3">
|
||||||
<div id="floChart"
|
<div
|
||||||
style="height: 100%; width: 100%; background-color: #fff"></div>
|
id="floChart"
|
||||||
|
style="height: 100%; width: 100%; background-color: #fff"
|
||||||
|
></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 my-3">
|
<div class="col-6 my-3">
|
||||||
<!-- <div id="forgeViewer" class="position-relative" style="height:100%">
|
<!-- <div id="forgeViewer" class="position-relative" style="height:100%">
|
||||||
@ -25,9 +27,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div id="forgeViewer" class="position-relative" style="height: 80vh">
|
<div id="forgeViewer" class="position-relative" style="height: 80vh">
|
||||||
<div id="forgeHeatBarDiv"
|
<div
|
||||||
class="d-flex mb-4 position-absolute"
|
id="forgeHeatBarDiv"
|
||||||
style="gap: 15px"></div>
|
class="d-flex mb-4 position-absolute"
|
||||||
|
style="gap: 15px"
|
||||||
|
></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -565,7 +569,7 @@
|
|||||||
? parseInt(data.value)
|
? parseInt(data.value)
|
||||||
: 0;
|
: 0;
|
||||||
}
|
}
|
||||||
if (data.point_name == "ONOFF" && pageAct.sysSubTag === "L1") {
|
if (data.point_name == "SSC" && pageAct.sysSubTag === "L1") {
|
||||||
const lightOn = data.value.includes("true");
|
const lightOn = data.value.includes("true");
|
||||||
setLightOpenOrClose(lightOn, matchDevice.device_guid);
|
setLightOpenOrClose(lightOn, matchDevice.device_guid);
|
||||||
if (lightOn && matchDevice.spriteDbid) {
|
if (lightOn && matchDevice.spriteDbid) {
|
||||||
@ -681,8 +685,8 @@
|
|||||||
$(loadEle).Loading("close");
|
$(loadEle).Loading("close");
|
||||||
} else if (
|
} else if (
|
||||||
deviceScatterCloseArr.length +
|
deviceScatterCloseArr.length +
|
||||||
deviceScatterNormalArr.length +
|
deviceScatterNormalArr.length +
|
||||||
deviceScatterErrorArr.length ===
|
deviceScatterErrorArr.length ===
|
||||||
option.series[0].data.length
|
option.series[0].data.length
|
||||||
) {
|
) {
|
||||||
deviceScatterNormalArr.forEach((device) => {
|
deviceScatterNormalArr.forEach((device) => {
|
||||||
@ -759,7 +763,7 @@
|
|||||||
viewer: viewer,
|
viewer: viewer,
|
||||||
nodeId: node,
|
nodeId: node,
|
||||||
floorHeight: elev3DOption.floorHeight ?? [],
|
floorHeight: elev3DOption.floorHeight ?? [],
|
||||||
inited: function () { },
|
inited: function () {},
|
||||||
};
|
};
|
||||||
let elevator3DObj = new elevator3D(options);
|
let elevator3DObj = new elevator3D(options);
|
||||||
let devNum = Object.keys(elev3DBind).filter(
|
let devNum = Object.keys(elev3DBind).filter(
|
||||||
@ -951,7 +955,7 @@
|
|||||||
);
|
);
|
||||||
temp_point_value =
|
temp_point_value =
|
||||||
allDeviceRowData[device_index].points[
|
allDeviceRowData[device_index].points[
|
||||||
item.device_normal_point_name
|
item.device_normal_point_name
|
||||||
];
|
];
|
||||||
if (temp_point_value == item.device_normal_point_value) {
|
if (temp_point_value == item.device_normal_point_value) {
|
||||||
item_node.device_color = item.device_normal_color;
|
item_node.device_color = item.device_normal_color;
|
||||||
@ -960,7 +964,7 @@
|
|||||||
if (item.device_close_point_name != null) {
|
if (item.device_close_point_name != null) {
|
||||||
temp_point_value =
|
temp_point_value =
|
||||||
allDeviceRowData[device_index].points[
|
allDeviceRowData[device_index].points[
|
||||||
item.device_close_point_name
|
item.device_close_point_name
|
||||||
];
|
];
|
||||||
if (temp_point_value == item.device_close_point_value) {
|
if (temp_point_value == item.device_close_point_value) {
|
||||||
item_node.device_color = item.device_close_color;
|
item_node.device_color = item.device_close_color;
|
||||||
@ -970,14 +974,14 @@
|
|||||||
if (item.device_normal_point_name == "ER") {
|
if (item.device_normal_point_name == "ER") {
|
||||||
temp_point_value =
|
temp_point_value =
|
||||||
allDeviceRowData[device_index].points[
|
allDeviceRowData[device_index].points[
|
||||||
item.device_normal_point_name
|
item.device_normal_point_name
|
||||||
];
|
];
|
||||||
if (temp_point_value == "true") {
|
if (temp_point_value == "true") {
|
||||||
item_node.device_color = item.device_normal_color;
|
item_node.device_color = item.device_normal_color;
|
||||||
} else {
|
} else {
|
||||||
temp_point_value =
|
temp_point_value =
|
||||||
allDeviceRowData[device_index].points[
|
allDeviceRowData[device_index].points[
|
||||||
item.device_close_point_name
|
item.device_close_point_name
|
||||||
];
|
];
|
||||||
if (temp_point_value == item.device_close_point_value) {
|
if (temp_point_value == item.device_close_point_value) {
|
||||||
item_node.device_color = item.device_close_color;
|
item_node.device_color = item.device_close_color;
|
||||||
@ -986,14 +990,14 @@
|
|||||||
} else if (item.device_close_point_name == "ER") {
|
} else if (item.device_close_point_name == "ER") {
|
||||||
temp_point_value =
|
temp_point_value =
|
||||||
allDeviceRowData[device_index].points[
|
allDeviceRowData[device_index].points[
|
||||||
item.device_close_point_name
|
item.device_close_point_name
|
||||||
];
|
];
|
||||||
if (temp_point_value == "true") {
|
if (temp_point_value == "true") {
|
||||||
item_node.device_color = item.device_close_color;
|
item_node.device_color = item.device_close_color;
|
||||||
} else {
|
} else {
|
||||||
temp_point_value =
|
temp_point_value =
|
||||||
allDeviceRowData[device_index].points[
|
allDeviceRowData[device_index].points[
|
||||||
item.device_normal_point_name
|
item.device_normal_point_name
|
||||||
];
|
];
|
||||||
if (
|
if (
|
||||||
temp_point_value == item.device_normal_point_value
|
temp_point_value == item.device_normal_point_value
|
||||||
@ -1004,7 +1008,7 @@
|
|||||||
} else {
|
} else {
|
||||||
temp_point_value =
|
temp_point_value =
|
||||||
allDeviceRowData[device_index].points[
|
allDeviceRowData[device_index].points[
|
||||||
item.device_normal_point_name
|
item.device_normal_point_name
|
||||||
];
|
];
|
||||||
if (temp_point_value == item.device_normal_point_value) {
|
if (temp_point_value == item.device_normal_point_value) {
|
||||||
item_node.device_color = item.device_normal_color;
|
item_node.device_color = item.device_normal_color;
|
||||||
@ -1607,23 +1611,23 @@
|
|||||||
selector: "#forgeViewer",
|
selector: "#forgeViewer",
|
||||||
elevCb: elevatorShow
|
elevCb: elevatorShow
|
||||||
? () => {
|
? () => {
|
||||||
let elevOption = {
|
let elevOption = {
|
||||||
selector: "#forgeViewer",
|
selector: "#forgeViewer",
|
||||||
viewer: viewer,
|
viewer: viewer,
|
||||||
ordPath: {
|
ordPath: {
|
||||||
area_tag: pageAct.AreaTag,
|
area_tag: pageAct.AreaTag,
|
||||||
building_tag: pageAct.buiTag,
|
building_tag: pageAct.buiTag,
|
||||||
},
|
},
|
||||||
sensorObjs,
|
sensorObjs,
|
||||||
};
|
};
|
||||||
|
|
||||||
// 電梯移動訂閱程序載入
|
// 電梯移動訂閱程序載入
|
||||||
let forge3DElev = new Forge3DElevFull(elevOption);
|
let forge3DElev = new Forge3DElevFull(elevOption);
|
||||||
forge3DElev.bajaEndCallback = function () {
|
forge3DElev.bajaEndCallback = function () {
|
||||||
endPageLoading();
|
endPageLoading();
|
||||||
};
|
};
|
||||||
forge3DElev.init();
|
forge3DElev.init();
|
||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
curDevice: {
|
curDevice: {
|
||||||
...device,
|
...device,
|
||||||
@ -1720,10 +1724,10 @@
|
|||||||
let name =
|
let name =
|
||||||
lightControl === "node" && pageAct.sysSubTag === "L1"
|
lightControl === "node" && pageAct.sysSubTag === "L1"
|
||||||
? currentData.filter(
|
? currentData.filter(
|
||||||
(x) => x.device_node_guid == devObj.device_node_guid
|
(x) => x.device_node_guid == devObj.device_node_guid
|
||||||
)[0]?.device_node_full_name
|
)[0]?.device_node_full_name
|
||||||
: currentData.filter((x) => x.device_guid == devObj.device_guid)[0]
|
: currentData.filter((x) => x.device_guid == devObj.device_guid)[0]
|
||||||
?.full_name;
|
?.full_name;
|
||||||
devObj.full_name = name;
|
devObj.full_name = name;
|
||||||
parentEle = crePosPopover(position, devObj);
|
parentEle = crePosPopover(position, devObj);
|
||||||
$(parentEle).click();
|
$(parentEle).click();
|
||||||
|
@ -181,7 +181,7 @@ class elevator3D {
|
|||||||
this.ele = option.element;
|
this.ele = option.element;
|
||||||
this.viewer = option.viewer;
|
this.viewer = option.viewer;
|
||||||
this.nodeId = option.nodeId;
|
this.nodeId = option.nodeId;
|
||||||
this.speed = option.speed ?? 0.07;
|
this.speed = option.speed ?? 0.18;
|
||||||
this.tagValue = option.tagValue ?? "";
|
this.tagValue = option.tagValue ?? "";
|
||||||
this.fragProxys = [];
|
this.fragProxys = [];
|
||||||
this.fragProxy = null;
|
this.fragProxy = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user