From 9887fc7be1578f465eee608e55b65097fa417d4c Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期二, 06 八月 2024 14:38:10 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes

---
 UI-Project/src/views/largescreen/largescreen.vue |   73 ++++++++++++++++++++++++++++++------
 1 files changed, 61 insertions(+), 12 deletions(-)

diff --git a/UI-Project/src/views/largescreen/largescreen.vue b/UI-Project/src/views/largescreen/largescreen.vue
index 7c3603a..3e133db 100644
--- a/UI-Project/src/views/largescreen/largescreen.vue
+++ b/UI-Project/src/views/largescreen/largescreen.vue
@@ -25,8 +25,12 @@
       </el-table-column>
       </el-table>
 </div> 
-<div id="center" style="margin-top: 10px;margin-left: 10px; height: 240px;width: 750px;">
+<div id="parent" style="margin-top: 10px;margin-left: 10px; height: 240px;width: 750px;">
   <img src="../../assets/d1a.png" alt="" style="margin-left: -10px; width: 100%;height: 100%;position: relative;"> 
+  <div id="overlay" v-show="flake"></div>
+  <div id="overlayb" v-show="flakeb"></div>
+  <div id="overlayc" v-show="flakec"></div>
+  <div id="overlayd" v-show="flaked"></div>
 </div>
 <div id="centerright" style="margin-top: 10px;margin-left: 10px; height: 240px;width: 240px;background-color: #911005;">
   <el-table height="240" ref="table" width="340px"
@@ -116,6 +120,10 @@
 const tableDatac = ref([])
 const adjustedRects = ref([]);  
 const chartRefs = ref([]);  
+const flake = ref(true)
+const flakeb = ref(true)
+const flakec = ref(true)
+const flaked = ref(true)
 const thisProcess = ref(); // 鐢ㄤ簬瀛樺偍process_id鐨勫搷搴斿紡寮曠敤 
 // 瀹氫箟涓�涓搷搴斿紡寮曠敤鏉ュ瓨鍌ㄥ浘琛ㄥ疄渚�    
 const chartDom = ref(null);  
@@ -147,6 +155,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 +168,7 @@
 //       thisProcess: rect.thisProcess,
 //     })); 
 };
-let socket;
+// let socket;
 // 璁剧疆鍥捐〃 DOM 寮曠敤  
 function setChartDom(index, el) {  
 if (!chartRefs.value[index]) {  
@@ -168,8 +177,11 @@
   chartRefs.value[index].dom = el;  
 }  
 } 
+const socketUrl2 = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingIsRun`;
+
 onMounted(() => {  
 socket = new WebSocket(socketUrl);  
+socket = new WebSocket(socketUrl2);  
 socket.onmessage = (event) => {  
   const data = JSON.parse(event.data);  
   processesData.value = data.device[0].map(rect => ({  
@@ -232,13 +244,14 @@
 onUnmounted(() => {  
 socket.close();  
 });  
-
 onMounted(() => {
-// fetchFlowCardId();
-// fetchTableData(); // 鑾峰彇鏁版嵁
-initializeWebSocket(socketUrl, handleMessage);
-
+  socket = initializeWebSocket(socketUrl, handleMessage);
 });
+  onUnmounted(() => {
+    if (socket) {
+    closeWebSocket(socket);
+    }
+    });
 onBeforeUnmount(() => {
 console.log("鍏抽棴浜�")
 closeWebSocket();
@@ -246,23 +259,59 @@
 </script>  
 
 <style scoped>  
-
-
-
 .echarts-container {
 display: flex;
 flex-wrap: wrap;
 gap: 20px;
 }
-
 .echarts-item {
 width: 150px;
 height: 150px;
 margin: 20px;
 }
-
 .pie-chart {
 width: 100%;
 height: 100%;
 }
+#parent{
+  position: relative;
+  width: 1500px;
+  margin-left: -300px
+}
+#overlay{
+  position: absolute;
+  z-index: 1;
+  width: 30px;
+  height: 10px;
+  background-color: #529b2e;
+  margin-top: -39px;
+  margin-left: 4px;
+}
+#overlayb{
+  position: absolute;
+  z-index: 1;
+  width: 16px;
+  height: 115px;
+  background-color: #529b2e;
+  margin-top: -197px;
+  margin-left: 9px;
+}
+#overlayc{
+  position: absolute;
+  z-index: 1;
+  width: 16px;
+  height: 16px;
+  background-color: #529b2e;
+  margin-top: -238px;
+  margin-left: 9px;
+}
+#overlayd{
+  position: absolute;
+  z-index: 1;
+  width: 28px;
+  height: 11px;
+  background-color: #529b2e;
+  margin-top: -234px;
+  margin-left: 56px;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0