From 24946a7945620878b05120a7fa91a2cc1be550ed Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期四, 13 十一月 2025 13:50:58 +0800
Subject: [PATCH] BUG
---
components/machine.vue | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/components/machine.vue b/components/machine.vue
index b8e1cd2..e0a039c 100644
--- a/components/machine.vue
+++ b/components/machine.vue
@@ -258,19 +258,19 @@
}
},
mounted() {
- // 椤甸潰鍔犺浇鏃讹紝鍚姩瀹氭椂鍣紝姣忛殧30绉掕嚜鍔ㄤ繚瀛�
- this.autoSaveTimer = setInterval(() => {
- // 1. 宸ュ崟涓哄紑宸ョ姸鎬佷笉鑷姩淇濆瓨
- if (this.statusForm && this.statusForm.status === '寮�宸�') {
- return;
- }
- // 2. 閫佹鏃堕棿涓虹┖涔熶笉鑷姩淇濆瓨
- if (!this.maShoutTime) {
- return;
- }
- this.save(); // 婊¤冻鏉′欢鎵嶈嚜鍔ㄤ繚瀛�
- }, 1 * 30 * 1000); // 30绉�
- },
+ // 椤甸潰鍔犺浇鏃讹紝鍚姩瀹氭椂鍣紝姣忛殧30绉掕嚜鍔ㄤ繚瀛�
+ this.autoSaveTimer = setInterval(() => {
+ // 1. 璋冩満瀹屾垚鏃堕棿鏈変簡灏变笉鑷姩淇濆瓨
+ if (this.maEndTime) {
+ return;
+ }
+ // 2. 閫佹鏃堕棿涓虹┖涔熶笉鑷姩淇濆瓨
+ if (!this.maShoutTime) {
+ return;
+ }
+ this.save(); // 婊¤冻鏉′欢鎵嶈嚜鍔ㄤ繚瀛�
+ }, 1 * 30 * 1000); // 30绉�
+ },
beforeDestroy() {
// 椤甸潰鍗歌浇鏃舵竻鐞嗗畾鏃跺櫒
clearInterval(this.autoSaveTimer);
--
Gitblit v1.9.3