zhoushihao
2024-07-29 ac71274114b9d41f5f29b9c125199031737a8528
UI-Project/src/views/Slicecage/slicecage.vue
@@ -23,6 +23,7 @@
const tableDataf = ref([])
const tableDatae = ref([])
const carPosition = ref([])
const ganghua = ref('')
const adjustedRects = ref([]);
const project = ref([]);
const adjust = ref([]);
@@ -509,10 +510,27 @@
function handleRowClick(row) {  
  selectedRow.value = row; // 更新选中的行数据  
}  
  const handleChange = async () => {
  try  {
  const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/temperingSwitch')
    if (response.code == 200) {
      // 绑定成功,处理逻辑
      ElMessage.success(response.message);
      // ganghua.value = response.data
    }else {
      ElMessage.error(response.message);
      }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
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);
@@ -541,8 +559,10 @@
if(data.carPostion!=null){
  carPosition.value = data.carPostion[0]
}
if(data.temperingSwitch!=null){
  ganghua.value = data.temperingSwitch[0]
}
console.log(data.temperingSwitch[0]);
  if(data.bigStorageCageInfos!=null){
    window.localStorage.setItem('length', data.bigStorageCageInfos[0][1].length)
  let length = window.localStorage.getItem('length')
@@ -659,9 +679,10 @@
 
<template>
  <div style="height: 600px;">
    <el-button style="margin-top: 5px;margin-left: 10px;"   id="searchButton" type="primary" @click="dialogFormVisiblea = true">{{ $t('searchOrder.cageinformation') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 10px;"   id="searchButton" type="success" @click="dialogFormVisibleb = true">{{ $t('searchOrder.productionqueue') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 10px;"   id="searchButton" type="info" @click="dialogFormVisiblec = true">{{ $t('searchOrder.temperingqueries') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="primary" @click="dialogFormVisiblea = true">{{ $t('searchOrder.cageinformation') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="success" @click="dialogFormVisibleb = true">{{ $t('searchOrder.productionqueue') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="dialogFormVisiblec = true">{{ $t('searchOrder.temperingqueries') }}</el-button>
    <el-switch style="margin-top: 5px;margin-left: 10px;" v-model="ganghua" class="mb-2" inactive-text="钢化开关" @change="handleChange" />
    <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 100px;">
        <el-table height="100px" ref="table"