Archer_cdm
2 years ago
16 changed files with 580 additions and 33 deletions
After Width: | Height: | Size: 668 B |
@ -0,0 +1,85 @@ |
|||||
|
// package/inspectionRecord/inspectionRecord.js
|
||||
|
Page({ |
||||
|
|
||||
|
/** |
||||
|
* 页面的初始数据 |
||||
|
*/ |
||||
|
data: { |
||||
|
ResList: [ //阅读状态
|
||||
|
{ |
||||
|
value: 'normal', |
||||
|
text: '正常', |
||||
|
}, |
||||
|
{ |
||||
|
value: 'abnormal', |
||||
|
text: '异常', |
||||
|
} |
||||
|
], |
||||
|
ResIndex: 0, //巡检结果
|
||||
|
dataList: [1, 2, 3, 4, 5,] |
||||
|
}, |
||||
|
|
||||
|
// 巡检结果
|
||||
|
bindPickerRes(e) { |
||||
|
let that = this; |
||||
|
that.setData({ |
||||
|
ResIndex: e.detail.value |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面加载 |
||||
|
*/ |
||||
|
onLoad(options) { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面初次渲染完成 |
||||
|
*/ |
||||
|
onReady() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面显示 |
||||
|
*/ |
||||
|
onShow() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面隐藏 |
||||
|
*/ |
||||
|
onHide() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面卸载 |
||||
|
*/ |
||||
|
onUnload() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面相关事件处理函数--监听用户下拉动作 |
||||
|
*/ |
||||
|
onPullDownRefresh() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面上拉触底事件的处理函数 |
||||
|
*/ |
||||
|
onReachBottom() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 用户点击右上角分享 |
||||
|
*/ |
||||
|
onShareAppMessage() { |
||||
|
|
||||
|
} |
||||
|
}) |
@ -0,0 +1,6 @@ |
|||||
|
{ |
||||
|
"navigationBarBackgroundColor": "#1979ff", |
||||
|
"navigationBarTextStyle": "white", |
||||
|
"navigationBarTitleText": "巡检记录", |
||||
|
"enablePullDownRefresh": false |
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
<!--package/inspectionRecord/inspectionRecord.wxml--> |
||||
|
<view style="box-shadow:0px 0px 5px #7e7e7e;padding: 15px;background: #fff;position:fixed;top:0;left:0;width: 100%;"> |
||||
|
<view style="display: flex;"> |
||||
|
<view style="line-height:50rpx;">时间范围:</view> |
||||
|
<view style="display: flex;"> |
||||
|
<view style="border:2rpx solid #ccc;padding:6rpx 16rpx;margin-right:20rpx;border-radius:6rpx;">2022-12-15</view> |
||||
|
<view style="line-height: 55rpx;">至</view> |
||||
|
<view style="border:2rpx solid #ccc;padding:6rpx 16rpx;margin-left:20rpx;border-radius:6rpx;">2022-12-26</view> |
||||
|
</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 20rpx;border-radius: 6rpx;"> |
||||
|
{{ResList[ResIndex].text}} |
||||
|
<image style="width:20rpx;height:20rpx;margin-left:10rpx;" src="../../images/down.svg" /> |
||||
|
</picker> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
<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">结构物A</view> |
||||
|
</view> |
||||
|
<view style="line-height:50rpx;font-size:28rpx;width: 630rpx; margin: 0 auto;"> |
||||
|
本次巡检日期:<text>2022-12-21 17:00</text> |
||||
|
</view> |
||||
|
<view style="line-height:50rpx;font-size:28rpx;width: 630rpx; margin: 0 auto;"> |
||||
|
巡检人:<text>巡检人</text> |
||||
|
</view> |
||||
|
<view style="line-height:50rpx;font-size:28rpx;width: 630rpx; margin: 0 auto;"> |
||||
|
巡检结果:<text>异常</text> |
||||
|
</view> |
||||
|
<view class="btn" bindtap="bindStart">查看详情</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</block> |
||||
|
</view> |
@ -0,0 +1,47 @@ |
|||||
|
/* package/inspectionRecord/inspectionRecord.wxss */ |
||||
|
page{ |
||||
|
background: #F7F7FA; |
||||
|
} |
||||
|
|
||||
|
.my-picker { |
||||
|
white-space: nowrap; |
||||
|
width: 100rpx; |
||||
|
} |
||||
|
|
||||
|
.contentBox { |
||||
|
padding: 210rpx 30rpx 20rpx; |
||||
|
} |
||||
|
|
||||
|
.listBox { |
||||
|
background-color: #fff; |
||||
|
border-radius: 10rpx; |
||||
|
box-shadow: 0rpx 0rpx 10rpx #ddd; |
||||
|
margin: 30rpx auto; |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
|
||||
|
.titleBox { |
||||
|
overflow: hidden; |
||||
|
padding-bottom: 20rpx; |
||||
|
padding-top: 40rpx; |
||||
|
} |
||||
|
|
||||
|
.title { |
||||
|
float: left; |
||||
|
font-size: 32rpx; |
||||
|
width: 460rpx; |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
|
||||
|
.btn { |
||||
|
width: 130rpx; |
||||
|
text-align: center; |
||||
|
font-size: 30rpx; |
||||
|
padding: 20rpx; |
||||
|
background: #1979ff; |
||||
|
color: #fff; |
||||
|
border-radius: 10rpx; |
||||
|
float: left; |
||||
|
margin-left: 30rpx; |
||||
|
margin-top: 20rpx; |
||||
|
} |
@ -0,0 +1,138 @@ |
|||||
|
// package/startInspection/startInspection.js
|
||||
|
Page({ |
||||
|
|
||||
|
/** |
||||
|
* 页面的初始数据 |
||||
|
*/ |
||||
|
data: { |
||||
|
dataList: [1, 2, 3] |
||||
|
}, |
||||
|
|
||||
|
handleChangeTwo(e) { |
||||
|
this.setData({ |
||||
|
changeTwo: e.detail.value |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
handleChangeThree(e) { |
||||
|
this.setData({ |
||||
|
changeThree: e.detail.value |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
showModal() { |
||||
|
this.setData({ |
||||
|
showModal: true |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
bindCancel() { |
||||
|
this.setData({ |
||||
|
showModal: false |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
selfLocation() { |
||||
|
const self = this |
||||
|
wx.showLoading({ |
||||
|
title: '定位中', |
||||
|
mask: true, |
||||
|
}); |
||||
|
wx.getLocation({ |
||||
|
type: 'gcj02', |
||||
|
success: (res) => { |
||||
|
let latitude, longitude; |
||||
|
latitude = res.latitude.toString(); |
||||
|
longitude = res.longitude.toString(); |
||||
|
this.latitude = res.latitude |
||||
|
this.longitude = res.longitude |
||||
|
getGeocoder({ lat: latitude, long: longitude }).then(res => { // 获取详细信息的接口
|
||||
|
const data = res.data; |
||||
|
self.userAddress.userAddressdetail = '' |
||||
|
var params = { |
||||
|
text: data.address |
||||
|
} |
||||
|
parseAddress(params).then(res => { // 粘贴详细信息的接口
|
||||
|
console.log(res) |
||||
|
if (res.status == 200 && res.message == "success") { |
||||
|
this.$forceUpdate(); // 定位后,界面没有反应,因此加上强制刷新
|
||||
|
this.userAddress.userAddressdetail = res.data.town + res.data.detail; |
||||
|
this.$set(this.userAddress, 'selectAddress', parseInt(res.data.county_info.city_id)); |
||||
|
this.addressInfo[0] = res.data.province_info ? res.data.province_info : {}; |
||||
|
this.addressInfo[1] = res.data.city_info ? res.data.city_info : {}; |
||||
|
this.addressInfo[2] = res.data.county_info ? res.data.county_info : {}; |
||||
|
} |
||||
|
}).catch(res => { |
||||
|
console.log("没有地址信息") |
||||
|
}) |
||||
|
wx.hideLoading(); |
||||
|
}) |
||||
|
}, |
||||
|
fail: (res) => { |
||||
|
console.log(res) |
||||
|
wx.hideLoading(); |
||||
|
wx.showToast({ |
||||
|
title: res.errMsg, |
||||
|
icon: 'none', |
||||
|
duration: 1000 |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面加载 |
||||
|
*/ |
||||
|
onLoad(options) { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面初次渲染完成 |
||||
|
*/ |
||||
|
onReady() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面显示 |
||||
|
*/ |
||||
|
onShow() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面隐藏 |
||||
|
*/ |
||||
|
onHide() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面卸载 |
||||
|
*/ |
||||
|
onUnload() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面相关事件处理函数--监听用户下拉动作 |
||||
|
*/ |
||||
|
onPullDownRefresh() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面上拉触底事件的处理函数 |
||||
|
*/ |
||||
|
onReachBottom() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 用户点击右上角分享 |
||||
|
*/ |
||||
|
onShareAppMessage() { |
||||
|
|
||||
|
} |
||||
|
}) |
@ -0,0 +1,6 @@ |
|||||
|
{ |
||||
|
"navigationBarBackgroundColor": "#1979ff", |
||||
|
"navigationBarTextStyle": "white", |
||||
|
"navigationBarTitleText": "开始巡检", |
||||
|
"enablePullDownRefresh": false |
||||
|
} |
@ -0,0 +1,87 @@ |
|||||
|
<!--package/startInspection/startInspection.wxml--> |
||||
|
<view class="box"> |
||||
|
<view class="titleFirst">巡检要求</view> |
||||
|
<view class="txt"> |
||||
|
<view style="float: left;font-weight: bold;">结构物名称</view> |
||||
|
<view style="float:left;width:70%;margin-left:40rpx;">结构物名称</view> |
||||
|
</view> |
||||
|
<view class="txt"> |
||||
|
<view style="float: left;font-weight: bold;">开始时间</view> |
||||
|
<view style="float:left;width:70%;margin-left:40rpx;">2022-12-25</view> |
||||
|
</view> |
||||
|
<view class="txt"> |
||||
|
<view style="float: left;font-weight: bold;">结束时间</view> |
||||
|
<view style="float:left;width:70%;margin-left:40rpx;">2023-01-15</view> |
||||
|
</view> |
||||
|
<view class="txt"> |
||||
|
<view style="float: left;font-weight: bold;">巡检方式</view> |
||||
|
<view style="float:left;width:70%;margin-left:40rpx;">周期巡检</view> |
||||
|
</view> |
||||
|
<view class="txt"> |
||||
|
<view style="float: left;font-weight: bold;">巡检频次</view> |
||||
|
<view style="float:left;width:70%;margin-left:40rpx;">3天一次</view> |
||||
|
</view> |
||||
|
<view class="txt"> |
||||
|
<view style="float: left;font-weight: bold;">巡检人</view> |
||||
|
<view style="float:left;width:70%;margin-left:40rpx;">巡检人</view> |
||||
|
</view> |
||||
|
<view class="txt"> |
||||
|
<view style="float: left;font-weight: bold;">巡检单位</view> |
||||
|
<view style="float:left;width:70%;margin-left:40rpx;">巡检单位</view> |
||||
|
</view> |
||||
|
<view class="txt"> |
||||
|
<view style="float: left;font-weight: bold;">巡检点位</view> |
||||
|
<view style="float:left;width:70%;margin-left:40rpx;">点位A、点位B、点位C</view> |
||||
|
</view> |
||||
|
<view class="line"></view> |
||||
|
<view class="titleFirst">巡检结果录入</view> |
||||
|
<block wx:for="{{dataList}}" 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;">点位A</view> |
||||
|
<view class="startBtn" 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;">2022-10-26</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;">巡检人A</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;">2022-12-23</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</block> |
||||
|
|
||||
|
<view class="modal" wx:if="{{showModal}}"> |
||||
|
<view class="popBox"> |
||||
|
<view style="padding:20rpx 30rpx;overflow: hidden;"> |
||||
|
<view style="float: left;">当前点位:</view> |
||||
|
<view style="float:left;width: 75%;">点位A</view> |
||||
|
</view> |
||||
|
<view style="padding:20rpx 30rpx;overflow: hidden;"> |
||||
|
<view style="float: left;">当前位置:</view> |
||||
|
<view style="float:left;width: 75%;">点位A</view> |
||||
|
</view> |
||||
|
<radio-group style="padding:10px 15px;display:flex;justify-content: space-evenly;" bindchange="handleChangeTwo"> |
||||
|
<radio style="color:#1979ff;" color="#1979ff" value="normal">正常</radio> |
||||
|
<radio style="color:#CC0000;" color="#CC0000" value="abnormal">异常</radio> |
||||
|
</radio-group> |
||||
|
<textarea style="width: 84%;margin:0 auto;border:2rpx solid #ccc;padding:20rpx;height: 120rpx;border-radius: 10rpx;" placeholder="请输入巡查详情" maxlength="-1" wx:if="{{changeTwo == 'abnormal'}}"></textarea> |
||||
|
<radio-group style="padding:10px 15px;display:flex;justify-content: space-evenly;" bindchange="handleChangeThree" wx:if="{{changeTwo == 'abnormal'}}"> |
||||
|
<radio style="color:#FF9900;" color="#FF9900" value="slight">轻微</radio> |
||||
|
<radio style="color:#FF3300;" color="#FF3300" value="moderate">中度</radio> |
||||
|
<radio style="color:#990000;" color="#990000" value="severity">严重</radio> |
||||
|
</radio-group> |
||||
|
<view class="btnBox"> |
||||
|
<view class="cancel" bindtap="bindCancel">取消</view> |
||||
|
<view class="submit">提交</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
</view> |
@ -0,0 +1,85 @@ |
|||||
|
/* package/startInspection/startInspection.wxss */ |
||||
|
.box { |
||||
|
width: 696rpx; |
||||
|
margin: 0 auto; |
||||
|
padding: 30rpx 0; |
||||
|
} |
||||
|
|
||||
|
.titleFirst { |
||||
|
font-size: 32rpx; |
||||
|
margin-bottom: 30rpx; |
||||
|
} |
||||
|
|
||||
|
.txt { |
||||
|
width: 100%; |
||||
|
overflow: hidden; |
||||
|
margin-bottom: 40rpx; |
||||
|
color: #333; |
||||
|
font-size: 28rpx; |
||||
|
} |
||||
|
|
||||
|
.line { |
||||
|
width: 100%; |
||||
|
height: 2rpx; |
||||
|
background: #ccc; |
||||
|
margin-bottom: 40rpx; |
||||
|
} |
||||
|
|
||||
|
.startBtn { |
||||
|
float: right; |
||||
|
padding: 10rpx 20rpx; |
||||
|
background: #1979ff; |
||||
|
color: #fff; |
||||
|
border-radius: 10rpx; |
||||
|
font-size: 26rpx; |
||||
|
} |
||||
|
|
||||
|
.modal { |
||||
|
background: rgba(0, 0, 0, 0.6); |
||||
|
width: 100%; |
||||
|
position: fixed; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
z-index: 10; |
||||
|
height: 100%; |
||||
|
} |
||||
|
|
||||
|
.popBox { |
||||
|
position: absolute; |
||||
|
top: 50%; |
||||
|
left: 50%; |
||||
|
z-index: 1000; |
||||
|
background: #fff; |
||||
|
width: 95%; |
||||
|
margin-left: -356rpx; |
||||
|
margin-top: -500rpx; |
||||
|
padding: 20rpx 0; |
||||
|
} |
||||
|
|
||||
|
.btnBox { |
||||
|
padding: 30rpx; |
||||
|
overflow: hidden; |
||||
|
font-size: 30rpx; |
||||
|
} |
||||
|
|
||||
|
.cancel { |
||||
|
width: 180rpx; |
||||
|
float: left; |
||||
|
text-align: center; |
||||
|
background: #fff; |
||||
|
border: 2rpx solid #1979ff; |
||||
|
border-radius: 10rpx; |
||||
|
padding: 12rpx 0; |
||||
|
color: #1979ff; |
||||
|
} |
||||
|
|
||||
|
.submit { |
||||
|
width: 180rpx; |
||||
|
float: right; |
||||
|
text-align: center; |
||||
|
border-radius: 10rpx; |
||||
|
padding: 12rpx 0; |
||||
|
background: #1979ff; |
||||
|
color: #fff; |
||||
|
border: 2rpx solid #1979ff; |
||||
|
} |
Loading…
Reference in new issue