duhe
8 天以前 38a353f799250a9c6323ce5145fdac09964d844d
华远:《直观图》增加各站pcs不良数的统计。
2个文件已修改
42 ■■■■■ 已修改文件
WebTM/Properties/PublishProfiles/LAYUI.pubxml.user 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/案例代码/华远/HY_HistogramReport.html 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/Properties/PublishProfiles/LAYUI.pubxml.user
@@ -4978,7 +4978,7 @@
      <publishTime>09/13/2024 15:42:13</publishTime>
    </File>
    <File Include="views/案例代码/华远/HY_HistogramReport.html">
      <publishTime>08/12/2025 17:39:01</publishTime>
      <publishTime>08/13/2025 15:33:27</publishTime>
    </File>
    <File Include="views/案例代码/华远/HY_HistogramReport_ForPCSCheckNote.html">
      <publishTime>06/23/2025 14:35:05</publishTime>
WebTM/views/°¸Àý´úÂë/»ªÔ¶/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];                                                 //标签的id
                        labelElement.style = "font-size: 20px; color: red;margin-left:50px;display: inline;";
                        labelElement.innerHTML = HBadLabelNameList[i] + ":" + HBadInfo[HBadLabelNameList[i]];
                        //将标签添加到标签容器对象中
                        HBadLabelNameListElement.appendChild(labelElement);
                    }
                }
            }
            //#endregion
        });
            //#endregion