wuyouming666
2024-08-02 66ad819bd2e08f900f6b6249e74c74e9c761e4a6
Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes

# Conflicts:
# UI-Project/src/views/Caching/cachingun.vue
# UI-Project/src/views/GlassStorage/MaterialRackManagement.vue
# UI-Project/src/views/UnLoadGlass/Landingindication.vue
# UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue
# UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
17个文件已修改
338 ■■■■■ 已修改文件
UI-Project/src/lang/zh.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Caching/cachingbefore.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Caching/cachingun.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/GlassStorage/MaterialRackManagement.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Identify/identify.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/PurchaseReturn/purchaseStorage.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/ReportWork/reportWork.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Returns/returns.vue 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Slicecage/slicecage.vue 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/StockBasicData/stockBasicData.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/StockBasicData/stockBasicDatatwo.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/UnLoadGlass/Landingindication.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/UnLoadGlass/loadmachinerack.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/largescreen/largescreen.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/service/impl/TaskCacheServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/lang/zh.js
@@ -219,6 +219,7 @@
        team:'班组',
        basic:'设备',
        add:'确认保存',
        cancel:'取消',
    },
    workOrder:{
        glassID:'玻璃ID',
UI-Project/src/views/Caching/cachingbefore.vue
@@ -7,7 +7,7 @@
import { WebSocketHost ,host} from '@/utils/constants'
import request from "@/utils/request"
import { ref, onMounted , onBeforeUnmount} from "vue";
import { ref, onMounted , onBeforeUnmount,onUnmounted} from "vue";
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
// import { ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
@@ -77,6 +77,7 @@
    console.error('发生错误:', error);  
  }  
};   
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`;
// 定义消息处理函数,更新 receivedData 变量
const handleMessage = (data) => {
@@ -92,11 +93,13 @@
};
// 初始化 WebSocket,并传递消息处理函数
onMounted(() => {
  // fetchFlowCardId();
  // fetchTableData(); // 获取数据
  initializeWebSocket(socketUrl, handleMessage);
  socket = initializeWebSocket(socketUrl, handleMessage);
});
  onUnmounted(() => {
    if (socket) {
    closeWebSocket(socket);
    }
    });
onBeforeUnmount(() => {
  console.log("关闭了")
  closeWebSocket();
UI-Project/src/views/Caching/cachingun.vue
@@ -60,7 +60,7 @@
const adda = ref(false)
import { WebSocketHost ,host} from '@/utils/constants'
import request from "@/utils/request"
import { ref, onMounted , onUnmounted} from "vue";
import { ref, onMounted , onBeforeUnmount,onUnmounted} from "vue";
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
// import { ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
@@ -204,6 +204,7 @@
};
let socket =null; 
const socketUrl = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/downcache`;
// 定义消息处理函数,更新 receivedData 变量
@@ -219,16 +220,17 @@
          })); 
};
// 初始化 WebSocket,并传递消息处理函数
onMounted(() => {
  // fetchFlowCardId();
  // fetchTableData(); // 获取数据
  socket =  initializeWebSocket(socketUrl, handleMessage);
});
onUnmounted(() => {
  console.log("关闭了")
    if (socket) {
  closeWebSocket(socket);
    }
    });
