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 +++++----
 fzzy-igdss-web/src/main/java/com/fzzy/appwx/manager/WeChatManager.java       |  103 ++++++++++++
 fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapReplyService.java    |    5 
 fzzy-igdss-web/src/main/java/com/fzzy/appwx/controller/WeChatController.java |   53 ++++++
 fzzy-igdss-web/src/main/resources/templates/wx/warn-detail.html              |  216 +++++++++++++++++++++++++++
 fzzy-igdss-web/src/main/java/com/fzzy/appwx/param/WeChatBaseParam.java       |    5 
 6 files changed, 413 insertions(+), 49 deletions(-)

diff --git a/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapReplyService.java b/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapReplyService.java
index d88e97e..5c92215 100644
--- a/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapReplyService.java
+++ b/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SnapReplyService.java
@@ -42,11 +42,12 @@
         }
 
         //鏄惁澶勭悊妫�绱�
-        if (StringUtils.isNotBlank(param.getName())) {
-            queryWrapper.eq("is_handle", param.getName());
+        if (StringUtils.isNotBlank(param.getKey())) {
+            queryWrapper.eq("is_handle", param.getKey());
         }
 
         queryWrapper.orderByDesc("create_time");
+        queryWrapper.orderByDesc("id");
         snapReplyMapper.selectPage(page, queryWrapper);
     }
 
diff --git a/fzzy-igdss-web/src/main/java/com/fzzy/appwx/controller/WeChatController.java b/fzzy-igdss-web/src/main/java/com/fzzy/appwx/controller/WeChatController.java
index 208f528..aaa0ede 100644
--- a/fzzy-igdss-web/src/main/java/com/fzzy/appwx/controller/WeChatController.java
+++ b/fzzy-igdss-web/src/main/java/com/fzzy/appwx/controller/WeChatController.java
@@ -1,11 +1,13 @@
 package com.fzzy.appwx.controller;
 
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.fzzy.appwx.constant.WeChatConst;
 import com.fzzy.appwx.manager.WeChatManager;
 import com.fzzy.appwx.param.WeChatBaseParam;
 import com.fzzy.igds.data.ConfigData;
 import com.fzzy.igds.data.PageResponse;
+import com.fzzy.igds.domain.SnapReply;
 import com.ruoyi.common.core.domain.entity.SysUser;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
@@ -43,7 +45,7 @@
         if (StringUtils.isEmpty(tag)) {
             tag = "home";
         }
-//
+
         String newUrl = WeChatConst.USER_AUTH_UPR
                 .replace("APPID", configData.getWxAppId())
                 .replace("REDIRECT_URI", URLEncoder.encode(url, "UTF-8"))
@@ -99,7 +101,7 @@
         }
         mv.setViewName("/wx/" + state);
 
-//        //娴嬭瘯浠g爜寮�鍚�
+////        //娴嬭瘯浠g爜寮�鍚�
 //        String openid = "testOpenId";
 //        mv.addObject("openid", openid);
 //        SysUser user = weChatManager.getUser(openid);
@@ -108,7 +110,11 @@
 //                userName = user.getUserName();
 //            }
 //        }
-//        //娴嬭瘯浠g爜缁撴潫
+//
+//        if (StringUtils.isNotEmpty(userName)) {
+//            mv.addObject("userName", userName);
+//        }
+////        //娴嬭瘯浠g爜缁撴潫
 
         return mv;
     }
@@ -154,4 +160,45 @@
         return weChatManager.unBandOpenId(param);
     }
 
+
+    /**
+     * 鑾峰彇鍑哄叆搴撳憡璀︽壒澶嶅垎椤垫暟鎹�
+     *
+     * @param param
+     * @author sgj
+     * @since 2026/04/11
+     */
+    @PostMapping(value = "/getSnapReplyPage")
+    @ResponseBody
+    public PageResponse<Page<SnapReply>> getSnapReplyPage(@RequestBody WeChatBaseParam param) {
+        return weChatManager.getSnapReplyPage(param);
+    }
+
+    /**
+     * 鏍规嵁id鑾峰彇鍛婅鎵瑰璇︾粏鍐呭
+     *
+     * @param param
+     * @author sgj
+     * @since 2026/04/11
+     */
+    @PostMapping(value = "/getSnapReplyInfoById")
+    @ResponseBody
+    public PageResponse<SnapReply> getSnapReplyInfoById(@RequestBody WeChatBaseParam param) {
+        return weChatManager.getSnapReplyInfoById(param);
+    }
+
+
+    /**
+     * 鏍规嵁id鑾峰彇鍛婅鎵瑰璇︾粏鍐呭
+     *
+     * @param param
+     * @author sgj
+     * @since 2026/04/11
+     */
+    @PostMapping(value = "/handleSnapReply")
+    @ResponseBody
+    public PageResponse<String> handleSnapReply(@RequestBody WeChatBaseParam param) {
+        return weChatManager.handleSnapReply(param);
+    }
+
 }
