From 38a353f799250a9c6323ce5145fdac09964d844d Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 13 八月 2025 15:42:09 +0800
Subject: [PATCH] 华远:《直观图》增加各站pcs不良数的统计。
---
WebTM/views/案例代码/华远/HY_HistogramReport.html | 40 ++++++++++++++++++++++++++++++++++++++++
WebTM/Properties/PublishProfiles/LAYUI.pubxml.user | 2 +-
2 files changed, 41 insertions(+), 1 deletions(-)
diff --git a/WebTM/Properties/PublishProfiles/LAYUI.pubxml.user b/WebTM/Properties/PublishProfiles/LAYUI.pubxml.user
index ef24de6..4624ea7 100644
--- a/WebTM/Properties/PublishProfiles/LAYUI.pubxml.user
+++ b/WebTM/Properties/PublishProfiles/LAYUI.pubxml.user
@@ -4978,7 +4978,7 @@
<publishTime>09/13/2024 15:42:13</publishTime>
</File>
<File Include="views/妗堜緥浠g爜/鍗庤繙/HY_HistogramReport.html">
- <publishTime>08/12/2025 17:39:01</publishTime>
+ <publishTime>08/13/2025 15:33:27</publishTime>
</File>
<File Include="views/妗堜緥浠g爜/鍗庤繙/HY_HistogramReport_ForPCSCheckNote.html">
<publishTime>06/23/2025 14:35:05</publishTime>
diff --git "a/WebTM/views/\346\241\210\344\276\213\344\273\243\347\240\201/\345\215\216\350\277\234/HY_HistogramReport.html" "b/WebTM/views/\346\241\210\344\276\213\344\273\243\347\240\201/\345\215\216\350\277\234/HY_HistogramReport.html"
index e744e8f..60e21b0 100644
--- "a/WebTM/views/\346\241\210\344\276\213\344\273\243\347\240\201/\345\215\216\350\277\234/HY_HistogramReport.html"
+++ "b/WebTM/views/\346\241\210\344\276\213\344\273\243\347\240\201/\345\215\216\350\277\234/HY_HistogramReport.html"
@@ -53,6 +53,8 @@
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
</div>
</div>
+ <div id="HBadLabelNameList">
+ </div>
<div id="HistogramReport" style = "background-color: black; height: 2000px; width: 100%; display: flex; flex-direction: column; align-items:center;">
</div>
@@ -81,6 +83,12 @@
var HBarCode_PNL_Note = ""; //璁板綍鏌ヨ鍚庣殑PNL鏉$爜缂栧彿
var HLayOut_PNL = []; //PNL甯冨眬淇℃伅鏁版嵁
var HPCSNoList = []; //璁板綍甯冨眬涓婂凡缁忓姞鍏ョ殑PCS鍙�
+
+ var HBadLabelNameList = ["AOI1", "AOI2", "AOI3", "AOI4", "AVI", "MRB", "鐢垫祴"]; //妫�楠岀珯鍒爣绛惧悕绉版暟缁�
+ var HBadInfo = {}; //妫�楠岀珯鍒搴斾笉鑹暟閲�
+ for (var i = 0; i < HBadLabelNameList.length; i++) {
+ HBadInfo[HBadLabelNameList[i]] = 0;
+ }
//#endregion
//#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -357,6 +365,11 @@
if (data[i]["HIsBadFlag"] == "1") {
HButtonElement_PCS.style = "background-image: url('" + HIconUrl + "'); background-size: cover; background-position: center; background-repeat: no-repeat;background-color:" + data[i]["HPCSColor"] + ";";
+
+ //缁熻妫�楠岀珯鍒搴斾笉鑹暟閲�
+ if (typeof (HBadInfo[data[i]["HCheckProcName"]]) != "undefined") {
+ HBadInfo[data[i]["HCheckProcName"]] += 1;
+ }
} else {
HButtonElement_PCS.style = "background-image: url('" + HIconUrl + "'); background-size: cover; background-position: center; background-repeat: no-repeat;background-color:black;";
}
@@ -388,6 +401,9 @@
HPosition_x = data[i]["HPosition_x"];
}
};
+
+ //璁剧疆 妫�楠岀珯鍒爣绛�
+ setBadInfoLabel();
}
//#endregion
@@ -458,6 +474,30 @@
}
}
//#endregion
+
+ //#region 璁剧疆涓嶈壇鏍囩
+ function setBadInfoLabel() {
+ //鑾峰彇鏍囩瀹瑰櫒
+ var HBadLabelNameListElement = document.getElementById("HBadLabelNameList");
+ if (HBadLabelNameListElement != null) {
+ // 閬嶅巻鏍囩瀹瑰櫒瀵硅薄涓殑鎵�鏈夊瓙鍏冪礌骞朵粠DOM涓Щ闄�
+ while (HBadLabelNameListElement.firstChild) {
+ HBadLabelNameListElement.removeChild(HBadLabelNameListElement.firstChild);
+ }
+
+ for (var i = 0; i < HBadLabelNameList.length; i++) {
+ //set瀹瑰櫒
+ var labelElement= document.createElement('div'); //鏍囩
+ labelElement.id = HBadLabelNameList[i]; //鏍囩鐨刬d
+ labelElement.style = "font-size: 20px; color: red;margin-left:50px;display: inline;";
+ labelElement.innerHTML = HBadLabelNameList[i] + "锛�" + HBadInfo[HBadLabelNameList[i]];
+
+ //灏嗘爣绛炬坊鍔犲埌鏍囩瀹瑰櫒瀵硅薄涓�
+ HBadLabelNameListElement.appendChild(labelElement);
+ }
+ }
+ }
+ //#endregion
});
//#endregion
--
Gitblit v1.9.1