| | |
| | | const tableData = ref([]) |
| | | const slot = ref('') |
| | | |
| | | |
| | | request.get("/unLoadGlass/downStorage/selectStorageCage").then((res) => { |
| | | const updatetable = async () => { |
| | | |
| | | await request.get("/unLoadGlass/downStorage/selectStorageCage").then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | console.log(res.data); |
| | |
| | | |
| | | } |
| | | }); |
| | | |
| | | |
| | | } |
| | | |
| | | const open = async(row) => { |
| | | try { |
| | |
| | | } |
| | | }; |
| | | |
| | | const socketUrl = `ws://${WebSocketHost}:88/api/unLoadGlass/api/talk/unloadglass`; |
| | | const socketUrl = `ws://${WebSocketHost}:88/api/unLoadGlass/api/talk/downcache`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | |
| | | // 更新 tableData 的数据 |
| | | |
| | | tableData.splice(0, tableData.length, ...data.params[0]); |
| | | // console.log("更新后数据", tableData); |
| | | // tableData.splice(0, tableData.length, ...data.params2[0]); |
| | | tableData.value = data.params2[0] |
| | | console.log("更新后数据", data.params2[0]); |
| | | |
| | | }; |
| | | |
| | | |
| | | onMounted(() => { |
| | | |
| | | updatetable() |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | |