Merge branch 'bjxz-rain' into bjxz-dev

This commit is contained in:
kun 2024-05-24 21:55:55 +08:00
commit d58922c17f
2 changed files with 42 additions and 21 deletions

View File

@ -4,9 +4,9 @@
<view class="headerName"> <view class="headerName">
{{info.itemName}} {{info.itemName}}
</view> </view>
<view class="right" @click="getScanCode()"> <!-- <view class="right" @click="getScanCode()">
<image class="scancode" src="@/static/scancode.png" mode=""></image> <image class="scancode" src="@/static/scancode.png" mode=""></image>
</view> </view> -->
</headers> </headers>
<view class="content" :style="{ 'padding-top': (statusBarHeight+52) + 'px' }"> <view class="content" :style="{ 'padding-top': (statusBarHeight+52) + 'px' }">
<view class="coordinate"> <view class="coordinate">
@ -25,7 +25,8 @@
</view> </view>
</view> </view>
<view class="coordinate-item"> <view class="coordinate-item">
<view :class="{'abnormal':item.inspectStatus == 2}" @click="onClickSelect(item)" 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> <image :src="statusList[item.inspectStatus].image" mode=""></image>
<text>{{item.checkingPointName}}</text> <text>{{item.checkingPointName}}</text>
</view> </view>
@ -56,7 +57,7 @@
</view> </view>
</view> </view>
<view class="detail-main" v-for="item in checkingInfoList" :key="item.id"> <view class="detail-main" v-for="item in checkingInfoList" :key="item.id">
<view class="title"> <view class="title">
{{item.checkingPointName}} {{item.checkingPointName}}
@ -71,12 +72,18 @@
<view v-if="item.status == 2">异常详情:{{item.alarmDetails}}</view> <view v-if="item.status == 2">异常详情:{{item.alarmDetails}}</view>
<view v-if="item.status == 2" class="detail-image"> <view v-if="item.status == 2" class="detail-image">
异常图片: 异常图片:
<view v-if="item.alarmImage && JSON.parse(item.alarmImage).length > 0" > <view v-if="item.alarmImage && JSON.parse(item.alarmImage).length > 0">
<image v-for="ele in JSON.parse(item.alarmImage)" @click="previewImage(url_config+'image/'+ele.url)" :src="url_config+'image/'+ele.url" mode=""></image> <image v-for="ele in JSON.parse(item.alarmImage)"
@click="previewImage(url_config+'image/'+ele.url)" :src="url_config+'image/'+ele.url"
mode=""></image>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="scancodebtn" @click="getScanCode()">
扫码巡检
</view>
</view> </view>
</view> </view>
</template> </template>
@ -100,11 +107,11 @@
statusName: "异常", statusName: "异常",
image: "/static/inspectelcon-abnormal.png", image: "/static/inspectelcon-abnormal.png",
}], }],
checkingInfoList:[], checkingInfoList: [],
checkingInfoDetail:{ checkingInfoDetail: {
id:"", id: "",
}, },
statusBarHeight:0, statusBarHeight: 0,
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
} }
@ -115,7 +122,7 @@
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn; this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn;
console.log(options); console.log(options);
this.getcheckingList(); this.getcheckingList();
this.getcheckingInfo();
}, },
// //
onReachBottom() { onReachBottom() {
@ -139,30 +146,32 @@
success: res => { success: res => {
console.log(res.result.records); console.log(res.result.records);
that.checkingList = res.result.records; that.checkingList = res.result.records;
this.checkingInfoDetail = res.result.records[0];
this.getcheckingInfo();
} }
}) })
}, },
onClickSelect(item){ onClickSelect(item) {
this.pageNo= 1; this.pageNo = 1;
this.pageSize= 10; this.pageSize = 10;
this.checkingInfoList = []; this.checkingInfoList = [];
this.checkingInfoDetail = item; this.checkingInfoDetail = item;
this.getcheckingInfo(); this.getcheckingInfo();
}, },
getcheckingInfo() { getcheckingInfo() {
let that = this; let that = this;
// //
this.sendRequest({ this.sendRequest({
url: 'xmgl/checkingPointInfo/selectPage', url: 'xmgl/checkingPointInfo/selectPage',
method: 'post', method: 'post',
data: { data: {
projectSn: this.projectSn, projectSn: this.projectSn,
// xzCheckingRouteTaskId: this.info.id, xzCheckingRouteTaskId: this.info.id,
checkingPointId:this.checkingInfoDetail.id, checkingPointId: this.checkingInfoDetail.id,
// checkingPointUserId: this.info.xzCheckingRoute.inspectUserIds, // checkingPointUserId: this.checkingInfoDetail.inspectUserIds,
pageNo: that.pageNo, pageNo: that.pageNo,
pageSize: that.pageSize, pageSize: that.pageSize,
}, },
success: res => { success: res => {
console.log(res); console.log(res);
@ -249,6 +258,18 @@
} }
} }
.scancodebtn {
padding: 20rpx 20rpx;
background-color: #2b8df3;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: white;
border-radius: 16rpx;
margin-top: 160rpx;
}
.content { .content {
padding: 0 26rpx 15%; padding: 0 26rpx 15%;
box-sizing: border-box; box-sizing: border-box;

View File

@ -5,7 +5,7 @@
巡检任务 巡检任务
</view> </view>
<view class="right"> <view class="right">
<dateTimePiccker :placeholder="'请选择'" :start="startTime" fields="day" :default-value="condition.date" <dateTimePiccker :placeholder="'请选择'" fields="day" :default-value="condition.date"
@change="bindPickerChange($event,'startTime')" class="dateTimePiccker"> @change="bindPickerChange($event,'startTime')" class="dateTimePiccker">
</dateTimePiccker> </dateTimePiccker>
</view> </view>
@ -144,7 +144,6 @@
methods: { methods: {
// //
getListData() { getListData() {
let that = this; let that = this;
this.sendRequest({ this.sendRequest({
url: 'xmgl/xzCheckingRouteTask/page', url: 'xmgl/xzCheckingRouteTask/page',
@ -152,6 +151,7 @@
data: { data: {
...that.condition, ...that.condition,
isInspect: that.tabIndex, isInspect: that.tabIndex,
date:this.condition.date,
}, },
success: res => { success: res => {
let arr = JSON.parse(JSON.stringify(this.listData)); let arr = JSON.parse(JSON.stringify(this.listData));