diff --git a/fzzy-igdss-web/src/main/java/com/fzzy/appwx/manager/WeChatManager.java b/fzzy-igdss-web/src/main/java/com/fzzy/appwx/manager/WeChatManager.java
index 4361ee3..4eb73be 100644
--- a/fzzy-igdss-web/src/main/java/com/fzzy/appwx/manager/WeChatManager.java
+++ b/fzzy-igdss-web/src/main/java/com/fzzy/appwx/manager/WeChatManager.java
@@ -1,14 +1,22 @@
 package com.fzzy.appwx.manager;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.fzzy.appwx.param.WeChatBaseParam;
 import com.fzzy.appwx.util.WeChatUtil;
+import com.fzzy.igds.constant.Constant;
 import com.fzzy.igds.constant.RespCodeEnum;
+import com.fzzy.igds.data.IgdsBaseParam;
 import com.fzzy.igds.data.PageResponse;
+import com.fzzy.igds.domain.SnapReply;
+import com.fzzy.igds.service.SnapReplyService;
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.system.service.ISysUserService;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.Date;
 
 @Component
 public class WeChatManager {
@@ -17,6 +25,8 @@
     private WeChatUtil weChatUtil;
     @Autowired
     private ISysUserService sysUserService;
+    @Resource
+    private SnapReplyService snapReplyService;
 
 
     public String getOpenid(String code) {
@@ -56,11 +66,11 @@
             deptId = Long.valueOf(user.getCompanyId());
             user.setDeptId(deptId);
         }
-        return new PageResponse(RespCodeEnum.CODE_0000.getCode(), "鏌ヨ鎴愬姛",user);
+        return new PageResponse(RespCodeEnum.CODE_0000.getCode(), "鏌ヨ鎴愬姛", user);
     }
 
     //缁戝畾openId
