| | |
| | | <div id="longa" v-show="dalipiana"></div> |
| | | <div id="longb" v-show="dalipianb"></div> |
| | | <div id="shangpianji" v-show="shangpian"></div> |
| | | <!-- <div id="shangpianji" v-show="xiapian"></div> |
| | | <div id="shangpianji" v-show="shangpian"></div> |
| | | <div id="shangpianji" v-show="shangpian"></div> |
| | | <div id="shangpianji" v-show="shangpian"></div> |
| | | <div id="shangpianji" v-show="shangpian"></div> |
| | | <div id="shangpianji" v-show="shangpian"></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" |
| | |
| | | let socket3 = null; |
| | | let socket4 = null; |
| | | let socket5 = null; |
| | | let socket6 = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/screen`; |
| | | const handleMessage = (data) => { |
| | | tableData.value = data.awaitingRepairs[0] |
| | |
| | | const socketUrl3 = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlassIsRun`; |
| | | const handleMessage3 = (data) => { |
| | | const tasks = data.taskCaches[0]; |
| | | woshia.value = tasks.some(task => task.endCell == 2001 && task.glassId == 0); |
| | | woshic.value = tasks.some(task => task.endCell == 2002 && task.glassId == 0); |
| | | woshia.value = tasks.some(task => task.line == 2001); |
| | | woshic.value = tasks.some(task => task.line == 2002); |
| | | console.log(tasks); |
| | | |
| | | }; |
| | | // 大理片笼 |
| | | const socketUrl4 = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/isRun`; |
| | |
| | | if(data.engineering.length !==0 ){ |
| | | shangpian.value = true; |
| | | } |
| | | }; |
| | | // 下片 |
| | | const socketUrl6 = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/unLoadGlassIsRun`; |
| | | const handleMessage6 = (data) => { |
| | | // if(data.engineering.length !==0 ){ |
| | | // shangpian.value = true; |
| | | // } |
| | | }; |
| | | const renderPieCharts = () => { |
| | | processesData.value.forEach((data, index) => { |
| | |
| | | socket3 = initializeWebSocket(socketUrl3, handleMessage3); |
| | | socket4 = initializeWebSocket(socketUrl4, handleMessage4); |
| | | socket5 = initializeWebSocket(socketUrl5, handleMessage5); |
| | | socket6 = initializeWebSocket(socketUrl6, handleMessage6); |
| | | }); |
| | | onUnmounted(() => { |
| | | if (socket) { |
| | |
| | | if (socket5) { |
| | | closeWebSocket5(socket5); |
| | | } |
| | | if (socket6) { |
| | | closeWebSocket6(socket6); |
| | | } |
| | | }); |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | |
| | | closeWebSocket3(); |
| | | closeWebSocket4(); |
| | | closeWebSocket5(); |
| | | closeWebSocket6(); |
| | | }); |
| | | </script> |
| | | |