From cb9f14d136e878b6ee7a7a72fa18dc2beb06497d Mon Sep 17 00:00:00 2001 From: Celeste Date: Wed, 4 Oct 2023 15:10:38 +0800 Subject: [PATCH] =?UTF-8?q?[Frontend]=E6=AD=B7=E5=8F=B2=E8=B3=87=E6=96=99?= =?UTF-8?q?=E6=9C=88=E9=81=B8=E6=93=87=E5=8F=8A=E8=AA=9E=E7=B3=BB=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20|=20=E5=91=8A=E8=AD=A6=E7=B3=BB=E7=B5=B1=E6=A3=9F?= =?UTF-8?q?=E5=88=A5=E9=9A=B1=E8=97=8F=20$3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frontend/_alert.html | 5 +- Frontend/_historyData.html | 60 +- Frontend/index.html | 4663 ++++++++++++++++++------------------ 3 files changed, 2375 insertions(+), 2353 deletions(-) diff --git a/Frontend/_alert.html b/Frontend/_alert.html index 1f69c26..728e68a 100644 --- a/Frontend/_alert.html +++ b/Frontend/_alert.html @@ -1049,7 +1049,10 @@ let columns = [ { title: "棟別-樓層", - data: "buildingFloorName_zh", + data: "buildingFloorName_zh", + render: (data) => { + return data.replace("$3", ""); + }, }, { title: "異常ID", diff --git a/Frontend/_historyData.html b/Frontend/_historyData.html index 04b2d01..0b35379 100644 --- a/Frontend/_historyData.html +++ b/Frontend/_historyData.html @@ -119,13 +119,30 @@ pageAct.hisBuiName = ""; hisFirst = true; $(function () { - flatpickr(".selectDate", {}); - flatpickr(".selectMonth", { dateFormat: "Y-m", }); + flatpickr(".selectDate", { + locale: "zh_tw", + }); + flatpickr(".selectMonth", { + dateFormat: "Y-m", + locale: "zh_tw", + onMonthChange: (selectedDates, dateStr, instance) => { + const curMon = new Date( + `${instance.currentYear}-${instance.currentMonth + 1}` + ); + instance.setDate(curMon); + }, + onYearChange: (selectedDates, dateStr, instance) => { + const curMon = new Date( + `${instance.currentYear}-${instance.currentMonth + 1}` + ); + instance.setDate(curMon); + }, + }); let html = ""; for (let building of pageAct.buildList) { html += ``; + ${building.full_name} + `; } $("#his_building").find(".item").empty(); $("#his_building").find(".item").append(html); @@ -262,12 +279,12 @@ $.each(res.data.history_Main_Systems, function (index, val) { if (pageAct.mainStatus) { strHtml += `
  • - - ${val.full_name + ${val.full_name } - -