tanghaolin
2022-07-27 fd4d1d9296ba620de15b47bd1d58383d46ecb626
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<loading hidden="{{loadingHidden}}">
    {{loadingInfo}}
</loading>
<!-- 底部导航栏 -->
<view class="tabBar">
    <block wx:for="{{tabBar}}" wx:for-item="item" wx:key="index">
        <view class="tabBar-item" data-index='{{item.index}}' catchtap='tapTab'>
            <view>
                <icon class="iconfont {{item.index == currentTabIndex ? item.selectedIconPath : item.iconPath}}"></icon>
                <!-- <image class="icon" src='{{item.index == currentTabIndex ? item.selectedIconPath : item.iconPath}}'></image> -->
            </view>
            <view class="{{item.index == currentTabIndex ? 'tabBartext' :''}}">{{item.text}}</view>
        </view>
    </block>
</view>
 
 
 
<!-- 监测 -->
<view class="container">
    <view class="y_container" wx:if="{{currentTabIndex==0}}">
        <view class="y_c_list">
            <icon class="iconfont icon-zhuangtai"></icon>
            <view class="kpiText">状态<text>({{kpiParas.status}})</text></view>
        </view>
        <view class="y_c_list">
            <icon class="iconfont icon-taishu"></icon>
            <view class="kpiText">运行台数:<text>{{machineList.length}}</text></view>
        </view>
        <view class="y_c_list">
            <icon class="iconfont icon-guzhang"></icon>
            <view class="kpiText"><text>故障:({{kpiParas.alarmNumber}})</text></view>
        </view>
    </view>
 
    <scroll-view wx:if="{{currentTabIndex==0}}" scroll-y class='pointLists' scroll-top="{{scrollTop}}"
        style="height: 100vh;" scroll-with-animation bindscroll="scrollListView">
        <text wx:if="{{!hasPointData}}" class="pointCellRecordName">还未定义信号</text>
 
        <!-- <block wx:if="{{hasPointData}}" wx:for="{{allProductPoints}}" wx:key="ID" wx:for-item="product"
            wx:for-index="product_index">
            <label class="lineSpace4Product"> </label>
            <view class='titleView' data-productid='{{product.ID}}' bindtap='tapProductName'>
                <text class="productName">{{product.Name}}</text>
                <label class='rightLabel'>
                    <icon class="expandImage iconfont {{product.IsExpand?'icon-down':'icon-right'}}"></icon>
                </label>
            </view> -->
 
            <view class="pointCell" wx:for="{{allProductPoints}}"
                wx:for-index="index" wx:key="index" wx:for-item="point" data-pointid="{{point.ID}}" data-pointname="{{point.SignalList[0].Name}}" data-pointunit="{{point.SignalList[0].UnitValue}}" data-crontype="{{point.CronType}}"
                catchtap='tapeMonitorPoint'>
                <label wx:if="{{index>0}}" class="lineSpace4Record"> </label>
                <!--<image class="pointCellImage" src="{{ point.image }}"></image>-->
                <view style="display:flex;justify-content: space-between;align-items: center;">
                    <view>
                        <view class="pointCellRecordName">{{ point.SignalList[0].Name }}</view>
                    </view>
                    <view>
                        <view class="pointRightBlock pointCellUnit" style="height:100rpx">
                            {{point.SignalList[0].UnitValue == null?'':point.SignalList[0].UnitValue}}
                        </view>
                        <view class="pointRightBlock pointCellRecord">{{point.SignalList[0].SignalValue}}</view>
                    </view>
                </view>
            </view>
 
            <view wx:if="{{product.IsExpand && !product.isExpandAll && product.Items.length>1}}" class="y_more"
                data-index="{{product_index}}" data-id="{{product.ID}}" catchtap='tapMoreMonitor'>
                <icon class="iconfont icon-icon-test"></icon>
                <view>更多</view>
            </view>
 
        <!-- </block> -->
        <view class='refreshTimeInfoLabel'>
            <text>最后刷新时间:{{getNewDateArry[0]}}-{{getNewDateArry[1]}}-{{getNewDateArry[2]}} {{getNewDateArry[3]}}:{{getNewDateArry[4]}}</text>
            <text>{{lastRefreshTime}}秒后刷新</text>
        </view>
    </scroll-view>
 
</view>
 
<!--  工作时间  -->
<view wx:if='{{currentTabIndex==1}}'>
    <view class="date_top">
        <button class="last_day" bindtap="yesterDay"><text>上一天</text></button>
        <view class="date">
            <picker mode="date" end="{{yestday}}" value="{{historyDate}}" fields="day" bindchange="tapChangeWorkTime">
                <view class="weui-input view-center">{{historyDate}}</view>
            </picker>
        </view>
        <button class="follow_day" disabled="{{!isNextDayAble}}" bindtap="tomorrow"><text
                style="text-align:center">下一天</text></button>
    </view>
    <view class="echart_body">
        <view class="container1">
            <ec-canvas id="mychart-dom-bar" canvas-id="mychart-bar" ec="{{ec}}"></ec-canvas>
        </view>
    </view>
    <view class="ykt-detail-wraper">
        <view class="ykt-head">
            <text class="ykt-type-name">泵组总开机时间</text>
        </view>
        <view class="detail-list">
            <view class="detail-item" wx:for="{{machineList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
                <text class="detail-item-label">{{item.TitleName}}</text>
                <text class="detail-item-value">{{item.WorkTime}}小时</text>
            </view>
        </view>
    </view>
</view>
 
