diff --git a/constant/UrlConstant.js b/constant/UrlConstant.js
index 8bb933b..04cde1c 100644
--- a/constant/UrlConstant.js
+++ b/constant/UrlConstant.js
@@ -58,6 +58,9 @@ const listActivitiess = baseUrl + "app/activities.listActivitiess"; //查询小
const listAdvertPhoto = baseUrl + "app/advert.listAdvertPhoto";
+//查询巡检任务
+const listInspectionTasks = baseUrl + "app/inspectionTask.listInspectionTasks";
+
module.exports = {
baseUrl: baseUrl,
@@ -88,5 +91,6 @@ module.exports = {
listActivitiess: listActivitiess,
filePath: filePath,
listAdvertPhoto: listAdvertPhoto,
- saveOwnerRepair:saveOwnerRepair
+ saveOwnerRepair:saveOwnerRepair,
+ listInspectionTasks:listInspectionTasks
};
\ No newline at end of file
diff --git a/pages/inspection/inspection.vue b/pages/inspection/inspection.vue
index 8183fd0..98fe7f9 100644
--- a/pages/inspection/inspection.vue
+++ b/pages/inspection/inspection.vue
@@ -1,6 +1,35 @@
-
+ 巡检任务
+
+
+ {{item.taskId}}
+ {{item.stateName}}
+
+
+ 巡检计划
+ {{item.inspectionPlanName}}
+
+
+ 计划编码
+ {{item.inspectionPlanId}}
+
+
+ 巡检人
+ {{item.planUserName}}
+
+
+ 巡检时间
+ {{item.planInsTime }}
+
+
+ 巡检方式
+ {{item.signTypeName}}
+
+
+
+
+
@@ -8,15 +37,67 @@
export default {
data() {
return {
-
+ tasks: [],
+ communityId: '',
+ userId: '',
+ userName: ''
}
},
+ onLoad: function() {
+ this.communityId = this.java110Context.getCurrentCommunity().communityId;
+ let _userInfo = this.java110Context.getUserInfo();
+ console.log("_userInfo", _userInfo);
+ this.userName = _userInfo.userName;
+ this.userId = _userInfo.userId;
+ this._queryInstpectionTasks();
+ },
methods: {
-
+ _startInspection:function(_item){
+ console.log('开始巡检',_item);
+ },
+ _queryInstpectionTasks: function() {
+ let _that = this;
+
+ _that.java110Context.request({
+ header: _that.java110Context.getHeaders(),
+ url: _that.java110Constant.url.listInspectionTasks,
+ method: "GET",
+ data: {
+ communityId: _that.communityId,
+ page: 1,
+ row: 10,
+ planUserId: _that.userId,
+ state: '20200405'
+ },
+ success: function(res) {
+ // TODO 判断
+ console.log(res);
+ res.data.inspectionTasks.forEach(function(item, index) {
+ item.timeStr = item.planInsTime.replace(/:\d{1,2}$/, ' ');
+ });
+ _that.tasks = res.data.inspectionTasks;
+ }
+ });
+ }
+
}
}