快乐的昕的电脑
2025-11-12 5d804f3f5bd78e6e803716d74984571d621dc7eb
送检时间为空也不自动保存
已修改1个文件
9 ■■■■■ 文件已修改
components/machine.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/machine.vue
@@ -260,12 +260,15 @@
        mounted() {
            // 页面加载时,启动定时器,每隔30秒自动保存
            this.autoSaveTimer = setInterval(() => {
                // 判断当前工单是否为开工状态,若是则不触发保存
                // 1. 工单为开工状态不自动保存
                if (this.statusForm && this.statusForm.status === '开工') {
                    // 已开工不自动保存
                    return;
                }
                this.save(); // 只有非开工状态才自动保存
                // 2. 送检时间为空也不自动保存
                if (!this.maShoutTime) {
                    return;
                }
                this.save(); // 满足条件才自动保存
            }, 1 * 30 * 1000); // 30秒
        },
        beforeDestroy() {