修改主页面和跳转报警页面

This commit is contained in:
xusd 2024-06-11 10:19:01 +08:00
parent cbf790c935
commit 12a4ea7b4b
2 changed files with 55 additions and 26 deletions

View File

@ -1,6 +1,6 @@
<template>
<view class="content">
<uni-section title="点巡检" type="line">
<!-- <uni-section title="点巡检" type="line">
<swiper class="swiper-box">
<swiper-item>
<view class="content-card-container">
@ -21,19 +21,19 @@
</view>
</swiper-item>
</swiper>
</uni-section>
<uni-section title="报警处理" type="line">
</uni-section> -->
<uni-section title="快捷入口" type="line">
<swiper class="swiper-box">
<swiper-item>
<view class="content-card-container">
<view class="content-card-wrap" @click="handleClickAllAlarm">
<view class="content-container">
<view class="content-icon-wrap">
<view :class="'iconfont icon-jixie'" :style="{'--color':'#0099FF'}">
<view :class="'iconfont icon-guzhang1'" :style="{'--color':'#FF0000'}">
</view>
</view>
<view class="content-title-wrap">
<view class="content-title">报警总数</view>
<view class="content-title">报警管理</view>
<view class="content-subTitle">
<text class="content-count">{{allCount}}</text>
@ -41,7 +41,21 @@
</view>
</view>
</view>
<view class="content-card-wrap" @click="handleClickProcessedAlarm">
<view class="content-card-wrap" @click="handleClickPatrolCount">
<view class="content-container">
<view class="content-icon-wrap">
<uni-icons type="paperplane-filled" size="40" color="#0099FF"></uni-icons>
</view>
<view class="content-title-wrap">
<view class="content-title">巡检任务</view>
<view class="content-subTitle">
<text class="content-count">{{patrolCount}}</text>
</view>
</view>
</view>
</view>
<!-- <view class="content-card-wrap" @click="handleClickProcessedAlarm">
<view class="content-container">
<view class="content-icon-wrap">
<view :class="'iconfont icon-zhengchang'" :style="{'--color':'#2BD52B'}">
@ -70,7 +84,7 @@
</view>
</view>
</view>
</view>
</view> -->
</view>
</swiper-item>
</swiper>
@ -425,16 +439,16 @@
},
//
handleClickAllAlarm() {
this.$tab.navigateTo("/pages/work/alarm/listAlarm?flag=0");
},
//
handleClickProcessedAlarm() {
this.$tab.navigateTo("/pages/work/alarm/listAlarm?flag=1");
},
//
handleClickUntreatedAlarm() {
this.$tab.navigateTo("/pages/work/alarm/listAlarm?flag=2");
this.$tab.navigateTo("/pages/work/alarm/listAlarm");
},
// //
// handleClickProcessedAlarm() {
// this.$tab.navigateTo("/pages/work/alarm/listAlarm?flag=1");
// },
// //
// handleClickUntreatedAlarm() {
// this.$tab.navigateTo("/pages/work/alarm/listAlarm?flag=2");
// },
tabListClick(item) {
clearInterval(this.intervalTask);
this.tabIndex = item.index;

View File

@ -1,5 +1,6 @@
<template>
<view class="card-group">
<u-tabs :list="tabList" @click="tabListClick"></u-tabs>
<view class="search-container">
<uni-data-select v-model="equipId" placeholder="请选择监测设备" :localdata="equipList"
@change="equipChange"></uni-data-select>
@ -73,7 +74,14 @@
pageNum: 1,
pageSize: 10
},
equipList: []
equipList: [],
tabList: [{
name: '全部',
}, {
name: '未处理',
}, {
name: '已处理'
}]
}
},
onReachBottom() {
@ -91,10 +99,23 @@
this.getAlarmList();
this.getEquipList();
},
onLoad(opts) {
this.flag = opts.flag;
},
// onLoad(opts) {
// this.flag = opts.flag;
// },
methods: {
tabListClick(item){
this.finished = true;
this.alarmList = []
this.tabIndex = item.index;
if (0 === item.index) {
this.queryParams.status = null;
} else if (1 === item.index) {
this.queryParams.status = 0;
} else if (2 === item.index) {
this.queryParams.status = 1;
}
this.getAlarmList();
},
equipChange() {
this.getAlarmList();
},
@ -116,12 +137,6 @@
},
getAlarmList() {
this.finished = true;
//flag0 1 2
if (this.flag === "1") {
this.queryParams.status = 1;
} else if (this.flag === "2") {
this.queryParams.status = 0;
}
this.queryParams.equipId = this.equipId;
listRecord(this.queryParams).then((res) => {
this.finished = false;