onBeforeUnmount(() => {
  console.log("关闭了")
  closeWebSocket();
});
</script>
<style scoped>
UI-Project/src/views/GlassStorage/MaterialRackManagement.vue
@@ -393,9 +393,7 @@
  row.enableState = 1 - row.enableState; // Toggle between 0 and 1
  // 此处可以添加保存状态的逻辑,比如调用 API 更新数据
};
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/glassStorage/api/talk/storageTask`;
// 定义消息处理函数,更新 receivedData 变量
const handleMessage = (data) => {
@@ -432,29 +430,19 @@
    // 替换原来的 createTime 字段为格式化后的日期时间字符串
    item.startTime = formattedDateTime;
  });
};
onMounted(() => {
 socket =  initializeWebSocket(socketUrl, handleMessage);
});
onUnmounted(() => {
      if (socket) {
        closeWebSocket(socket);
        socketStatus.value = 'closed';
      }
    });
// onBeforeUnmount(() => {
//   console.log("关闭了");
//   closeWebSocket();
// });
onBeforeUnmount(() => {
  console.log("关闭了");
  closeWebSocket();
});
const tasktableData = ref([]);
UI-Project/src/views/Identify/identify.vue
@@ -41,7 +41,7 @@
<script setup lang="ts">  
import { Delete, Upload } from '@element-plus/icons-vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { ref, onMounted, onBeforeUnmount } from 'vue';
import { ref, onMounted, onBeforeUnmount,onUnmounted } from 'vue';
import request from "@/utils/request"
import { WebSocketHost ,host} from '@/utils/constants'
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
@@ -181,12 +181,13 @@
    }  
  });  
}
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`;
const handleMessage = (data) => {
  // adjustedRects.value = data.currentCutTerritory[0]
  adjustedRects.value = data.currentCutTerritory[0].map(rect => ({  
        ...rect, // 复制原始对象的其他属性
        x_axis: (rect.x_axis*100) * 0.003, // 将x值除以3
        ...rect,
        x_axis: (rect.x_axis*100) * 0.003,
        y_axis: (rect.y_axis*100) * 0.003,
        width: (rect.width*100) * 0.002 ,
        widtha: rect.width ,
@@ -194,18 +195,15 @@
        height:( rect.height*100) * 0.002 ,
        glass_state: rect.glass_state
      }));  
 // console.log("更新后数据", tableData);
};
// 初始化 WebSocket,并传递消息处理函数
onMounted(() => {
  // fetchFlowCardId();
  // fetchTableData(); // 获取数据
  initializeWebSocket(socketUrl, handleMessage);
  socket = initializeWebSocket(socketUrl, handleMessage);
});
  onUnmounted(() => {
    if (socket) {
    closeWebSocket(socket);
    }
    });
