From 74d8fe6cfd8297b539276d6e06f580032f88215d Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 20 三月 2026 15:07:38 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI

---
 WebTM/layuiadmin/Scripts/webConfig.js                  |    8 
 WebTM/views/生产管理/订单状态分布/Sc_OrderStateDistribution.html |  272 +++++++++++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 252 insertions(+), 28 deletions(-)

diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js
index 60109e7..e4e378d 100644
--- a/WebTM/layuiadmin/Scripts/webConfig.js
+++ b/WebTM/layuiadmin/Scripts/webConfig.js
@@ -4,16 +4,16 @@
     //var WEBURL = "http://61.164.86.218:8099/ABAPI/";
     //var WEBURL = "http://localhost/API/";             //棰滄檽鍐涙湰鍦伴厤缃�
     //var WEBURL = "http://localhost:8082/API/";        //鏉滆春鏈湴閰嶇疆
-    var WEBURL = "http://localhost:81/API/"           //缈佹稕娑涙湰鍦伴厤缃�
-    //var WEBURL = "http://localhost:8082/API/";        //寮犵憺骞挎湰鍦伴厤缃�
-    //var WEBURL = "http://localhost:81/API/";          //闄堥晲鍝叉湰鍦伴厤缃�
+    //var WEBURL = "http://localhost:81/API/"           //缈佹稕娑涙湰鍦伴厤缃�
+    // var WEBURL = "http://localhost:8082/API/";        //寮犵憺骞挎湰鍦伴厤缃�
+    // var WEBURL = "http://localhost:81/API/";          //闄堥晲鍝叉湰鍦伴厤缃�
     //var WEBURL = "http://localhost:8082/LuBaoAPI/";   //鏉庢灄淇婃湰鍦伴厤缃�
     //var WEBURL = "http://localhost:8080/API/";        //鐜嬩华鏈湴閰嶇疆
     //var WEBURL = "http://localhost:8082/LuBaoAPI/";   //浣欐�濇澃鏈湴閰嶇疆
     //var WEBURL = "http://localhost:8088/ARAPI/";      //浣欐�濇澃鏈湴閰嶇疆(瀹夌憺)
     //var WEBURL = "http://47.96.97.237/API/";          //鏅轰簯鏈嶅姟鍣�
    /* var WEBURL = "http://localhost:8082/LuBaoAPI/";  //浣欐�濇澃鏈湴閰嶇疆*/
-    //var WEBURL = "http://localhost:81/API/";            // 闄堥晲鍝叉湰鍦伴厤缃�*/
+    var WEBURL = "http://localhost:81/API/";            // 闄堥晲鍝叉湰鍦伴厤缃�*/
      //var WEBURL = "http://localhost:8082/LuBaoAPI/";  //鏉庢灄淇婃湰鍦伴厤缃�
     //var WEBURL = "http://localhost:8088/ARAPI/";      //浣欐�濇澃鏈湴閰嶇疆(瀹夌憺)
     //var WEBURL = "http://61.164.86.218:8099/ABAPI/";  //濂ラ偊
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\242\345\215\225\347\212\266\346\200\201\345\210\206\345\270\203/Sc_OrderStateDistribution.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\242\345\215\225\347\212\266\346\200\201\345\210\206\345\270\203/Sc_OrderStateDistribution.html"
index 2bbe018..843d4e4 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\242\345\215\225\347\212\266\346\200\201\345\210\206\345\270\203/Sc_OrderStateDistribution.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\242\345\215\225\347\212\266\346\200\201\345\210\206\345\270\203/Sc_OrderStateDistribution.html"
@@ -1,5 +1,6 @@
 锘�<!DOCTYPE html>
 <html>
+
 <head>
     <meta charset="utf-8" />
     <title>璁惧鐘舵�佸垎甯�</title>
@@ -15,7 +16,7 @@
     <link href="../../../layuiadmin/layui/css/ReportPlatform.css" rel="stylesheet" />
     <style>
         /*鏍戠姸鍥剧偣鍑婚珮浜彉鑹�*/
