You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

154 lines
4.7 KiB

<!-- package/inspectionInput/inspectionInput.wxml -->
<view class="popBox">
<view wx:if="{{planList}}">
<t-cell
class="block"
title="选择巡检计划"
arrow
hover
note="{{planListText}}"
bind:click="onPlanListPicker"
/>
<t-picker
visible="{{planListVisible}}"
value="{{planListValue}}"
data-key="planList"
title="选择巡检计划"
cancelBtn="取消"
confirmBtn="确认"
bindchange="onPickerChange"
bindcancel="onPickerCancel"
>
<t-picker-item options="{{planList}}" format></t-picker-item>
</t-picker>
</view>
<view style="padding:20rpx 30rpx;overflow: hidden;">
<view style="float: left;">当前点位:</view>
<view style="float:right;">{{itemData.name}}</view>
</view>
<view class="divider" />
<view style="padding:20rpx 30rpx;overflow: hidden;">
<view style="float: left;">当前位置:</view>
<view style="float:right;" wx:if="{{address}}">
{{address}}
</view>
<view style="float:right;">
<image wx:if="{{!address}}" class="icon" src="../../images/landmark.svg" />
<view style="display: inline-block;" bindtap="selfLocation" wx:if="{{!address}}">
点击获取
</view>
</view>
</view>
<view class="divider" />
<!-- 渲染巡检内容 -->
<view
wx:for="{{inspectContentArr}}"
wx:key="deviceId"
wx:for-item="device"
wx:for-index="deviceidx"
>
<view wx:if="{{device.deviceName}}" class="flex flex-start" style="height: 40px"
>{{device.deviceName}}</view
>
<view wx:for="{{device.checkItems}}" wx:key="id" wx:for-index="itemidx">
<view class="flex-between">
<view class="item-name">{{item.name}}:</view>
<van-radio-group
style="padding:10px 15px;"
data-deviceidx="{{deviceidx}}"
data-itemidx="{{itemidx}}"
bindchange="handleChangeTwo"
>
<van-radio style="margin-right: 20px;" class="radio-text" color="#1979ff" name="normal"
>正常</van-radio
>
<van-radio class="radio-text" checked-color="#CC0000" name="abnormal">异常</van-radio>
</van-radio-group>
</view>
<view class="divider" />
<van-radio-group
class="flex-end"
style="padding:10px 15px;"
data-deviceidx="{{deviceidx}}"
data-itemidx="{{itemidx}}"
bindchange="handleChangeThree"
wx:if="{{item.isNormal === false}}"
>
<van-radio
style="margin-right: 20px;"
class="radio-text"
checked-color="#FF9900"
name="轻微"
>轻微</van-radio
>
<van-radio
style="margin-right: 20px;"
class="radio-text"
checked-color="#FF3300"
name="中度"
>中度</van-radio
>
<van-radio class="radio-text" checked-color="#990000" name="严重">严重</van-radio>
</van-radio-group>
<textarea
class="textarea"
placeholder="请输入巡查详情"
maxlength="-1"
wx:if="{{item.isNormal === false}}"
data-deviceidx="{{deviceidx}}"
data-itemidx="{{itemidx}}"
bindinput="bindInput"
/>
<view
class="weui-uploader"
style="padding: 20rpx 30rpx;overflow-y:scroll;"
wx:if="{{item.isNormal === false}}"
>
<view class="img-v weui-uploader__bd" style="overflow:hidden;">
<view
class="pic"
wx:for="{{item.imgs}}"
wx:for-item="img"
wx:key="*this"
>
<image
class="weui-uploader__img showImg"
src="{{imgUrl + img}}"
data-index="{{index}}"
data-deviceidx="{{deviceidx}}"
data-itemidx="{{itemidx}}"
mode="aspectFill"
bindtap="previewImg"
>
<icon
type="cancel"
class="delete-btn"
data-index="{{index}}"
data-deviceidx="{{deviceidx}}"
data-itemidx="{{itemidx}}"
catchtap="deleteImg"
/>
</image>
</view>
<!-- 用来提示用户上传图片 -->
<view
class="weui-uploader__input-box pic"
data-item="{{item.name}}"
data-deviceidx="{{deviceidx}}"
data-itemidx="{{itemidx}}"
bindtap="chooseImg"
>
<image class="upload" src="/images/upload.png" />
</view>
</view>
</view>
<view class="divider" />
</view>
</view>
<view class="btnBox">
<view class="cancel" bindtap="bindCancel">取消</view>
<view class="submit" bindtap="addPatrolRecord">提交</view>
</view>
</view>