| components/machine.vue | ●●●●● 补丁 | 查看 | 原始文档 | 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() {