diff --git a/index.html b/index.html
index 1fdce78..7fb5d27 100644
--- a/index.html
+++ b/index.html
@@ -899,6 +899,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
{ mainSys: "S", subSys: "R", iconClass: "./gif/R_white.png" }, // 門禁
{ mainSys: "P", subSys: "PSC", iconClass: "./gif/PSC_white.png" }, // 停管
{ mainSys: "W3", subSys: "W1", iconClass: "./gif/W3_white.png" }, // 0131目前沒有
+ { mainSys: "ME", subSys: "M2", iconClass: "./gif/W2_white.png" },
];
var tempSysSubText = [
@@ -1267,6 +1268,11 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
(rel) => {
console.log(rel);
$(this).parents(".toast").YTNotice("hide");
+ // 從 noticeOptArr 中移除已確認的通知
+ const index = noticeOptArr.findIndex((x) => x.id == uuid);
+ if (index !== -1) {
+ noticeOptArr.splice(index, 1);
+ }
},
"text"
);
@@ -2387,10 +2393,11 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
noticeObj.forEach((notice) => {
let div2 = creDiv(["row", "m-0"]);
let span1 = creSpan(notice.title + ":", ["m-0"]);
+ let displayValue = data[notice.data];
if (notice.data === "uuid") {
- data[notice.data] = data[notice.data].split("-")[0];
+ displayValue = data[notice.data].split("-")[0];
}
- span1.append(creSpan(data[notice.data]));
+ span1.append(creSpan(displayValue));
div2.append(span1);
div1.append(div2);
});
@@ -2409,8 +2416,10 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
notices.push(main);
}
});
-
- $("#noticeBlock").YTNotice("add_many", notices.oSort("id").reverse());
+ // 只添加新的通知,不清空已存在的通知
+ if (notices.length > 0) {
+ $("#noticeBlock").YTNotice("add_many", notices.oSort("id").reverse());
+ }
});
}