[系統監控] 各樓層上方增加燈號
This commit is contained in:
parent
9a17604f77
commit
ead6a13f4b
@ -6,23 +6,29 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal center Add -->
|
<!-- Modal center Add -->
|
||||||
<div class="modal fade"
|
<div
|
||||||
|
class="modal fade"
|
||||||
id="lightSchModal"
|
id="lightSchModal"
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
data-backdrop="static"
|
data-backdrop="static"
|
||||||
data-keyboard="false">
|
data-keyboard="false"
|
||||||
<div class="modal-dialog modal-dialog-centered"
|
>
|
||||||
|
<div
|
||||||
|
class="modal-dialog modal-dialog-centered"
|
||||||
role="document"
|
role="document"
|
||||||
style="min-width: 60%">
|
style="min-width: 60%"
|
||||||
|
>
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">燈控排程</h4>
|
<h4 class="modal-title">燈控排程</h4>
|
||||||
<button type="button"
|
<button
|
||||||
|
type="button"
|
||||||
class="close"
|
class="close"
|
||||||
data-dismiss="modal"
|
data-dismiss="modal"
|
||||||
aria-label="Close">
|
aria-label="Close"
|
||||||
|
>
|
||||||
<span aria-hidden="true"><i class="fal fa-times"></i></span>
|
<span aria-hidden="true"><i class="fal fa-times"></i></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -181,7 +187,7 @@
|
|||||||
? parseInt(data.value)
|
? parseInt(data.value)
|
||||||
: 0;
|
: 0;
|
||||||
}
|
}
|
||||||
console.log(matchDevice, data)
|
|
||||||
if (
|
if (
|
||||||
data.point_name == norDevPoiName &&
|
data.point_name == norDevPoiName &&
|
||||||
data.value == matchDevice.device_normal_point_value
|
data.value == matchDevice.device_normal_point_value
|
||||||
@ -237,7 +243,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setLightColor() {
|
/* function setLightColor() {
|
||||||
$("[data-light-type]").each((index, ele) => {
|
$("[data-light-type]").each((index, ele) => {
|
||||||
let type = $(ele).data("light-type");
|
let type = $(ele).data("light-type");
|
||||||
let isFlashing = false;
|
let isFlashing = false;
|
||||||
@ -266,42 +272,7 @@
|
|||||||
$(ele).parents(".card.device-wrap").removeClass("light-flash");
|
$(ele).parents(".card.device-wrap").removeClass("light-flash");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
} */
|
||||||
|
|
||||||
// 設置昇位圖上方 燈號
|
|
||||||
function setTopLight() {
|
|
||||||
let sysSubObj = pageAct.sysSubObj;
|
|
||||||
let strHtml = ``;
|
|
||||||
if (
|
|
||||||
sysSubObj.device_normal_point_name != null &&
|
|
||||||
sysSubObj.device_normal_point_value != null
|
|
||||||
) {
|
|
||||||
strHtml += ` <div class="row m-0 align-items-center">
|
|
||||||
<span id="sysNorLight" class="circle-light mr-2 " data-light-type="normal"></span>
|
|
||||||
<label class="mb-0">${sysSubObj.device_normal_text}</label>
|
|
||||||
</div>`;
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
sysSubObj.device_close_point_name != null &&
|
|
||||||
sysSubObj.device_close_point_value != null
|
|
||||||
) {
|
|
||||||
strHtml += ` <div class="row m-0 align-items-center">
|
|
||||||
<span id="sysCloLight" class="circle-light mr-2" data-light-type="close"></span>
|
|
||||||
<label class="mb-0">${sysSubObj.device_close_text}</label>
|
|
||||||
</div>`;
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
sysSubObj.device_error_point_name != null &&
|
|
||||||
sysSubObj.device_error_point_value != null
|
|
||||||
) {
|
|
||||||
strHtml += ` <div class="row m-0 align-items-center">
|
|
||||||
<span id="sysErrLight" class="circle-light mr-2" data-light-type="error"></span>
|
|
||||||
<label class="mb-0">${sysSubObj.device_error_text}</label>
|
|
||||||
</div>`;
|
|
||||||
}
|
|
||||||
|
|
||||||
return strHtml;
|
|
||||||
}
|
|
||||||
|
|
||||||
function setLightSchBlcok(obj) {
|
function setLightSchBlcok(obj) {
|
||||||
let devNum = $(obj).parents(".device-wrap").data("number");
|
let devNum = $(obj).parents(".device-wrap").data("number");
|
||||||
@ -371,32 +342,43 @@
|
|||||||
$.each(floObj.device_list, (index2, devObj) => {
|
$.each(floObj.device_list, (index2, devObj) => {
|
||||||
allDevList.push(devObj);
|
allDevList.push(devObj);
|
||||||
let devItem = getRiserPoiObj();
|
let devItem = getRiserPoiObj();
|
||||||
strHtml += `<div class="card m-1 border device-wrap" data-number="${devObj.device_number
|
strHtml += `<div class="card m-1 border device-wrap" data-number="${
|
||||||
|
devObj.device_number
|
||||||
}" data-position="${position}">
|
}" data-position="${position}">
|
||||||
<div class="card-body p-2">
|
<div class="card-body p-2">
|
||||||
<div class="d-flex mb-2">
|
<div class="d-flex mb-2">
|
||||||
<div class="mr-5 cur-poi">
|
<div class="mr-5 cur-poi">
|
||||||
<span class="d-inline-block mr-3">
|
<span class="d-inline-block mr-3">
|
||||||
<img src="${baseImgUrl +
|
<img src="${
|
||||||
|
baseImgUrl +
|
||||||
varPathDevIcon +
|
varPathDevIcon +
|
||||||
devObj.device_image
|
devObj.device_image
|
||||||
}" class="profile-image rounded-circle" onerror="defDev(this)" alt="...">
|
}" class="profile-image rounded-circle" onerror="defDev(this)" alt="...">
|
||||||
</span>
|
</span>
|
||||||
<a name="devItemName" data-number="${devObj.device_number
|
<a name="devItemName" data-number="${
|
||||||
}" href="javascript:;">${devObj.full_name
|
devObj.device_number
|
||||||
|
}" href="javascript:;">${
|
||||||
|
devObj.full_name
|
||||||
}</a>
|
}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex mb-0 mt-2 align-items-center">
|
<div class="d-flex mb-0 mt-2 align-items-center">
|
||||||
<span id="${devObj.device_number
|
<span id="${
|
||||||
|
devObj.device_number
|
||||||
}_status" class="circle-light"></span>
|
}_status" class="circle-light"></span>
|
||||||
<span class="${devItem ? "" : "d-none"
|
<span class="${
|
||||||
} ml-2">${devItem?.full_name
|
devItem ? "" : "d-none"
|
||||||
}:<span name="devItemPoiVal" data-point="${devItem?.points
|
} ml-2">${
|
||||||
|
devItem?.full_name
|
||||||
|
}:<span name="devItemPoiVal" data-point="${
|
||||||
|
devItem?.points
|
||||||
}"></span>${devItem?.unit}</span>
|
}"></span>${devItem?.unit}</span>
|
||||||
<a href="javascript:;" name="devItem" data-id="${devObj.device_guid
|
<a href="javascript:;" name="devItem" data-id="${
|
||||||
}" data-number="${devObj.device_number
|
devObj.device_guid
|
||||||
}" data-name="${devObj.full_name
|
}" data-number="${
|
||||||
|
devObj.device_number
|
||||||
|
}" data-name="${
|
||||||
|
devObj.full_name
|
||||||
}" class=" ml-2 mb-0 " data-toggle="tooltip" title="默认的 Tooltip">詳細資料</a>
|
}" class=" ml-2 mb-0 " data-toggle="tooltip" title="默认的 Tooltip">詳細資料</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,9 +4,10 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="row m-0 mb-3">
|
<!-- <div class="row m-0 mb-3">
|
||||||
<button id="resChartZoom" class="btn btn-info">圖檔重置</button>
|
<button id="resChartZoom" class="btn btn-info">圖檔重置</button>
|
||||||
</div>
|
</div> -->
|
||||||
|
<div id="topLight" class="d-flex mb-4" style="gap: 15px"></div>
|
||||||
<!-- <div class="row">
|
<!-- <div class="row">
|
||||||
<div id="floChart" style="height : 80vh!important;width:100%"></div>
|
<div id="floChart" style="height : 80vh!important;width:100%"></div>
|
||||||
</div> -->
|
</div> -->
|
||||||
@ -15,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%">
|
||||||
@ -24,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
|
||||||
|
id="forgeHeatBarDiv"
|
||||||
class="d-flex mb-4 position-absolute"
|
class="d-flex mb-4 position-absolute"
|
||||||
style="gap: 15px"></div>
|
style="gap: 15px"
|
||||||
|
></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -47,6 +52,10 @@
|
|||||||
getHotspotPoint(() => {
|
getHotspotPoint(() => {
|
||||||
show3DModel(pageAct.urn);
|
show3DModel(pageAct.urn);
|
||||||
});
|
});
|
||||||
|
if (!tempSubTag.includes(pageAct.sysSubTag)) {
|
||||||
|
$("#topLight").html(setTopLight());
|
||||||
|
setLightColor();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
onEvent("click", "#resChartZoom", function () {
|
onEvent("click", "#resChartZoom", function () {
|
||||||
|
1345
Frontend/index.html
1345
Frontend/index.html
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user