Commit 075df140 authored by wanghao's avatar wanghao

1 实时数据显示 最终标定结果 调整,及 一键解绑时 加上loading 处理效果。

parent 71e5140f
......@@ -337,6 +337,8 @@ public class PalletDeviceBindingServiceImpl implements IPalletDeviceBindingServi
if(StringUtils.isNotBlank(data)) {
// 存失败记录
processPalletDeviceUploadFailure(palletDeviceBindings,data);
} else{
iPalletDeviceUploadFailureService.batchInsertRealTimeData(palletDeviceBindings);
}
}
}
......
......@@ -175,6 +175,7 @@ public class AgingStageTwoProcessJob implements Job {
/**
* 处理单个设备(读取 + 条件写入)
*/
private CompletableFuture<Boolean> processDeviceWithWrite(String ip, int port, int deviceId, AtomicInteger errorCount) {
return CompletableFuture.supplyAsync(() -> {
......
......@@ -88,7 +88,8 @@
<el-table-column label="标检结果" align="center" width="120">
<template slot-scope="scope">
<span v-if="scope.row.standardInspectResult === '1'" class="write-success">合格</span>
<span v-else class="write-failed">不合格</span>
<span v-else-if="scope.row.standardInspectResult === '0'" class="write-failed">不合格</span>
<span v-else class="write-unknown">-</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" width="120">
......
......@@ -632,13 +632,25 @@ export default {
},
// 一键解绑所有设备
// 一键解绑所有设备
unbindAll() {
this.$confirm('确定要解绑当前托盘下所有设备吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error'
}).then(() => {
// 创建loading实例
const loadingInstance = this.$loading({
lock: true,
text: '正在解绑所有设备...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
unbindAllDevice(this.fTrayId).then(res => {
// 关闭loading
loadingInstance.close();
if (res.code === 200) {
// 解绑成功后重置设备矩阵
this.devices = this.devices.map(d => ({
......@@ -656,8 +668,15 @@ export default {
} else {
this.$message.error("解绑失败");
}
})
}).catch(() => {});
}).catch(error => {
// 关闭loading
loadingInstance.close();
this.$message.error("解绑请求失败: " + error.message);
console.error("一键解绑失败:", error);
});
}).catch(() => {
// 用户点击取消,不做任何操作
});
},
// 绑定托盘
......
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