照明設備開關 bug 修正

This commit is contained in:
Celeste 2023-04-28 14:01:58 +08:00
parent 605f3f8f87
commit 4e96375be4
5 changed files with 3653 additions and 3751 deletions

View File

@ -6,29 +6,23 @@
</div>
<!-- Modal center Add -->
<div
class="modal fade"
<div class="modal fade"
id="lightSchModal"
tabindex="-1"
role="dialog"
aria-hidden="true"
data-backdrop="static"
data-keyboard="false"
>
<div
class="modal-dialog modal-dialog-centered"
data-keyboard="false">
<div class="modal-dialog modal-dialog-centered"
role="document"
style="min-width: 60%"
>
style="min-width: 60%">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">燈控排程</h4>
<button
type="button"
<button type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
aria-label="Close">
<span aria-hidden="true"><i class="fal fa-times"></i></span>
</button>
</div>
@ -59,6 +53,7 @@
var forgeInvTypeDef = null;
$(function () {
$(loadEle).Loading("start");
getBuildMenu((arr, data) => {
buildMenuData = data;
if (arr.indexOf(4) != -1) {
@ -162,15 +157,31 @@
if (lightOn) {
setLightValues(matchDevice.device_guid, 200, 0xe1cf18);
// changeColorForHotspot(matchDevice.spriteDbid, null, true)
lightOnHotColorArr.push(matchDevice.spriteDbid);
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 !== matchDevice.spriteDbid
(light) => light.spriteDbid !== matchDevice.spriteDbid
);
lightOffHotColorArr.push(matchDevice.spriteDbid);
heatMap?.changeTemp(matchDevice.device_number, 0);
}
}
@ -187,7 +198,6 @@
? parseInt(data.value)
: 0;
}
if (
data.point_name == norDevPoiName &&
data.value == matchDevice.device_normal_point_value
@ -211,9 +221,24 @@
.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");
changeColorForHotspot(lightOnHotColorArr, null, true);
changeColorForHotspot(lightOffHotColorArr, null, false);
setLightColor();
setForgeHotSpotColor(matchDevice);
lightDevForgeSpotLig(matchDevice);
@ -342,43 +367,32 @@
$.each(floObj.device_list, (index2, devObj) => {
allDevList.push(devObj);
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}">
<div class="card-body p-2">
<div class="d-flex mb-2">
<div class="mr-5 cur-poi">
<span class="d-inline-block mr-3">
<img src="${
baseImgUrl +
<img src="${baseImgUrl +
varPathDevIcon +
devObj.device_image
}" class="profile-image rounded-circle" onerror="defDev(this)" alt="...">
</span>
<a name="devItemName" data-number="${
devObj.device_number
}" href="javascript:;">${
devObj.full_name
<a name="devItemName" data-number="${devObj.device_number
}" href="javascript:;">${devObj.full_name
}</a>
</div>
</div>
<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>
<span class="${
devItem ? "" : "d-none"
} ml-2">${
devItem?.full_name
}<span name="devItemPoiVal" data-point="${
devItem?.points
<span class="${devItem ? "" : "d-none"
} ml-2">${devItem?.full_name
}<span name="devItemPoiVal" data-point="${devItem?.points
}"></span>${devItem?.unit}</span>
<a href="javascript:;" name="devItem" data-id="${
devObj.device_guid
}" data-number="${
devObj.device_number
}" data-name="${
devObj.full_name
<a href="javascript:;" name="devItem" data-id="${devObj.device_guid
}" data-number="${devObj.device_number
}" data-name="${devObj.full_name
}" class=" ml-2 mb-0 " data-toggle="tooltip" title="默认的 Tooltip">詳細資料</a>
</div>
</div>
@ -511,12 +525,11 @@
}
function show3DModel(urn) {
$(loadEle).Loading("start");
launchViewerForHotspot(
urn,
(viewer, nodeIds) => {
// 隱藏 toolbar
// document.querySelector("#guiviewer3d-toolbar").style.display = "none";
document.querySelector("#guiviewer3d-toolbar").style.display = "none";
let devDbIds = allDevList.map((x) => x.forge_dbid);
// 大類
let subDevDbId = [];
@ -534,11 +547,11 @@
setInviForge(forgeInvTypeDef, [...devDbIds, ...subDevDbId]);
}
$(loadEle).Loading("close");
let sensorObjs = [];
let devices = [];
if (pageAct.sysSubTag === "M12") {
addHotPoint(viewer);
Forge3DSensor.sensorTimes = 0;
allDevList.forEach((device) => {
Forge3DSensor.sensorTimes++;
const sensorObj = new Forge3DSensor({
@ -670,9 +683,7 @@
getE1NodeId(viewer);
}
},
() => {
$(loadEle).Loading("close");
},
() => { },
"[name=forgeViewer]"
);
}

View File

@ -49,7 +49,7 @@
getHotspotPoint(() => {
show3DModel(pageAct.urn);
});
if (!tempSubTag.includes(pageAct.sysSubTag)) {
if (tempSubTag.includes(pageAct.sysSubTag)) {
$("#topLight").html(setTopLight());
setLightColor();
}
@ -573,7 +573,13 @@
if (lightOn && matchDevice.spriteDbid) {
// setLightValues(matchDevice.device_guid, 200, 0xe1cf18);
// changeColorForHotspot(matchDevice.spriteDbid, null, lightOn);
if (
!lightOnHotColorArr.some(
({ spriteDbid }) => spriteDbid === matchDevice.spriteDbid
)
) {
lightOnHotColorArr.push(matchDevice);
}
lightOffHotColorArr = lightOffHotColorArr.filter(
(light) => light.spriteDbid !== matchDevice.spriteDbid
);
@ -582,10 +588,16 @@
// console.log(lightOn, matchDevice);
// setLightValues(matchDevice.device_guid, 0, 0xffffff);
// changeColorForHotspot(matchDevice.spriteDbid, null, lightOn);
if (
!lightOffHotColorArr.some(
({ spriteDbid }) => spriteDbid === matchDevice.spriteDbid
)
) {
lightOffHotColorArr.push(matchDevice);
}
lightOnHotColorArr = lightOnHotColorArr.filter(
(light) => light.spriteDbid !== matchDevice.spriteDbid
);
lightOffHotColorArr.push(matchDevice);
heatMap?.changeTemp(matchDevice.device_number, 0);
}
}
@ -681,7 +693,6 @@
deviceScatterErrorArr.length ===
option.series[0].data.length
) {
console.log("deviceScatterNormalArr", deviceScatterNormalArr)
deviceScatterNormalArr.forEach((device) => {
const cur = option.series[0].data.find(
({ device_number }) => device_number === device.device_number
@ -693,7 +704,6 @@
cur.itemStyle = { color: normalColor };
});
deviceScatterCloseArr.forEach((device) => {
const cur = option.series[0].data.find(
({ device_number }) => device_number === device.device_number
@ -1150,7 +1160,7 @@
};
obj.itemStyle = {
color: item.device_color || item.device_normal_color,
color: item.device_color || item.device_close_color,
};
res.push(obj);

View File

@ -13,94 +13,64 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
<title>Marketing Dashboard - Application Intel - SmartAdmin v4.5.1</title>
<meta name="description" content="Marketing Dashboard" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no, minimal-ui"
/>
<meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no, minimal-ui" />
<!-- Call App Mode on ios devices -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- Remove Tap Highlight on Windows Phone IE -->
<meta name="msapplication-tap-highlight" content="no" />
<!-- base css -->
<link
id="vendorsbundle"
<link id="vendorsbundle"
rel="stylesheet"
media="screen, print"
href="lib/vendors.bundle.css"
/>
<link
id="appbundle"
href="lib/vendors.bundle.css" />
<link id="appbundle"
rel="stylesheet"
media="screen, print"
href="lib/app.bundle.css"
/>
href="lib/app.bundle.css" />
<link id="mytheme" rel="stylesheet" media="screen, print" href="#" />
<link
id="myskin"
<link id="myskin"
rel="stylesheet"
media="screen, print"
href="lib/skins/skin-master.css"
/>
href="lib/skins/skin-master.css" />
<link rel="stylesheet" href="lib/notifications/toastr/toastr.min.css" />
<link rel="stylesheet" href="lib/dropzone/dropzone.css" />
<!-- Place favicon.ico in the root directory -->
<link
rel="apple-touch-icon"
<link rel="apple-touch-icon"
sizes="180x180"
href="img/favicon/apple-touch-icon.png"
/>
<link
rel="icon"
href="img/favicon/apple-touch-icon.png" />
<link rel="icon"
type="image/png"
sizes="32x32"
href="img/favicon/favicon-32x32.png"
/>
<link
rel="mask-icon"
href="img/favicon/favicon-32x32.png" />
<link rel="mask-icon"
href="img/favicon/safari-pinned-tab.svg"
color="#5bbad5"
/>
color="#5bbad5" />
<!-- Font Awesome -->
<link href="lib/fontawesome-free/css/all.min.css" rel="stylesheet" />
<link href="lib/jquery-ui/jquery-ui.min.css" rel="stylesheet" />
<!--<link href="lib/chart.js/Chart.min.css" rel="stylesheet" />-->
<link
href="lib/jstree-master/themes/default/style.min.css"
rel="stylesheet"
/>
<link
href="lib/jstree-master/themes/default-dark/style.min.css"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<link href="lib/jstree-master/themes/default/style.min.css"
rel="stylesheet" />
<link href="lib/jstree-master/themes/default-dark/style.min.css"
rel="stylesheet" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet" />
<!--<link rel="stylesheet" media="screen, print" href="https://cdn.datatables.net/1.10.21/css/dataTables.bootstrap.min.css">-->
<link
rel="stylesheet"
<link rel="stylesheet"
media="screen, print"
href="https://cdn.datatables.net/1.10.21/css/dataTables.bootstrap4.min.css"
/>
href="https://cdn.datatables.net/1.10.21/css/dataTables.bootstrap4.min.css" />
<link rel="stylesheet" href="css/site.css" />
<link
rel="stylesheet"
href="css/yourteam/plugins/yt-tooltip/yt-tooltip.css"
/>
<link
rel="stylesheet"
href="css/yourteam/plugins/yt-notice/yt-notice.css"
/>
<link
rel="stylesheet"
href="css/yourteam/plugins/yt-alert/ytpop-alert.css"
/>
<link
rel="stylesheet"
<link rel="stylesheet"
href="css/yourteam/plugins/yt-tooltip/yt-tooltip.css" />
<link rel="stylesheet"
href="css/yourteam/plugins/yt-notice/yt-notice.css" />
<link rel="stylesheet"
href="css/yourteam/plugins/yt-alert/ytpop-alert.css" />
<link rel="stylesheet"
href="https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/style.min.css"
type="text/css"
/>
type="text/css" />
</head>
<!-- BEGIN Body -->
<!-- Possible Classes
@ -128,9 +98,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
>>> more settings are described inside documentation page >>>
-->
<body
class="mod-bg-1 mod-nav-link mod-skin-dark mod-hide-info-card nav-function-top nav-function-fixed mod-lean-subheader desktop chrome webkit pace-done blur"
>
<body class="mod-bg-1 mod-nav-link mod-skin-dark mod-hide-info-card nav-function-top nav-function-fixed mod-lean-subheader desktop chrome webkit pace-done blur">
<!-- DOC: script to save and load page settings -->
<script>
/**
@ -203,17 +171,13 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
<header class="page-header" role="banner">
<!--we need this logo when user switches to nav-function-top-->
<div class="page-logo">
<a
href="javascript:;"
<a href="javascript:;"
name="topFunBtn"
data-page="dashboard"
class="page-logo-link press-scale-down d-flex align-items-center position-relative"
>
<img
src="img/logo.png"
class="page-logo-link press-scale-down d-flex align-items-center position-relative">
<img src="img/logo.png"
alt="SmartAdmin WebApp"
aria-roledescription="logo"
/>
aria-roledescription="logo" />
<!--<span class="page-logo-text mr-1">SmartAdmin WebApp</span>-->
<!--<span class="position-absolute text-white opacity-50 small pos-top pos-right mr-2 mt-n2"></span>
@ -222,35 +186,29 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
</div>
<!--DOC: nav menu layout change shortcut-->
<div class="hidden-md-down dropdown-icon-menu position-relative">
<a
href="#"
<a href="#"
class="header-btn btn js-waves-off"
data-action="toggle"
data-class="nav-function-hidden"
title="Hide Navigation"
>
title="Hide Navigation">
<i class="ni ni-menu"></i>
</a>
<ul>
<li>
<a
href="#"
<a href="#"
class="btn js-waves-off"
data-action="toggle"
data-class="nav-function-minify"
title="Minify Navigation"
>
title="Minify Navigation">
<i class="ni ni-minify-nav"></i>
</a>
</li>
<li>
<a
href="#"
<a href="#"
class="btn js-waves-off"
data-action="toggle"
data-class="nav-function-fixed"
title="Lock Navigation"
>
title="Lock Navigation">
<i class="ni ni-lock-nav"></i>
</a>
</li>
@ -258,83 +216,65 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
</div>
<!--DOC: mobile button appears during mobile width-->
<div class="hidden-lg-up">
<a
href="#"
<a href="#"
class="header-btn btn press-scale-down"
data-action="toggle"
data-class="mobile-nav-on"
>
data-class="mobile-nav-on">
<i class="ni ni-menu"></i>
</a>
</div>
<div class="dropdown">
<a
class="dropdown-toggle fs-1"
<a class="dropdown-toggle fs-1"
href="javascript:;"
role="button"
id="buiActDrop"
data-target="buiList"
data-toggle="dropdown"
aria-haspopup="true"
>
aria-haspopup="true">
</a>
<div
id="buiList"
class="dropdown-menu dropdown-select-menu js-auto-close"
></div>
<div id="buiList"
class="dropdown-menu dropdown-select-menu js-auto-close"></div>
</div>
<div class="ml-auto d-flex" id="froLisPage"></div>
<div class="ml-auto d-flex mr-3">
<div class="dropdown">
<a
href="javascript:;"
<a href="javascript:;"
id="toggleNoticeBtn"
class="d-flex align-items-center justify-content-center ml-2"
>
class="d-flex align-items-center justify-content-center ml-2">
<!--<img src="img/demo/avatars/avatar-admin.png" class="profile-image rounded-circle"
alt="Dr. Codex Lantern">-->
<!--you can also add username next to the avatar with the codes below:-->
<div class="row m-0 justify-content-center userblock">
<i id="noticeConIcon" class="fs-1-5 w-100 text-center"></i>
<span
id="noticeConText"
<span id="noticeConText"
class="text-truncate text-truncate-header hidden-xs-down"
data-hide="隱藏警告"
data-show="顯示警告"
></span>
data-show="顯示警告"></span>
</div>
</a>
</div>
<!--app user menu-->
<div class="dropdown">
<a
href="#"
<a href="#"
data-toggle="dropdown"
data-target="logoutList"
class="d-flex align-items-center justify-content-center ml-2"
>
class="d-flex align-items-center justify-content-center ml-2">
<!--<img src="img/demo/avatars/avatar-admin.png" class="profile-image rounded-circle"
alt="Dr. Codex Lantern">-->
<!--you can also add username next to the avatar with the codes below:-->
<div class="row m-0 justify-content-center userblock">
<i class="fas fa-user-circle fs-1-5 w-100 text-center"></i>
<span
id="usrName"
class="text-truncate text-truncate-header hidden-xs-down"
></span>
<span id="usrName"
class="text-truncate text-truncate-header hidden-xs-down"></span>
</div>
</a>
<div
id="logoutList"
class="dropdown-menu dropdown-menu-right dropdown-lg"
>
<a
id="logout"
<div id="logoutList"
class="dropdown-menu dropdown-menu-right dropdown-lg">
<a id="logout"
href="javascript:;"
class="dropdown-item fw-500 pt-3 pb-3"
>
class="dropdown-item fw-500 pt-3 pb-3">
<span>登出</span>
</a>
</div>
@ -356,11 +296,9 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
<div id="app"></div>
<!-- this overlay is activated only when mobile menu is triggered -->
<div
class="page-content-overlay"
<div class="page-content-overlay"
data-action="toggle"
data-class="mobile-nav-on"
></div>
data-class="mobile-nav-on"></div>
<div id="sysMonNavbar" class="yt-navbar yt-left-navbar">
<div class="yt-navbar-content">
@ -456,106 +394,76 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
</div>
<!-- END Page Wrapper -->
<!-- BEGIN Messenger -->
<div
class="modal fade js-modal-messenger modal-backdrop-transparent"
<div class="modal fade js-modal-messenger modal-backdrop-transparent"
tabindex="-1"
role="dialog"
aria-hidden="true"
>
aria-hidden="true">
<div class="modal-dialog modal-dialog-right">
<div class="modal-content h-100">
<div
class="dropdown-header bg-trans-gradient d-flex align-items-center w-100"
>
<div
class="d-flex flex-row align-items-center mt-1 mb-1 color-white"
>
<div class="dropdown-header bg-trans-gradient d-flex align-items-center w-100">
<div class="d-flex flex-row align-items-center mt-1 mb-1 color-white">
<span class="mr-2">
<span
class="rounded-circle profile-image d-block"
<span class="rounded-circle profile-image d-block"
style="
background-image: url('img/demo/avatars/avatar-d.png');
background-size: cover;
"
></span>
"></span>
</span>
<div class="info-card-text">
<a
href="javascript:void(0);"
<a href="javascript:void(0);"
class="fs-lg text-truncate text-truncate-lg text-white"
data-toggle="dropdown"
aria-expanded="false"
>
aria-expanded="false">
Tracey Chang
<i
class="fal fa-angle-down d-inline-block ml-1 text-white fs-md"
></i>
<i class="fal fa-angle-down d-inline-block ml-1 text-white fs-md"></i>
</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">Send Email</a>
<a class="dropdown-item" href="#">Create Appointment</a>
<a class="dropdown-item" href="#">Block User</a>
</div>
<span class="text-truncate text-truncate-md opacity-80"
>IT Director</span
>
<span class="text-truncate text-truncate-md opacity-80">IT Director</span>
</div>
</div>
<button
type="button"
<button type="button"
class="close text-white position-absolute pos-top pos-right p-2 m-1 mr-2"
data-dismiss="modal"
aria-label="Close"
>
aria-label="Close">
<span aria-hidden="true"><i class="fal fa-times"></i></span>
</button>
</div>
<div class="modal-body p-0 h-100 d-flex">
<!-- BEGIN msgr-list -->
<div
class="msgr-list d-flex flex-column bg-faded border-faded border-top-0 border-right-0 border-bottom-0 position-absolute pos-top pos-bottom"
>
<div class="msgr-list d-flex flex-column bg-faded border-faded border-top-0 border-right-0 border-bottom-0 position-absolute pos-top pos-bottom">
<div>
<div
class="height-4 width-3 h3 m-0 d-flex justify-content-center flex-column color-primary-500 pl-3 mt-2"
>
<div class="height-4 width-3 h3 m-0 d-flex justify-content-center flex-column color-primary-500 pl-3 mt-2">
<i class="fal fa-search"></i>
</div>
<input
type="text"
<input type="text"
class="form-control bg-white"
id="msgr_listfilter_input"
placeholder="Filter contacts"
aria-label="FriendSearch"
data-listfilter="#js-msgr-listfilter"
/>
data-listfilter="#js-msgr-listfilter" />
</div>
<div class="flex-1 h-100 custom-scroll">
<div class="w-100">
<ul id="js-msgr-listfilter" class="list-unstyled m-0">
<li>
<a
href="#"
<a href="#"
class="d-table w-100 px-2 py-2 text-dark hover-white"
data-filter-tags="tracey chang online"
>
<div
class="d-table-cell align-middle status status-success status-sm"
>
<span
class="profile-image-md rounded-circle d-block"
data-filter-tags="tracey chang online">
<div class="d-table-cell align-middle status status-success status-sm">
<span class="profile-image-md rounded-circle d-block"
style="
background-image: url('img/demo/avatars/avatar-d.png');
background-size: cover;
"
></span>
"></span>
</div>
<div class="d-table-cell w-100 align-middle pl-2 pr-2">
<div class="text-truncate text-truncate-md">
Tracey Chang
<small
class="d-block font-italic text-success fs-xs"
>
<small class="d-block font-italic text-success fs-xs">
Online
</small>
</div>
@ -563,28 +471,20 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
</a>
</li>
<li>
<a
href="#"
<a href="#"
class="d-table w-100 px-2 py-2 text-dark hover-white"
data-filter-tags="oliver kopyuv online"
>
<div
class="d-table-cell align-middle status status-success status-sm"
>
<span
class="profile-image-md rounded-circle d-block"
data-filter-tags="oliver kopyuv online">
<div class="d-table-cell align-middle status status-success status-sm">
<span class="profile-image-md rounded-circle d-block"
style="
background-image: url('img/demo/avatars/avatar-b.png');
background-size: cover;
"
></span>
"></span>
</div>
<div class="d-table-cell w-100 align-middle pl-2 pr-2">
<div class="text-truncate text-truncate-md">
Oliver Kopyuv
<small
class="d-block font-italic text-success fs-xs"
>
<small class="d-block font-italic text-success fs-xs">
Online
</small>
</div>
@ -592,21 +492,15 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
</a>
</li>
<li>
<a
href="#"
<a href="#"
class="d-table w-100 px-2 py-2 text-dark hover-white"
data-filter-tags="dr john cook phd away"
>
<div
class="d-table-cell align-middle status status-warning status-sm"
>
<span
class="profile-image-md rounded-circle d-block"
data-filter-tags="dr john cook phd away">
<div class="d-table-cell align-middle status status-warning status-sm">
<span class="profile-image-md rounded-circle d-block"
style="
background-image: url('img/demo/avatars/avatar-e.png');
background-size: cover;
"
></span>
"></span>
</div>
<div class="d-table-cell w-100 align-middle pl-2 pr-2">
<div class="text-truncate text-truncate-md">
@ -619,28 +513,20 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
</a>
</li>
<li>
<a
href="#"
<a href="#"
class="d-table w-100 px-2 py-2 text-dark hover-white"
data-filter-tags="ali amdaney online"
>
<div
class="d-table-cell align-middle status status-success status-sm"
>
<span
class="profile-image-md rounded-circle d-block"
data-filter-tags="ali amdaney online">
<div class="d-table-cell align-middle status status-success status-sm">
<span class="profile-image-md rounded-circle d-block"
style="
background-image: url('img/demo/avatars/avatar-g.png');
background-size: cover;
"
></span>
"></span>
</div>
<div class="d-table-cell w-100 align-middle pl-2 pr-2">
<div class="text-truncate text-truncate-md">
Ali Amdaney
<small
class="d-block font-italic fs-xs text-success"
>
<small class="d-block font-italic fs-xs text-success">
Online
</small>
</div>
@ -648,28 +534,20 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
</a>
</li>
<li>
<a
href="#"
<a href="#"
class="d-table w-100 px-2 py-2 text-dark hover-white"
data-filter-tags="sarah mcbrook online"
>
<div
class="d-table-cell align-middle status status-success status-sm"
>
<span
class="profile-image-md rounded-circle d-block"
data-filter-tags="sarah mcbrook online">
<div class="d-table-cell align-middle status status-success status-sm">
<span class="profile-image-md rounded-circle d-block"
style="
background-image: url('img/demo/avatars/avatar-h.png');
background-size: cover;
"
></span>
"></span>
</div>
<div class="d-table-cell w-100 align-middle pl-2 pr-2">
<div class="text-truncate text-truncate-md">
Sarah McBrook
<small
class="d-block font-italic fs-xs text-success"
>
<small class="d-block font-italic fs-xs text-success">
Online
</small>
</div>
@ -677,19 +555,15 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
</a>
</li>
<li>
<a
href="#"
<a href="#"
class="d-table w-100 px-2 py-2 text-dark hover-white"
data-filter-tags="ali amdaney offline"
>
data-filter-tags="ali amdaney offline">
<div class="d-table-cell align-middle status status-sm">
<span
class="profile-image-md rounded-circle d-block"
<span class="profile-image-md rounded-circle d-block"
style="
background-image: url('img/demo/avatars/avatar-a.png');
background-size: cover;
"
></span>
"></span>
</div>
<div class="d-table-cell w-100 align-middle pl-2 pr-2">
<div class="text-truncate text-truncate-md">
@ -702,28 +576,20 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
</a>
</li>
<li>
<a
href="#"
<a href="#"
class="d-table w-100 px-2 py-2 text-dark hover-white"
data-filter-tags="ali amdaney busy"
>
<div
class="d-table-cell align-middle status status-danger status-sm"
>
<span
class="profile-image-md rounded-circle d-block"
data-filter-tags="ali amdaney busy">
<div class="d-table-cell align-middle status status-danger status-sm">
<span class="profile-image-md rounded-circle d-block"
style="
background-image: url('img/demo/avatars/avatar-j.png');
background-size: cover;
"
></span>
"></span>
</div>
<div class="d-table-cell w-100 align-middle pl-2 pr-2">
<div class="text-truncate text-truncate-md">
oliver.kopyuv@gotbootstrap.com
<small
class="d-block font-italic fs-xs text-danger"
>
<small class="d-block font-italic fs-xs text-danger">
Busy
</small>
</div>
@ -731,19 +597,15 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
</a>
</li>
<li>
<a
href="#"
<a href="#"
class="d-table w-100 px-2 py-2 text-dark hover-white"
data-filter-tags="ali amdaney offline"
>
data-filter-tags="ali amdaney offline">
<div class="d-table-cell align-middle status status-sm">
<span
class="profile-image-md rounded-circle d-block"
<span class="profile-image-md rounded-circle d-block"
style="
background-image: url('img/demo/avatars/avatar-c.png');
background-size: cover;
"
></span>
"></span>
</div>
<div class="d-table-cell w-100 align-middle pl-2 pr-2">
<div class="text-truncate text-truncate-md">
@ -756,19 +618,15 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
</a>
</li>
<li>
<a
href="#"
<a href="#"
class="d-table w-100 px-2 py-2 text-dark hover-white"
data-filter-tags="ali amdaney inactive"
>
data-filter-tags="ali amdaney inactive">
<div class="d-table-cell align-middle">
<span
class="profile-image-md rounded-circle d-block"
<span class="profile-image-md rounded-circle d-block"
style="
background-image: url('img/demo/avatars/avatar-m.png');
background-size: cover;
"
></span>
"></span>
</div>
<div class="d-table-cell w-100 align-middle pl-2 pr-2">
<div class="text-truncate text-truncate-md">
@ -877,46 +735,34 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
<!-- END custom-scroll -->
<!-- BEGIN msgr__chatinput -->
<div class="d-flex flex-column">
<div
class="border-faded border-right-0 border-bottom-0 border-left-0 flex-1 mr-3 ml-3 position-relative shadow-top"
>
<div class="border-faded border-right-0 border-bottom-0 border-left-0 flex-1 mr-3 ml-3 position-relative shadow-top">
<div class="pt-3 pb-1 pr-0 pl-0 rounded-0" tabindex="-1">
<div
id="msgr_input"
<div id="msgr_input"
contenteditable="true"
data-placeholder="Type your message here..."
class="height-10 form-content-editable"
></div>
class="height-10 form-content-editable"></div>
</div>
</div>
<div
class="height-8 px-3 d-flex flex-row align-items-center flex-wrap flex-shrink-0"
>
<a
href="javascript:void(0);"
<div class="height-8 px-3 d-flex flex-row align-items-center flex-wrap flex-shrink-0">
<a href="javascript:void(0);"
class="btn btn-icon fs-xl width-1 mr-1"
data-toggle="tooltip"
data-original-title="More options"
data-placement="top"
>
data-placement="top">
<i class="fal fa-ellipsis-v-alt color-fusion-300"></i>
</a>
<a
href="javascript:void(0);"
<a href="javascript:void(0);"
class="btn btn-icon fs-xl mr-1"
data-toggle="tooltip"
data-original-title="Attach files"
data-placement="top"
>
data-placement="top">
<i class="fal fa-paperclip color-fusion-300"></i>
</a>
<a
href="javascript:void(0);"
<a href="javascript:void(0);"
class="btn btn-icon fs-xl mr-1"
data-toggle="tooltip"
data-original-title="Insert photo"
data-placement="top"
>
data-placement="top">
<i class="fal fa-camera color-fusion-300"></i>
</a>
<div class="ml-auto">
@ -932,8 +778,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
</div>
</div>
<div
id="noticeBlock"
<div id="noticeBlock"
style="
position: fixed;
top: 70px;
@ -942,8 +787,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
transition: 0.2s;
z-index: 50000;
height: 100%;
"
></div>
"></div>
<!--<button id="testsysbtn" class="btn btn-info col-1">系統監控(測試用)</button>-->
<!-- END Messenger -->
@ -1225,7 +1069,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
// 清空 loading 狀態
endPageLoading();
$(loadEle).Loading("close");
// $(loadEle).Loading("close");
$(".yt-alert").YTAlert().hide();
// 取得使用者資訊
getUserInfo();
@ -1858,7 +1702,6 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
}
function crePosPopover(position, obj) {
console.log("obj", obj);
let _position = {};
_position.tpLeft = position[0];
_position.tpTop = position[1];

View File

@ -56,7 +56,6 @@ class subscriptionDevices {
var sub = new baja.Subscriber();
sub.attach('changed', function (prop) {
console.log("Light prop", prop.getName())
if (prop.getName() === 'out') {
var out_value = this.getOutDisplay();
var target_device_number = this.$parent.getDisplayName().split('_').slice(0, 5).join('_');

View File

@ -1007,7 +1007,6 @@ class Forge3DSensor {
const viewableData = new DataVizCore.ViewableData();
viewableData.spriteSize = 30; // Sprites as points of size 24 x 24 pixels
this.deviceList.forEach((myData, index) => {
// console.log(myData)
const dbId = myData.forge_dbid;
const myPosition = myData.position;
const viewable = new DataVizCore.SpriteViewable(
@ -1109,7 +1108,13 @@ class Forge3DSensor {
Forge3DSensor.highTempForSensor.push(dbid);
break;
}
if (
(Forge3DSensor.lowerTempForSensor.length,
Forge3DSensor.normalTempForSensor.length,
Forge3DSensor.highTempForSensor.length,
Forge3DSensor.highestTempForSensor.length,
allDevList.length)
) {
await this.changeColorForSensorHotspot(
Forge3DSensor.lowerTempForSensor,
temps[0]
@ -1127,6 +1132,7 @@ class Forge3DSensor {
temps[3]
);
}
}
async changeColorForSensorHotspot(viewablesToUpdate, color) {
const dataVizExtn = await viewer.loadExtension(
@ -1171,10 +1177,6 @@ class Forge3DSensor {
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 == "Temp" || data.point_name == "TEMP") {
this.tempVal = !isNaN(parseInt(data.value)) ? parseInt(data.value) : 0;
this.curDevice = {
@ -1189,6 +1191,43 @@ class Forge3DSensor {
);
}
}
let matchDevice = allDevList.find(
(x) => x.device_number == data.device_number_full
);
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 == 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");
}
setLightColor();
setDevItemPoiValBySub(data);
$(loadEle).Loading("close");
});
myBaja.setSubscribeDeviceEndCallBack((data) => {