From faa3b0410410415c4ad788c7e0955ef97158df2e Mon Sep 17 00:00:00 2001
From: 严智鑫 <test>
Date: 星期四, 13 三月 2025 22:37:20 +0800
Subject: [PATCH] 贴膜机任务数据显示异常修改

---
 UI-Project/src/views/FlipSlice/flipSlice.vue |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/UI-Project/src/views/FlipSlice/flipSlice.vue b/UI-Project/src/views/FlipSlice/flipSlice.vue
index 78656d1..804ac8d 100644
--- a/UI-Project/src/views/FlipSlice/flipSlice.vue
+++ b/UI-Project/src/views/FlipSlice/flipSlice.vue
@@ -22,7 +22,12 @@
 const sendRecords = ref([]);
 const downLineTask = ref([]);
 
-const machineId = 26;//褰撳墠椤甸潰鐨勮澶嘔D
+const userInfo=JSON.parse(window.localStorage.getItem('userInfo'));
+const pageParams=userInfo.user.menus[0].pages[2].params;
+const pageParamsJson=JSON.parse(pageParams);
+const machineId = pageParamsJson.machineId;//褰撳墠椤甸潰鐨勮澶嘔D
+console.log(machineId);
+//const machineId = 26;//褰撳墠椤甸潰鐨勮澶嘔D
 var errorScanId;
 var errorOpen=false;
 //浣跨敤WebSocket鏂瑰紡灞曠ず鏁版嵁
@@ -33,9 +38,11 @@
 // 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
 const handleMessage = (data) => {
   // 鏇存柊 tableData 鐨勬暟鎹�
-  loadData.value = data.taskingList[0];
-  findMachine.value = data.machine[0];
-  sendRecords.value = data.sendRecords[0].reverse();
+  let dataJson = data[""+machineId][0];
+
+  loadData.value = dataJson.taskingList[0];
+  findMachine.value = dataJson.machine[0];
+  sendRecords.value = dataJson.sendRecords[0].reverse();
   if(findMachine.value.remark.toString()!=errorScanId&&findMachine.value.remark.toString()!=""&&findMachine.value.remark.toString()!=undefined){
     //鏈夋暟鎹氨寮圭獥 
     if(errorOpen){

--
Gitblit v1.8.0