|
|
|
<!-- package/polling/polling.wxml -->
|
|
|
|
<view class="page">
|
|
|
|
<!-- 顶部tab切换 -->
|
|
|
|
<view class='swiper-tab'>
|
|
|
|
<view class="swiper-tab-item" data-current="0" bindtap="clickTab" style="{{currentTab=='0' ? 'color:#1979ff' : 'color:black'}}">待巡检</view>
|
|
|
|
<view class="swiper-tab-item" data-current="1" bindtap="clickTab" style="{{currentTab=='1' ? 'color:#1979ff' : 'color:black'}}">巡检记录</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 待巡检 -->
|
|
|
|
<view class="wait-patrol" wx:if="{{currentTab=='0'}}">
|
|
|
|
<view class="contentBox">
|
|
|
|
<block wx:for="{{dataList}}" wx:key='*this'>
|
|
|
|
<view class="listBox">
|
|
|
|
<view style="padding-bottom:40rpx;overflow: hidden;">
|
|
|
|
<view class="titleBox" style="width: 630rpx; margin: 0 auto;">
|
|
|
|
<view class="title">{{item.name}}</view>
|
|
|
|
</view>
|
|
|
|
<view style="line-height:50rpx;font-size:28rpx;width: 630rpx; margin: 0 auto;">
|
|
|
|
计划时间:
|
|
|
|
<text>{{item.startTime}}至{{item.endTime}}</text>
|
|
|
|
</view>
|
|
|
|
<view style="line-height:50rpx;font-size:28rpx;width: 630rpx; margin: 0 auto;">
|
|
|
|
计划时间:
|
|
|
|
<text>{{item.way}}({{item.frequency}})</text>
|
|
|
|
</view>
|
|
|
|
<view class="btn" data-item="{{item}}" bindtap="bindStart">开始巡检</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</block>
|
|
|
|
</view>
|
|
|
|
<!-- 暂无数据 -->
|
|
|
|
<view hidden="{{hidden}}">
|
|
|
|
<image class="noData" src="../../images/noData.png"></image>
|
|
|
|
<view class="noTxt">暂无数据~</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 巡检记录 -->
|
|
|
|
<view id="patrol-record" wx:elif="{{currentTab=='1'}}">
|
|
|
|
<view style="box-shadow:0px 0px 5px #7e7e7e;padding: 15px;background: #fff;position:fixed;top:100rpx;left:0;width: 100%;">
|
|
|
|
<view style="display: flex;">
|
|
|
|
<view style="line-height:50rpx;">时间范围:</view>
|
|
|
|
<view style="display: flex;">
|
|
|
|
<!-- 自定义时间选择器 -->
|
|
|
|
<view class="page-date" style="{{startTime != '开始日期' && endTime != '结束日期' ? 'float:left' : ''}}" bindtap="pickerShow">
|
|
|
|
<view style="{{startTime == '开始日期' && endTime == '结束日期' ? 'color:#ccc;' : ''}}">
|
|
|
|
{{startTime}}
|
|
|
|
<text style="margin: 0 20rpx;color:#000;">至</text>
|
|
|
|
{{endTime}}
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="clearDate" wx:if="{{startTime != '开始日期' && endTime != '结束日期'}}" bindtap="bindClearDate">
|
|
|
|
<image src="/images/close.svg"></image>
|
|
|
|
</view>
|
|
|
|
<timePicker pickerShow="{{isPickerShow}}" id="picker" wx:if="{{isPickerRender}}" bind:hidePicker="pickerHide" bind:setPickerTime="setPickerTime" config="{{pickerConfig}}"></timePicker>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view style='display:flex;margin-top:28rpx;'>
|
|
|
|
<view style="line-height: 55rpx;">巡检结果:</view>
|
|
|
|
<picker class='my-picker' bindchange="bindPickerRes" value="{{ResIndex}}" rangeKey='text' range='{{ResList}}' style="border:2rpx solid #ccc;padding:6rpx 42rpx;border-radius: 6rpx;">
|
|
|
|
{{ResList[ResIndex].text}}
|
|
|
|
<image style="width:20rpx;height:20rpx;margin-left:10rpx;" src="../../images/down.svg" />
|
|
|
|
</picker>
|
|
|
|
<view style="padding:6rpx 64rpx;background:#1979ff;border-radius:6rpx;color:#fff;margin-left:70rpx;" bindtap="bindSearch">
|
|
|
|
查询
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="contentBox">
|
|
|
|
<block wx:for="{{recordDataList}}" wx:key='*this'>
|
|
|
|
<view class="listBox">
|
|
|
|
<view style="padding-bottom:40rpx;overflow: hidden;">
|
|
|
|
<view class="titleBox" style="width: 630rpx; margin: 0 auto;">
|
|
|
|
<view class="title">{{item.points.project.name}}</view>
|
|
|
|
</view>
|
|
|
|
<view style="line-height:50rpx;font-size:28rpx;width: 630rpx; margin: 0 auto;">
|
|
|
|
本次巡检日期:
|
|
|
|
<text>{{item.inspectionTime}}</text>
|
|
|
|
</view>
|
|
|
|
<view style="line-height:50rpx;font-size:28rpx;width: 630rpx; margin: 0 auto;">
|
|
|
|
巡检人:
|
|
|
|
<text>{{item.points.user.name}}</text>
|
|
|
|
</view>
|
|
|
|
<view style="line-height:50rpx;font-size:28rpx;width: 630rpx; margin: 0 auto;">
|
|
|
|
巡检结果:
|
|
|
|
<text>{{item.alarm ? '异常' : '正常'}}</text>
|
|
|
|
</view>
|
|
|
|
<view class="btn" data-item="{{item}}" bindtap="bindDetail">查看详情</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</block>
|
|
|
|
</view>
|
|
|
|
<!-- 暂无数据 -->
|
|
|
|
<view hidden="{{recordHidden}}">
|
|
|
|
<image class="noData" src="../../images/noData.png"></image>
|
|
|
|
<view class="noTxt">暂无数据~</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|