From f13213d0a2d44443790e648896303ed93dc1bacd Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期三, 19 十一月 2025 11:17:50 +0800
Subject: [PATCH] 调试

---
 components/WorkOrderPrint.vue |   93 ++++++++++++++++++++++++++++++++++------------
 1 files changed, 69 insertions(+), 24 deletions(-)

diff --git a/components/WorkOrderPrint.vue b/components/WorkOrderPrint.vue
index b0b439a..eaaa0fd 100644
--- a/components/WorkOrderPrint.vue
+++ b/components/WorkOrderPrint.vue
@@ -238,9 +238,10 @@
 				printNum: 1, reportingList: [], printLoading: false, customAmount: '',
 				isGeneratingBarcode: false, lastGenerateTime: 0, generateRequestId: null,
 				nowTimeTimer: null, nowTime: '',
-				userSearch: '',
+                userSearch: '',
+                refreshTimer: null, // 鏂板锛氳嚜鍔ㄥ埛鏂板畾鏃跺櫒
 				/* 鏂板锛氬巻鍙叉姤宸ヨ褰曟暟缁� */
-				reportingHistory: []
+                reportingHistory: []
 			}
 		},
 		computed: {
@@ -278,10 +279,35 @@
 			this.getXS0101();
 			this.updateNowTime();
 			// 绉掔骇鍒锋柊锛涘涓嶉渶鍔ㄦ�佽烦绉掑彲鏀逛负 60000
-			this.nowTimeTimer = setInterval(this.updateNowTime, 1000);
+            this.nowTimeTimer = setInterval(this.updateNowTime, 1000);
+
+            // 鏂板锛氭瘡鍒嗛挓鑷姩鍒锋柊鏁版嵁锛�60000姣 = 1鍒嗛挓锛�
+            this.startAutoRefresh();
 		},
