Commit 1a039f47 by 延飞 李

oee时间利用率 loading 提示优化

parent 6f8f0893
...@@ -549,7 +549,11 @@ ...@@ -549,7 +549,11 @@
// 处理产线改变 // 处理产线改变
async handleLineChange() { async handleLineChange() {
this.loading = true; // 避免在init过程中重复设置loading状态
const isAlreadyLoading = this.loading;
if (!isAlreadyLoading) {
this.loading = true;
}
try { try {
console.log("产线改变,新产线ID:", this.selectedLine); console.log("产线改变,新产线ID:", this.selectedLine);
...@@ -640,7 +644,10 @@ ...@@ -640,7 +644,10 @@
console.error("切换产线失败:", error); console.error("切换产线失败:", error);
this.$message.error("切换产线失败"); this.$message.error("切换产线失败");
} finally { } finally {
this.loading = false; // 只有当我们设置了loading状态时才关闭它
if (!isAlreadyLoading) {
this.loading = false;
}
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment