From 67b2e6a3b7e4254be92e3ecbcd7b6e9f61b3aae3 Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期二, 14 四月 2026 09:23:39 +0800
Subject: [PATCH] 添加批复处理页面

---
 fzzy-igdss-web/src/main/resources/templates/wx/warn-list.html |   80 ++++++++++++++++++++-------------------
 1 files changed, 41 insertions(+), 39 deletions(-)

diff --git a/fzzy-igdss-web/src/main/resources/templates/wx/warn-list.html b/fzzy-igdss-web/src/main/resources/templates/wx/warn-list.html
index c844d48..b151cde 100644
--- a/fzzy-igdss-web/src/main/resources/templates/wx/warn-list.html
+++ b/fzzy-igdss-web/src/main/resources/templates/wx/warn-list.html
@@ -72,7 +72,6 @@
 <script th:src="@{/wx/wx-common.js}"></script>
 <script th:src="@{/ajax/libs/mui/js/mui.js}"></script>
 <script th:inline="javascript">
-
     var loginType = [[${loginType}]];  //鐧诲綍鏂瑰紡
     var userName = [[${userName}]];
     openid = [[${openid}]];  //鐢ㄦ埛鐨刼penid
@@ -82,6 +81,17 @@
     var total;
     var pageCount;  //鎬婚〉鐮佹暟
     var warnList;  //姣忛〉鏁版嵁
+    $(function () {
+        // 鐩戝惉椤甸潰鏄剧ず浜嬩欢锛堝井淇� H5 鐜锛�
+        window.addEventListener('pageshow', function() {
+            if (localStorage.getItem('needRefresh') === 'true') {
+                localStorage.removeItem('needRefresh');
+                refreshData();
+            }
+        });
+
+    });
+
 
     mui.init({
         pullRefresh: {
@@ -101,12 +111,22 @@
         }
     });
 
+
     //鍒濆鍑哄姞杞介〉闈㈡暟鎹�
     function pullupRefresh() {
-            $("#pullrefresh").addClass("head1");
+        $("#pullrefresh").addClass("head1");
         //璇锋眰鑾峰彇鏁版嵁
         getWarnData();
     }
+
+    function refreshData() {
+        // 閲嶇疆鍒嗛〉鍙傛暟
+        pageNo = 1;
+
+        // 璋冪敤娴忚鍣ㄥ埛鏂�
+        location.reload();
+    }
+
 
     //鍒濆鍖栭〉闈㈡暟鎹�
     function initData() {
@@ -123,15 +143,10 @@
             li.className = 'mui-table-view-cell';
             var html = '';
             html += '<div onclick="toWarnDetail(\'' + warnList[i].id +'\',\'' + warnList[i].companyId + '\')" class="mui-table">';
-            html += '<div class="mui-table-cell mui-col-xs-10"><h4 class="mui-ellipsis">' + warnList[i].warnTitle;
-            // if(warnList[i].warnStatus == '10' || warnList[i].warnStatus == '20'){
-            //     html += '<span class="first1">' + warnList[i].warnStatusName;
-            // }else {
-            //     html += '<span class="first2">' + warnList[i].warnStatusName;
-            // }
-            html += '</span></h4><h5>鎵�灞炲簱鍖猴細<span>' + warnList[i].deviceName;
-            html += '</span></h5><h5>璀﹀憡鏃堕棿锛�<span>' + warnList[i].warnTime;
-            html += '</span></h5><p class="mui-h6 mui-ellipsis">璀﹀憡璇存槑锛�' +warnList[i].warnInfo;
+            html += '<div class="mui-table-cell mui-col-xs-10"><h4 class="mui-ellipsis">' + warnList[i].id;
+            html += '</span></h4><h5>鎵�灞炲簱鍖猴細<span>' + warnList[i].deptId;
+            html += '</span></h5><h5>璀﹀憡鏃堕棿锛�<span>' + warnList[i].createTime;
+            html += '</span></h5><p class="mui-h6 mui-ellipsis">璀﹀憡璇存槑锛�' +warnList[i].content;
             li.innerHTML = html;
             table.appendChild(li);
         }
@@ -140,34 +155,21 @@
 
     //璇锋眰鑾峰彇璀﹀憡鏁版嵁
     function getWarnData() {
-        var data = JSON.stringify({
-            "interfaceId": "app_1008",
-            "sign": "01",
-            "outId": "01-01",
-            "reqDateTime": new Date(),
-            "data": {
-                "userName": userName,
-                "loginType": loginType,
-                "openid": openid,
-                "pageSize": pageSize,
-                "pageNo": pageNo
-            }
-        });
-        $.ajax({
-            type: "POST",
-            url: "../wx/gateway",
-            dataType: "json",
-            contentType: "application/json;charset=UTF-8",
-            data: data,
-            success: function (result) {
-                if (result.code == "0000") {
-                    warnList = null;
-                    warnList = result.data.records;
-                    pageCount = getPageCount (result.data.total,pageSize);
-                    initData();
-                } else {
-                    mui.toast("娌℃湁鏇村鏁版嵁浜嗭紒");
-                }
+        var data = {
+            "userName": userName,
+            "loginType": loginType,
+            "openid": openid,
+            "pageSize": pageSize,
+            "pageNo": pageNo
+        };
+        wxCommon.postJson("../wx/getSnapReplyPage", data,function (result) {
+            if (result.code == "0000") {
+                warnList = null;
+                warnList = result.data.records;
+                pageCount = getPageCount (result.data.total,pageSize);
+                initData();
+            } else {
+                mui.toast("娌℃湁鏇村鏁版嵁浜嗭紒");
             }
         });
     }

--
Gitblit v1.9.3