<!-- 警报 -->
<view wx:if='{{currentTabIndex==2}}'>
    <view class='filterTimeScopeView' style='display: flex;justify-content: center;font-size: 26rpx;'>
        <view style="display: flex;justify-content: center;align-items: center;">
            <label style="color:red;margin-top:0;">{{alarmListInfo.length}}条</label>
            <label style='display: flex;margin-top:0;'>时间</label>
            <label style='display: flex;padding-right:20rpx;margin-top:0;'>从 </label>
        </view>
        <view style="display: flex;justify-content: center;align-items: center;">
            <picker class='timePicker' mode="date" end="{{endDate}}" value="{{startAlarmDate}}" fields="day"
                bindchange="bindStartAlarmDateChange">
                <view style='display: flex' class="weui-input view-center">{{startAlarmDate}}</view>
            </picker>
            <view style='display: flex;padding-left:20rpx;padding-right:20rpx;align-items:center;' class='fenView'>到</view>
            <picker class='timePicker' mode="date" start="{{startAlarmDate}}" end="{{today}}" value="{{endAlarmDate}}"
                fields="day" bindchange="bindEndAlarmDateChange">
                <view style='display: flex' class="weui-input view-center">{{endAlarmDate}}</view>
            </picker>
            <image bindtap='tapRefreshAlarm' src='../../images/icons/refresh.png'
                style='width:32px;height:32px;display: flex;margin-top:3px;'></image>
        </view>
    </view>
 
    <scroll-view class="tableView" lower-threshold="50" scroll-y="true"
        style="margin-top: 42px;height:calc(100vh - 164rpx)" bindscrolltolower="lowRefresh" bindscroll="scrollListView"
        scroll-top="{{scrollTop}}">
        <view class="flexItem rowStyle tableViewCellHeader marginTop10" wx:if="{{!hasAlarmData}}">
            <!-- <image class="orderImage marginLeft12"></image> -->
            <label class="color54 fontSize12"
                style="text-align: center;display: flex;align-items: center;width: 100%;justify-content: center;">{{message}}</label>
        </view>
 
        <block wx:for="{{alarmListInfo}}" wx:for-item="info" wx:for-index="index" wx:key="index" wx:if="{{hasAlarmData}}">
            <view class="flexItem rowStyle  personInfo" style="margin-top:20rpx;">
                <view class="flexItem rowStyle marginLeft12" style="display: flex;flex-direction: column;">
                    <text class="color54 fontSize12">报警时间: {{info.AlarmTime}}</text>
                    <text class="color54 fontSize12">恢复时间: {{info.RecoveryTime}}</text>
                </view>
            </view>
            <view class="flexItem columnStyle tableViewCell">
                <view style="display:flex;align-items: center;justify-content: space-between;width:100%;">
                    <view class="flexItem rowStyle marginBottom10 cellStyle" style="width:50%;">
                        <label class="color54 fontSize12" style="color:#8799a3">对象名称:</label>
                        <label class="fontSize14"> {{}}</label>
                    </view>
                    <view class="flexItem rowStyle marginBottom10 cellStyle" style="width:50%;">
                        <label class="color54 fontSize12" style="color:#8799a3">监测名称:</label>
                        <label class="fontSize14">{{}} </label>
                    </view>
                </view>
                <view class="flexItem rowStyle marginBottom10 cellStyle" style="width:100%;">
                    <label class="color54 fontSize12" style="width:50%;color:#8799a3">报警内容:{{info.AlarmContent}}</label>
                    <label class="color54 fontSize12" style="width:50%;color:#8799a3">报警等级:{{info.AlarmLevel}}</label>
                </view>
                <view class="flexItem rowStyle marginBottom10 cellStyle" style="width:100%;">
                    <label class="color54 fontSize12" style="width:50%;color:#8799a3">报警类型:{{info.AlarmType}}</label>
                    <label class="color54 fontSize12" style="width:50%;color:#8799a3">报警次数:{{info.AlarmCount}}</label>
                </view>
                <view class="flexItem rowStyle marginBottom10 cellStyle" style="width:100%;">
                    <label class="color54 fontSize12" style="width:50%;color:#8799a3">监控值:{{info.MonitorValue}}</label>
                    <label class="color54 fontSize12" style="width:50%;color:#8799a3">处理状态:{{info.HandleStatus}}</label>
                </view>
            </view>
        </block>
        <view
            style="width: 100%;height: 80rpx;display: flex;background-color: #eee;align-items: center;justify-content: center;"
            wx:if="{{bottomStatus == true}}">
            <text style="color: #bebebe;">-- 没有更多信息了 --</text>
        </view>
    </scroll-view>
</view>
 
<!-- 返回顶部 -->
<view class="iconfont icon-weibiaoti- {{animationFloatMenu}}"
    style="font-size:40px;color:#fff;width: 40px; height: 40px; position: fixed; right: 10px; bottom: 100px;z-index:200;display: flex;align-items: center;justify-content:center;background-color: #16b5cb;border-radius:10rpx;box-shadow: 0 2px 6px 0 rgba(114, 124, 245, .5);"
    bindtap="goTop" wx:if="{{isShowFloatMenu && currentTabIndex == 0 || isShowFloatMenu && currentTabIndex == 2}}"></view>
 
<!-- 列表伸缩 -->
<view class="iconfont icon-youjian  {{isExpandList? '.down':'.xia'}}"
    style="font-size:40px;color:#fff;font-size: 40rpx;width: 40px; height: 40px; position: fixed; right: 10px; bottom: 155px;z-index:200;display: flex;align-items: center;justify-content:center;background-color: #16b5cb;border-radius:10rpx;box-shadow: 0 2px 6px 0 rgba(114, 124, 245, .5);"
    bindtap="tapExpandList" wx:if="{{currentTabIndex == 0}}"></view>