-        .layui-tree-set-active > .layui-tree-entry .layui-tree-main {
+        .layui-tree-set-active>.layui-tree-entry .layui-tree-main {
             background: #aef0f7;
         }
 
@@ -23,17 +24,22 @@
             border: 1px solid #5FB878;
             height: 50px;
             border-radius: 5px;
-            /*background: -webkit-gradient(linear, 0% 0%, 0% 50%,from(#262525), to(#262525));*/ /*璋锋瓕*/
+            /*background: -webkit-gradient(linear, 0% 0%, 0% 50%,from(#262525), to(#262525));*/
+            /*璋锋瓕*/
         }
 
         .bottomright {
-            cursor: pointer; /*榧犳爣鍙樻垚鎵嬫寚鏍峰紡*/
-            transition: all 0.1s; /*鎵�鏈夊睘鎬у彉鍖栧湪0.6绉掑唴鎵ц鍔ㄧ敾*/
+            cursor: pointer;
+            /*榧犳爣鍙樻垚鎵嬫寚鏍峰紡*/
+            transition: all 0.1s;
+            /*鎵�鏈夊睘鎬у彉鍖栧湪0.6绉掑唴鎵ц鍔ㄧ敾*/
         }
 
         .bottomright:hover {
-           transform: scale(1.3); /*榧犳爣鏀句笂涔嬪悗鍏冪礌鍙樻垚1.4鍊嶅ぇ灏�*/
-        }        
+            transform: scale(1.3);
+            /*榧犳爣鏀句笂涔嬪悗鍏冪礌鍙樻垚1.4鍊嶅ぇ灏�*/
+        }
+
         .imgtitle {
             width: 70%;
             height: 50px;
@@ -57,13 +63,14 @@
             white-space: nowrap;
             text-overflow: ellipsis;
             overflow: hidden;
-            }
+        }
 
         .check1 {
-            cursor: pointer; /*榧犳爣鍙樻垚鎵嬫寚鏍峰紡*/
-            -webkit-transition: border linear .1s,-webkit-box-shadow linear .5s;
-            border-color: rgba(0,148, 255,.75);
-            -webkit-box-shadow: 0 0 18px rgba(0,148,255);
+            cursor: pointer;
+            /*榧犳爣鍙樻垚鎵嬫寚鏍峰紡*/
+            -webkit-transition: border linear .1s, -webkit-box-shadow linear .5s;
+            border-color: rgba(0, 148, 255, .75);
+            -webkit-box-shadow: 0 0 18px rgba(0, 148, 255);
         }
 
         .prs {
@@ -80,7 +87,10 @@
             top: 6px;
         }
 
