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 |   33 +++++++++++++++++++++++----------
 1 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/components/machine.vue b/components/machine.vue
index c237153..e0a039c 100644
--- a/components/machine.vue
+++ b/components/machine.vue
@@ -257,12 +257,20 @@
 				})
 			}
 		},
-		mounted() {
-			// 椤甸潰鍔犺浇鏃讹紝鍚姩瀹氭椂鍣紝姣忛殧5鍒嗛挓鑷姩淇濆瓨锛堝綋鍓嶇ず渚嬩娇鐢� 30s锛屽彲鏀瑰洖 5 鍒嗛挓锛�
-			this.autoSaveTimer = setInterval(() => {
-				this.save(); // 鐩存帴璋冪敤宸叉湁鐨勪繚瀛樻柟娉曪紙save 宸茶繑鍥� Promise锛�
-			}, 1 * 30 * 1000); // 30绉�
-		},
+        mounted() {
+                // 椤甸潰鍔犺浇鏃讹紝鍚姩瀹氭椂鍣紝姣忛殧30绉掕嚜鍔ㄤ繚瀛�
+                this.autoSaveTimer = setInterval(() => {
+                    // 1. 璋冩満瀹屾垚鏃堕棿鏈変簡灏变笉鑷姩淇濆瓨
+                    if (this.maEndTime) {
+                        return;
+                    }
+                    // 2. 閫佹鏃堕棿涓虹┖涔熶笉鑷姩淇濆瓨
+                    if (!this.maShoutTime) {
+                        return;
+                    }
+                    this.save(); // 婊¤冻鏉′欢鎵嶈嚜鍔ㄤ繚瀛�
+                }, 1 * 30 * 1000); // 30绉�
+            },
 		beforeDestroy() {
 			// 椤甸潰鍗歌浇鏃舵竻鐞嗗畾鏃跺櫒
 			clearInterval(this.autoSaveTimer);
@@ -286,6 +294,7 @@
 		position: absolute;
 		top: 8px;
 		right: 40px;
+		width: 200px;
 		z-index: 1000;
 	}
 
@@ -313,8 +322,9 @@
 	.item {
 		display: flex;
 		flex-direction: row;
-		align-items: flex-start;
+		align-items: center;
 		margin-bottom: 10px;
+		gap: 10px;
 	}
 
 	.item h4 {
@@ -325,7 +335,8 @@
 	}
 
 	button {
-		width: 100%;
+		width: 50%;
+		flex-shrink: 0;
 		padding: 10px;
 		font-size: 16px;
 		border: none;
@@ -348,7 +359,8 @@
 		padding: 8px;
 		font-size: 15px;
 		border: 1px solid #ccc;
-		width: 100%;
+		width: 50%;
+		flex-grow: 1;
 		box-sizing: border-box;
 	}
 
@@ -376,7 +388,8 @@
 		height: 40px;
 		padding: 8px;
 		font-size: 15px;
-		width: 100%;
+		width: 50%;
+		flex-grow: 1;
 		box-sizing: border-box;
 		margin-top: 0;
 	}

--
Gitblit v1.9.3