报警模块优化

This commit is contained in:
xusd 2024-06-05 15:59:03 +08:00
parent 744684c626
commit 00be8d9018
2 changed files with 2 additions and 6 deletions

View File

@ -1,6 +1,5 @@
<template> <template>
<view class="detail-container"> <view class="detail-container">
<u-notify message="处理成功" ref="showMsg"></u-notify>
<view style="background: white;padding: 20px;"> <view style="background: white;padding: 20px;">
<u--form labelPosition="left" :model="recordDetails" :rules="rules" ref="alarmForm" label-width="100px"> <u--form labelPosition="left" :model="recordDetails" :rules="rules" ref="alarmForm" label-width="100px">
<u-form-item label="监测设备名称:" prop="" borderBottom> <u-form-item label="监测设备名称:" prop="" borderBottom>
@ -84,7 +83,7 @@
status: 1 status: 1
} }
updateRecord(data).then(() => { updateRecord(data).then(() => {
this.$refs.showMsg.success('处理成功'); uni.$u.toast('处理成功');
this.$tab.redirectTo("/pages/work/alarm/listAlarm?flag=1"); this.$tab.redirectTo("/pages/work/alarm/listAlarm?flag=1");
}) })
}, },

View File

@ -76,10 +76,6 @@
equipList: [] equipList: []
} }
}, },
created() {
this.getAlarmList();
this.getEquipList();
},
onReachBottom() { onReachBottom() {
const allTotal = this.queryParams.pageNum * this.queryParams.pageSize; const allTotal = this.queryParams.pageNum * this.queryParams.pageSize;
if (allTotal < this.total) { if (allTotal < this.total) {
@ -93,6 +89,7 @@
onShow() { onShow() {
this.alarmList = []; this.alarmList = [];
this.getAlarmList(); this.getAlarmList();
this.getEquipList();
}, },
onLoad(opts) { onLoad(opts) {
this.flag = opts.flag; this.flag = opts.flag;