onBeforeUnmount(() => {
  console.log("关闭了")
  closeWebSocket();
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue
@@ -3,7 +3,7 @@
import {reactive} from "vue";
import {useRouter} from "vue-router"
import request from "@/utils/request"
import { ref, onMounted, onBeforeUnmount } from 'vue';
import { ref, onMounted, onBeforeUnmount,onUnmounted } from 'vue';
import { WebSocketHost ,host} from '@/utils/constants'
import { ElMessage, ElMessageBox } from 'element-plus'
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
@@ -22,6 +22,7 @@
const adjustedRectsb = ref([]);
const currentGlassId = ref(null);
const currenttemperingFeedSequence = ref(null);
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`;
const handleMessage = (data) => {
// 进炉中
@@ -205,7 +206,12 @@
      }
};
onMounted(() => {
  initializeWebSocket(socketUrl, handleMessage);
  socket = initializeWebSocket(socketUrl, handleMessage);
});
  onUnmounted(() => {
    if (socket) {
    closeWebSocket(socket);
    }
});
function updateRectColors() {  
  adjustedRectsa.value.forEach(rect => {  
UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
@@ -5,7 +5,7 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import request from "@/utils/request"
import { ref, onMounted, onBeforeUnmount } from 'vue';
import { ref, onMounted, onBeforeUnmount,onUnmounted } from 'vue';
import { WebSocketHost ,host} from '@/utils/constants'
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
const adjustedRects = ref([]);
@@ -29,7 +29,7 @@
    }
  }
}
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/temperingGlass`; 
// 定义消息处理函数,更新 receivedData 变量
const handleMessage = (data) => {
@@ -117,11 +117,13 @@
  }
}
onMounted(() => {
  // fetchFlowCardId();
  // fetchTableData(); // 获取数据
  initializeWebSocket(socketUrl, handleMessage);
  socket = initializeWebSocket(socketUrl, handleMessage);
});
  onUnmounted(() => {
    if (socket) {
    closeWebSocket(socket);
    }
    });
onBeforeUnmount(() => {
  console.log("关闭了")
  closeWebSocket();
UI-Project/src/views/ReportWork/reportWork.vue
@@ -224,6 +224,7 @@
  inputValuesb[rowId] = value;  
};
fetchTableData();  
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/screen`;
const handleMessage = (data) => {
  // adjustedRects.value = data.device[0].map(rect => ({  
@@ -233,7 +234,7 @@
  //       thisProcess: rect.thisProcess,
  //     })); 
};
let socket;
// let socket;
onMounted(() => {
  socket = new WebSocket(socketUrl);
  socket.onmessage = (event) => {
@@ -243,18 +244,17 @@
  };
  // };  
});
onUnmounted(() => {
  socket.close();
});
onMounted(() => {
  // fetchFlowCardId();
  fetchTableData();
  initializeWebSocket(socketUrl, handleMessage);
  socket = initializeWebSocket(socketUrl, handleMessage);
});
  onUnmounted(() => {
    if (socket) {
    closeWebSocket(socket);
    }
});
onBeforeUnmount(() => {
  console.log("关闭了")
UI-Project/src/views/Returns/returns.vue
@@ -17,6 +17,8 @@
const flakea = ref(false)
const flakeb = ref(false)
const flakec = ref(false)
const dialoglea = ref(false)
const tableDatax = ref([])
const user = ref('');
const projectNo = ref('');
const workstationId = ref('');
@@ -89,12 +91,49 @@
    // ElMessage.error('获取表格数据失败,请重试');
  }
};
const handlezhiban = () => {
  dialoglea.value = true; // 打开绑定架子对话框
  fetchFlowCardId();
};
// 值班信息
const fetchFlowCardId = async () => {
  try  {
    const response = await request.post('/loadGlass/work_assignment/selectWorkAssignment',{
      line: 2001,
      workingProcedure : '冷加工'
    })
    if (response.code == 200) {
      ElMessage.success(response.message);
      tableDatax.value = response.data;
      console.log(tableDatax.value);
      console
    } else {
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
const handleConfirmb = async () => {
  const response = await request.post("/loadGlass/work_assignment/updateWorkAssignment", tableDatax.value)
  if (response.code === 200) {
    ElMessage.success(response.message);
    dialoglea.value = false;
  } else {
    ElMessage.error(response.message);
  }
};
onMounted(() => {  
  list('');  
  fetchOptions('');
  initializeWebSocket(socketUrl, handleMessage);
  socket = initializeWebSocket(socketUrl, handleMessage);
});
onMounted(() => {
  onUnmounted(() => {
    if (socket) {
    closeWebSocket(socket);
    }
}); 
const list = async () => {  
  try {  
@@ -152,6 +191,7 @@
const titleSelectJsona = ref({
  processTypea: [],
})
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlass`;
// 定义消息处理函数,更新 receivedData 变量
const handleMessage = (data) => {
@@ -654,6 +694,7 @@
    <el-button style="margin-top: 5px;margin-left: 15px;"   id="searchButton" type="primary" @click="dialogFormVisible = true">{{ $t('basicData.selectproject') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="primary" @click="handleBind">{{ $t('basicData.startloading') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 20px;"  id="searchButton" type="warning" @click="handleBinda">{{ $t('basicData.stop') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="info" @click="handlezhiban">{{ $t('searchOrder.dutyinformation') }}</el-button>
    <!-- <el-button style="margin-top: 5px;margin-left: 20px;"  id="searchButton" type="danger" @click="handleBindb">停止任务</el-button> -->
    
    <el-card style="flex: 1;margin-left: 10px;margin-top: 15px;" v-loading="loading">
@@ -715,6 +756,32 @@
      </div>
    </template>
  </el-dialog>
<el-dialog v-model="dialoglea" top="15vh" width="70%" :title="$t('searchOrder.dutyinformation')">
    <el-table  ref="table" style="margin-top: 20px;height: 300px;"
        :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="line" fixed align="center" :label="$t('searchOrder.line')"/>
          <el-table-column prop="workProcesses" fixed align="center" :label="$t('searchOrder.process')" />
          <el-table-column prop="teamsGroupsName" align="center" :label="$t('searchOrder.team')">
        <template #default="{ row }">
          <el-input v-model="row.teamsGroupsName" autocomplete="off" min-width="150"/>
        </template>
      </el-table-column>
          <el-table-column prop="deviceName" align="center" :label="$t('searchOrder.basic')">
            <template #default="{ row }">
          <el-input v-model="row.deviceName" autocomplete="off" min-width="150"/>
        </template>
        </el-table-column>
        </el-table>
        <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="handleConfirm">
          {{ $t('searchOrder.add') }}
        </el-button>
        <el-button @click="dialoglea = false">{{ $t('searchOrder.cancel') }}</el-button>
      </div>
    </template>
</el-dialog>
  <el-dialog v-model="blinda" top="30vh" width="25%" :title="$t('basicData.whetherpause')">
    <template #footer>
      <div id="dialog-footer">
UI-Project/src/views/Slicecage/slicecage.vue
@@ -7,7 +7,7 @@
const router = useRouter()
import request from "@/utils/request"
import { WebSocketHost ,host} from '@/utils/constants'
import { ref, onMounted , onBeforeUnmount, reactive, computed } from "vue";
import { ref, onMounted , onBeforeUnmount, reactive, computed,onUnmounted } from "vue";
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
import { ElMessage, ElMessageBox } from 'element-plus'
import { tr } from "element-plus/es/locale";
@@ -23,7 +23,7 @@
const tableDatad = ref([])
const tableDataf = ref([])
const tableDatae = ref([])
const tableDataxx = ref([])
const tableDatax = ref([])
const carPosition = ref([])
const ganghua = ref('')
const adjustedRects = ref([]);
@@ -39,6 +39,8 @@
const adjustedRectsg = ref([]);
const adjustedRectsh = ref([]);
const currentRow = reactive({}); // 当前行的数据 
const inputValuesa = reactive({});
const add = ref(false)
const flowCardId = ref('');
const gap = ref('');
@@ -180,10 +182,8 @@
    });
    setInterval(() => {  
    localStorage.clear(); // 清除所有localStorage数据  
    console.log(11111);
}, 60000);
//  function cleanUp() {
//     console.log('执行清理操作');
// }
// // 假设我们每2分钟执行一次清理  
// setInterval(cleanUp, 1 * 60 * 1000);
@@ -232,10 +232,7 @@
// 是否禁用
const toggleEnableState = async (row) => {
  const newState = row.enableState === 1 ? 0 : 1;  
  console.log(row.slot);
  console.log(row.enableState);
  var url="/cacheVerticalGlass/bigStorageCage/updateStorageCageDisabled?slot="+row.slot + "&enableState=" + newState;
      console.log(url);
      const response = await request.get(url) 
  if (response.code === 200) {
      ElMessage.success(response.message);
@@ -513,28 +510,36 @@
  }  
}; 
const handlezhiban = () => {
  fetchFlowCardId();
  dialoglea.value = true; // 打开绑定架子对话框
  fetchFlowCardId();
};
const fetchFlowCardId = async () => {
  try {
    // var url="/cacheVerticalGlass/work_assignment/selectWorkAssignment?line=" + 2001 + "&workingProcedure='冷加工'";
    // const response = await request.post(url)
    const response = await request.post('/cacheVerticalGlass/work_assignment/selectWorkAssignment',{
      line: 2001,
      workingProcedure : '冷加工'
    });
    if (response.code === 200) {
      ElMessage.error(response.message);
      tableDataxx.value = response.data;
      console.log(tableDataxx.value);
}
 else {
    })
    if (response.code == 200) {
      ElMessage.success(response.message);
      tableDatax.value = response.data;
      console.log(tableDatax.value);
      console
    } else {
      ElMessage.error(response.message);
    }
  } catch (error) {
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
const handleConfirm = async () => {
  const response = await request.post("/cacheVerticalGlass/work_assignment/updateWorkAssignment", tableDatax.value)
  if (response.code === 200) {
    ElMessage.success(response.message);
    dialoglea.value = false;
  } else {
    ElMessage.error(response.message);
  }
};
function handleRowClick(row) {  
@@ -561,11 +566,11 @@
    console.error(error);
  }
}
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheVerticalGlass/api/talk/slicecage`;
// 定义消息处理函数,更新 receivedData 变量
const handleMessage = (data) => {
  // 更新 tableData 的数据
  console.log(data.temperingSwitch[0]);
  if(data.bigStorageCageDetailsOutTask!=null){
    tableDatac.value = data.bigStorageCageDetailsOutTask[0]
    adjusta.value = data.bigStorageCageDetailsOutTask[0].filter(rect => rect.slot !== null && rect.slot !== undefined);
@@ -612,7 +617,6 @@
}else{
  ganghua.value = ''
  }
console.log(data.temperingSwitch[0]);
  if(data.bigStorageCageInfos!=null){
    window.localStorage.setItem('length', data.bigStorageCageInfos[0][1].length)
  let length = window.localStorage.getItem('length')
@@ -670,8 +674,13 @@
// 初始化 WebSocket,并传递消息处理函数
onMounted(() => {
  // fetchFlowCardId();
  initializeWebSocket(socketUrl, handleMessage);
  // initializeWebSocket(socketUrl, handleMessage);
  socket = initializeWebSocket(socketUrl, handleMessage);
});
  onUnmounted(() => {
    if (socket) {
    closeWebSocket(socket);
    }
});
function getStatusType(enableState: number) {  
  switch (enableState) {  
@@ -724,7 +733,7 @@
  }  
}
onBeforeUnmount(() => {
  console.log("关闭了")
  // console.log("关闭了")
  closeWebSocket();
});
</script>
@@ -1371,20 +1380,28 @@
        </el-table-column>
        </el-table>
</el-dialog>
<el-dialog v-model="dialoglea" top="5vh" width="85%" :title="$t('searchOrder.dutyinformation')">
    <el-table  ref="table" style="margin-top: 20px;height: 400px;"
        :data="tableDataxx" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="line" fixed align="center" :label="$t('searchOrder.line')" min-width="150"/>
          <el-table-column prop="workProcesses" fixed align="center" :label="$t('searchOrder.process')" min-width="120" />
          <el-table-column prop="teamsGroupsName" align="center" :label="$t('searchOrder.team')" min-width="150" />
          <el-table-column prop="deviceName" align="center" :label="$t('searchOrder.basic')" min-width="150" />
<el-dialog v-model="dialoglea" top="15vh" width="70%" :title="$t('searchOrder.dutyinformation')">
    <el-table  ref="table" style="margin-top: 20px;height: 300px;"
        :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="line" fixed align="center" :label="$t('searchOrder.line')"/>
          <el-table-column prop="workProcesses" fixed align="center" :label="$t('searchOrder.process')" />
          <el-table-column prop="teamsGroupsName" align="center" :label="$t('searchOrder.team')">
        <template #default="{ row }">
          <el-input v-model="row.teamsGroupsName" autocomplete="off" min-width="150"/>
        </template>
      </el-table-column>
          <el-table-column prop="deviceName" align="center" :label="$t('searchOrder.basic')">
            <template #default="{ row }">
          <el-input v-model="row.deviceName" autocomplete="off" min-width="150"/>
        </template>
        </el-table-column>
        </el-table>
        <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="handleConfirm">
          {{ $t('searchOrder.add') }}
        </el-button>
        <el-button @click="dialoglea = false">{{ $t('basicData.cancel') }}</el-button>
        <el-button @click="dialoglea = false">{{ $t('searchOrder.cancel') }}</el-button>
      </div>
    </template>
</el-dialog>
UI-Project/src/views/StockBasicData/stockBasicData.vue
@@ -6,7 +6,7 @@
const adda = ref(false)
import { WebSocketHost ,host} from '@/utils/constants'
import request from "@/utils/request"
import { ref, onMounted , onBeforeUnmount} from "vue";
import { ref, onMounted , onBeforeUnmount,onUnmounted} from "vue";
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
// import { ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
@@ -100,26 +100,26 @@
    console.error('发生错误:', error);  
  }  
};   
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`;
// 定义消息处理函数,更新 receivedData 变量
const handleMessage = (data) => {
  // 更新 tableData 的数据
  tableData.value = data.EdgTasks1[0]
};
// 初始化 WebSocket,并传递消息处理函数
onMounted(() => {
  // fetchFlowCardId();
  // fetchTableData(); // 获取数据
  initializeWebSocket(socketUrl, handleMessage);
  socket = initializeWebSocket(socketUrl, handleMessage);
});
  onUnmounted(() => {
    if (socket) {
    closeWebSocket(socket);
    }
    });
onBeforeUnmount(() => {
  console.log("关闭了")
  closeWebSocket();
});
</script>
<template>
  <div>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
@@ -147,7 +147,6 @@
</template>
<style scoped>
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
#dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
#dialog-footer{
UI-Project/src/views/StockBasicData/stockBasicDatatwo.vue
@@ -6,7 +6,7 @@
const adda = ref(false)
import { WebSocketHost ,host} from '@/utils/constants'
import request from "@/utils/request"
import { ref, onMounted , onBeforeUnmount} from "vue";
import { ref, onMounted , onBeforeUnmount,onUnmounted} from "vue";
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
// import { ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
@@ -100,21 +100,21 @@
    console.error('发生错误:', error);  
  }  
};   
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`;
// 定义消息处理函数,更新 receivedData 变量
const handleMessage = (data) => {
  // 更新 tableData 的数据
  tableData.value = data.EdgTasks2[0]
};
// 初始化 WebSocket,并传递消息处理函数
onMounted(() => {
  // fetchFlowCardId();
  // fetchTableData(); // 获取数据
  initializeWebSocket(socketUrl, handleMessage);
  socket = initializeWebSocket(socketUrl, handleMessage);
});
  onUnmounted(() => {
    if (socket) {
    closeWebSocket(socket);
    }
    });
onBeforeUnmount(() => {
  console.log("关闭了")
  closeWebSocket();
UI-Project/src/views/UnLoadGlass/Landingindication.vue
@@ -147,21 +147,15 @@
  }
});
};
// 初始化 WebSocket,并传递消息处理函数
onMounted(() => {
  fetchFlowCardId(); // 获取数据
  socket = initializeWebSocket(socketUrl, handleMessage);
});
onUnmounted(() => {
  console.log("关闭了")
    if (socket) {
  closeWebSocket(socket);
    }
});
const showCustomAlert = (downGlassInfoList) => {
  let tableContent = '<table border="1" style="border-collapse: collapse; width: 100%;">';
  tableContent += '<tr><th style="background-color: #f2f2f2;">玻璃ID</th><th style="background-color: #f2f2f2;">膜系</th><th style="background-color: #f2f2f2;">厚度</th><th style="background-color: #f2f2f2;">宽度</th><th style="background-color: #f2f2f2;">高度</th></tr>';
UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue
@@ -114,6 +114,7 @@
    console.error(error);
  }
};
let socket =null; 
const socketUrl = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/unloadglass3`;
// 定义消息处理函数,更新 receivedData 变量
@@ -143,18 +144,15 @@
  }
});
};
// 初始化 WebSocket,并传递消息处理函数
onMounted(() => {
  fetchFlowCardId(); // 获取数据
  socket =  initializeWebSocket(socketUrl, handleMessage);
});
onUnmounted(() => {
  console.log("关闭了")
    if (socket) {
  closeWebSocket(socket);
    }
});
const showCustomAlert = (downGlassInfoList) => {
  let tableContent = '<table border="1" style="border-collapse: collapse; width: 100%;">';
  tableContent += '<tr><th style="background-color: #f2f2f2;">玻璃ID</th><th style="background-color: #f2f2f2;">膜系</th><th style="background-color: #f2f2f2;">厚度</th><th style="background-color: #f2f2f2;">宽度</th><th style="background-color: #f2f2f2;">高度</th></tr>';
UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
@@ -1,6 +1,6 @@
<script setup>
import {Search} from "@element-plus/icons-vue";
import {reactive, onMounted, onUnmounted} from "vue";
import {reactive, onMounted, onBeforeUnmount,onUnmounted} from "vue";
import {useRouter} from "vue-router"
const router = useRouter()
import { useI18n } from 'vue-i18n'
@@ -154,8 +154,13 @@
  socket =  initializeWebSocket(socketUrl, handleMessage);
});
onUnmounted(() => {
  console.log("关闭了")
    if (socket) {
  closeWebSocket(socket);
    }
    });
