From e6eccf5f0aaa54aea74b3cecbdff7bc8a118eb2c Mon Sep 17 00:00:00 2001
From: yangyin <1850366751@qq.com>
Date: 星期五, 14 六月 2024 18:16:12 +0800
Subject: [PATCH] fix: 修改报警记录

---
 other/alarm/index.wxml       |    5 ++---
 app.js                       |   22 +++++++++++++++++++---
 monitor/singlePoint/index.js |   13 +++++++++----
 other/alarm/index.wxss       |    8 ++++++++
 4 files changed, 38 insertions(+), 10 deletions(-)

diff --git a/app.js b/app.js
index 6a3d8ca..42edc8c 100644
--- a/app.js
+++ b/app.js
@@ -35,8 +35,22 @@
         PageIndex: that.globalData.PageIndex,
         PageSize: that.globalData.PageSize,
       },
+      fail: function (err) {
+        wx.showModal({
+          title: '',
+          content: '閫氳澶辫触',
+        })
+      }, //璇锋眰澶辫触
       success: (res) => {
         var result = res.data
+        if(res.statusCode==404){
+          wx.showModal({
+            title: '',
+            content: '閫氳澶辫触',
+          })
+          that.globalData.alarmTotal=0 
+          return
+        }
         if (result.Code != 0) {
           wx.showModal({
             title: '鎻愮ず',
@@ -52,14 +66,16 @@
           return
         }
         that.getMonitorDialog()
+        that.globalData.timer = setInterval(() => {
+          that.getMonitorDialog()
+        }, 300000)
       }
     })
   },
   //鍒濆鍖栨椂鎵撳紑鎶ヨ娑堟伅閫氱煡寮圭獥
   getMonitorDialog() {
     var that=this
-    that.globalData.timer = setInterval(() => {
-      if(that.globalData.monitorModalName) return
+    if(that.globalData.monitorModalName) return
       wx.showModal({
         title: '娑堟伅鎶ヨ',
         content: '鎮ㄦ湁鏂扮殑鎶ヨ娑堟伅闇�瑕佸鐞�,鐐瑰嚮鍓嶅線鎶ヨ澶勭悊鏌ョ湅',
@@ -73,7 +89,7 @@
           }
         })
         that.globalData.monitorModalName=true 
-    }, 300000)
+   
   },
   //鎶ヨ娑堟伅閫氱煡璺宠浆鍒版姤璀﹀鐞�
   workMonitorSure() {
diff --git a/monitor/singlePoint/index.js b/monitor/singlePoint/index.js
index 42fac10..0104b83 100644
--- a/monitor/singlePoint/index.js
+++ b/monitor/singlePoint/index.js
@@ -212,9 +212,10 @@
     });
     var formatType=that.data.getParamInfo.FormatType 
     Request({
-      url: Constant.BASE_SERVER_URL + "Monitor/Record/Real/Std/GetBySignalIDOfDay@V2.0",
+      url: Constant.BASE_SERVER_URL + "Monitor/Record/Real/Std/GetLimitBySignalIDOfDay@V2.0",
       method: 'GET',
       data: {
+        Limit :2000,
         SignalID : that.data.pointID,
         // Day: "2024-01-15"
         Day: util.formatDay(new Date())
@@ -399,6 +400,8 @@
       yAxis: {
         x: 'center',
         type: 'value',
+        boundaryGap: ['10%', '20%'],
+        min:0,
         splitLine: {
           lineStyle: {
             type: 'dashed'
@@ -1275,10 +1278,10 @@
     });
     var formatType=that.data.getParamInfo.FormatType 
     Request({
-      url: Constant.BASE_SERVER_URL + "Monitor/Record/Real/Std/GetBySignalIDOfDay@V2.0",
+      url: Constant.BASE_SERVER_URL + "Monitor/Record/Real/Std/GetLimitBySignalIDOfDay@V2.0",
       method: 'GET',
       data: {
-   
+        Limit :1000,
         SignalID : that.data.pointID,
         Day: that.data.historyDate
       },
@@ -1454,7 +1457,9 @@
             type: 'dashed'
           }
         },
-        scale: true,
+        boundaryGap: ['5%', '10%'],
+        // scale: true,
+        min:0,
         axisLabel: {
           formatter: function (val) {
             //console.log(val)
diff --git a/other/alarm/index.wxml b/other/alarm/index.wxml
index cc40906..6d40288 100644
--- a/other/alarm/index.wxml
+++ b/other/alarm/index.wxml
@@ -4,13 +4,12 @@
     <view class="jilu">鍏�
       <span style="color:red;">{{alarmTotal}}</span>鏉¤褰�
     </view>
-    <!-- <input bindinput="wxSearchInput" bindfocus="wxSerchFocus" value="{{wxSearchData.value}}" bindblur="wxSearchBlur" class="wxSearch-input" placeholder="鎼滅储娉电珯" /> -->
     <view class="daoxu" style="color:#8B39C5;" data-tabIndex="{{tabIndex}}" bindtap="{{sort.onClick}}">
       <icon class="iconfont icon-liebiao1"></icon>
       <span class="sortText">{{sort.text}}</span>
     </view>
   </view>
-  <!-- sort.text=='鏀惰捣' &&  -->
+
   <view class="screen" wx:if="{{sort.text=='鏀惰捣'}}">
     <view class="screen_li">
       <view class="screen_li_left">
@@ -31,7 +30,7 @@
       </view>
     </view>
   </view>
-  <scroll-view class="sc" scroll-y="true" style="height: calc(100% - 142rpx)" scroll-top="{{scrollTop}}" bindscrolltolower="onReachBottom"> 
+  <scroll-view class="sc" scroll-y="true" style="padding-top: 40rpx;height: 100%;" scroll-top="{{scrollTop}}" bindscrolltolower="onReachBottom"> 
     <view class="tui-menu-list tui-youjiantou" wx:for="{{alarmList}}" wx:for-item="alarm_item" wx:for-index="node_index" wx:key="node_index">
       <view>
         <block>
diff --git a/other/alarm/index.wxss b/other/alarm/index.wxss
index 905d741..f94a4c5 100644
--- a/other/alarm/index.wxss
+++ b/other/alarm/index.wxss
@@ -158,6 +158,13 @@
   color: #16b5cb;
   justify-content: center;
 }
+.view_header{
+  position: absolute;
+  top: 0px;
+  left: 0px;
+  width: 100%;
+overflow: hidden;
+}
 .view_header,.jilu,.daoxu,.daoxu>icon{
   display: flex;
   align-items: center;
@@ -231,6 +238,7 @@
   width: 100vw;
   background: #fff;
   flex-wrap: wrap;
+  align-items: center;
   font-size: 30rpx;
 }
 .screen>.screen_li{

--
Gitblit v1.9.3