|
@@ -5,18 +5,19 @@
|
|
|
<scroll-view scroll-x class="bg-white nav text-center">
|
|
|
<view class="cu-item" :class="index==TabCur?'text-blue cur':''" v-for="(item,index) in tabNav" :key="index" @tap="tabSelect"
|
|
|
:data-id="index">
|
|
|
- <!-- <view class="cu-tag badge" >
|
|
|
- <block class="cu-tag badge" >{{alarmUntreatedCount}}</block>
|
|
|
- </view> -->
|
|
|
- {{tabNav[index]}}
|
|
|
+ <view v-if="TabCur==index" class="cu-tag badge" >
|
|
|
+ <block class="cu-tag badge" >{{TabCur?alarmUntreatedCount1:alarmUntreatedCount}} </block>
|
|
|
+ </view>
|
|
|
+ {{item}}
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
|
|
|
<block v-if="TabCur==0">
|
|
|
- <view class="processList">
|
|
|
- <view class="cu-list menu-avatar ">
|
|
|
- <view class="cu-item" v-for="(item,index) in unporcessList" :key="item.id">
|
|
|
+ <view class="processList">
|
|
|
+ <!-- {{alarmUntreatedCount}} -->
|
|
|
+ <view class="cu-list menu-avatar" >
|
|
|
+ <view class="cu-item" v-if="alarmUntreatedCount !=0" v-for="(item,index) in unporcessList" :key="item.id">
|
|
|
<view class="cu-avatar lg" style="background-image:url(../../static/process-icon.png);"></view>
|
|
|
<view class="content">
|
|
|
<view class="pro-title">
|
|
@@ -31,16 +32,19 @@
|
|
|
</view>
|
|
|
<view class="action" style="z-index:99">
|
|
|
<view class="unProcess" v-if="type==1" @tap="goUnprocessDetail(item.id)">未处理</view>
|
|
|
-<!-- <view class="unProcess" v-else @tap="goVideoUnprocessDetail">未处理</view>
|
|
|
- --> </view>
|
|
|
+ <view class="unProcess" v-else @tap="goVideoUnprocessDetail(item.id)">未处理</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+ <view class="cu-item" v-else>暂无数据</view>
|
|
|
</view>
|
|
|
+
|
|
|
</view>
|
|
|
</block>
|
|
|
<block v-if="TabCur==1">
|
|
|
- <view class="processList">
|
|
|
- <view class="cu-list menu-avatar ">
|
|
|
- <view class="cu-item" v-for="(item,index) in unporcessList" :key="index">
|
|
|
+ <view class="processList">
|
|
|
+ <!-- {{alarmUntreatedCount1}} -->
|
|
|
+ <view class="cu-list menu-avatar " >
|
|
|
+ <view class="cu-item" v-if="alarmUntreatedCount1 != 0" v-for="(item,index) in porcessedList" :key="index">
|
|
|
<view class="cu-avatar lg" style="background-image:url(../../static/processed-icon.png);"></view>
|
|
|
<view class="content">
|
|
|
<view class="pro-title">
|
|
@@ -55,10 +59,13 @@
|
|
|
</view>
|
|
|
<view class="action" style="z-index:99">
|
|
|
<view class="processed" v-if="type==1" @tap="goProcessedDetail(item.id)">已处理</view>
|
|
|
- <view class="processed" v-else @tap="goVideoProcessedDetail">已处理</view>
|
|
|
+ <view class="processed" v-else @tap="goVideoProcessedDetail(item.id)">已处理</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ <view class="cu-item" v-else>暂无数据...</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
</view>
|
|
|
</block>
|
|
|
|
|
@@ -71,7 +78,8 @@
|
|
|
data() {
|
|
|
return {
|
|
|
// unporcessList: json.unprocessList,
|
|
|
- unporcessList:[],
|
|
|
+ unporcessList:[],
|
|
|
+ porcessedList:[],
|
|
|
|
|
|
|
|
|
type: '0',
|
|
@@ -82,7 +90,8 @@
|
|
|
TabCur: 0,
|
|
|
tabNav: ['未处理', '已处理'],
|
|
|
companyCode:'',
|
|
|
- alarmUntreatedCount:'',
|
|
|
+ alarmUntreatedCount:0,
|
|
|
+ alarmUntreatedCount1:0,
|
|
|
processingStatus:''
|
|
|
};
|
|
|
},
|
|
@@ -99,41 +108,88 @@
|
|
|
title: '视频告警'
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+ this.getProcessData({"companyCode":option.companyCode,"type":option.type,"processingStatus":"0"},0);
|
|
|
+ console.log('onload里')
|
|
|
|
|
|
this.companyCode = option.companyCode;
|
|
|
this.processingStatus=1
|
|
|
- this.type = 1;
|
|
|
- this.getProcessData({"companyCode":option.companyCode,"type":option.type,"processingStatus":"0"});
|
|
|
+ this.type = option.type;
|
|
|
},
|
|
|
methods: {
|
|
|
- async getProcessData(ming={}) {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ async getProcessData(ming={},whichTab) {
|
|
|
+
|
|
|
+
|
|
|
+ // uni.request({
|
|
|
+ // url: 'https://iot.usky.cn/USKYOF/USKYOF.php/Home/IntegratedAlarm/getElectricAlarmUntreated',
|
|
|
+ // data:ming,
|
|
|
+ // success: (res) => {
|
|
|
+ // console.log(res.data);
|
|
|
+
|
|
|
+ // if(whichTab == 0){
|
|
|
+ // this.unporcessList=res.data.data;
|
|
|
+ // this.alarmUntreatedCount=res.data.alarmUntreatedCount
|
|
|
+ // }else{
|
|
|
+ // this.porcessedList=res.data.data;
|
|
|
+ // this.alarmUntreatedCount1=res.data.alarmUntreatedCount
|
|
|
+
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
const res= await this.$myRequest({
|
|
|
url:'IntegratedAlarm/getElectricAlarmUntreated',
|
|
|
- data:ming
|
|
|
+ data:ming,
|
|
|
+
|
|
|
})
|
|
|
- this.unporcessList=res.data.data;
|
|
|
- this.alarmUntreatedCount=res.data.alarmUntreatedCount
|
|
|
- console.log(res.data)
|
|
|
+
|
|
|
+ if(whichTab == 0){
|
|
|
+ this.unporcessList=res.data.data;
|
|
|
+ this.alarmUntreatedCount=res.data.alarmUntreatedCount
|
|
|
+ }else{
|
|
|
+ this.porcessedList=res.data.data;
|
|
|
+ this.alarmUntreatedCount1=res.data.alarmUntreatedCount
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // console.log(res.data)
|
|
|
},
|
|
|
|
|
|
tabSelect(e) {
|
|
|
+
|
|
|
console.log(e.currentTarget);
|
|
|
this.TabCur = e.currentTarget.dataset.id;
|
|
|
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
|
|
|
- this.getProcessData({"companyCode":this.companyCode,"type":"1","processingStatus":e.currentTarget.dataset.id});
|
|
|
+
|
|
|
+ this.getProcessData({"companyCode":this.companyCode,"type":this.type,"processingStatus":e.currentTarget.dataset.id},this.TabCur);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
|
|
|
// 页面跳转
|
|
|
- goUnprocessDetail(id) {
|
|
|
-
|
|
|
-
|
|
|
+ goUnprocessDetail(id) {
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/unprocessDetail/unprocessDetail?companyCode='+this.companyCode+'&processingStatus=0&id='+id+'&type=1',
|
|
|
success: res => {},
|
|
|
fail: () => {},
|
|
|
complete: () => {}
|
|
|
});
|
|
|
+ },
|
|
|
+ goVideoUnprocessDetail(id) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/unprocessDetail/unprocessDetail?companyCode='+this.companyCode+'&processingStatus=0&id='+id+'&type=2',
|
|
|
+ success: res => {},
|
|
|
+ fail: () => {},
|
|
|
+ complete: () => {}
|
|
|
+ });
|
|
|
},
|
|
|
goProcessedDetail(id) {
|
|
|
uni.navigateTo({
|
|
@@ -143,17 +199,10 @@
|
|
|
complete: () => {}
|
|
|
});
|
|
|
},
|
|
|
- goVideoUnprocessDetail() {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/unprocessDetail/unprocessDetail?type=2',
|
|
|
- success: res => {},
|
|
|
- fail: () => {},
|
|
|
- complete: () => {}
|
|
|
- });
|
|
|
- },
|
|
|
- goVideoProcessedDetail() {
|
|
|
+
|
|
|
+ goVideoProcessedDetail(id) {
|
|
|
uni.navigateTo({
|
|
|
- url: '/pages/processedDetail/processedDetail?type=2',
|
|
|
+ url: '/pages/processedDetail/processedDetail?companyCode='+this.companyCode+'&processingStatus='+this.processingStatus+'&id='+id+'&type=2',
|
|
|
success: res => {},
|
|
|
fail: () => {},
|
|
|
complete: () => {}
|