mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-02-23 21:36:39 +08:00
优化巡检打开
This commit is contained in:
parent
b8b5fd373f
commit
d8b8293428
@ -61,6 +61,9 @@ const listAdvertPhoto = baseUrl + "app/advert.listAdvertPhoto";
|
||||
//查询巡检任务
|
||||
const listInspectionTasks = baseUrl + "app/inspectionTask.listInspectionTasks";
|
||||
|
||||
//巡检任务详情
|
||||
const listInspectionTaskDetails = baseUrl + 'app/inspectionTaskDetail.listInspectionTaskDetails';
|
||||
|
||||
|
||||
module.exports = {
|
||||
baseUrl: baseUrl,
|
||||
@ -92,5 +95,6 @@ module.exports = {
|
||||
filePath: filePath,
|
||||
listAdvertPhoto: listAdvertPhoto,
|
||||
saveOwnerRepair:saveOwnerRepair,
|
||||
listInspectionTasks:listInspectionTasks
|
||||
listInspectionTasks:listInspectionTasks,
|
||||
listInspectionTaskDetails:listInspectionTaskDetails
|
||||
};
|
||||
@ -146,6 +146,12 @@
|
||||
"navigationBarTitleText": "采购管理"
|
||||
}
|
||||
}
|
||||
,{
|
||||
"path" : "pages/excuteInspection/excuteInspection",
|
||||
"style" : {
|
||||
"navigationBarTitleText": "执行巡检"
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "white",
|
||||
|
||||
84
pages/excuteInspection/excuteInspection.vue
Normal file
84
pages/excuteInspection/excuteInspection.vue
Normal file
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="block__title">{{inspectionPlanName}}</view>
|
||||
<view class="cu-timeline margin-left-xs margin-right-xs">
|
||||
<view class="cu-time">巡检点</view>
|
||||
<view class="cu-item cuIcon-noticefill" :class="(item.state == '20200407'?'text-green':'')" v-for="(item,index) in taskDetails" :key="index">
|
||||
<view class="content shadow-blur" :class="(item.state == '20200407'?'bg-green':'')">
|
||||
{{item.inspectionName}}
|
||||
</view>
|
||||
<view class="text-right" v-if="item.state != '20200407'">
|
||||
<button class="cu-btn line-green block margin-tb-sm lg ">
|
||||
<text class="cuIcon-upload"></text>巡检</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
taskId:'',
|
||||
inspectionPlanName:'',
|
||||
scroll: 0,
|
||||
communityId:'',
|
||||
userId:'',
|
||||
userName:'',
|
||||
taskDetails:[]
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.taskId = options.taskId;
|
||||
this.inspectionPlanName = options.inspectionPlanName;
|
||||
this.communityId = this.java110Context.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: _that.java110Constant.url.listInspectionTaskDetails,
|
||||
method: "GET",
|
||||
data: {
|
||||
communityId: _that.communityId,
|
||||
page: 1,
|
||||
row: 100,
|
||||
taskId: _that.taskId
|
||||
},
|
||||
success: function(res) {
|
||||
// TODO 判断
|
||||
console.log(res);
|
||||
// res.data.inspectionTaskDetails.forEach(function(item, index) {
|
||||
// item.timeStr = item.planInsTime.replace(/:\d{1,2}$/, ' ');
|
||||
// });
|
||||
_that.taskDetails = res.data.inspectionTaskDetails;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
ScrollSteps() {
|
||||
this.scroll= this.scroll == 9 ? 0 : this.scroll + 1
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.block__title {
|
||||
margin: 0;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: rgba(69,90,100,.6);
|
||||
padding: 40rpx 30rpx 20rpx;
|
||||
}
|
||||
|
||||
</style>
|
||||
@ -54,6 +54,9 @@
|
||||
methods: {
|
||||
_startInspection:function(_item){
|
||||
console.log('开始巡检',_item);
|
||||
uni.navigateTo({
|
||||
url:'/pages/excuteInspection/excuteInspection?taskId='+_item.taskId+'&inspectionPlanName='+_item.inspectionPlanName
|
||||
});
|
||||
},
|
||||
_queryInstpectionTasks: function() {
|
||||
let _that = this;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user