onBeforeUnmount(() => {
  console.log("关闭了")
  closeWebSocket();
});
UI-Project/src/views/largescreen/largescreen.vue
@@ -147,6 +147,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 +160,7 @@
//       thisProcess: rect.thisProcess,
//     })); 
};
let socket;
// let socket;
// 设置图表 DOM 引用  
function setChartDom(index, el) {  
if (!chartRefs.value[index]) {  
@@ -232,12 +233,13 @@
onUnmounted(() => {  
socket.close();  
});  
onMounted(() => {
// fetchFlowCardId();
// fetchTableData(); // 获取数据
initializeWebSocket(socketUrl, handleMessage);
  socket = initializeWebSocket(socketUrl, handleMessage);
});
  onUnmounted(() => {
    if (socket) {
    closeWebSocket(socket);
    }
});
onBeforeUnmount(() => {
console.log("关闭了")
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/service/impl/TaskCacheServiceImpl.java
@@ -78,7 +78,7 @@
                            .eq(EdgStorageCageDetails::getGlassId, GlassInfo::getGlassId)
                            .eq(EdgStorageCageDetails::getEngineerId, GlassInfo::getEngineerId))
                    .eq(GlassInfo::getGlassId,taskCache1.getGlassId())
                    .eq(EdgStorageCageDetails::getState,Const.GLASS_STATE_IN)
                    .eq(EdgStorageCageDetails::getState,Const.GLASS_STATE_OUT)
            );
            if(glassInfos.size()==1){
                GlassInfo glassInfo=glassInfos.get(0);