From 66ad819bd2e08f900f6b6249e74c74e9c761e4a6 Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期五, 02 八月 2024 09:26:39 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes

---
 UI-Project/src/views/StockBasicData/stockBasicData.vue                                                                  |   17 +-
 UI-Project/src/views/UnLoadGlass/Landingindication.vue                                                                  |   20 +-
 UI-Project/src/views/Returns/returns.vue                                                                                |   75 ++++++++++
 UI-Project/src/views/Identify/identify.vue                                                                              |   22 +-
 UI-Project/src/views/StockBasicData/stockBasicDatatwo.vue                                                               |   16 +-
 UI-Project/src/views/Caching/cachingbefore.vue                                                                          |   13 +
 UI-Project/src/lang/zh.js                                                                                               |    1 
 UI-Project/src/views/ReportWork/reportWork.vue                                                                          |   16 +-
 UI-Project/src/views/UnLoadGlass/loadmachinerack.vue                                                                    |   13 +
 UI-Project/src/views/Caching/cachingun.vue                                                                              |   20 +-
 UI-Project/src/views/Slicecage/slicecage.vue                                                                            |   83 +++++++----
 hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/service/impl/TaskCacheServiceImpl.java |    2 
 UI-Project/src/views/GlassStorage/MaterialRackManagement.vue                                                            |   30 +---
 UI-Project/src/views/PurchaseReturn/purchaseStorage.vue                                                                 |   14 +
 UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue                                                               |   20 +-
 UI-Project/src/views/PurchaseReturn/purchaseReturn.vue                                                                  |   10 +
 UI-Project/src/views/largescreen/largescreen.vue                                                                        |   14 +
 17 files changed, 234 insertions(+), 152 deletions(-)

diff --git a/UI-Project/src/lang/zh.js b/UI-Project/src/lang/zh.js
index c04c3a4..d2c352b 100644
--- a/UI-Project/src/lang/zh.js
+++ b/UI-Project/src/lang/zh.js
@@ -219,6 +219,7 @@
         team:'鐝粍',
         basic:'璁惧',
         add:'纭淇濆瓨',
+        cancel:'鍙栨秷',
     },
     workOrder:{
         glassID:'鐜荤拑ID',
diff --git a/UI-Project/src/views/Caching/cachingbefore.vue b/UI-Project/src/views/Caching/cachingbefore.vue
index 6c9510b..e4c67f3 100644
--- a/UI-Project/src/views/Caching/cachingbefore.vue
+++ b/UI-Project/src/views/Caching/cachingbefore.vue
@@ -7,7 +7,7 @@
 import { WebSocketHost ,host} from '@/utils/constants'
 
 import request from "@/utils/request"
-import { ref, onMounted , onBeforeUnmount} from "vue";
+import { ref, onMounted , onBeforeUnmount,onUnmounted} from "vue";
 import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
 // import { ref } from 'vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
@@ -77,6 +77,7 @@
     console.error('鍙戠敓閿欒:', error);  
   }  
 };   
+let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`;
 // 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
 const handleMessage = (data) => {
@@ -92,11 +93,13 @@
 };
 // 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
 onMounted(() => {
-  // fetchFlowCardId();
-  // fetchTableData(); // 鑾峰彇鏁版嵁
-  initializeWebSocket(socketUrl, handleMessage);
+  socket = initializeWebSocket(socketUrl, handleMessage);
 });
-
+  onUnmounted(() => {
+    if (socket) {
+    closeWebSocket(socket);
+    }
+    });
 onBeforeUnmount(() => {
   console.log("鍏抽棴浜�")
   closeWebSocket();
diff --git a/UI-Project/src/views/Caching/cachingun.vue b/UI-Project/src/views/Caching/cachingun.vue
index a00f4ea..737c1de 100644
--- a/UI-Project/src/views/Caching/cachingun.vue
+++ b/UI-Project/src/views/Caching/cachingun.vue
@@ -60,7 +60,7 @@
 const adda = ref(false)
 import { WebSocketHost ,host} from '@/utils/constants'
 import request from "@/utils/request"
-import { ref, onMounted , onUnmounted} from "vue";
+import { ref, onMounted , onBeforeUnmount,onUnmounted} from "vue";
 import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
 // import { ref } from 'vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
@@ -204,7 +204,8 @@
 };
 
 
-let socket =null; 
+
+let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/downcache`;
 // 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
 const handleMessage = (data) => {
@@ -219,16 +220,17 @@
           })); 
 
 };
