|
@@ -14,11 +14,11 @@
|
|
|
|
|
|
<view class="viewTop" >
|
|
|
<u-tabs :list="tabslist"
|
|
|
- style=" width: 50%;"
|
|
|
+ style=" width: 70%;"
|
|
|
:current="current" @change="change"></u-tabs>
|
|
|
- <view class="select" @click="gotoSelectLock">
|
|
|
+ <view class="select" @click="completionTimeShow=true">
|
|
|
<view class="selectSpan">
|
|
|
- {{lockName?lockName:'选择地锁'}}
|
|
|
+ {{completionTimeN}}
|
|
|
</view>
|
|
|
<u-icon name="arrow-down" size="32" color="#AAAAAA"></u-icon>
|
|
|
</view>
|
|
@@ -34,7 +34,7 @@
|
|
|
<view class="body">
|
|
|
<view class="line1">
|
|
|
<view class="title">
|
|
|
- {{item.errorCodeText}}
|
|
|
+ {{item.stationName}}
|
|
|
|
|
|
</view>
|
|
|
<view class="status " :class="'status'+item.status">
|
|
@@ -45,26 +45,18 @@
|
|
|
|
|
|
<view class="line2">
|
|
|
<view class="value">
|
|
|
- 设备编号 {{item.parkingName}}
|
|
|
+ 上次巡检 {{item.lastInspectionTime}}
|
|
|
|
|
|
</view>
|
|
|
<view class="value">
|
|
|
- 设备网点 {{item.parkingName}}
|
|
|
+ 截止时间 {{item.inspectionEndTime}}
|
|
|
|
|
|
</view>
|
|
|
- <view class="value">
|
|
|
- 创建时间 {{item.createTime}}
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="line3">
|
|
|
-
|
|
|
- <u-button type="info" size="mini">查看</u-button>
|
|
|
|
|
|
- <u-button type="primary" size="mini" >去处理</u-button>
|
|
|
|
|
|
</view>
|
|
|
+
|
|
|
+
|
|
|
|
|
|
</view>
|
|
|
|
|
@@ -78,7 +70,7 @@
|
|
|
<view class="floating-button">
|
|
|
<view class="button" @click="submit" >
|
|
|
|
|
|
- 故障上报
|
|
|
+ 巡检
|
|
|
|
|
|
</view>
|
|
|
|
|
@@ -89,10 +81,16 @@
|
|
|
|
|
|
<script>
|
|
|
import * as API from '@/apis/pagejs/pagesInspection.js'
|
|
|
+ import {
|
|
|
|
|
|
+ currentTimeStamp,
|
|
|
+ parseUnixTime,newDate,nextMonth
|
|
|
+ } from '@/apis/utils'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ queryName: "",
|
|
|
+ testName: "",
|
|
|
list:[],
|
|
|
listForm:{
|
|
|
pageIndex: 1,
|
|
@@ -100,14 +98,21 @@
|
|
|
recordsTotal: 1,
|
|
|
status:0
|
|
|
},
|
|
|
+ completionTime: "",
|
|
|
+ completionTimeShow: false,
|
|
|
lockId:"",
|
|
|
lockName:"",
|
|
|
current:0,
|
|
|
tabslist:[
|
|
|
{
|
|
|
- name: '待处理'
|
|
|
+ name: '未完成',
|
|
|
+ status:0
|
|
|
+ }, {
|
|
|
+ name: '已完成',
|
|
|
+ status:1
|
|
|
}, {
|
|
|
- name: '已处理'
|
|
|
+ name: '全部',
|
|
|
+ status:''
|
|
|
}
|
|
|
]
|
|
|
};
|
|
@@ -129,7 +134,15 @@
|
|
|
this.lockName=op.lockName
|
|
|
this.listForm.lockId=op.lockId;
|
|
|
}
|
|
|
+ this.completionTime = parseUnixTime(currentTimeStamp(),'{y}-{m}-1')
|
|
|
+
|
|
|
this.getList()
|
|
|
+
|
|
|
+ },
|
|
|
+ computed:{
|
|
|
+ completionTimeN(){
|
|
|
+ return parseUnixTime(newDate(this.completionTime ),'{y}年{m}月')
|
|
|
+ }
|
|
|
},
|
|
|
onReachBottom() {
|
|
|
if (this.list.length < this.listForm.recordsTotal) {
|
|
@@ -137,6 +150,21 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ testBtn() {
|
|
|
+
|
|
|
+ this.queryName=this.testName
|
|
|
+ this.listForm.queryContent=this.queryName
|
|
|
+
|
|
|
+ this.getList(1)
|
|
|
+ },
|
|
|
+ completionTimeConfirm(e) {
|
|
|
+ console.log(e)
|
|
|
+
|
|
|
+ this.completionTime = e.year+"-"+e.month+"-1"
|
|
|
+
|
|
|
+
|
|
|
+ this.getList(1)
|
|
|
+ },
|
|
|
gotoSelectLock(){
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/task/selectStation?isAll=1',
|
|
@@ -182,7 +210,7 @@
|
|
|
change(e){
|
|
|
this.current=e
|
|
|
this.listForm.pageIndex=0
|
|
|
- this.listForm.status=e
|
|
|
+ this.listForm.status=this.tabslist[e].status
|
|
|
this.list =[]
|
|
|
this.getList()
|
|
|
},
|
|
@@ -199,6 +227,12 @@
|
|
|
title: "加载中",
|
|
|
mask: true,
|
|
|
})
|
|
|
+ if(this.completionTime){
|
|
|
+
|
|
|
+ this.listForm.startTime=this.completionTime
|
|
|
+ var sz=this.completionTime.split('-')
|
|
|
+ this.listForm.endTime=nextMonth(sz[0],sz[1],sz[2])
|
|
|
+ }
|
|
|
|
|
|
API.recordList(this.listForm).then((res) => {
|
|
|
var list=this.list
|