-        .tr1-1, .tr1-2, .tr1-3, .tr1-4 {
+        .tr1-1,
+        .tr1-2,
+        .tr1-3,
+        .tr1-4 {
             margin-left: 3%;
             margin-top: 4%;
             height: 310px;
@@ -99,8 +109,42 @@
         .layui-icon {
             font-size: 20px;
         }
+
+        .param-group {
+            margin-bottom: 15px;
+            border: 1px solid #e6e6e6;
+            border-radius: 4px;
+            overflow: hidden;
+        }
+
+        .group-title {
+            background-color: #007dff;
+            color: #fff;
+            padding: 8px 12px;
+            font-size: 32px;
+            font-weight: bold;
+        }
+
+        .param-list {
+            display: flex;
+            flex-wrap: wrap;
+            padding: 10px 20px;
+            background-color: #f2f2f2;
+        }
+
+        .param-item {
+            width: 24%;
+            margin-bottom: 8px;
+            font-size: 28px;
+            color: #333;
+        }
+
+        .param-item span {
+            color: #666;
+        }
     </style>
 </head>
+
 <body>
     <div class="layui-fluid">
         <div class="layui-col-md12">
@@ -109,7 +153,8 @@
                     <form class="layui-form" action="" lay-filter="component-form-group">
                         <div class="layui-row">
                             <div class="layui-col-xs2 layui-inline" style="border: solid 1.5px #e0d6d64d;">
-                                <div id="TreeTable" class="demo-tree demo-tree-box" style="height: 600px; overflow: scroll;"></div>
+                                <div id="TreeTable" class="demo-tree demo-tree-box"
+                                    style="height: 600px; overflow: scroll;"></div>
                             </div>
                             <div class="layui-col-xs9 layui-inline" style="border: solid 1.5px #e0d6d64d;">
                                 <div id="btomleft" style="height:600px;display:block;overflow-y:auto;">
@@ -117,7 +162,8 @@
                                 </div>
                             </div>
                             <div class="layui-col-xs1 layui-inline" style="border: solid 1.5px #e0d6d64d;">
-                                <fieldset style="border: 1px solid #eee; box-shadow: 0 2px 5px 0 rgb(0 0 0 / 10%); height: 585px;">
+                                <fieldset
+                                    style="border: 1px solid #eee; box-shadow: 0 2px 5px 0 rgb(0 0 0 / 10%); height: 585px;">
                                     <legend style="color: #5FB878">鎿嶄綔鍙�</legend>
                                     <div class="content4">
                                         <div class="layui-row layui-col-space10">
@@ -201,22 +247,32 @@
                                                 </div>
                                             </div>
                                         </div>
+                                        <div class="layui-row layui-col-space10">
+                                            <div class="layui-col-sm12 " onclick="showTechParam()">
+                                                <div class="cnt bottomright">
+                                                    <div class="btnM">
+                                                        <span class="layui-icon layui-icon-layer imgicon"></span>
+                                                    </div>
+                                                    <span class="imgtitle">宸ヨ壓鍙傛暟</span>
+                                                </div>
+                                            </div>
+                                        </div>
                                     </div>
                                 </fieldset>
                             </div>
                         </div>
                         <div class="layui-row">
                             <div class="layui-col-xs3 layui-inline">
-                                <div class="tr1-1" id="mychart11">   </div>
+                                <div class="tr1-1" id="mychart11"> </div>
                             </div>
                             <div class="layui-col-xs3 layui-inline">
-                                <div class="tr1-2" id="mychart22">   </div>
+                                <div class="tr1-2" id="mychart22"> </div>
                             </div>
                             <div class="layui-col-xs3 layui-inline">
-                                <div class="tr1-3" id="mychart3">   </div>
+                                <div class="tr1-3" id="mychart3"> </div>
                             </div>
                             <div class="layui-col-xs3 layui-inline">
-                                <div class="tr1-4" id="mychart4">   </div>
+                                <div class="tr1-4" id="mychart4"> </div>
                             </div>
                         </div>
                     </form>
@@ -224,7 +280,10 @@
             </div>
         </div>
     </div>
+    <!-- 鐢ㄤ簬棰勬覆鏌撳垪琛ㄦ暟鎹� 椤甸潰涓婁笉鏄剧ず -->
+    <div id="TechParamWrapper" style="padding: 10px; display: none;"></div>
 </body>
+
 </html>
 <script>
     var wktag = 0;
@@ -233,6 +292,9 @@
     var HEquipName = "";//璁惧鍚嶇О
     var HSourceID = "";//浜х嚎id
     var HDeptID = "";
+    var Timer = null; // 鏁版嵁璇诲彇瀹氭椂鍣�
+    var EquipTechParamHtml = ''; // 璁惧鍙傛暟寮圭獥娓叉煋html
+    var firstRunning = true;
     layui.config({
         base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
     }).extend({
@@ -441,6 +503,22 @@
     });
     //#endregion
 
+    //#region 鏄剧ず 宸ヨ壓鍙傛暟寮圭獥
+    function showTechParam() {
+        var TechParamPreLoading = document.getElementById("TechParamWrapper").innerHTML
+
+        layer.open({
+            skin: 'layui-layer-rim', //鍔犱笂杈规
+            title: '鏌ョ湅璁惧宸ヨ壓鍙傛暟',
+            type: 1,
+            area: ['80%', '80%'], // 瀹介珮
+            scrollbar: false,
+            content: '<div id="TechParamWrapper-Modal" style="padding: 10px;">' + TechParamPreLoading + '</div>'
+        });
+    }
+    //#endregon
+
+
     //宸ュ崟鍒楄〃閫変腑
     function CheckBtom(obj, i) {
         workcode = $("#gd" + i + "").html(); //閫氳繃鏍峰紡ID鑾峰彇html鍐呭(宸ュ崟鍙�)
@@ -456,15 +534,20 @@
         if (HEquipID != "" && HEquipID != null) {
             wktag = 1;
         }
-        sWhere = {
-            HDeptID: HDeptID
-            , HSourceID: HSourceID
+        // sWhere = {
+        //     HDeptID: HDeptID
+        //     , HSourceID: HSourceID,
+        //     HEquipID: HEquipID
+        // }
+        // FourReport(JSON.stringify(sWhere));
+        if (Timer.isRunning() == true) {
+            Timer.stop()
         }
-        FourReport(JSON.stringify(sWhere));
+        Timer.start()
     }
 
     //鏌ヨ 閮ㄩ棬+浜х嚎 4涓浘琛� 璧嬪��
-    function FourReport(sWhere) {      
+    function FourReport(sWhere) {
         $.ajax({
             url: GetWEBURL() + '/Sc_HEquipStateDistribution/Get_EquipStateDistribution_FourReport',
             type: "GET",
@@ -492,6 +575,8 @@
             }
         });
     }
+
+    window.FourReport = FourReport;
 
     //鏌辩姸鍥�
     function get_Histogram1(mychart11, chartData) {
@@ -654,7 +739,7 @@
         // 鏇存柊鍥捐〃
         mychart22.setOption(option);
     }
- 
+
     //楗煎浘
     function get_Statistics(mychart3, chartData2) {
         // 濡傛灉 chartData2 涓虹┖锛屾彁渚涗竴涓�滄棤鏁版嵁鈥濇彁绀�
@@ -1114,7 +1199,146 @@
         });
     }
 
+    // 璁㈠崟璇诲彇瀹氭椂鍣� 榛樿1鍒嗛挓璇诲彇涓�娆�
+    function TimerClock(interval = 60000, immediate = true) {
+        // 绉佹湁鍙橀噺锛氬瓨鍌ㄥ畾鏃跺櫒ID
+        let timerId = null;
+        // 绉佹湁鍙橀噺锛氳褰曟墽琛屾鏁�
+        let executeCount = 0;
+        // 绉佹湁鍙橀噺锛氭爣璁板畾鏃跺櫒鏄惁姝e湪杩愯
+        let isRunning = false;
+        // 绉佹湁鍙橀噺: 鏍囪瀹氭椂鍣ㄦ槸鍚︾涓�娆″惎鍔紝褰撶涓�娆″惎鍔�(鍗抽�氳繃鐐瑰嚮鍗$墖鐨勬柟寮忚闂暟鎹椂) 闇�瑕佹樉绀哄姞杞斤紝寮圭獥涓渶瑕侀潤榛樻洿鏂�
 
+        const task = () => {
+            var EmptyHtml = '<div style="Width: 100%; text-align: center; font-size: 46px;">璇ヨ澶囨病鏈夊伐鑹哄弬鏁�</div>'
+            if (firstRunning) {
+                var loadIndex = layui.layer.load(0, { shade: 0.3 });
+            }
+            $.ajax({
+                url: GetWEBURL() + '/Web/getSB_EquipTechParamBillListByEquipID',
+                type: "GET",
+                data: { HEquipID: HEquipID },
+                dataType: "json",
+                success: function (data) {
+                    if (data.code == 1) {
+                        EquipTechParamHtml = "";
+                        data.data.forEach(group => {
+                            EquipTechParamHtml += `<div class="param-group">`;
+                            EquipTechParamHtml += `<div class="group-title">${group['鍒嗙粍鍚嶇О']}</div>`;
+                            EquipTechParamHtml += `<div class="param-list">`;
+                            group['鍙傛暟鍒楄〃'].forEach(param => {
+                                EquipTechParamHtml += `<div class="param-item">${param.HTechParamName}:<span>${param.HResult}</span></div>`;
+                            });
+                            EquipTechParamHtml += `</div></div>`;
+                        });
+
+                        // 璧嬪�肩粰棰勬覆鏌撴ā鐗�
+                        document.getElementById("TechParamWrapper").innerHTML = EquipTechParamHtml
+                        // 璧嬪�肩粰娓叉煋妯℃澘
+                        if (document.getElementById("TechParamWrapper-Modal")) {
+                            document.getElementById("TechParamWrapper-Modal").innerHTML = EquipTechParamHtml
+                        }
+
+                        layui.layer.close(loadIndex);
+                        firstRunning = false
+                    } else {
+                        document.getElementById("TechParamWrapper").innerHTML = EmptyHtml
+                        // 璧嬪�肩粰娓叉煋妯℃澘
+                        if (document.getElementById("TechParamWrapper-Modal")) {
+                            document.getElementById("TechParamWrapper-Modal").innerHTML = EmptyHtml
+                        }
+                        if (firstRunning) {
+                            layui.layer.close(loadIndex);
+                        }
+                    }
+                },
+                error: function (err) {
+                    document.getElementById("TechParamWrapper").innerHTML = EmptyHtml
+                    // 璧嬪�肩粰娓叉煋妯℃澘
+                    if (document.getElementById("TechParamWrapper-Modal")) {
+                        document.getElementById("TechParamWrapper-Modal").innerHTML = EmptyHtml
+                    }
+                    if (firstRunning) {
+                        layui.layer.close(loadIndex);
+                    }
+                    return false;
+                }
+            });
+
+            var sWhere = {
+                HDeptID: HDeptID
+                , HSourceID: HSourceID,
+                HEquipID: HEquipID
+            }
+            window.FourReport(JSON.stringify(sWhere));
+        }
+
+        // 鍚姩瀹氭椂鍣ㄦ柟娉�
+        this.start = function () {
+            // 闃叉閲嶅鍚姩
+            if (isRunning) {
+                console.log('瀹氭椂鍣ㄥ凡鍦ㄨ繍琛屼腑');
+                return;
+            }
+
+            if (immediate) {
+                task();
+            }
+
+            // 璁剧疆瀹氭椂鍣紙interval 姣鎵ц涓�娆★級
+            timerId = setInterval(() => {
+                executeCount++;
+                task();
+                console.log(`瀹氭椂鍣ㄦ墽琛岀 ${executeCount} 娆);
+            }, interval);
+
+            // 鏇存柊鐘舵�佹爣璁�
+            isRunning = true;
+            // document.getElementById('status').textContent = '杩愯涓�';
+            console.log(`瀹氭椂鍣ㄥ凡鍚姩锛岄棿闅旓細${interval} 姣`);
+        };
+
+        // 鍋滄瀹氭椂鍣ㄦ柟娉�
+        this.stop = function () {
+            // 闃叉閲嶅鍋滄
+            if (!isRunning) {
+                console.log('瀹氭椂鍣ㄦ湭杩愯');
+                return;
+            }
+
+            firstRunning = true
+
+            // 娓呴櫎瀹氭椂鍣�
+            clearInterval(timerId);
+            // 閲嶇疆鐘舵��
+            timerId = null;
+            isRunning = false;
+            // document.getElementById('status').textContent = '宸插仠姝�';
+            console.log('瀹氭椂鍣ㄥ凡鍋滄');
+        };
+
+        // 鑾峰彇褰撳墠瀹氭椂鍣ㄧ姸鎬�
+        this.isRunning = function () {
+            return isRunning;
+        };
+    }
+
+
+    // 椤甸潰鍔犺浇瀹屾瘯鍚庤皟鐢�
+    window.addEventListener('load', function () {
+        console.log('椤甸潰鎵�鏈夎祫婧愰兘鍔犺浇瀹屾垚锛�');
+        Timer = new TimerClock()
+        console.log(Timer)
+    });
+
+    // 椤甸潰鍗歌浇鍓嶈皟鐢�
+    window.addEventListener('beforeunload', function (e) {
+        if (Timer) {
+            Timer.stop()
+        }
+
+        delete window.FourReport
+    })
     //#endregion
 
 </script>
\ No newline at end of file

--
Gitblit v1.9.1