-// 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
 onMounted(() => {
-  // fetchFlowCardId();
-  // fetchTableData(); // 鑾峰彇鏁版嵁
-  socket =  initializeWebSocket(socketUrl, handleMessage);
+  socket = initializeWebSocket(socketUrl, handleMessage);
 });
-
-onUnmounted(() => {
+  onUnmounted(() => {
+    if (socket) {
+    closeWebSocket(socket);
+    }
+    });
+onBeforeUnmount(() => {
   console.log("鍏抽棴浜�")
-  closeWebSocket(socket);
+  closeWebSocket();
 });
 </script>
 <style scoped>
diff --git a/UI-Project/src/views/GlassStorage/MaterialRackManagement.vue b/UI-Project/src/views/GlassStorage/MaterialRackManagement.vue
index 433c2a3..c41ce56 100644
--- a/UI-Project/src/views/GlassStorage/MaterialRackManagement.vue
+++ b/UI-Project/src/views/GlassStorage/MaterialRackManagement.vue
@@ -393,9 +393,7 @@
   row.enableState = 1 - row.enableState; // Toggle between 0 and 1
   // 姝ゅ鍙互娣诲姞淇濆瓨鐘舵�佺殑閫昏緫锛屾瘮濡傝皟鐢� API 鏇存柊鏁版嵁
 };
-
 let socket = null;
-
 const socketUrl = `ws://${WebSocketHost}:${host}/api/glassStorage/api/talk/storageTask`;
 // 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
 const handleMessage = (data) => {
@@ -432,29 +430,19 @@
     // 鏇挎崲鍘熸潵鐨� createTime 瀛楁涓烘牸寮忓寲鍚庣殑鏃ユ湡鏃堕棿瀛楃涓�
     item.startTime = formattedDateTime;
   });
-
-
-
-
-
 };
-
 onMounted(() => {
-
- socket =  initializeWebSocket(socketUrl, handleMessage);
+  socket = initializeWebSocket(socketUrl, handleMessage);
 });
-
-
-onUnmounted(() => {
-      if (socket) {
-        closeWebSocket(socket);
-        socketStatus.value = 'closed';
-      }
+  onUnmounted(() => {
+    if (socket) {
+    closeWebSocket(socket);
+    }
     });
-// onBeforeUnmount(() => {
-//   console.log("鍏抽棴浜�");
-//   closeWebSocket();
-// });
+onBeforeUnmount(() => {
+  console.log("鍏抽棴浜�");
+  closeWebSocket();
+});
 
 const tasktableData = ref([]);
 
diff --git a/UI-Project/src/views/Identify/identify.vue b/UI-Project/src/views/Identify/identify.vue
index 3274205..5111448 100644
--- a/UI-Project/src/views/Identify/identify.vue
+++ b/UI-Project/src/views/Identify/identify.vue
@@ -41,7 +41,7 @@
 <script setup lang="ts">  
 import { Delete, Upload } from '@element-plus/icons-vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
-import { ref, onMounted, onBeforeUnmount } from 'vue';  
+import { ref, onMounted, onBeforeUnmount,onUnmounted } from 'vue';  
 import request from "@/utils/request"
 import { WebSocketHost ,host} from '@/utils/constants'
 import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
@@ -181,12 +181,13 @@
     }  
   });  
 }
+let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`;
 const handleMessage = (data) => {
   // adjustedRects.value = data.currentCutTerritory[0]
   adjustedRects.value = data.currentCutTerritory[0].map(rect => ({  
-        ...rect, // 澶嶅埗鍘熷瀵硅薄鐨勫叾浠栧睘鎬�  
-        x_axis: (rect.x_axis*100) * 0.003, // 灏唜鍊奸櫎浠�3  
+        ...rect,
+        x_axis: (rect.x_axis*100) * 0.003,
         y_axis: (rect.y_axis*100) * 0.003,
         width: (rect.width*100) * 0.002 ,
         widtha: rect.width ,
@@ -194,18 +195,15 @@
         height:( rect.height*100) * 0.002 ,
         glass_state: rect.glass_state
       }));  
- // console.log("鏇存柊鍚庢暟鎹�", tableData);
-
 };
-
-// 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
-
 onMounted(() => {
-  // fetchFlowCardId();
-  // fetchTableData(); // 鑾峰彇鏁版嵁
-  initializeWebSocket(socketUrl, handleMessage);
+  socket = initializeWebSocket(socketUrl, handleMessage);
 });
-
+  onUnmounted(() => {
+    if (socket) {
+    closeWebSocket(socket);
+    }
+    });
 onBeforeUnmount(() => {
   console.log("鍏抽棴浜�")
   closeWebSocket();
diff --git a/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue b/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
index 3ab4e62..f0b25de 100644
--- a/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
+++ b/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
@@ -3,7 +3,7 @@
 import {reactive} from "vue";
 import {useRouter} from "vue-router"
 import request from "@/utils/request"
-import { ref, onMounted, onBeforeUnmount } from 'vue';  
+import { ref, onMounted, onBeforeUnmount,onUnmounted } from 'vue';  
 import { WebSocketHost ,host} from '@/utils/constants'
 import { ElMessage, ElMessageBox } from 'element-plus'
 import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
@@ -22,6 +22,7 @@
 const adjustedRectsb = ref([]);
 const currentGlassId = ref(null);
 const currenttemperingFeedSequence = ref(null);
+let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`;
 const handleMessage = (data) => {
 // 杩涚倝涓�
@@ -205,8 +206,13 @@
       }
 };
 onMounted(() => {
-  initializeWebSocket(socketUrl, handleMessage);
+  socket = initializeWebSocket(socketUrl, handleMessage);
 });
