| | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | const adda = ref(false) |
| | | |
| | | |
| | | |
| | | import { initializeWebSocket } from '@/utils/WebSocketService'; |
| | | import { WebSocketHost } from '@/utils/constants'; |
| | | import request from "@/utils/request" |
| | | import { ref, onMounted } from "vue"; |
| | | // import { ref } from 'vue' |
| | |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | id: 'OrderList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | }, |
| | | data: [ |
| | | { |
| | | 'id': '1', |
| | | 'long': '5', |
| | | 'wide': '1005', |
| | | 'thick': '183.6', |
| | | } |
| | | ] |
| | | |
| | | }) |
| | | |
| | | const socketUrl = `ws://${WebSocketHost}:88/api/unLoadGlass/api/talk/unloadglass`; |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | |
| | | // 更新 tableData 的数据 |
| | | |
| | | tableData.splice(0, tableData.length, ...data.params[0]); |
| | | // console.log("更新后数据", tableData); |
| | | |
| | | }; |
| | | |
| | | |
| | | onMounted(() => { |
| | | |
| | | initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | |
| | | </script> |
| | | |
| | |
| | |
|
| | | @Autowired
|
| | | private DownWorkstationService downWorkstationService;
|
| | | @Scheduled(fixedDelay = 1000)
|
| | | @Scheduled(fixedDelay = 1000)
|
| | | public void Downpush() {
|
| | |
|
| | |
|
| | |
| | | public class WebSocketConfig { |
| | | |
| | | |
| | | |
| | | @Bean |
| | | public ServerEndpointExporter serverEndpointExporter() { |
| | | return new ServerEndpointExporter(); |
| | | } |
| | | |
| | | } |
| | |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | import org.springframework.web.socket.config.annotation.EnableWebSocket; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | |
| | | GlassInfoServiceImpl glassInfoServiceImpl; |
| | | @Autowired |
| | | DownWorkstationService downWorkstationService; |
| | | |
| | | |
| | | |
| | | |
| | | @Test |
| | | public void testFindPath() { |
| | |
| | | // downStorageCageDetailsService.CacheOut(1,2); |
| | | // |
| | | // } |
| | | |
| | | |
| | | |
| | | @Test |
| | | public void CacheEmpty1() { |
| | | log.info("测试出片"); |