| | |
| | | "reportForm/index/index", |
| | | "reportForm/Detail/index", |
| | | "video/station/index", |
| | | "video/single/index" |
| | | "video/single/index", |
| | | "other/alarm/index" |
| | | ], |
| | | "requiredPrivateInfos": [ |
| | | "getLocation", |
| | |
| | | }); |
| | | return; |
| | | }, |
| | | //æ¥è¦æ¨é |
| | | alarmPush: function () { |
| | | wx.navigateTo({ |
| | | url: '/other/alarm/index', |
| | | }); |
| | | return; |
| | | }, |
| | | removeStorage: function () { //æ¸
餿æç¼å |
| | | wx.clearStorage({ |
| | | success(res) { |
| | |
| | | <text class="text-grey">éæ°ç»å½</text> |
| | | </button> |
| | | </view> |
| | | <view class="cu-item arrow" bindtap="alarmPush"> |
| | | <button class="cu-btn content" > |
| | | <text class="cuIcon-notice text-red"></text> |
| | | <text class="text-grey">æ¥è¦æ¨é</text> |
| | | </button> |
| | | </view> |
| | | <view class="cu-item arrow" bindtap="removeStorage"> |
| | | <button class="cu-btn content" > |
| | | <text class="cuIcon-deletefill text-cyan"></text> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // other/alarm/index.js |
| | | import Request from "../../utils/api" |
| | | var Constant = require('../../utils/constant.js'); |
| | | var util = require('../../utils/util.js'); |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | alarmList:[], |
| | | isLoading: false, |
| | | startAlarmDate: util.formatDay(util.GetBeforeDate(7)), |
| | | endAlarmDate: util.formatDay(new Date()), |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | wx.setNavigationBarTitle({ |
| | | title: 'æ¥è¦å表', |
| | | }); |
| | | this.getAlarmList() |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | getAlarmList(){ |
| | | this.isLoading = true |
| | | Request({ |
| | | url: Constant.BASE_SERVER_URL + 'Monitor/Value/Alarm/Record/Std/GetLastList@V1.0', |
| | | method: 'GET', |
| | | data: { |
| | | StartTime: this.data.startAlarmDate, |
| | | EndTime: this.data.endAlarmDate, |
| | | Number:10 |
| | | }, |
| | | success: (res) => { |
| | | this.isLoading = false |
| | | var result=res.data |
| | | if (result.Code != 0) { |
| | | wx.showModal({ |
| | | title: 'æç¤º', |
| | | content: result.Message, |
| | | showCancel: false, |
| | | }) |
| | | return; |
| | | } |
| | | if(result.Data==null) { |
| | | wx.showModal({ |
| | | title: 'ææ æ¥è¦æ°æ®', |
| | | |
| | | }); |
| | | return |
| | | } |
| | | this.setData({ |
| | | alarmList:result.Data |
| | | }) |
| | | |
| | | |
| | | }, |
| | | fail: (err) => { |
| | | if (res.errMsg == 'request:fail timeout') { |
| | | wx.showToast({ |
| | | title: '请æ±è¶
æ¶,è¯·æ£æ¥æ¨çç½ç»', |
| | | duration: 2000 |
| | | }) |
| | | return; |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å¸è½½ |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ç¸å
³äºä»¶å¤ç彿°--çå¬ç¨æ·ä¸æå¨ä½ |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ä¸æè§¦åºäºä»¶çå¤ç彿° |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç¨æ·ç¹å»å³ä¸è§å享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "usingComponents": {} |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!--other/alarm/index.wxml--> |
| | | <view class='tui-list-box-raduis'> |
| | | <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> |
| | | <view class="block_list" style="height:130rpx;" data-meter-name="{{alarm_item.Name}}" data-meter_node_id="{{alarm_item.ID}}"> |
| | | <view class="block_list_center"> |
| | | <view class="beng_name" style="justify-content: space-between;"> |
| | | <view> |
| | | <text>{{alarm_item.Name}}ï¼{{alarm_item.SignalName}}</text> |
| | | |
| | | </view> |
| | | <view class="text-blue light" |
| | | style="margin-right:20rpx;font-size:22rpx;"> |
| | | æ¥è¦æ¶é´ {{alarm_item.AlarmTime?alarm_item.AlarmTime:''}} |
| | | </view> |
| | | </view> |
| | | <view class="beng_dizi text-grey"> |
| | | <view>äº{{alarm_item.DataTime}}è¾¾å°{{alarm_item.DataValue}},éå¼ä¸º{{alarm_item.AlarmName }}{{alarm_item.ThresholdValue}}</view> |
| | | <view style="color:{{alarm_item.AlarmLevelColor}}">[{{alarm_item.AlarmLevelName}}]</view> |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </block> |
| | | </view> |
| | | </view> |
| | | </view> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | @import '../../style/icon.wxss'; |
| | | @import '../../style/main.wxss'; |
| | | @import '../../style/animation.wxss'; |
| | | |
| | | .main { |
| | | height: 100vh; |
| | | } |
| | | |
| | | .hovers { |
| | | background-color: 16b5cb; |
| | | } |
| | | |
| | | .tab { |
| | | background-color: #fff; |
| | | height: 7vh; |
| | | display: flex; |
| | | line-height: 7vh; |
| | | } |
| | | |
| | | .tab view { |
| | | flex: 1 0 auto; |
| | | font-size: 14px; |
| | | color: #333; |
| | | text-align: center; |
| | | } |
| | | |
| | | .tab .active { |
| | | color: #16b5cb; |
| | | border-bottom: 1px solid #16b5cb; |
| | | padding-bottom: 1.8vh; |
| | | } |
| | | |
| | | .right_btn { |
| | | top: 3rem; |
| | | } |
| | | |
| | | /* 20191227 ywg */ |
| | | .warp_scroll { |
| | | width: 100%; |
| | | border-radius: 50px; |
| | | margin: 0px auto; |
| | | } |
| | | |
| | | .list:nth-child(1) { |
| | | border: 0; |
| | | } |
| | | |
| | | .list:hover { |
| | | background-color: #16b5cb; |
| | | } |
| | | |
| | | .list { |
| | | position: relative; |
| | | min-height: 60px; |
| | | padding: 5px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | flex-wrap: wrap; |
| | | border-top: 1px dashed #EFEFF4; |
| | | background: #fff; |
| | | } |
| | | |
| | | .list>i { |
| | | position: absolute; |
| | | padding: 5px; |
| | | bottom: -5px; |
| | | border-radius: 5px; |
| | | background: #EFEFF4; |
| | | z-index: 2; |
| | | } |
| | | |
| | | .list>i:nth-child(3) { |
| | | left: -5px; |
| | | } |
| | | |
| | | .list>i:nth-child(4) { |
| | | right: -5px; |
| | | } |
| | | |
| | | .list:nth-last-child(1)>i { |
| | | opacity: 0 |
| | | } |
| | | |
| | | .list>view { |
| | | width: 100%; |
| | | font-size: 27rpx; |
| | | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .list>view>span { |
| | | width: 50%; |
| | | } |
| | | |
| | | |
| | | |
| | | /* 20200113 ywg */ |
| | | |
| | | .tui-menu-list { |
| | | color: #555; |
| | | font-size: 35rpx; |
| | | position: relative; |
| | | border-top: 1px solid rgba(0, 0, 0, 0.15); |
| | | } |
| | | |
| | | |
| | | .tui-list-head { |
| | | background-color: #efeff4; |
| | | line-height: 80rpx; |
| | | color: #6d6d72; |
| | | padding: 0 10px; |
| | | font-size: 35rpx; |
| | | border-bottom: 1px solid rgba(0, 0, 0, 0.15); |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .tui-list-box-raduis { |
| | | /* border: 1px solid #c8c7cc; */ |
| | | width: 98vw; |
| | | border-radius: 5px; |
| | | margin: 5px 1vw 10px 1vw; |
| | | overflow: hidden; |
| | | background-color: #fff; |
| | | box-shadow: 0 2px 6px 0 rgba(114, 124, 245, .5); |
| | | } |
| | | |
| | | .block_list, |
| | | .tui-list-head, |
| | | .block_list_left, |
| | | .block_list_center>view, |
| | | .block_list_url>view, |
| | | .block_list_url, |
| | | .cover_view, |
| | | .map_search, |
| | | .map_search>view, |
| | | .block_list_url>view>icon { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .block_list { |
| | | position: relative; |
| | | width: 100%; |
| | | min-height: 20px; |
| | | font-size: 25rpx; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .block_list_left { |
| | | display: block; |
| | | width: 15%; |
| | | padding: 10px; |
| | | font-size: 40px; |
| | | color: #16b5cb; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .block_list_center { |
| | | width: 100%; |
| | | } |
| | | .monitor_des{ |
| | | font-size: 26rpx; |
| | | } |
| | | .station_status { |
| | | position: absolute; |
| | | bottom: 10rpx; |
| | | left: 10rpx; |
| | | padding: 20rpx; |
| | | |
| | | color: #16b5cb; |
| | | } |
| | | |
| | | .buzhengchang { |
| | | color: red; |
| | | } |
| | | |
| | | .block_list_center>view { |
| | | padding: 5px 0px; |
| | | } |
| | | |
| | | .block_list_center>view>span:nth-child(1) { |
| | | display: block; |
| | | height: 13px; |
| | | } |
| | | |
| | | .block_list_url { |
| | | width: 100%; |
| | | justify-content: space-around; |
| | | border-top: 1px dashed #EFEFF4; |
| | | } |
| | | |
| | | .block_list_url>view { |
| | | width: 30%; |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 5px 0; |
| | | padding: 3px 5px; |
| | | justify-content: center; |
| | | font-size: 30rpx; |
| | | color: #16b5cb; |
| | | /* border-radius: 5px; |
| | | border: 1px solid red; */ |
| | | } |
| | | |
| | | .block_list_url>view>icon { |
| | | margin-right: 5rpx; |
| | | } |
| | | |
| | | /* .block_list_url>view:nth-child(1){ |
| | | background-color: #16b5cb; |
| | | } |
| | | .block_list_url>view:nth-child(2){ |
| | | background-color: #2fc593; |
| | | } |
| | | .block_list_url>view:nth-child(3){ |
| | | background-color: #2fc598; |
| | | } */ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | "query": "id=23&name=%E5%87%AF%E6%B3%89%E4%B8%80%E4%BD%93%E5%8C%96%E5%A2%9E%E5%8E%8B%E6%B3%B5%E7%AB%99", |
| | | "launchMode": "default", |
| | | "scene": null |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "other/alarm/index", |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | | } |
| | | ] |
| | | } |