zhaobing’
1 year ago
27 changed files with 633 additions and 381 deletions
@ -0,0 +1,2 @@ |
|||||
|
UPDATE device SET date_guarantee = '2022-12-20'; |
||||
|
UPDATE device SET date_mainten = '2026-12-20 '; |
@ -1,155 +1,82 @@ |
|||||
<!-- package/inspectionInput/inspectionInput.wxml --> |
<!-- package/inspectionInput/inspectionInput.wxml --> |
||||
<view class="popBox"> |
<view class="popBox"> |
||||
<view wx:if="{{planList}}"> |
<view wx:if="{{planList}}"> |
||||
<t-cell |
<t-cell class="block" title="选择巡检计划" arrow hover note="{{planListText}}" bind:click="onPlanListPicker" /> |
||||
class="block" |
<t-picker visible="{{planListVisible}}" value="{{planListValue}}" data-key="planList" title="选择巡检计划" cancelBtn="取消" confirmBtn="确认" bindchange="onPickerChange" bindcancel="onPickerCancel"> |
||||
title="选择巡检计划" |
<t-picker-item options="{{planList}}" format></t-picker-item> |
||||
arrow |
</t-picker> |
||||
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> |
||||
<view style="float:right;"> |
<view style="padding:20rpx 30rpx;overflow: hidden;"> |
||||
<image wx:if="{{!address}}" class="icon" src="../../images/landmark.svg" /> |
<view style="float: left;">当前点位:</view> |
||||
<view style="display: inline-block;" bindtap="selfLocation" wx:if="{{!address}}"> |
<view style="float:right;">{{itemData.name}}</view> |
||||
点击获取 |
|
||||
</view> |
|
||||
</view> |
</view> |
||||
</view> |
<view class="divider" /> |
||||
<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 |
<view wx:for="{{inspectContentArr}}" wx:key="id" wx:for-item="item" wx:for-index="itemidx"> |
||||
wx:for="{{inspectContentArr}}" |
<!-- <view wx:for="{{device.checkItems}}" wx:key="id" wx:for-index="itemidx"> --> |
||||
wx:key="deviceId" |
<view class="flex-between"> |
||||
wx:for-item="device" |
<view class="item-name">{{item.name}}:</view> |
||||
wx:for-index="deviceidx" |
<van-radio-group style="padding:10px 15px;" data-deviceidx="{{item.id}}" data-itemidx="{{itemidx}}" bindchange="handleChangeTwo" value="{{item.isNormal}}"> |
||||
> |
<van-radio style="margin-right: 20px;" class="radio-text" color="#1979ff" name="{{true}}">正常</van-radio> |
||||
<view wx:if="{{device.deviceName}}" class="flex flex-start" style="height: 40px" |
<van-radio class="radio-text" checked-color="#CC0000" name="{{false}}">异常</van-radio> |
||||
>{{device.deviceName}}</view |
</van-radio-group> |
||||
> |
</view> |
||||
<view wx:for="{{device.checkItems}}" wx:key="id" wx:for-index="itemidx"> |
<view class="divider" /> |
||||
<view class="flex-between"> |
<!--渲染设备--> |
||||
<view class="item-name">{{item.name}}:</view> |
<!-- <van-checkbox-group wx:if="{{!item.isNormal}}" value="{{ device.isNormal }}" bind:change="handleChangeDevice"> |
||||
<van-radio-group |
<van-checkbox name="a">复选框 a</van-checkbox> |
||||
style="padding:10px 15px;" |
</van-checkbox-group> --> |
||||
data-deviceidx="{{deviceidx}}" |
<view wx:if="{{!item.isNormal}}" wx:for-index="deviceidx" wx:for="{{item.devices}}" wx:key="deviceId" wx:for-item="device" class="flex flex-start" style="height: 40px"> |
||||
data-itemidx="{{itemidx}}" |
<!-- <van-radio-group style="padding:10px 15px;" value="{{device.isNormal}}" data-deviceidx="{{deviceidx}}" data-itemidx="{{itemidx}}" bindchange="handleChangeDevice"> |
||||
bindchange="handleChangeTwo" |
{{device.deviceName}}: |
||||
value="{{item.isNormal}}" |
<van-radio style="margin-right: 20px;" class="radio-text" color="#1979ff" name="{{true}}">正常</van-radio> |
||||
> |
<van-radio class="radio-text" checked-color="#CC0000" name="{{false}}">异常</van-radio> |
||||
<van-radio style="margin-right: 20px;" class="radio-text" color="#1979ff" name="{{true}}" |
</van-radio-group> --> |
||||
>正常</van-radio |
<van-checkbox-group value="{{ devicesChecked }}" data-deviceidx="{{deviceidx}}" data-itemidx="{{itemidx}}" bind:change="handleChangeDevice"> |
||||
> |
<van-checkbox name="{{device.deviceId+'-'+item.id}}">{{device.deviceName}}</van-checkbox> |
||||
<van-radio class="radio-text" checked-color="#CC0000" name="{{false}}">异常</van-radio> |
</van-checkbox-group> |
||||
</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> |
<!--巡检的具体内容--> |
||||
<view class="divider" /> |
<view style="margin-top: 10px;"> |
||||
|
<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> |
||||
|
<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="{{devicesChecked}}" data-itemidx="{{itemidx}}" bindtap="chooseImg"> |
||||
|
<image class="upload" src="/images/upload.png" /> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<!-- </view> --> |
||||
</view> |
</view> |
||||
</view> |
|
||||
|
|
||||
<view class="btnBox"> |
<view class="btnBox"> |
||||
<view class="cancel" bindtap="bindCancel">取消</view> |
<view class="cancel" bindtap="bindCancel">取消</view> |
||||
<view class="submit" bindtap="addPatrolRecord">提交</view> |
<view class="submit" bindtap="addPatrolRecord">提交</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
@ -1,50 +1,88 @@ |
|||||
<!--package/subSystem/dayPatrolInfo/dayPatrolInfo.wxml--> |
<!--package/subSystem/dayPatrolInfo/dayPatrolInfo.wxml--> |
||||
<view class="day-patrol-info"> |
<view class="day-patrol-info"> |
||||
<view class="card" style="margin-bottom: 10px"> |
<view class="card" style="margin-bottom: 10px"> |
||||
<view class="card-top flex flex-between"> |
<view class="card-top flex flex-between"> |
||||
<view class="card-left flex"> |
<view class="card-left flex"> |
||||
<image class="card-icon" src="/images/question_icon.png" /> |
<image class="card-icon" src="/images/question_icon.png" /> |
||||
<view class="title">今日问题分布</view> |
<view class="title">今日问题分布</view> |
||||
</view> |
</view> |
||||
<image src="/images/question_card_bg.png" class="card-bg" /> |
<image src="/images/question_card_bg.png" class="card-bg" /> |
||||
|
</view> |
||||
|
<view wx:for="{{dayIssues}}" wx:key="*this" class="problem-box flex"> |
||||
|
<view class="problem-title text---">{{item.pointName}}</view> |
||||
|
<progress style="width: 70%;" percent="{{item.percent}}" activeColor="{{item.color}}" stroke-width="8" show-info font-size="14" border-radius="4" /> |
||||
|
</view> |
||||
|
<!-- 暂无数据 --> |
||||
|
<view wx:if="{{!dayIssues.length}}"> |
||||
|
<image class="noData" src="../../../images/noData.svg"></image> |
||||
|
<view class="noTxt">暂无数据</view> |
||||
|
</view> |
||||
</view> |
</view> |
||||
<view wx:for="{{dayIssues}}" class="problem-box flex"> |
|
||||
<view class="problem-title text---">{{item.pointName}}</view> |
<view class="card" style="margin-bottom: 10px"> |
||||
<progress |
<view class="card-top flex flex-between"> |
||||
style="width: 70%;" |
<view class="card-left flex"> |
||||
percent="{{item.percent}}" |
<image class="card-icon" src="/images/hourglass_icon.png" /> |
||||
activeColor="{{item.color}}" |
<view class="title">今日待检分布</view> |
||||
stroke-width="8" |
</view> |
||||
show-info |
<view class="card-right">总次数:{{needInspectCount}}次</view> |
||||
font-size="14" |
<image src="/images/hourglass_card_bg.png" class="card-bg" /> |
||||
border-radius="4" |
</view> |
||||
/> |
|
||||
|
<!-- 有数据时显示图表 --> |
||||
|
<!-- <view wx:if="{{needInspectCount}}"> |
||||
|
<view class="pie-chart-box"> |
||||
|
<ec-canvas id="need-chart-dom" canvas-id="need-chart" ec="{{ needEc }}"></ec-canvas> |
||||
|
</view> |
||||
|
</view> --> |
||||
|
|
||||
|
<!-- 没有数据时显示图表但不显示内容 --> |
||||
|
<!-- <view wx:else> |
||||
|
<view class="pie-chart-box" hidden="{{!needInspectCount}}"> |
||||
|
<ec-canvas id="need-chart-dom" canvas-id="need-chart" ec="{{ needEc }}"></ec-canvas> |
||||
|
</view> |
||||
|
<image class="noData" src="../../../images/noData.svg"></image> |
||||
|
<view class="noTxt">暂无数据</view> |
||||
|
</view> --> |
||||
|
<view class="pie-chart-box" wx:if="{{needInspectCount}}"> |
||||
|
<ec-canvas id="need-chart-dom" canvas-id="need-chart" ec="{{ needEc }}"></ec-canvas> |
||||
|
</view> |
||||
|
<view wx:else> |
||||
|
<image class="noData" src="../../../images/noData.svg"></image> |
||||
|
<view class="noTxt">暂无数据</view> |
||||
|
</view> |
||||
</view> |
</view> |
||||
</view> |
|
||||
<view class="card" style="margin-bottom: 10px"> |
<view class="card" style="margin-bottom: 10px"> |
||||
<view class="card-top flex flex-between"> |
<view class="card-top flex flex-between"> |
||||
<view class="card-left flex"> |
<view class="card-left flex"> |
||||
<image class="card-icon" src="/images/hourglass_icon.png" /> |
<image class="card-icon" src="/images/right_icon.png" /> |
||||
<view class="title">今日待检分布</view> |
<view class="title">今日已检分布</view> |
||||
</view> |
</view> |
||||
<view class="card-right">总次数:{{needInspectCount}}次</view> |
<view class="card-right">总次数:{{inspectedCount}}次</view> |
||||
<image src="/images/hourglass_card_bg.png" class="card-bg" /> |
<image src="/images/right_card_bg.png" class="card-bg" /> |
||||
</view> |
</view> |
||||
<view class="pie-chart-box"> |
<!-- 有数据时显示图表 --> |
||||
<ec-canvas id="need-chart-dom" canvas-id="need-chart" ec="{{ needEc }}"></ec-canvas> |
<!-- <view wx:if="{{inspectedCount}}"> |
||||
</view> |
<view class="pie-chart-box"> |
||||
</view> |
<ec-canvas id="already-chart-dom" canvas-id="already-chart" ec="{{ alreadyEc }}"></ec-canvas> |
||||
<view class="card" style="margin-bottom: 10px"> |
</view> |
||||
<view class="card-top flex flex-between"> |
</view> --> |
||||
<view class="card-left flex"> |
|
||||
<image class="card-icon" src="/images/right_icon.png" /> |
<!-- 没有数据时显示图表但不显示内容 --> |
||||
<view class="title">今日已检分布</view> |
<!-- <view wx:else> |
||||
</view> |
<view class="pie-chart-box" hidden="{{!inspectedCount}}"> |
||||
<view class="card-right">总次数:{{inspectedCount}}次</view> |
<ec-canvas id="already-chart-dom" canvas-id="already-chart" ec="{{ alreadyEc }}"></ec-canvas> |
||||
<image src="/images/right_card_bg.png" class="card-bg" /> |
</view> |
||||
</view> |
<image class="noData" src="../../../images/noData.svg"></image> |
||||
<view class="pie-chart-box"> |
<view class="noTxt">暂无数据</view> |
||||
|
</view> --> |
||||
|
<view class="pie-chart-box" wx:if="{{inspectedCount}}"> |
||||
<ec-canvas id="already-chart-dom" canvas-id="already-chart" ec="{{ alreadyEc }}"></ec-canvas> |
<ec-canvas id="already-chart-dom" canvas-id="already-chart" ec="{{ alreadyEc }}"></ec-canvas> |
||||
</view> |
</view> |
||||
</view> |
<view wx:else> |
||||
|
<image class="noData" src="../../../images/noData.svg"></image> |
||||
|
<view class="noTxt">暂无数据</view> |
||||
|
</view> |
||||
|
</view> |
||||
</view> |
</view> |
Loading…
Reference in new issue