[Frontend]歷史資料月選擇及語系修改 | 告警系統棟別隱藏 $3
This commit is contained in:
		
							parent
							
								
									22396c5736
								
							
						
					
					
						commit
						cb9f14d136
					
				@ -1050,6 +1050,9 @@
 | 
				
			|||||||
			{
 | 
								{
 | 
				
			||||||
				title: "棟別-樓層",
 | 
									title: "棟別-樓層",
 | 
				
			||||||
						data: "buildingFloorName_zh",
 | 
											data: "buildingFloorName_zh",
 | 
				
			||||||
 | 
					      render: (data) => {
 | 
				
			||||||
 | 
					        return data.replace("$3", "");
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				title: "異常ID",
 | 
									title: "異常ID",
 | 
				
			||||||
 | 
				
			|||||||
@ -119,8 +119,25 @@
 | 
				
			|||||||
  pageAct.hisBuiName = "";
 | 
					  pageAct.hisBuiName = "";
 | 
				
			||||||
  hisFirst = true;
 | 
					  hisFirst = true;
 | 
				
			||||||
  $(function () {
 | 
					  $(function () {
 | 
				
			||||||
    flatpickr(".selectDate", {});
 | 
					    flatpickr(".selectDate", {
 | 
				
			||||||
    flatpickr(".selectMonth", { dateFormat: "Y-m", });
 | 
					      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 = "";
 | 
					    let html = "";
 | 
				
			||||||
    for (let building of pageAct.buildList) {
 | 
					    for (let building of pageAct.buildList) {
 | 
				
			||||||
      html += `<label class="btn btn-secondary">
 | 
					      html += `<label class="btn btn-secondary">
 | 
				
			||||||
@ -450,7 +467,7 @@
 | 
				
			|||||||
      new Date(new Date().setDate(new Date().getDate() + 1)),
 | 
					      new Date(new Date().setDate(new Date().getDate() + 1)),
 | 
				
			||||||
      "date"
 | 
					      "date"
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
 | 
					    $(".flatpickr-innerContainer").show();
 | 
				
			||||||
    if (type == "day" || type == "today" || type == "ytd") {
 | 
					    if (type == "day" || type == "today" || type == "ytd") {
 | 
				
			||||||
      let date = type == "ytd" ? ytd : now;
 | 
					      let date = type == "ytd" ? ytd : now;
 | 
				
			||||||
      $("#his_startdate").css("display", "block");
 | 
					      $("#his_startdate").css("display", "block");
 | 
				
			||||||
@ -495,6 +512,7 @@
 | 
				
			|||||||
      $("#his_enddate").css("display", "none");
 | 
					      $("#his_enddate").css("display", "none");
 | 
				
			||||||
      $("#getmonth").css("display", "block");
 | 
					      $("#getmonth").css("display", "block");
 | 
				
			||||||
      $("#getmonth").val(now.substr(0, 7));
 | 
					      $("#getmonth").val(now.substr(0, 7));
 | 
				
			||||||
 | 
					      $(".flatpickr-innerContainer").hide();
 | 
				
			||||||
    } else if (type == "ytd") {
 | 
					    } else if (type == "ytd") {
 | 
				
			||||||
      $("#his_startdate").css("display", "block");
 | 
					      $("#his_startdate").css("display", "block");
 | 
				
			||||||
      $("#his_enddate").css("display", "none");
 | 
					      $("#his_enddate").css("display", "none");
 | 
				
			||||||
 | 
				
			|||||||
@ -821,6 +821,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
 | 
				
			|||||||
                + src/../jquery-snippets.js (core) -->
 | 
					                + src/../jquery-snippets.js (core) -->
 | 
				
			||||||
  <!-- verdors.bundle.js 已含有 jquery Library v3.5.1-->
 | 
					  <!-- verdors.bundle.js 已含有 jquery Library v3.5.1-->
 | 
				
			||||||
  <script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
 | 
					  <script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
 | 
				
			||||||
 | 
					  <script src="https://npmcdn.com/flatpickr@4.6.13/dist/l10n/zh-tw.js"></script>
 | 
				
			||||||
  <script src="lib/vendors.bundle.js"></script>
 | 
					  <script src="lib/vendors.bundle.js"></script>
 | 
				
			||||||
  <!-- toast 第三方套件 若 require 此套件只能用 define 使用,先暫時 html 引用-->
 | 
					  <!-- toast 第三方套件 若 require 此套件只能用 define 使用,先暫時 html 引用-->
 | 
				
			||||||
  <script src="lib/notifications/toastr/toastr.min.js"></script>
 | 
					  <script src="lib/notifications/toastr/toastr.min.js"></script>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user