wuyouming666
2024-05-28 4330edfe62916213b616d14a34de0ad23bc7db0e
下片卧式缓存推送数据
4个文件已修改
77 ■■■■■ 已修改文件
UI-Project/src/views/Caching/cachingun.vue 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/Downpush.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/WebSocketConfig.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/test/java/mes/UnloadGlassModuleApplicationTest.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Caching/cachingun.vue
@@ -1,10 +1,9 @@
<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'
@@ -58,46 +57,23 @@
    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>
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/Downpush.java
@@ -20,7 +20,7 @@
    @Autowired
    private DownWorkstationService downWorkstationService;
   @Scheduled(fixedDelay = 1000)
    @Scheduled(fixedDelay = 1000)
    public void Downpush() {
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/WebSocketConfig.java
@@ -8,6 +8,9 @@
public class WebSocketConfig {
    
     @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }
}
hangzhoumesParent/moduleService/UnLoadGlassModule/src/test/java/mes/UnloadGlassModuleApplicationTest.java
@@ -16,8 +16,8 @@
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;
@@ -50,6 +50,9 @@
    GlassInfoServiceImpl glassInfoServiceImpl;
    @Autowired
    DownWorkstationService downWorkstationService;
    @Test
    public void testFindPath() {
@@ -114,6 +117,9 @@
//        downStorageCageDetailsService.CacheOut(1,2);
//
//    }
    @Test
    public void CacheEmpty1() {
        log.info("测试出片");