-		beforeDestroy() { if (this.nowTimeTimer) clearInterval(this.nowTimeTimer); },
-		methods: {
+        beforeDestroy() {
+            if (this.nowTimeTimer) clearInterval(this.nowTimeTimer);
+            // 鏂板锛氭竻鐞嗚嚜鍔ㄥ埛鏂板畾鏃跺櫒
+            this.stopAutoRefresh();
+        },
+        methods: {
+            // 鏂板锛氬紑濮嬭嚜鍔ㄥ埛鏂�
+            startAutoRefresh() {
+                // 鍏堟竻闄ゅ彲鑳藉瓨鍦ㄧ殑鏃у畾鏃跺櫒
+                this.stopAutoRefresh();
+                // 璁剧疆鏂扮殑瀹氭椂鍣紝姣忓垎閽熸墽琛屼竴娆�
+                this.refreshTimer = setInterval(() => {
+                    console.log('鑷姩鍒锋柊鏁版嵁...');
+                    this.refresh();
+                }, 60000); // 60000姣 = 1鍒嗛挓
+            },
+            // 鏂板锛氬仠姝㈣嚜鍔ㄥ埛鏂�
+            stopAutoRefresh() {
+                if (this.refreshTimer) {
+                    clearInterval(this.refreshTimer);
+                    this.refreshTimer = null;
+                }
+            },
+
 			formatUser(u) {
 				if (!u) return '';
 				const segs = u.split(':');
@@ -303,13 +329,24 @@
 				this.isGeneratingBarcode = false; this.generateRequestId = null; this.lastGenerateTime = 0;
 				this.$showMessage("宸查噸缃潯鐮佺敓鎴愮姸鎬�");
 			},
-			refresh() {
-				this.$sendPostRequest({
-					url: "http://192.168.0.94:9095/Numerical/RefreshDevBycl",
-					data: { machineNo: this.order.machineNo },
-					contentType: "application/json"
-				}).then(r => { r.code == 200 ? this.fetchData(true) : this.$showMessage("鍚屾澶辫触"); });
-			},
+            // 淇敼锛氬湪鎵嬪姩鍒锋柊鏃朵篃閲嶇疆鑷姩鍒锋柊璁℃椂鍣�
+            refresh() {
+                this.$sendPostRequest({
+                    url: "http://192.168.0.94:9095/Numerical/RefreshDevBycl",
+                    data: { machineNo: this.order.machineNo },
+                    contentType: "application/json"
+                }).then(r => {
+                    if (r.code == 200) {
+                        this.fetchData(true);
+                        this.$showMessage("鏁版嵁鍒锋柊鎴愬姛");
+                    } else {
+                        this.$showMessage("鍚屾澶辫触");
+                    }
+                }).catch(error => {
+                    console.error('鍒锋柊澶辫触:', error);
+                    this.$showMessage("鍒锋柊澶辫触锛岃妫�鏌ョ綉缁滆繛鎺�");
+                });
+            },
 			onDaa003Change(v) {
 				let o = this.lineList[this.DAA003List.indexOf(v)];
 				this.orderId = o.id; this.orderNo = o.daa001;
@@ -612,7 +649,7 @@
     .current-user-section,
     .defective-section,
     .submit-section {
-        font-size: 24px;
+        font-size: 30px;
     }
 
     /* 5. 杈撳叆妗嗗瓧浣� */
@@ -746,11 +783,13 @@
         gap: 30px;
     }
 
+    /* 涓嶈壇鏁伴噺鍖哄煙 */
     .defective-section {
         display: flex;
         align-items: center;
         gap: 14px;
-        font-size: 18px;
+        font-size: 36px; /* 浠�32px鏀逛负36px */
+        font-weight: bold; /* 鍙�夛細鍔犵矖瀛椾綋 */
     }
 
     .submit-section {
@@ -766,20 +805,22 @@
         box-sizing: border-box;
     }
 
+    /* 涓嶈壇鏁伴噺杈撳叆妗� */
     .bad-input {
         width: 320px;
         max-width: 100%;
         height: 66px;
         border: 3px solid #808080;
-        font-size: 34px;
+        font-size: 42px;
         text-align: center;
     }
 
+    /* 纭鎻愪氦鎸夐挳*/
     .details-btn {
         padding: 12px 34px;
         background: #00a2e9;
         color: #fff;
-        font-size: 20px;
+        font-size: 32px;
         border: none;
         cursor: pointer;
         border-radius: 12px;
@@ -792,7 +833,7 @@
     .current-user-section {
         display: flex;
         align-items: center;
-        font-size: 18px;
+        font-size: 32px;
         border: 1.5px solid #f00;
         border-radius: 10px;
         padding: 14px 22px;
@@ -803,19 +844,23 @@
 
     .current-user-name {
         font-weight: bold;
-        font-size: 22px;
+        font-size: 32px;
     }
 
+    /* 閫変汉鎸夐挳 - 钃濊壊涓婚 */
     .select-user-btn {
-        padding: 6px 22px;
-        background: #eee;
-        border: 1px solid #aaa;
-        border-radius: 8px;
-        font-size: 24px;
+        background: #00a2e9; /* 涓庢彁浜ゆ寜閽浉鍚岀殑钃濊壊 */
+        color: #fff; /* 鐧借壊鏂囧瓧 */
+        border: none; /* 绉婚櫎杈规 */
+        padding: 12px 22px; /* 璋冩暣鍐呰竟璺濅笌鎻愪氦鎸夐挳鍗忚皟 */
+        border-radius: 12px; /* 涓庢彁浜ゆ寜閽浉鍚岀殑鍦嗚 */
+        font-size: 32px; /* 淇濇寔瀛椾綋澶у皬 */
+        cursor: pointer;
+        transition: background 0.15s; /* 娣诲姞杩囨浮鏁堟灉 */
     }
 
         .select-user-btn:hover {
-            background: #ddd;
+            background: #008ac2;
         }
 
     .overlay {

--
Gitblit v1.9.3