|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
<view class="processWrapper ">
|
|
|
+ <view style="height:100rpx"></view>
|
|
|
|
|
|
<view class="ding">
|
|
|
<scroll-view scroll-x class="bg-white nav text-center">
|
|
@@ -35,7 +36,10 @@
|
|
|
class="icon iconfont margin-left-xs margin-right-xs"></text></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class=" text-center margin-top" v-if="alarmUntreatedCount === 0">暂无数据...</view>
|
|
|
+ <view class=" text-center margin-top" v-if="alarmUntreatedCount == 0">暂无数据...</view>
|
|
|
+ <view v-show="isLoadMore&&alarmUntreatedCount!= 0">
|
|
|
+ <uni-load-more :status="loadStatus"></uni-load-more>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</block>
|
|
@@ -117,7 +121,11 @@
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="text-center margin-top" v-if="alarmUntreatedCount1 === 0">暂无数据...</view>
|
|
|
+ <view class="text-center margin-top" v-if="alarmUntreatedCount1 == 0">暂无数据...</view>
|
|
|
+ <view v-show="isLoadMore&&alarmUntreatedCount1 != 0&&this.currentPage>1" :style="{'padding-top':this.handleStatus==2 ? '50rpx':'','padding-bottom':this.handleStatus==2 ? '180rpx':''}" >
|
|
|
+ <uni-load-more :status="loadStatus"></uni-load-more>
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
<view v-if="this.handleStatus==2" class="btn-area submitBottomBtn padding-lr-sm">
|
|
@@ -166,27 +174,57 @@
|
|
|
companyCode: '',
|
|
|
alarmUntreatedCount: '',
|
|
|
alarmUntreatedCount1: '',
|
|
|
- processingStatus: '',
|
|
|
+ processingStatus: 0,
|
|
|
+
|
|
|
+ currentPage: 1,
|
|
|
+ size: 10,
|
|
|
+ loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
|
|
|
+ isLoadMore: false, //是否加载中
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
handleStatus(val) {
|
|
|
+ console.log('下拉框切换')
|
|
|
+ this.currentPage=1;
|
|
|
+ this.porcessedList=[]
|
|
|
// this.porcessedList={};
|
|
|
if(val==0){
|
|
|
val='1,2,3,4'
|
|
|
}
|
|
|
+ this.processingStatus=val
|
|
|
+ console.log(this.processingStatus)
|
|
|
this.getProcessData({
|
|
|
"companyCode": this.companyCode,
|
|
|
"type": this.type,
|
|
|
- "processingStatus": val
|
|
|
+ "processingStatus": val,
|
|
|
+ "currentPage": this.currentPage,
|
|
|
+ "size": this.size,
|
|
|
+
|
|
|
}, this.TabCur);
|
|
|
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
},
|
|
|
+ onReachBottom() { //上拉触底函数
|
|
|
+ if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
|
|
|
+ this.isLoadMore = true
|
|
|
+ this.currentPage += 1;
|
|
|
+
|
|
|
+ this.getProcessData({
|
|
|
+ "companyCode": this.companyCode,
|
|
|
+ "type": this.type,
|
|
|
+ "processingStatus": this.processingStatus,
|
|
|
+ "currentPage": this.currentPage,
|
|
|
+ "size": this.size,
|
|
|
+ }, this.TabCur);
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
onLoad: function(option) {
|
|
|
+ this.type=option.type;
|
|
|
+ this.companyCode=option.companyCode;
|
|
|
|
|
|
console.log(option.type);
|
|
|
console.log(option.companyCode);
|
|
@@ -199,18 +237,24 @@
|
|
|
title: '视频告警'
|
|
|
});
|
|
|
}
|
|
|
- this.getProcessData({
|
|
|
- "companyCode": option.companyCode,
|
|
|
- "type": option.type,
|
|
|
- "processingStatus": "0"
|
|
|
- }, 0);
|
|
|
- console.log('onload里')
|
|
|
+
|
|
|
+ this.loadData()
|
|
|
+
|
|
|
|
|
|
- this.companyCode = option.companyCode;
|
|
|
- this.processingStatus = 1
|
|
|
- this.type = option.type;
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
+ loadData(){
|
|
|
+
|
|
|
+ this.getProcessData({
|
|
|
+ "companyCode": this.companyCode,
|
|
|
+ "type": this.type,
|
|
|
+ "processingStatus": this.processingStatus,
|
|
|
+ "currentPage": this.currentPage,
|
|
|
+ "size": this.size,
|
|
|
+ }, this.TabCur);
|
|
|
+ },
|
|
|
|
|
|
quickConfirm(){
|
|
|
if (!this.checkedArr.length) {
|
|
@@ -283,34 +327,68 @@
|
|
|
this.allChecked = false;
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
async getProcessData(ming = {}, whichTab) {
|
|
|
+ console.log('请求接口')
|
|
|
const res = await this.$myRequest({
|
|
|
url: 'IntegratedAlarm/getElectricAlarmUntreated',
|
|
|
data: ming,
|
|
|
showLoading: true
|
|
|
})
|
|
|
|
|
|
- if (whichTab ==0) {
|
|
|
- this.unporcessList = res.data.data;
|
|
|
- this.alarmUntreatedCount = parseInt(res.data.alarmUntreatedCount)
|
|
|
- } else {
|
|
|
- this.porcessedList = res.data.data;
|
|
|
- this.alarmUntreatedCount1 = parseInt(res.data.alarmUntreatedCount)
|
|
|
+ // if (whichTab ==0) {
|
|
|
+ // this.unporcessList = res.data.data;
|
|
|
+ // this.alarmUntreatedCount = parseInt(res.data.alarmUntreatedCount)
|
|
|
+ // } else {
|
|
|
+ // this.porcessedList = res.data.data;
|
|
|
+ // this.alarmUntreatedCount1 = parseInt(res.data.alarmUntreatedCount)
|
|
|
|
|
|
+ // }
|
|
|
+ // console.log(this.porcessedList)
|
|
|
+
|
|
|
+ if (res.data.data.length) {
|
|
|
+ if (whichTab == 0) {
|
|
|
+ this.unporcessList = this.unporcessList.concat(res.data.data)
|
|
|
+ this.alarmUntreatedCount = parseInt(res.data.alarmUntreatedCount)
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.porcessedList = this.porcessedList.concat(res.data.data);
|
|
|
+
|
|
|
+ this.alarmUntreatedCount1 = parseInt(res.data.alarmUntreatedCount)
|
|
|
+ console.log(this.alarmUntreatedCount1)
|
|
|
+ }
|
|
|
+
|
|
|
+ if (res.data.data.length < this.size) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
|
|
|
+ this.isLoadMore = true
|
|
|
+ this.loadStatus = 'nomore'
|
|
|
+ } else {
|
|
|
+ this.isLoadMore = false
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.isLoadMore = true
|
|
|
+ this.loadStatus = 'nomore'
|
|
|
}
|
|
|
- console.log(this.porcessedList)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
|
|
|
- tabSelect(e) {
|
|
|
+ tabSelect(e) { //已处理未处理切换
|
|
|
+ console.log('已处理未处理切换')
|
|
|
+ this.currentPage=1;
|
|
|
+ this.porcessedList=[];
|
|
|
+ this.unporcessList=[];
|
|
|
+
|
|
|
console.log(e.currentTarget);
|
|
|
this.TabCur = e.currentTarget.dataset.id;
|
|
|
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
|
|
|
- this.handleStatus=0
|
|
|
- this.getProcessData({
|
|
|
- "companyCode": this.companyCode,
|
|
|
- "type": this.type,
|
|
|
- "processingStatus": !e.currentTarget.dataset.id ? e.currentTarget.dataset.id : '1,2,3,4'
|
|
|
- }, this.TabCur);
|
|
|
+ // this.handleStatus=0;
|
|
|
+
|
|
|
+ this.processingStatus=!e.currentTarget.dataset.id ? e.currentTarget.dataset.id : '1,2,3,4',
|
|
|
+ console.log(this.processingStatus)
|
|
|
+ this.loadData()
|
|
|
},
|
|
|
|
|
|
// 页面跳转
|
|
@@ -356,8 +434,8 @@
|
|
|
|
|
|
<style lang="scss">
|
|
|
.handle2scroll {
|
|
|
- height: calc(100vh - 400rpx);
|
|
|
- overflow-y: scroll;
|
|
|
+ // height: calc(100vh - 400rpx);
|
|
|
+ // overflow-y: scroll;
|
|
|
}
|
|
|
|
|
|
//已处理未处理消息个数样式
|