This commit is contained in:
”Rain“ 2024-05-24 21:04:45 +08:00
parent 895bb4f73e
commit 2e1de42595
3 changed files with 34 additions and 12 deletions

View File

@ -25,7 +25,7 @@
</view>
</view>
<view class="coordinate-item">
<view :class="{'abnormal':item.inspectStatus == 2}" v-for="item in checkingList" :key="item.id">
<view :class="{'abnormal':item.inspectStatus == 2}" @click="onClickSelect(item)" v-for="item in checkingList" :key="item.id">
<image :src="statusList[item.inspectStatus].image" mode=""></image>
<text>{{item.checkingPointName}}</text>
</view>
@ -101,7 +101,12 @@
image: "/static/inspectelcon-abnormal.png",
}],
checkingInfoList:[],
checkingInfoDetail:{
id:"",
},
statusBarHeight:0,
pageNo: 1,
pageSize: 10,
}
},
onLoad(options) {
@ -112,6 +117,11 @@
this.getcheckingList();
this.getcheckingInfo();
},
//
onReachBottom() {
this.pageNo = this.pageNo + 1;
this.getcheckingInfo();
},
methods: {
getcheckingList() {
let that = this;
@ -132,8 +142,16 @@
}
})
},
onClickSelect(item){
this.pageNo= 1;
this.pageSize= 10;
this.checkingInfoList = [];
this.checkingInfoDetail = item;
this.getcheckingInfo();
},
getcheckingInfo() {
let that = this;
//
this.sendRequest({
url: 'xmgl/checkingPointInfo/selectPage',
@ -141,25 +159,26 @@
data: {
projectSn: this.projectSn,
// xzCheckingRouteTaskId: this.info.id,
checkingPointId:"",
checkingPointId:this.checkingInfoDetail.id,
// checkingPointUserId: this.info.xzCheckingRoute.inspectUserIds,
pageNo: 1,
pageSize: 10,
pageNo: that.pageNo,
pageSize: that.pageSize,
},
success: res => {
console.log(res);
that.checkingInfoList = res.result.records;
that.checkingInfoList = this.checkingInfoList.concat(res.result.records);
}
})
},
getScanCode() {
const that = this;
uni.scanCode({
scanType: ['qrCode'],
success: function(res) {
console.log('扫一扫得到的数据:' + res.result)
uni.navigateTo({
url: '../scan/saoSao?data=' + res.result
url: `../scan/saoSao?data=${res.result}&id=${that.info.id}`
})
// let qrcodeVal=JSON.parse(res.result)

View File

@ -32,21 +32,21 @@
</view>
<view>
<text>巡检点情况:</text>
<text>{{item.taskToInspectUser ? (item.taskToInspectUser.normalCheckingPointNum + item.taskToInspectUser.abnormalCheckingPointNum) : 0}}/{{item.taskToInspectUser ? item.taskToInspectUser.checkingPointNum : 0}}</text>
<text>{{(item.normalCheckingPointNum + item.abnormalCheckingPointNum)}}/{{item.checkingPointNum ? item.checkingPointNum : 0}}</text>
</view>
</view>
<view class="item-box">
<view>
<text>正常点位:</text>
<text>{{item.taskToInspectUser ? item.taskToInspectUser.normalCheckingPointNum : 0}}</text>
<text>{{item.normalCheckingPointNum ? item.normalCheckingPointNum : 0}}</text>
</view>
<view>
<text>异常点位:</text>
<text>{{item.taskToInspectUser ? item.taskToInspectUser.abnormalCheckingPointNum : 0}}</text>
<text>{{item.abnormalCheckingPointNum ? item.abnormalCheckingPointNum : 0}}</text>
</view>
</view>
<view class="status" :style="`background-color: ${item.taskToInspectUser && statusList[item.taskToInspectUser.inspectStatus - 1].color};`">
{{item.taskToInspectUser && statusList[item.taskToInspectUser.inspectStatus - 1].statusName}}
<view class="status" :style="`background-color: ${item.inspectStatus && statusList[item.inspectStatus - 1].color};`">
{{item.inspectStatus && statusList[item.inspectStatus - 1].statusName}}
</view>
</view>
</view>

View File

@ -111,7 +111,9 @@
onLoad(e) {
this.checkOpenGPSServiceByAndroid()
console.log(e.data,'我的测试数据')
console.log(e,'我的测试数据')
this.sendData = JSON.parse(e.data);
this.form.id = e.id;
uni.showLoading({
title: "获取数据中"
})
@ -326,7 +328,8 @@
position: this.form.posiTion,
status: this.form.status,
template: JSON.stringify(this.form.templateList),
updateDate: ""
updateDate: "",
xzCheckingRouteTaskId:this.form.id,
},
method: "POST",