+  onUnmounted(() => {
+    if (socket) {
+    closeWebSocket(socket);
+    }
+    });
 function updateRectColors() {  
   adjustedRectsa.value.forEach(rect => {  
     if (rect.glassId === glassId) {  
diff --git a/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue b/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
index 8bd571d..5164c6a 100644
--- a/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
+++ b/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
@@ -5,7 +5,7 @@
 import { ElMessage, ElMessageBox } from 'element-plus'
 import request from "@/utils/request"
 
-import { ref, onMounted, onBeforeUnmount } from 'vue';  
+import { ref, onMounted, onBeforeUnmount,onUnmounted } from 'vue';  
 import { WebSocketHost ,host} from '@/utils/constants'
 import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
 const adjustedRects = ref([]);
@@ -29,7 +29,7 @@
     }
   }
 }
-
+let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`; 
 // 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
 const handleMessage = (data) => {
@@ -117,11 +117,13 @@
   }
 }
 onMounted(() => {
-  // fetchFlowCardId();
-  // fetchTableData(); // 鑾峰彇鏁版嵁
-  initializeWebSocket(socketUrl, handleMessage);
+  socket = initializeWebSocket(socketUrl, handleMessage);
 });
-
+  onUnmounted(() => {
+    if (socket) {
+    closeWebSocket(socket);
+    }
+    });
 onBeforeUnmount(() => {
   console.log("鍏抽棴浜�")
   closeWebSocket();
diff --git a/UI-Project/src/views/ReportWork/reportWork.vue b/UI-Project/src/views/ReportWork/reportWork.vue
index d1bfcfe..67b04ab 100644
--- a/UI-Project/src/views/ReportWork/reportWork.vue
+++ b/UI-Project/src/views/ReportWork/reportWork.vue
@@ -224,6 +224,7 @@
   inputValuesb[rowId] = value;  
 };
 fetchTableData();  
+let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/screen`;
 const handleMessage = (data) => {
   // adjustedRects.value = data.device[0].map(rect => ({  
@@ -233,7 +234,7 @@
   //       thisProcess: rect.thisProcess,
   //     })); 
 };
-let socket;
+// let socket;
 onMounted(() => {
   socket = new WebSocket(socketUrl);
   socket.onmessage = (event) => {
@@ -243,19 +244,18 @@
   };
   // };  
 });
-
-
-
-
 onUnmounted(() => {
   socket.close();
 });
-
 onMounted(() => {
-  // fetchFlowCardId();
   fetchTableData();
-  initializeWebSocket(socketUrl, handleMessage);
+  socket = initializeWebSocket(socketUrl, handleMessage);
 });
+  onUnmounted(() => {
+    if (socket) {
+    closeWebSocket(socket);
+    }
+    });
 onBeforeUnmount(() => {
   console.log("鍏抽棴浜�")
   closeWebSocket();
diff --git a/UI-Project/src/views/Returns/returns.vue b/UI-Project/src/views/Returns/returns.vue
index 3c14673..5824545 100644
--- a/UI-Project/src/views/Returns/returns.vue
+++ b/UI-Project/src/views/Returns/returns.vue
@@ -17,6 +17,8 @@
 const flakea = ref(false)
 const flakeb = ref(false)
 const flakec = ref(false)
+const dialoglea = ref(false)
+const tableDatax = ref([])
 const user = ref('');
 const projectNo = ref('');
 const workstationId = ref('');
@@ -89,13 +91,50 @@
     // ElMessage.error('鑾峰彇琛ㄦ牸鏁版嵁澶辫触锛岃閲嶈瘯');
   }
 };
-onMounted(() => {  
+const handlezhiban = () => {
+  dialoglea.value = true; // 鎵撳紑缁戝畾鏋跺瓙瀵硅瘽妗�
+  fetchFlowCardId(); 
+};
+// 鍊肩彮淇℃伅
+const fetchFlowCardId = async () => {
+  try  {
+    const response = await request.post('/loadGlass/work_assignment/selectWorkAssignment',{
+      line: 2001,
+      workingProcedure : '鍐峰姞宸�'
+    })
+    if (response.code == 200) {
+      ElMessage.success(response.message);
+      tableDatax.value = response.data;
+      console.log(tableDatax.value);
+      console
+    } else {
+      ElMessage.error(response.message);
+    }
+}
+catch (error) {
+    // 澶勭悊閿欒
+    console.error(error);
+  }
+}
+const handleConfirmb = async () => {
+  const response = await request.post("/loadGlass/work_assignment/updateWorkAssignment", tableDatax.value)
+  if (response.code === 200) {
+    ElMessage.success(response.message);
+    dialoglea.value = false;
+  } else {
+    ElMessage.error(response.message);
+  }
+};
+onMounted(() => {
   list('');  
   fetchOptions('');
-  initializeWebSocket(socketUrl, handleMessage);
+  socket = initializeWebSocket(socketUrl, handleMessage);
 });
-onMounted(() => {  
-}); 
+  onUnmounted(() => {
+    if (socket) {
+    closeWebSocket(socket);
+    }
+    });
 const list = async () => {  
   try {  
     const response = await request.get('/loadGlass/LoadGlass/list');  
@@ -152,6 +191,7 @@
 const titleSelectJsona = ref({
   processTypea: [],
 })
+let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlass`;
 // 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
 const handleMessage = (data) => {
@@ -654,6 +694,7 @@
     <el-button style="margin-top: 5px;margin-left: 15px;"   id="searchButton" type="primary" @click="dialogFormVisible = true">{{ $t('basicData.selectproject') }}</el-button>
     <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="primary" @click="handleBind">{{ $t('basicData.startloading') }}</el-button>
     <el-button style="margin-top: 5px;margin-left: 20px;"  id="searchButton" type="warning" @click="handleBinda">{{ $t('basicData.stop') }}</el-button>
+    <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="info" @click="handlezhiban">{{ $t('searchOrder.dutyinformation') }}</el-button>
     <!-- <el-button style="margin-top: 5px;margin-left: 20px;"  id="searchButton" type="danger" @click="handleBindb">鍋滄浠诲姟</el-button> -->
     
     <el-card style="flex: 1;margin-left: 10px;margin-top: 15px;" v-loading="loading">
@@ -715,6 +756,32 @@
       </div>
     </template>
   </el-dialog>
+  
+<el-dialog v-model="dialoglea" top="15vh" width="70%" :title="$t('searchOrder.dutyinformation')">
+    <el-table  ref="table" style="margin-top: 20px;height: 300px;"
+        :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
+          <el-table-column prop="line" fixed align="center" :label="$t('searchOrder.line')"/>
+          <el-table-column prop="workProcesses" fixed align="center" :label="$t('searchOrder.process')" />
+          <el-table-column prop="teamsGroupsName" align="center" :label="$t('searchOrder.team')">
+        <template #default="{ row }">  
+          <el-input v-model="row.teamsGroupsName" autocomplete="off" min-width="150"/>  
+        </template>  
+      </el-table-column>
+          <el-table-column prop="deviceName" align="center" :label="$t('searchOrder.basic')">
+            <template #default="{ row }">  
+          <el-input v-model="row.deviceName" autocomplete="off" min-width="150"/>  
+        </template>
+        </el-table-column>
+        </el-table>
+        <template #footer>
+      <div id="dialog-footer">
+        <el-button type="primary" @click="handleConfirm">
+          {{ $t('searchOrder.add') }}
+        </el-button>
+        <el-button @click="dialoglea = false">{{ $t('searchOrder.cancel') }}</el-button>
+      </div>
+    </template>
+</el-dialog>
   <el-dialog v-model="blinda" top="30vh" width="25%" :title="$t('basicData.whetherpause')">
     <template #footer>
       <div id="dialog-footer">
diff --git a/UI-Project/src/views/Slicecage/slicecage.vue b/UI-Project/src/views/Slicecage/slicecage.vue
index f52ad85..4ed89ea 100644
--- a/UI-Project/src/views/Slicecage/slicecage.vue
+++ b/UI-Project/src/views/Slicecage/slicecage.vue
@@ -7,7 +7,7 @@
 const router = useRouter()
 import request from "@/utils/request"
 import { WebSocketHost ,host} from '@/utils/constants'
-import { ref, onMounted , onBeforeUnmount, reactive, computed } from "vue";
+import { ref, onMounted , onBeforeUnmount, reactive, computed,onUnmounted } from "vue";
 import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
 import { ElMessage, ElMessageBox } from 'element-plus'
 import { tr } from "element-plus/es/locale";
@@ -23,7 +23,7 @@
 const tableDatad = ref([])
 const tableDataf = ref([])
 const tableDatae = ref([])
-const tableDataxx = ref([])
+const tableDatax = ref([])
 const carPosition = ref([])
 const ganghua = ref('')
 const adjustedRects = ref([]);
@@ -39,6 +39,8 @@
 const adjustedRectsg = ref([]);
 const adjustedRectsh = ref([]);
 const currentRow = reactive({}); // 褰撳墠琛岀殑鏁版嵁 
+const inputValuesa = reactive({});
+
 const add = ref(false)
 const flowCardId = ref('');
 const gap = ref('');
@@ -180,10 +182,8 @@
     });
     setInterval(() => {  
     localStorage.clear(); // 娓呴櫎鎵�鏈塴ocalStorage鏁版嵁  
-    console.log(11111);
 }, 60000);
 //  function cleanUp() {
-//     console.log('鎵ц娓呯悊鎿嶄綔');  
 // }
 // // 鍋囪鎴戜滑姣�2鍒嗛挓鎵ц涓�娆℃竻鐞�  
 // setInterval(cleanUp, 1 * 60 * 1000);
@@ -232,10 +232,7 @@
 // 鏄惁绂佺敤
 const toggleEnableState = async (row) => {
   const newState = row.enableState === 1 ? 0 : 1;  
-  console.log(row.slot);
-  console.log(row.enableState);
   var url="/cacheVerticalGlass/bigStorageCage/updateStorageCageDisabled?slot="+row.slot + "&enableState=" + newState;
-      console.log(url);
       const response = await request.get(url) 
   if (response.code === 200) {
       ElMessage.success(response.message);
@@ -513,28 +510,36 @@
   }  
 }; 
 const handlezhiban = () => {
-  fetchFlowCardId(); 
   dialoglea.value = true; // 鎵撳紑缁戝畾鏋跺瓙瀵硅瘽妗�
+  fetchFlowCardId(); 
 };
 const fetchFlowCardId = async () => {
-  try {
-    // var url="/cacheVerticalGlass/work_assignment/selectWorkAssignment?line=" + 2001 + "&workingProcedure='鍐峰姞宸�'";
-    // const response = await request.post(url)
+  try  {
     const response = await request.post('/cacheVerticalGlass/work_assignment/selectWorkAssignment',{
       line: 2001,
       workingProcedure : '鍐峰姞宸�'
-    });
-    if (response.code === 200) {
-      ElMessage.error(response.message);
-      tableDataxx.value = response.data;
-      console.log(tableDataxx.value);
-      
-}
- else {
+    })
+    if (response.code == 200) {
+      ElMessage.success(response.message);
+      tableDatax.value = response.data;
+      console.log(tableDatax.value);
+      console
+    } else {
       ElMessage.error(response.message);
     }
-  } catch (error) {
+}
+catch (error) {
+    // 澶勭悊閿欒
     console.error(error);
+  }
+}
+const handleConfirm = async () => {
+  const response = await request.post("/cacheVerticalGlass/work_assignment/updateWorkAssignment", tableDatax.value)
+  if (response.code === 200) {
+    ElMessage.success(response.message);
+    dialoglea.value = false;
+  } else {
+    ElMessage.error(response.message);
   }
 };
 function handleRowClick(row) {  
@@ -561,11 +566,11 @@
     console.error(error);
   }
 }
+let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/slicecage`;
 // 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
 const handleMessage = (data) => {
   // 鏇存柊 tableData 鐨勬暟鎹�
-  console.log(data.temperingSwitch[0]);
   if(data.bigStorageCageDetailsOutTask!=null){
     tableDatac.value = data.bigStorageCageDetailsOutTask[0]
     adjusta.value = data.bigStorageCageDetailsOutTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined);
@@ -612,7 +617,6 @@
 }else{
   ganghua.value = ''
   }
-console.log(data.temperingSwitch[0]);
   if(data.bigStorageCageInfos!=null){
     window.localStorage.setItem('length', data.bigStorageCageInfos[0][1].length)
   let length = window.localStorage.getItem('length')
@@ -670,9 +674,14 @@
 // 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
 onMounted(() => {
   // fetchFlowCardId();
-  initializeWebSocket(socketUrl, handleMessage);
- 
+  // initializeWebSocket(socketUrl, handleMessage);
+  socket = initializeWebSocket(socketUrl, handleMessage);
 });
+  onUnmounted(() => {
+    if (socket) {
+    closeWebSocket(socket);
+    }
+    });
 function getStatusType(enableState: number) {  
   switch (enableState) {  
     case 100:
@@ -724,7 +733,7 @@
   }  
 }
 onBeforeUnmount(() => {
-  console.log("鍏抽棴浜�")
+  // console.log("鍏抽棴浜�")
   closeWebSocket();
 });
 </script>
@@ -1371,20 +1380,28 @@
         </el-table-column>
         </el-table>
 </el-dialog>
-<el-dialog v-model="dialoglea" top="5vh" width="85%" :title="$t('searchOrder.dutyinformation')">
-    <el-table  ref="table" style="margin-top: 20px;height: 400px;"
-        :data="tableDataxx" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
-          <el-table-column prop="line" fixed align="center" :label="$t('searchOrder.line')" min-width="150"/>
-          <el-table-column prop="workProcesses" fixed align="center" :label="$t('searchOrder.process')" min-width="120" />
-          <el-table-column prop="teamsGroupsName" align="center" :label="$t('searchOrder.team')" min-width="150" />
-          <el-table-column prop="deviceName" align="center" :label="$t('searchOrder.basic')" min-width="150" />
+<el-dialog v-model="dialoglea" top="15vh" width="70%" :title="$t('searchOrder.dutyinformation')">
+    <el-table  ref="table" style="margin-top: 20px;height: 300px;"
+        :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
+          <el-table-column prop="line" fixed align="center" :label="$t('searchOrder.line')"/>
+          <el-table-column prop="workProcesses" fixed align="center" :label="$t('searchOrder.process')" />
+          <el-table-column prop="teamsGroupsName" align="center" :label="$t('searchOrder.team')">
+        <template #default="{ row }">  
+          <el-input v-model="row.teamsGroupsName" autocomplete="off" min-width="150"/>  
+        </template>  
+      </el-table-column>
+          <el-table-column prop="deviceName" align="center" :label="$t('searchOrder.basic')">
+            <template #default="{ row }">  
+          <el-input v-model="row.deviceName" autocomplete="off" min-width="150"/>  
+        </template>
+        </el-table-column>
         </el-table>
         <template #footer>
       <div id="dialog-footer">
         <el-button type="primary" @click="handleConfirm">
           {{ $t('searchOrder.add') }}
         </el-button>
-        <el-button @click="dialoglea = false">{{ $t('basicData.cancel') }}</el-button>
+        <el-button @click="dialoglea = false">{{ $t('searchOrder.cancel') }}</el-button>
       </div>
     </template>
 </el-dialog>
diff --git a/UI-Project/src/views/StockBasicData/stockBasicData.vue b/UI-Project/src/views/StockBasicData/stockBasicData.vue
index 8b0da31..5135e96 100644
--- a/UI-Project/src/views/StockBasicData/stockBasicData.vue
+++ b/UI-Project/src/views/StockBasicData/stockBasicData.vue
@@ -6,7 +6,7 @@
 const adda = ref(false)
 import { WebSocketHost ,host} from '@/utils/constants'
 import request from "@/utils/request"
-import { ref, onMounted , onBeforeUnmount} from "vue";
+import { ref, onMounted , onBeforeUnmount,onUnmounted} from "vue";
 import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
 // import { ref } from 'vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
@@ -100,26 +100,26 @@
     console.error('鍙戠敓閿欒:', error);  
   }  
 };   
-
+let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`;
 // 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
 const handleMessage = (data) => {
   // 鏇存柊 tableData 鐨勬暟鎹�
   tableData.value = data.EdgTasks1[0]
 };
-// 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
 onMounted(() => {
-  // fetchFlowCardId();
-  // fetchTableData(); // 鑾峰彇鏁版嵁
-  initializeWebSocket(socketUrl, handleMessage);
+  socket = initializeWebSocket(socketUrl, handleMessage);
 });
-
+  onUnmounted(() => {
+    if (socket) {
+    closeWebSocket(socket);
+    }
+    });
 onBeforeUnmount(() => {
   console.log("鍏抽棴浜�")
   closeWebSocket();
 });
 </script>
-
 <template>
   <div>
     <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
@@ -147,7 +147,6 @@
 </template>
 
 <style scoped>
-
 #dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
 #dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
 #dialog-footer{
diff --git a/UI-Project/src/views/StockBasicData/stockBasicDatatwo.vue b/UI-Project/src/views/StockBasicData/stockBasicDatatwo.vue
index 8775761..57e6567 100644
--- a/UI-Project/src/views/StockBasicData/stockBasicDatatwo.vue
+++ b/UI-Project/src/views/StockBasicData/stockBasicDatatwo.vue
@@ -6,7 +6,7 @@
 const adda = ref(false)
 import { WebSocketHost ,host} from '@/utils/constants'
 import request from "@/utils/request"
-import { ref, onMounted , onBeforeUnmount} from "vue";
+import { ref, onMounted , onBeforeUnmount,onUnmounted} from "vue";
 import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
 // import { ref } from 'vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
@@ -100,21 +100,21 @@
     console.error('鍙戠敓閿欒:', error);  
   }  
 };   
-
-
+let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`;
 // 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
 const handleMessage = (data) => {
   // 鏇存柊 tableData 鐨勬暟鎹�
   tableData.value = data.EdgTasks2[0]
 };
-// 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
 onMounted(() => {
-  // fetchFlowCardId();
-  // fetchTableData(); // 鑾峰彇鏁版嵁
-  initializeWebSocket(socketUrl, handleMessage);
+  socket = initializeWebSocket(socketUrl, handleMessage);
 });
-
+  onUnmounted(() => {
+    if (socket) {
+    closeWebSocket(socket);
+    }
+    });
 onBeforeUnmount(() => {
   console.log("鍏抽棴浜�")
   closeWebSocket();
diff --git a/UI-Project/src/views/UnLoadGlass/Landingindication.vue b/UI-Project/src/views/UnLoadGlass/Landingindication.vue
index 0178914..06aa4d0 100644
--- a/UI-Project/src/views/UnLoadGlass/Landingindication.vue
+++ b/UI-Project/src/views/UnLoadGlass/Landingindication.vue
@@ -39,7 +39,7 @@
   let language = ref(localStorage.getItem('lang') || 'zh')
 import Swal from 'sweetalert2'
 import request from "@/utils/request";
-import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
+import { initializeWebSocket,closeWebSocket } from '@/utils/WebSocketService';
  import { WebSocketHost } from '@/utils/constants';
 const racks = ref([
   { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456',downGlassInfoList:"" } },
@@ -116,7 +116,7 @@
     console.error(error);
   }
 };
-let  socket = null;
+let socket = null;
 const socketUrl = `ws://${WebSocketHost}:8085/api/talk/unloadglass2`;
 //const socketUrl = `ws://${WebSocketHost}:88/api/unLoadGlass/api/talk/unloadglass2`;
 // 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
@@ -147,21 +147,15 @@
   }
 });
 };
-
-// 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
-
 onMounted(() => {
   fetchFlowCardId(); // 鑾峰彇鏁版嵁
   socket = initializeWebSocket(socketUrl, handleMessage);
 });
-
-onUnmounted(() => {
-  console.log("鍏抽棴浜�")
-  closeWebSocket(socket);
-});
-
-
-
+  onUnmounted(() => {
+    if (socket) {
+    closeWebSocket(socket);
+    }
+    });
 const showCustomAlert = (downGlassInfoList) => {
   let tableContent = '<table border="1" style="border-collapse: collapse; width: 100%;">';
   tableContent += '<tr><th style="background-color: #f2f2f2;">鐜荤拑ID</th><th style="background-color: #f2f2f2;">鑶滅郴</th><th style="background-color: #f2f2f2;">鍘氬害</th><th style="background-color: #f2f2f2;">瀹藉害</th><th style="background-color: #f2f2f2;">楂樺害</th></tr>';
diff --git a/UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue b/UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue
index 6dd2afd..9d4fb7a 100644
--- a/UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue
+++ b/UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue
@@ -39,7 +39,7 @@
   let language = ref(localStorage.getItem('lang') || 'zh')
 import Swal from 'sweetalert2'
 import request from "@/utils/request";
-import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
+import { initializeWebSocket,closeWebSocket } from '@/utils/WebSocketService';
 import { WebSocketHost ,host} from '@/utils/constants'
 const racks = ref([
   { x: 50, y: 100, height: 100, width: 60, fillColor: '#6a6da9', item: { height: 90, width: 10, fillColor: 'yellow', content: 'NG123456' } },
@@ -114,7 +114,8 @@
     console.error(error);
   }
 };
-let socket =null; 
+
+let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/unloadglass3`;
 // 瀹氫箟娑堟伅澶勭悊鍑芥暟锛屾洿鏂� receivedData 鍙橀噺
 const handleMessage = (data) => {
@@ -143,18 +144,15 @@
   }
 });
 };
-
-// 鍒濆鍖� WebSocket锛屽苟浼犻�掓秷鎭鐞嗗嚱鏁�
-
 onMounted(() => {
   fetchFlowCardId(); // 鑾峰彇鏁版嵁
-  socket =  initializeWebSocket(socketUrl, handleMessage);
+  socket = initializeWebSocket(socketUrl, handleMessage);
 });
-onUnmounted(() => {
-  console.log("鍏抽棴浜�")
-  closeWebSocket(socket);
-});
-
+  onUnmounted(() => {
+    if (socket) {
+    closeWebSocket(socket);
+    }
+    });
 const showCustomAlert = (downGlassInfoList) => {
   let tableContent = '<table border="1" style="border-collapse: collapse; width: 100%;">';
   tableContent += '<tr><th style="background-color: #f2f2f2;">鐜荤拑ID</th><th style="background-color: #f2f2f2;">鑶滅郴</th><th style="background-color: #f2f2f2;">鍘氬害</th><th style="background-color: #f2f2f2;">瀹藉害</th><th style="background-color: #f2f2f2;">楂樺害</th></tr>';
diff --git a/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue b/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
index b4a6ce1..c0fbde6 100644
--- a/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
+++ b/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
@@ -1,6 +1,6 @@
 <script setup>
 import {Search} from "@element-plus/icons-vue";
-import {reactive, onMounted, onUnmounted} from "vue";
+import {reactive, onMounted, onBeforeUnmount,onUnmounted} from "vue";
 import {useRouter} from "vue-router"
 const router = useRouter()
 import { useI18n } from 'vue-i18n'
@@ -151,11 +151,16 @@
 onMounted(() => {
   fetchFlowCardId();
   fetchTableData(); // 鑾峰彇鏁版嵁
-  socket =  initializeWebSocket(socketUrl, handleMessage);
+  socket = initializeWebSocket(socketUrl, handleMessage);
 });
-onUnmounted(() => {
+  onUnmounted(() => {
+    if (socket) {
+    closeWebSocket(socket);
+    }
+    });
+onBeforeUnmount(() => {
   console.log("鍏抽棴浜�")
-  closeWebSocket(socket);
+  closeWebSocket();
 });
 
 
diff --git a/UI-Project/src/views/largescreen/largescreen.vue b/UI-Project/src/views/largescreen/largescreen.vue
index 7c3603a..fb2ab1a 100644
--- a/UI-Project/src/views/largescreen/largescreen.vue
+++ b/UI-Project/src/views/largescreen/largescreen.vue
@@ -147,6 +147,7 @@
   return t('large.allstatus');
 }  
 }  
+let socket = null;
 const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/screen`;
 const handleMessage = (data) => {
 tableData.value = data.awaitingRepairs[0]
@@ -159,7 +160,7 @@
 //       thisProcess: rect.thisProcess,
 //     })); 
 };
-let socket;
+// let socket;
 // 璁剧疆鍥捐〃 DOM 寮曠敤  
 function setChartDom(index, el) {  
 if (!chartRefs.value[index]) {  
@@ -232,13 +233,14 @@
 onUnmounted(() => {  
 socket.close();  
 });  
-
 onMounted(() => {
-// fetchFlowCardId();
-// fetchTableData(); // 鑾峰彇鏁版嵁
-initializeWebSocket(socketUrl, handleMessage);
-
+  socket = initializeWebSocket(socketUrl, handleMessage);
 });
+  onUnmounted(() => {
+    if (socket) {
+    closeWebSocket(socket);
+    }
+    });
 onBeforeUnmount(() => {
 console.log("鍏抽棴浜�")
 closeWebSocket();
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/service/impl/TaskCacheServiceImpl.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/service/impl/TaskCacheServiceImpl.java
index 7fff8e4..0287e4b 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/service/impl/TaskCacheServiceImpl.java
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/service/impl/TaskCacheServiceImpl.java
@@ -78,7 +78,7 @@
                             .eq(EdgStorageCageDetails::getGlassId, GlassInfo::getGlassId)
                             .eq(EdgStorageCageDetails::getEngineerId, GlassInfo::getEngineerId))
                     .eq(GlassInfo::getGlassId,taskCache1.getGlassId())
-                    .eq(EdgStorageCageDetails::getState,Const.GLASS_STATE_IN)
+                    .eq(EdgStorageCageDetails::getState,Const.GLASS_STATE_OUT)
             );
             if(glassInfos.size()==1){
                 GlassInfo glassInfo=glassInfos.get(0);

--
Gitblit v1.8.0