diff --git a/src/assets/emptyData.png b/src/assets/emptyData.png new file mode 100644 index 00000000..e930739a Binary files /dev/null and b/src/assets/emptyData.png differ diff --git a/src/views/vehicle-maintenance/vehicle-alarm-detail.vue b/src/views/vehicle-maintenance/vehicle-alarm-detail.vue index 999306be..4bfaac3c 100644 --- a/src/views/vehicle-maintenance/vehicle-alarm-detail.vue +++ b/src/views/vehicle-maintenance/vehicle-alarm-detail.vue @@ -110,6 +110,16 @@ this.initMap(); }, methods: { + // 新增方法:重置弹窗状态 + resetPopupState() { + this.radio = ''; + this.remark = ''; + // 重置radioList状态 + this.radioList = [ + { name: '开始处理', value: 3, disabled: false }, + { name: '处理完成', value: 5, disabled: false } + ]; + }, goAlarmMonitoring() { let data = { "action":"goMonitoring", @@ -133,8 +143,9 @@ remark: this.remark }) this.$toast('操作成功') + this.resetPopupState(); } finally { - this.dealWithShow = false; + this.dealWithShow = false; await this.getAlarmDetail(); } }, @@ -148,10 +159,20 @@ if(!res.data) { this.$router.push({ name: 'vehicleAlarmList', + params: { + token: localStorage.getItem('token') + }, replace: true // 关键:替换当前路由,而不是新增历史记录 }); + return } + // this.$nextTick(() => { this.info = res?.data; + // 每次获取详情时重置radioList + this.radioList = [ + { name: '开始处理', value: 3, disabled: false }, + { name: '处理完成', value: 5, disabled: false } + ]; if( this.info.handStatus == 0 && ['1', '2', '3'].includes(String(this.info.alarmType))) { // 未处理,且需要技术处理 this.radio = this.radioList[0].value this.radioList[1].disabled = true @@ -159,7 +180,7 @@ if(this.info.handStatus == 3) { this.radioList[0].disabled = true } - + // }) }, initMap() { this.map = new AMap.Map('container',{ diff --git a/src/views/vehicle-maintenance/vehicle-alarm-list.vue b/src/views/vehicle-maintenance/vehicle-alarm-list.vue index 01ee380b..fc27f5cc 100644 --- a/src/views/vehicle-maintenance/vehicle-alarm-list.vue +++ b/src/views/vehicle-maintenance/vehicle-alarm-list.vue @@ -37,7 +37,7 @@