| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- <!--
- * @Title:
- * @Description: 测站异常列表信息
- * @Author: swp
- * @Date: 2022-08-24 10:49:21
- * @LastEditors:
- * @LastEditTime: 2022-08-24 10:49:21
- -->
- <template>
- <view class="wrap">
- <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
- @clickLeft="toBack">
- <view class="nav-title">
- <text>{{title}}</text>
- </view>
- </uni-nav-bar>
- <view class="container">
- <uni-list>
- <uni-list-item v-for="item in list" :key="item.id">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="items-line">
- <image class="item-title-run-status-icon" src="/static/images/icon_warning.png"
- mode="widthFix">
- </image>
- <text class="item-title-rtu-name">{{item.rtuName}}</text>
- <text class="item-title-rtu-code">[{{item.rtuCode}}]</text>
- </view>
- <view class="items-line">
- <uni-icons class="input-uni-icon" type="calendar" size="18" color="lightblue" />
- <text class="item-text-lable">创建时间:</text>
- <text class="item-text-content">{{item.warningHappenTime}}</text>
- </view>
- <view class="items-line">
- <uni-icons class="input-uni-icon" type="reload" size="18" color="lightblue" />
- <text class="item-text-lable">恢复时间:</text>
- <text v-if="item.warningRecoveryTime!=null"
- class="item-text-content">{{item.warningRecoveryTime}}</text>
- </view>
- <view class="items-line">
- <uni-icons class="input-uni-icon" type="list" size="18" color="lightblue" />
- <text class="item-text-lable">异常类型:</text>
-
- <text v-if="item.warningKind==1" class="item-text-content">测站离线</text>
- <text v-else-if="item.warningKind==2" class="item-text-content">测站时钟异常</text>
- <text v-else-if="item.warningKind==3" class="item-text-content">测站雨量小时报漏报</text>
- <text v-else-if="item.warningKind==4" class="item-text-content">测站水位小时报漏报</text>
- <text v-else-if="item.warningKind==5" class="item-text-content">雨量5分钟上报延时</text>
- <text v-else-if="item.warningKind==6" class="item-text-content">雨量站小时上报延时</text>
- <text v-else-if="item.warningKind==7" class="item-text-content">水位站小时上报延时</text>
- <text v-else-if="item.warningKind==8" class="item-text-content">雨量疑似异常值</text>
- </view>
- <view class="items-line">
- <uni-icons class="input-uni-icon" type="compose" size="18" color="lightblue" />
- <text class="item-text-lable">异常信息:</text>
- </view>
- <view class="items-line">
- <text class="item-text-content" style="margin-left: 0px;">{{item.warningDesc}}</text>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- <uni-group>
- <view class="pagination-block">
- <uni-pagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total"
- @change="pageChange" />
- </view>
- </uni-group>
- </view>
- </view>
- </template>
- <script>
- import http from '@/http/api.js';
- export default {
- name: '',
- components: {
- },
- onLoad(option) {
- this.rtuCode = option.rtuCode;
- this.query = {};
- this.query['rtuCode'] = this.rtuCode;
- this.getPage();
- },
- data() {
- return {
- list: [],
- title: '异常测站信息',
- query: {},
- rtuCode: '',
- pageSize: 10,
- // 当前页
- pageCurrent: 1,
- // 数据总量
- total: 0,
- }
- },
- computed: {
- },
- onShow() {
- this.getPage();
- },
- created() {
- },
- methods: {
- toBack() {
- uni.navigateBack({
- delta: 1
- })
- },
- // 分页触发
- pageChange(e) {
- this.pageCurrent = e.current;
- this.getPage()
- },
- getPage(params = {}) {
- var that = this;
- const current = this.pageCurrent;
- const size = this.pageSize;
- let postData = Object.assign(params, this.query);
- http.request({
- url: '/galaxy-business/rtu/warning/page',
- method: 'GET',
- data: postData,
- params: {
- current,
- size,
- },
- }).then(res => {
- if (res.data.records != null) {
- that.list = res.data.records;
- }
- this.total = res.data.total;
- }).catch(err => {
- console.log(err)
- })
- },
- toWarningPage(id) {
- var url = '/pages/warning/warninginfodetail?id=' + id;
- uni.navigateTo({
- url: url
- })
- },
- }
- }
- </script>
- <style>
- /* page {
- background-color: rgb(240, 242, 244);
- } */
- </style>
- <style lang="scss" scoped>
- </style>
|