BUG
快乐的昕的电脑
2025-11-13 24946a7945620878b05120a7fa91a2cc1be550ed
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);