123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240 |
- <template>
- <view class="processWrapper ">
- <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 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="index">
- <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.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" style="z-index:99">
- <view class="unProcess" v-if="type==1" @tap="goUnprocessDetail(item.id)">未处理</view>
- <view class="unProcess" v-else @tap="goVideoUnprocessDetail(item.id)">未处理</view>
- </view>
- </view>
- <view class=" text-center margin-top" v-if="alarmUntreatedCount === 0">暂无数据...</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 porcessedList" :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.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" style="z-index:99">
- <view class="processed" v-if="type==1" @tap="goProcessedDetail(item.id)">已处理</view>
- <view class="processed" v-else @tap="goVideoProcessedDetail(item.id)">已处理</view>
- </view>
- </view>
- <view class="text-center margin-top" v-if="alarmUntreatedCount1 === 0">暂无数据...</view>
- </view>
-
-
-
- </view>
- </block>
- </view>
- </template>
- <script>
- import json from '../../data/json.js';
- export default {
- data() {
- return {
-
- unporcessList: [],
- porcessedList: [],
- type: '0',
- modalName: null,
- listTouchStart: 0,
- listTouchDirection: null,
- CustomBar: this.CustomBar,
- TabCur: 0,
- tabNav: ['未处理', '已处理'],
- companyCode: '',
- alarmUntreatedCount: '',
- alarmUntreatedCount1: '',
- processingStatus: '',
-
- };
- },
- onLoad: function(option) {
- console.log(option.type);
- console.log(option.companyCode);
- if (option.type == 1) {
- uni.setNavigationBarTitle({
- title: '电力检测'
- });
- } else {
- uni.setNavigationBarTitle({
- title: '视频告警'
- });
- }
- this.getProcessData({
- "companyCode": option.companyCode,
- "type": option.type,
- "processingStatus": "0"
- }, 0);
- console.log('onload里')
- this.companyCode = option.companyCode;
- this.processingStatus = 1
- this.type = option.type;
- },
- methods: {
- async getProcessData(ming = {}, whichTab) {
- 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)
- }
-
- },
- 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": this.type,
- "processingStatus": e.currentTarget.dataset.id
- }, this.TabCur);
- },
-
- 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({
- url: '/pages/processedDetail/processedDetail?companyCode=' + this.companyCode + '&processingStatus=' + this.processingStatus +
- '&id=' + id + '&type=1',
- success: res => {},
- fail: () => {},
- complete: () => {}
- });
- },
- goVideoProcessedDetail(id) {
- uni.navigateTo({
- url: '/pages/processedDetail/processedDetail?companyCode=' + this.companyCode + '&processingStatus=' + this.processingStatus +
- '&id=' + id + '&type=2',
- success: res => {},
- fail: () => {},
- complete: () => {}
- });
- }
- }
- }
- </script>
- <style lang="scss">
- //已处理未处理消息个数样式
- .nav .cu-item.cur {
- position: relative;
- border-bottom: 8rpx solid;
- }
- .cu-tag.badge {
- top: 14rpx;
- right: 96rpx;
- }
- .nav .cu-item {
- width: 50%;
- margin: 0;
- .text-blue,
- .line-blue,
- .lines-blue {
- color: #4274E7
- }
- }
- </style>
|