From 2eeda76d44d82438210e195fd5ebc0deeee29092 Mon Sep 17 00:00:00 2001
From: hwh <332078369@qq.com>
Date: 星期四, 26 九月 2024 10:30:56 +0800
Subject: [PATCH] `

---
 Web/src/views/device/sortPallet/index.vue |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/Web/src/views/device/sortPallet/index.vue b/Web/src/views/device/sortPallet/index.vue
index 1a8c905..d73c05a 100644
--- a/Web/src/views/device/sortPallet/index.vue
+++ b/Web/src/views/device/sortPallet/index.vue
@@ -109,10 +109,25 @@
 </template>
   
 <script lang="ts" setup>
-import { ref } from 'vue';
+import { ref, onMounted  } from 'vue';
 import { GetWcsPackPlcList,GetWcsPackStationPlcList,BindTaskForPLC,CloseTaskForPLC } from '/@/api/wcs/wcsDevice';
 import { pageWcsOderTask } from '/@/api/device/wcsOderTask';
 import { ElMessageBox,ElMessage } from 'element-plus';
+import { signalR,stopConnection } from './signalR';
+//杩炴帴signalR 鐩戝惉鍙樻洿
+onMounted(async () => {
+    signalR.off('PublicCheckTask');
+    signalR.on('PublicCheckTask', (data: any) => {
+        //todo 闇�瑕佹祴璇�
+        // if (data.type == 0) {
+            
+        // }
+        var index = devicePointData.value.findIndex(s => s.id == data.id);
+        if (index !== -1) {
+            devicePointData.value.splice(index, 1, data);
+        }
+    });
+});
 
 //璁惧鏁版嵁
 const deviceList=ref<any>([]);

--
Gitblit v1.8.0