Browse Source

开始巡检UI

master
liujiangyong 1 year ago
parent
commit
07337d6f20
  1. 3
      weapp/package/inspectionInput/inspectionInput.json
  2. 4
      weapp/package/startInspection/startInspection.json
  3. 75
      weapp/package/startInspection/startInspection.wxml
  4. 34
      weapp/package/startInspection/startInspection.wxss

3
weapp/package/inspectionInput/inspectionInput.json

@ -9,9 +9,6 @@
"t-cell": "tdesign-miniprogram/cell/cell",
"t-picker": "tdesign-miniprogram/picker/picker",
"t-picker-item": "tdesign-miniprogram/picker-item/picker-item",
"van-cell": "@vant/weapp/cell/index",
"van-cell-group": "@vant/weapp/cell-group/index",
"van-icon": "@vant/weapp/icon/index",
"van-radio": "@vant/weapp/radio/index",
"van-radio-group": "@vant/weapp/radio-group/index"
}

4
weapp/package/startInspection/startInspection.json

@ -8,6 +8,8 @@
"t-cell-group": "tdesign-miniprogram/cell-group/cell-group",
"t-cell": "tdesign-miniprogram/cell/cell",
"t-picker": "tdesign-miniprogram/picker/picker",
"t-picker-item": "tdesign-miniprogram/picker-item/picker-item"
"t-picker-item": "tdesign-miniprogram/picker-item/picker-item",
"van-cell": "@vant/weapp/cell/index",
"van-cell-group": "@vant/weapp/cell-group/index"
}
}

75
weapp/package/startInspection/startInspection.wxml

@ -1,5 +1,5 @@
<!-- package/startInspection/startInspection.wxml -->
<view class="box">
<view class="page">
<view class="plan-list" 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">
@ -7,59 +7,26 @@
</t-picker>
</view>
<view class="titleFirst">巡检要求</view>
<view class="txt">
<view style="float: left;font-weight: bold;">结构物名称</view>
<view style="float:left;width:70%;margin-left:40rpx;">{{dataList.project.name}}</view>
</view>
<view class="txt">
<view style="float: left;font-weight: bold;">开始时间</view>
<view style="float:left;width:70%;margin-left:40rpx;">{{dataList.startTime}}</view>
</view>
<view class="txt">
<view style="float: left;font-weight: bold;">结束时间</view>
<view style="float:left;width:70%;margin-left:40rpx;">{{dataList.endTime}}</view>
</view>
<view class="txt">
<view style="float: left;font-weight: bold;">巡检方式</view>
<view style="float:left;width:70%;margin-left:40rpx;">{{dataList.way}}</view>
</view>
<view class="txt">
<view style="float: left;font-weight: bold;">巡检频次</view>
<view style="float:left;width:70%;margin-left:40rpx;">{{dataList.frequency}}</view>
</view>
<view class="txt">
<view style="float: left;font-weight: bold;">巡检人</view>
<view style="float:left;width:70%;margin-left:40rpx;">{{dataList.showUsers}}</view>
</view>
<view class="txt">
<view style="float: left;font-weight: bold;">巡检单位</view>
<view style="float:left;width:70%;margin-left:40rpx;">{{dataList.showDepts}}</view>
</view>
<view class="txt">
<view style="float: left;font-weight: bold;">巡检点位</view>
<view style="float:left;width:70%;margin-left:40rpx;">{{points}}</view>
</view>
<view class="line"></view>
<view class="titleFirst">巡检结果录入</view>
<block wx:for="{{dataList.points}}" wx:key="*this">
<view style="margin-bottom: 60rpx;">
<view class="txt" style="margin-bottom: 20rpx;">
<view style="float: left;font-weight: bold;">巡检点位</view>
<view style="float:left;width:55%;margin-left:40rpx;">{{item.name}}</view>
<view class="startBtn" data-itemData="{{item}}" bindtap="showModal">开始巡检</view>
</view>
<view class="txt" style="margin-bottom: 20rpx;">
<view style="float: left;font-weight: bold;">上次巡检日期</view>
<view style="float:left;width:55%;margin-left:40rpx;">{{item.lastInspectionTime}}</view>
</view>
<view class="txt" style="margin-bottom: 20rpx;">
<view style="float: left;font-weight: bold;">巡检人</view>
<view style="float:left;width:55%;margin-left:40rpx;">{{dataList.showUsers}}</view>
</view>
<view class="txt" style="margin-bottom: 20rpx;">
<view style="float: left;font-weight: bold;">本次巡检日期</view>
<view style="float:left;width:55%;margin-left:40rpx;">{{item.inspectionTime}}</view>
</view>
<van-cell-group>
<van-cell size="large" title="结构物名称:" value="{{dataList.project.name}}" />
<van-cell size="large" title="开始时间:" value="{{dataList.startTime}}" />
<van-cell size="large" title="结束时间:" value="{{dataList.endTime}}" />
<van-cell size="large" title="巡检方式:" value="{{dataList.way}}" />
<van-cell size="large" title="巡检频次:" value="{{dataList.frequency}}" />
<van-cell size="large" title="巡检人:" value="{{dataList.showUsers}}" />
<van-cell size="large" title="巡检单位:" value="{{dataList.showDepts}}" />
<van-cell size="large" title="巡检点位:" value="{{points}}" />
</van-cell-group>
<view class="titleTwo">巡检结果录入</view>
<block wx:for="{{dataList.points}}" wx:key="*this" class="entering">
<van-cell-group>
<van-cell title="巡检点位:" value="{{item.name}}" />
<van-cell title="上次巡检日期:" value="{{item.lastInspectionTime}}" />
<van-cell title="巡检人:" value="{{dataList.showUsers}}" />
<van-cell title="本次巡检日期:" value="{{item.inspectionTime}}" />
</van-cell-group>
<view class="flex-end btn-box">
<view class="startBtn" data-itemData="{{item}}" bindtap="showModal">开始巡检</view>
</view>
</block>
<!-- 开始巡检弹框 -->

34
weapp/package/startInspection/startInspection.wxss

@ -1,8 +1,14 @@
/* package/startInspection/startInspection.wxss */
.box {
width: 696rpx;
.page {
width: 100%;
margin: 0 auto;
padding: 30rpx 0;
background-color: #F7F7FA;
}
.flex-end {
display: flex;
justify-content: flex-end;
}
.plan-list {
@ -13,6 +19,12 @@
.titleFirst {
font-size: 32rpx;
margin-bottom: 30rpx;
margin-left: 30rpx;
}
.titleTwo {
font-size: 32rpx;
margin: 30rpx;
}
.txt {
@ -31,12 +43,20 @@
}
.startBtn {
float: right;
width: 52px;
height: 18px;
padding: 10rpx 20rpx;
background: #1979ff;
background: #1684FF;
border-radius: 16px;
color: #fff;
border-radius: 10rpx;
font-size: 26rpx;
margin: 10px 12px 10px;
}
.btn-box {
background: #fff;
width: 100%;
margin-bottom: 16px;
}
.modal {
@ -114,4 +134,8 @@
.block {
display: block;
}
.entering {
padding: 30rpx;
}
Loading…
Cancel
Save