Commit 1a039f47 by 延飞 李

oee时间利用率 loading 提示优化

parent 6f8f0893
...@@ -549,7 +549,11 @@ ...@@ -549,7 +549,11 @@
// 处理产线改变 // 处理产线改变
async handleLineChange() { async handleLineChange() {
// 避免在init过程中重复设置loading状态
const isAlreadyLoading = this.loading;
if (!isAlreadyLoading) {
this.loading = true; this.loading = true;
}
try { try {
console.log("产线改变,新产线ID:", this.selectedLine); console.log("产线改变,新产线ID:", this.selectedLine);
...@@ -640,8 +644,11 @@ ...@@ -640,8 +644,11 @@
console.error("切换产线失败:", error); console.error("切换产线失败:", error);
this.$message.error("切换产线失败"); this.$message.error("切换产线失败");
} finally { } finally {
// 只有当我们设置了loading状态时才关闭它
if (!isAlreadyLoading) {
this.loading = false; 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