From 241d327e57cbfe504aa806c61aa22e6205706098 Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期六, 11 四月 2026 16:59:46 +0800
Subject: [PATCH] 引用纠正
---
fzzy-igdss-web/src/main/resources/templates/wx/warn-list.html | 189 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 189 insertions(+), 0 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
new file mode 100644
index 0000000..c844d48
--- /dev/null
+++ b/fzzy-igdss-web/src/main/resources/templates/wx/warn-list.html
@@ -0,0 +1,189 @@
+<!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,maximum-scale=1,user-scalable=no">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-status-bar-style" content="black">
+
+ <link rel="stylesheet" th:href="@{/ajax/libs/mui/css/mui.min.css}">
+ <style type="text/css">
+ .mui-content{
+ margin: 0 6px;
+ }
+ .mui-content>.mui-table-view:first-child {
+ margin-top: -1px;
+ }
+ .mui-table-view-chevron .mui-table-view-cell {
+ padding-right: 0px;
+ }
+ .mui-col-xs-10 {
+ width: 100%;
+ }
+ .mui-h4, h4 {
+ font-size: 17px;
+ font-weight: 600;
+ }
+ .first1{
+ color: #C7254E;
+ float: right;
+ margin-right: 50px;
+ font-size: 15px;
+ }
+ .first2{
+ float: right;
+ margin-right: 50px;
+ font-size: 15px;
+ }
+ .mui-h5, h5 {
+ font-size: 14px;
+ font-weight: 400;
+ color: #333;
+ margin: 10px 0;
+ }
+ .mui-table-view-cell p {
+ color: #333;
+ }
+ .mui-scroll-wrapper {
+ width: unset;
+ }
+ .head{
+ margin-top: 44px;
+ }
+ .head1{
+ margin-top: -44px;
+ }
+ </style>
+</head>
+
+<body>
+<div id="head">
+
+</div>
+<div id="content" class="mui-content">
+ <!--涓嬫媺鍒锋柊瀹瑰櫒-->
+ <div id="pullrefresh" class="mui-content mui-scroll-wrapper">
+ <!--鏁版嵁鍒楄〃-->
+ <ul class="mui-table-view mui-table-view-chevron"></ul>
+ </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 loginType = [[${loginType}]]; //鐧诲綍鏂瑰紡
+ var userName = [[${userName}]];
+ openid = [[${openid}]]; //鐢ㄦ埛鐨刼penid
+ SERVE_URL = location.href.split("/wx/")[0]; //鏈嶅姟鍩熷悕
+ var pageSize = 10; //姣忛〉鏉℃暟
+ var pageNo = 1; //椤电爜
+ var total;
+ var pageCount; //鎬婚〉鐮佹暟
+ var warnList; //姣忛〉鏁版嵁
+
+ mui.init({
+ pullRefresh: {
+ container: '#pullrefresh',
+ down: {
+ // style: 'circle',
+ // callback: pullupRefresh //涓嬫媺鍒锋柊
+ },
+ up: {
+ auto: true,
+ contentrefresh: '姝e湪鍔犺浇...',
+ callback: pullupRefresh //涓婃粦鍒锋柊
+ },
+ preventDefaultException: {
+ className: /^mui-/
+ }
+ }
+ });
+
+ //鍒濆鍑哄姞杞介〉闈㈡暟鎹�
+ function pullupRefresh() {
+ $("#pullrefresh").addClass("head1");
+ //璇锋眰鑾峰彇鏁版嵁
+ getWarnData();
+ }
+
+ //鍒濆鍖栭〉闈㈡暟鎹�
+ function initData() {
+ if(warnList == null || warnList.length<1){
+ mui.toast("娌℃湁鏇村鏁版嵁浜嗭紒");
+ mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
+ return;
+ }
+ //鍒濆鍖栨暟鎹埌椤甸潰
+ mui('#pullrefresh').pullRefresh().endPullupToRefresh((pageNo>=pageCount));
+ var table = document.body.querySelector('.mui-table-view');
+ for (var i = 0; i < warnList.length; i++) {
+ var li = document.createElement('li');
+ 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;
+ li.innerHTML = html;
+ table.appendChild(li);
+ }
+ pageNo += 1;
+ }
+
+ //璇锋眰鑾峰彇璀﹀憡鏁版嵁
+ 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("娌℃湁鏇村鏁版嵁浜嗭紒");
+ }
+ }
+ });
+ }
+
+ //璁$畻鎬婚〉鐮�
+ function getPageCount (total,limit){
+ return total > 0 ? ((total < limit) ? 1 : ((total % limit) ? (parseInt(total / limit) + 1) : (total / limit))) : 0;
+ }
+
+ //鏌ョ湅璀﹀憡璇︽儏椤甸潰
+ function toWarnDetail(warnId,companyId) {
+ location.href = SERVE_URL +
+ '/wx/view-gateway?state=warn-detail&id='+ warnId + '&companyId=' + companyId + '&loginType=' + loginType + '&userName=' + userName;
+ }
+
+</script>
+</body>
+
+</html>
\ No newline at end of file
--
Gitblit v1.9.3