|
@@ -1,38 +1,38 @@
|
|
|
<template>
|
|
|
<view class="processWrapper ">
|
|
|
- <!-- <cu-custom bgColor="bg-gradual-blue" :isBack="true"><block slot="backText">返回</block><block slot="content">布局</block></cu-custom>
|
|
|
- --> <view class="ding">
|
|
|
- <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" v-if="item.badge!=1">99</block>
|
|
|
- </view>
|
|
|
- {{tabNav[index]}}
|
|
|
- </view>
|
|
|
- </scroll-view>
|
|
|
- </view>
|
|
|
-
|
|
|
+
|
|
|
+ <view class="ding">
|
|
|
+ <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>
|
|
|
+ </scroll-view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<block v-if="TabCur==0">
|
|
|
- <view class="processList" >
|
|
|
+ <view class="processList">
|
|
|
<view class="cu-list menu-avatar ">
|
|
|
- <view class="cu-item" v-for="(item,index) in unporcessList" :key="index">
|
|
|
+ <view class="cu-item" 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">
|
|
|
- <view class="cut">{{item.title}}</view>
|
|
|
+ <view class="cut">{{item.measName}}</view>
|
|
|
</view>
|
|
|
<view class="pro-des ">
|
|
|
<view class="text-cut">
|
|
|
- {{item.subTitle}}
|
|
|
+ {{item.digitalValue!=0?"动作":"复归"}}
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="pro-date ">{{item.time}}</view>
|
|
|
- </view>
|
|
|
- <view class="action">
|
|
|
- <view class="unProcess" v-if="type==1" @tap="goUnprocessDetail">{{item.status}}</view>
|
|
|
- <view class="unProcess" v-else @tap="goVideoUnprocessDetail">{{item.status}}</view>
|
|
|
+ <view class="pro-date ">{{item.soeTime}}</view>
|
|
|
</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>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -40,22 +40,22 @@
|
|
|
<block v-if="TabCur==1">
|
|
|
<view class="processList">
|
|
|
<view class="cu-list menu-avatar ">
|
|
|
- <view class="cu-item" v-for="(item,index) in processedList" :key="index" >
|
|
|
+ <view class="cu-item" v-for="(item,index) in unporcessList" :key="index">
|
|
|
<view class="cu-avatar lg" style="background-image:url(../../static/processed-icon.png);"></view>
|
|
|
- <view class="content">
|
|
|
- <view class="pro-title">
|
|
|
- <view class="cut">{{item.title}}</view>
|
|
|
- </view>
|
|
|
- <view class="pro-des ">
|
|
|
- <view class="text-cut">
|
|
|
- {{item.subTitle}}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="pro-date ">{{item.time}}</view>
|
|
|
+ <view class="content">
|
|
|
+ <view class="pro-title">
|
|
|
+ <view class="cut">{{item.measName}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="pro-des ">
|
|
|
+ <view class="text-cut">
|
|
|
+ {{item.digitalValue!=0?"动作":"复归"}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="pro-date ">{{item.soeTime}}</view>
|
|
|
</view>
|
|
|
- <view class="action">
|
|
|
- <view class="processed" v-if="type==1" @tap="goProcessedDetail">{{item.status}}</view>
|
|
|
- <view class="processed"v-else @tap="goVideoProcessedDetail">{{item.status}}</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>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -65,13 +65,14 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
-<script>
|
|
|
+<script>
|
|
|
import json from '../../data/json.js';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- unporcessList: json.unprocessList,
|
|
|
- processedList: json.processedList,
|
|
|
+ // unporcessList: json.unprocessList,
|
|
|
+ unporcessList:[],
|
|
|
+
|
|
|
|
|
|
type: '0',
|
|
|
modalName: null,
|
|
@@ -79,12 +80,16 @@
|
|
|
listTouchDirection: null,
|
|
|
CustomBar: this.CustomBar,
|
|
|
TabCur: 0,
|
|
|
- tabNav: ['未处理', '已处理']
|
|
|
+ tabNav: ['未处理', '已处理'],
|
|
|
+ companyCode:'',
|
|
|
+ alarmUntreatedCount:'',
|
|
|
+ processingStatus:''
|
|
|
};
|
|
|
- },
|
|
|
+ },
|
|
|
onLoad: function(option) {
|
|
|
- console.log(option.type); //打印出上个页面传递的参数。
|
|
|
- this.type = option.type;
|
|
|
+
|
|
|
+ console.log(option.type);
|
|
|
+ console.log(option.companyCode);
|
|
|
if (option.type == 1) {
|
|
|
uni.setNavigationBarTitle({
|
|
|
title: '电力检测'
|
|
@@ -94,53 +99,73 @@
|
|
|
title: '视频告警'
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ this.companyCode = option.companyCode;
|
|
|
+ this.processingStatus=1
|
|
|
+ this.type = 1;
|
|
|
+ this.getProcessData({"companyCode":option.companyCode,"type":option.type,"processingStatus":"0"});
|
|
|
},
|
|
|
- methods: {
|
|
|
- tabSelect(e) {
|
|
|
- this.TabCur = e.currentTarget.dataset.id;
|
|
|
- this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
|
|
|
+ methods: {
|
|
|
+ async getProcessData(ming={}) {
|
|
|
+ const res= await this.$myRequest({
|
|
|
+ url:'IntegratedAlarm/getElectricAlarmUntreated',
|
|
|
+ data:ming
|
|
|
+ })
|
|
|
+ this.unporcessList=res.data.data;
|
|
|
+ this.alarmUntreatedCount=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});
|
|
|
},
|
|
|
|
|
|
// 页面跳转
|
|
|
- goUnprocessDetail() {
|
|
|
+ goUnprocessDetail(id) {
|
|
|
+
|
|
|
+
|
|
|
uni.navigateTo({
|
|
|
- url: '/pages/unprocessDetail/unprocessDetail?type=1',
|
|
|
+ url: '/pages/unprocessDetail/unprocessDetail?companyCode='+this.companyCode+'&processingStatus=0&id='+id+'&type=1',
|
|
|
success: res => {},
|
|
|
fail: () => {},
|
|
|
complete: () => {}
|
|
|
});
|
|
|
},
|
|
|
- goProcessedDetail() {
|
|
|
+ goProcessedDetail(id) {
|
|
|
uni.navigateTo({
|
|
|
- url: '/pages/processedDetail/processedDetail?type=1',
|
|
|
+ url: '/pages/processedDetail/processedDetail?companyCode='+this.companyCode+'&processingStatus='+this.processingStatus+'&id='+id+'&type=1',
|
|
|
+ success: res => {},
|
|
|
+ fail: () => {},
|
|
|
+ complete: () => {}
|
|
|
+ });
|
|
|
+ },
|
|
|
+ goVideoUnprocessDetail() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/unprocessDetail/unprocessDetail?type=2',
|
|
|
+ success: res => {},
|
|
|
+ fail: () => {},
|
|
|
+ complete: () => {}
|
|
|
+ });
|
|
|
+ },
|
|
|
+ goVideoProcessedDetail() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/processedDetail/processedDetail?type=2',
|
|
|
success: res => {},
|
|
|
fail: () => {},
|
|
|
complete: () => {}
|
|
|
});
|
|
|
- },
|
|
|
- goVideoUnprocessDetail() {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/unprocessDetail/unprocessDetail?type=2',
|
|
|
- success: res => {},
|
|
|
- fail: () => {},
|
|
|
- complete: () => {}
|
|
|
- });
|
|
|
- },
|
|
|
- goVideoProcessedDetail() {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/processedDetail/processedDetail?type=2',
|
|
|
- success: res => {},
|
|
|
- fail: () => {},
|
|
|
- complete: () => {}
|
|
|
- });
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
- //已处理未处理消息个数样式
|
|
|
-
|
|
|
+ //已处理未处理消息个数样式
|
|
|
+
|
|
|
.nav .cu-item.cur {
|
|
|
position: relative;
|
|
|
border-bottom: 8rpx solid;
|