加入二维码巡检功能

This commit is contained in:
java110 2022-03-17 18:32:13 +08:00
parent 0d83276e2c
commit 6405effe6e
3 changed files with 103 additions and 3 deletions

View File

@ -3,7 +3,7 @@
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "百航E家" "navigationBarTitleText": "HC掌上物业"
} }
} }
,{ ,{
@ -528,10 +528,19 @@
} }
} }
,{
"path" : "pages/excuteOneQrCodeInspection/excuteOneQrCodeInspection",
"style" :
{
"navigationBarTitleText": "二维码巡检",
"enablePullDownRefresh": false
}
}
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarTitleText": "百航E家", "navigationBarTitleText": "HC掌上物业",
"navigationBarBackgroundColor": "#00AA00", "navigationBarBackgroundColor": "#00AA00",
"backgroundColor": "#00AA00", "backgroundColor": "#00AA00",
"onReachBottonDistance":50 "onReachBottonDistance":50

View File

@ -95,7 +95,6 @@
}, },
success: function(res) { success: function(res) {
// TODO // TODO
let _inspectionTaskDetails = res.data.inspectionTaskDetails; let _inspectionTaskDetails = res.data.inspectionTaskDetails;
_inspectionTaskDetails.forEach(function(_item) { _inspectionTaskDetails.forEach(function(_item) {
if (_item.state == '20200407') { if (_item.state == '20200407') {

View File

@ -0,0 +1,92 @@
<template>
<view>
<view class="text-center margin-top-100" v-if="taskDetails.length > 0">
<view class="">
<text class=" cuIcon-warnfill light text-orange no-data-icon"></text>
</view>
<view class="">
<text class="text-gray">当前没有巡检任务</text>
</view>
</view>
</view>
</template>
<script>
import url from '../../constant/url.js'
import {
getCurrentCommunity
} from '../../api/community/community.js'
export default {
data() {
return {
inspectionId: '',
inspectionName: '',
taskId: '',
taskDetailId: '',
itemId: '',
communityId: '',
userName: '',
userId: '',
taskDetails:[]
}
},
onLoad(options) {
this.java110Context.onLoad();
this.inspectionId = options.inspectionId;
this.inspectionName = options.inspectionName;
this.itemId = options.itemId;
this.communityId = getCurrentCommunity().communityId;
let _userInfo = this.java110Context.getUserInfo();
this.userName = _userInfo.userName;
this.userId = _userInfo.userId;
this._queryTaskDetail();
},
methods: {
_queryTaskDetail: function() {
let _that = this;
_that.java110Context.request({
header: _that.java110Context.getHeaders(),
url: url.listInspectionTaskDetails,
method: "GET",
data: {
communityId: _that.communityId,
page: 1,
row: 100,
planUserId: this.userId,
inspectionId: this.inspectionId,
state: '20200405'
},
success: function(res) {
// TODO
let _inspectionTaskDetails = res.data.inspectionTaskDetails;
_that.taskDetails = _inspectionTaskDetails;
if (!_that.taskDetails || _that.taskDetails.length < 0) {
return;
}
let _item = _that.taskDetails[0];
uni.navigateTo({
url: '/pages/excuteOneInspection/excuteOneInspection?taskDetailId=' +
_item.taskDetailId + "&taskId=" + _item.taskId +
"&inspectionId=" + _that.inspectionId + "&inspectionName=" + _that
.inspectionName + "&itemId=" + _that.itemId
});
}
});
},
}
}
</script>
<style>
.no-data-icon{
font-size: 200upx;
}
.margin-top-100{
margin-top: 200upx;
}
</style>