-    public  PageResponse<String> bandOpenId(WeChatBaseParam param)  {
+    public PageResponse<String> bandOpenId(WeChatBaseParam param) {
 
         //鍒ゆ柇鍙傛暟
         if (null == param || StringUtils.isEmpty(param.getOpenid())) {
@@ -90,7 +100,7 @@
 
         //鏍规嵁鎵嬫満鍙锋煡鐪嬬敤鎴锋槸鍚︽槸绯荤粺鐢ㄦ埛
         SysUser user = sysUserService.selectUserByPhoneNumber(param.getMobile());
-        if(user == null || StringUtils.isEmpty(user.getPhonenumber())){
+        if (user == null || StringUtils.isEmpty(user.getPhonenumber())) {
             return new PageResponse<String>(RespCodeEnum.CODE_1006.getCode(), "鎵嬫満鍙蜂笉鍦ㄧ郴缁熷唴锛岃鑱旂郴绠$悊鍛橈紒");
         }
 
@@ -106,7 +116,7 @@
 
 
     //瑙g粦openId
-    public  PageResponse<String> unBandOpenId(WeChatBaseParam param)  {
+    public PageResponse<String> unBandOpenId(WeChatBaseParam param) {
 
         //鍒ゆ柇鍙傛暟
         if (null == param || StringUtils.isEmpty(param.getOpenid())) {
@@ -136,7 +146,7 @@
 
         //鏍规嵁鎵嬫満鍙锋煡璇㈢敤鎴锋槸鍚﹀凡缁忕粦瀹�
         SysUser user = sysUserService.selectUserByPhoneNumber(param.getMobile());
-        if(user == null || StringUtils.isEmpty(user.getPhonenumber())){
+        if (user == null || StringUtils.isEmpty(user.getPhonenumber())) {
             return new PageResponse<String>(RespCodeEnum.CODE_1006.getCode(), "鎵嬫満鍙蜂笉鍦ㄧ郴缁熷唴锛岃鑱旂郴绠$悊鍛橈紒");
 
         }
@@ -150,4 +160,87 @@
 
     }
 
+    public PageResponse<Page<SnapReply>> getSnapReplyPage(WeChatBaseParam param) {
+
+        if (null == param) {
+            return new PageResponse<Page<SnapReply>>(RespCodeEnum.CODE_1007.getCode(), "鍙傛暟涓嶅畬鏁达紝璇锋牳鏌�");
+        }
+
+        SysUser user;
+
+        //寰俊鍏紬鍙�
+        if (StringUtils.isEmpty(param.getOpenid())) {
+            return new PageResponse<Page<SnapReply>>(RespCodeEnum.CODE_1007.getCode(), "鍙傛暟涓嶅畬鏁达紝璇锋牳鏌�");
+
+        }
+        //鏍规嵁openid鏌ヨ鐢ㄦ埛鏄惁宸茬粡缁戝畾
+        user = sysUserService.selectUserByOpenId(param.getOpenid());
+        if (user == null) {
+            return new PageResponse<Page<SnapReply>>(RespCodeEnum.CODE_1006.getCode(), "灏氭湭缁戝畾鏈嶅姟锛岃鍏堢粦瀹氾紒");
+
+        }
+        //鍒嗛〉鎷兼帴
+        Page<SnapReply> page = new Page<>(param.getPageNo(), param.getPageSize());
+        //鏌ヨ鍙傛暟缁勮
+        IgdsBaseParam queryParam = new IgdsBaseParam();
+        queryParam.setDeptId(String.valueOf(user.getDeptId()));
+        queryParam.setCompanyId(user.getCompanyId());
+        queryParam.setKey(Constant.YN_N);
+        snapReplyService.listPage(page, queryParam);
+        return new PageResponse<Page<SnapReply>>(RespCodeEnum.CODE_0000.getCode(), "璇锋眰鎴愬姛", page);
+    }
+
+    public PageResponse<SnapReply> getSnapReplyInfoById(WeChatBaseParam param) {
+
+        //鍒ゆ柇鍙傛暟
+        if (null == param || StringUtils.isEmpty(param.getId())) {
+            return new PageResponse<SnapReply>(RespCodeEnum.CODE_1007.getCode(), "鍙傛暟涓嶅畬鏁达紝璇锋牳鏌�");
+
+        }
+
+        SnapReply warn = snapReplyService.getById(param.getId());
+        if (warn == null) {
+            return new PageResponse<SnapReply>(RespCodeEnum.CODE_1007.getCode(), "鏈幏鍙栧埌璇ヨ鍛婁俊鎭紒");
+
+        }
+
+        return new PageResponse<SnapReply>(RespCodeEnum.CODE_0000.getCode(), "璇锋眰鎴愬姛", warn);
+
+    }
+
+    public PageResponse<String> handleSnapReply(WeChatBaseParam param) {
+
+        //鍒ゆ柇鍙傛暟
+        if (null == param || StringUtils.isEmpty(param.getId())) {
+            return new PageResponse<String>(RespCodeEnum.CODE_1007.getCode(), "鍙傛暟涓嶅畬鏁达紝璇锋牳鏌�");
+
+        }
+
+        //澶勭悊鏃堕棿
+        Date date = new Date();
+
+//        if(StringUtils.isEmpty(companyId)){
+//            companyId = ShiroUtils.getLoginUserCompanyId();
+//        }
+        String info = (String) param.getRemark();
+        String id = param.getId();
+        String userName = param.getUserName();
+
+        //鍛婅澶勭悊
+        SnapReply warn = snapReplyService.getById(id);
+        if(Constant.YN_N.equals(warn.getIsHandle())){
+            return new PageResponse<String>(RespCodeEnum.CODE_1008.getCode(), "鏀瑰憡璀﹀凡澶勭悊锛屾棤闇�閲嶅鎵瑰锛�");
+        }
+        warn.setId(id);
+        warn.setUpdateBy(userName);
+        warn.setUpdateTime(date);
+        warn.setIsHandle(Constant.YN_Y);
+        warn.setReplyText(info);
+        warn.setDays(param.getDays());
+        snapReplyService.updateData(warn);
+
+        return new PageResponse<String>(RespCodeEnum.CODE_0000.getCode(), "璇锋眰鎴愬姛");
+
+    }
+
 }
diff --git a/fzzy-igdss-web/src/main/java/com/fzzy/appwx/param/WeChatBaseParam.java b/fzzy-igdss-web/src/main/java/com/fzzy/appwx/param/WeChatBaseParam.java
index 0d4ab4a..369c3ae 100644
--- a/fzzy-igdss-web/src/main/java/com/fzzy/appwx/param/WeChatBaseParam.java
+++ b/fzzy-igdss-web/src/main/java/com/fzzy/appwx/param/WeChatBaseParam.java
@@ -32,4 +32,9 @@
      */
     private String id;
 
+
+    private  String remark;
+
+    private Integer days;
+
 }
diff --git a/fzzy-igdss-web/src/main/resources/templates/wx/warn-detail.html b/fzzy-igdss-web/src/main/resources/templates/wx/warn-detail.html
new file mode 100644
index 0000000..8bafb29
--- /dev/null
+++ b/fzzy-igdss-web/src/main/resources/templates/wx/warn-detail.html
@@ -0,0 +1,216 @@
+<!DOCTYPE html>
+<html lang="zh-cn" xmlns:th=http://www.thymeleaf.org>
+<head>
+    <meta charset="utf-8">
+    <title>璀﹀憡璇︾粏</title>
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
+    <link rel="stylesheet" th:href="@{/ajax/libs/mui/css/mui.min.css}">
+    <style>
+        .mui-content {
+            margin: 0 5px;
+        }
+
+        .mui-table-view {
+            position: unset;
+            margin-top: 10px;
+            border-radius: 6px;
+        }
+
+        .mui-table-view-chevron .mui-table-view-cell {
+            padding-right: 10px;
+        }
+
+        .mui-table-view-cell {
+            padding: 10px 10px;
+        }
+
+        .mui-table-view-cell p {
+            font-size: 17px;
+        }
+
+        .mui-ellipsis {
+            margin-top: 5px;
+            margin-bottom: 10px;
+            font-size: 18px;
+        }
+
+        .first {
+            font-size: 15px;
+            float: right;
+        }
+
+        .sec {
+            border-radius: 6px;
+            margin-top: 10px;
+            margin-bottom: 10px;
+            list-style: none;
+            background: #FFFFFF;
+        }
+
+        .four {
+            padding: 7px 10px;
+        }
+
+        .sec-2 {
+            margin-top: 10px;
+            margin-bottom: 10px;
+            font-size: 18px;
+        }
+
+        input[type=color], input[type=date], input[type=datetime-local], input[type=datetime], input[type=email], input[type=month], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=time], input[type=url], input[type=week], select, textarea {
+            border-radius: 4px;
+            padding: 10px 10px;
+            margin-bottom: unset;
+            background-color: #eee;
+            border: 1px solid #eee;
+        }
+
+        .title {
+            text-align: center;
+            background: #8bd2f5;
+            border-radius: 6px 6px 0 0;
+            font-size: 15px;
+        }
+
+        .mui-btn {
+            font-size: 22px;
+            padding: 6px 20px;
+            border-radius: 6px;
+        }
+
+        .mui-button-row {
+            margin-bottom: 10px;
+        }
+
+        .head {
+            margin-top: 44px;
+        }
+    </style>
+</head>
+<body>
+<div id="head">
+    <header class="mui-bar mui-bar-nav">
+        <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
+        <h1 class="mui-title">璀﹀憡璇︾粏</h1>
+    </header>
+</div>
+<div id="content" class="mui-content head">
+    <div>
+        <ul class="mui-table-view mui-table-view-chevron">
+            <div class="title">璀﹀憡淇℃伅</div>
+            <li id="handle1" class="mui-table-view-cell">
+                <!--                <h4 class="mui-ellipsis">楂樻俯璀﹀憡<span class="first">鏈鐞�</span></h4>-->
+                <!--                <h5 class="mui-ellipsis">娓╂箍搴�#1</h5>-->
+                <!--                <h5 class="mui-ellipsis">2020-10-10 10:10:10</h5>-->
+                <!--                <p >鎮ㄥソ锛屼綘鐨勮澶囨俯婀垮害#1浜�2020-10-10 10:10:10瑙﹀彂楂樻俯鍛婅锛岃鍙婃椂澶勭悊锛�</p>-->
+            </li>
+        </ul>
+    </div>
+    <div class="sec">
+        <div class="title">澶勭悊淇℃伅</div>
+        <div id="handle2" class="four">
+            <!--            <h5 class="sec-2">寮犱笁</h5>-->
+            <!--            <h5 class="sec-2">2020-10-10 10:10:10</h5>-->
+            <!--            <textarea id="textarea" rows="5" placeholder="澶勭悊璇存槑"></textarea>-->
+        </div>
+    </div>
+    <div class="mui-button-row">
+        <button id="btn1" type="button" class="mui-btn mui-btn-primary" onclick="toHandle()">澶勭悊</button>&nbsp;&nbsp;
+        <button type="button" class="mui-btn mui-btn-danger" onclick="toPage()">杩斿洖</button>
+    </div>
+
+</div>
+<script th:src="@{/js/jquery.min.js}"></script>
+<script th:src="@{/wx/wx-common.js}"></script>
+<script th:src="@{/ajax/libs/mui/js/mui.js}"></script>
+<script th:inline="javascript">
+    var warnId = [[${id}]];  //璁惧id
+    var companyId = [[${companyId}]];  //缁勭粐缂栫爜
+    var userName = [[${userName}]];    //褰撳墠鎿嶄綔浜鸿处鍙�
+    var loginType = [[${loginType}]];  //鐧诲綍鏂瑰紡
+    $(function () {
+        mui.init();
+        try {
+            getDeviceList();
+        } catch (e) {
+            mui.alert(e, '鎻愮ず', ["纭畾"], function () {
+            }, "div");
+        }
+        // getDeviceList()
+    });
+
+    //鑾峰彇鐢ㄦ埛璁惧淇℃伅
+    function getDeviceList() {
+        var data = {
+            "id": warnId,
+        };
+        wxCommon.postJson("../wx/getSnapReplyInfoById", data, function (result) {
+            if (result.code == "0000") {
+                initData(result.data);
+            } else {
+                $("#listData").html('');
+                mui.alert(result.msg, '鎻愮ず', ["纭畾"], function () {
+                }, "div");
+            }
+        });
+    }
+
+    //鍒濆鍖栭〉闈㈡暟鎹�
+    function initData(data) {
+
+        var html1 = '';
+        var html2 = '';
+        html1 += '<h4 class="mui-ellipsis">' + data.id;
+        html1 += '<span class="first">' + data.deptId + '</span></h4>';
+        html1 += '<h5 class="mui-ellipsis">' + data.createTime + '</h5>';
+        html1 += '<p>' + data.content + '</p>';
+
+        //鏈鐞�
+        if(data.isHandle && data.isHandle == "N"){
+            html2 += '<input id="days" type="number" min="1" step="1" placeholder="鏈潵姝e父澶╂暟" style="width: 100%; margin-top: 10px;margin-bottom: 10px" oninput="this.value = this.value.replace(/\\D|^0/g, \'\')" />';
+            html2 += '<textarea id="remark" rows="5" placeholder="澶勭悊璇存槑"></textarea>';
+        }else{
+            html2 += '<p>' + '鏈潵姝e父澶╂暟锛�'+ data.days + '</p>';
+            html2 += '<p>' + '澶勭悊璇存槑锛�'+ data.remark + '</p>';
+
+        }
+        $("#handle1").html(html1);
+        $("#handle2").html(html2);
+    }
+
+    //璀﹀憡澶勭悊鎻愪氦
+    function toHandle() {
+        var remarkDetail = $("#remark").val();
+        var days = $("#days").val();
+
+
+        var data = {
+            "id": warnId,
+            "userName": userName,
+            "remark": remarkDetail,
+            "days": days
+        };
+        wxCommon.postJson("../wx/handleSnapReply", data, function (result) {
+            if (result.code == "0000") {
+                mui.toast("澶勭悊鎴愬姛锛�");
+                toPage();
+            } else {
+                mui.alert(result.msg, '鎻愮ず', ["纭畾"], function () {
+                }, "div");
+            }
+        });
+    }
+
+    //杩斿洖璀︽姤鍒楄〃
+    function toPage() {
+        location.reload();
+        // 杩斿洖涓婁竴椤�
+        // 寰俊 H5 鐜锛氫娇鐢� localStorage 鏍囪
+        localStorage.setItem('needRefresh', 'true');
+        mui.back();
+    }
+
+</script>
+</body>
+</html>
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