zhoushihao
2024-08-06 c5a2b71990cabc221834b856c99954677f1b5646
UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
@@ -15,6 +15,7 @@
import { WebSocketHost ,host} from '@/utils/constants'
const dialogFormVisiblea = ref(false)
const dialogFormVisiblea2 = ref(false)
const dialogFormVisibleaDownGlass = ref(false)
// 数据
const loading = ref(false);
// 弹框显示控制
@@ -25,6 +26,7 @@
const flowCardId = ref('');
const flowCardOptions = ref('[]');
const tableData = reactive([]);
const downGlass= ref([]);
// 方法
const handleSelectionChange = () => {
  // 处理表格行选择事件
@@ -144,7 +146,13 @@
// 定义消息处理函数,更新 receivedData 变量
const handleMessage = (data) => {
  // 更新 tableData 的数据
  tableData.splice(0, tableData.length, ...data.params[0]);
  if(data.sendDownGlass!=null){
    downGlass.value=data.sendDownGlass[0][1];
    console.log(downGlass.value);
    console.log(tableData.value);
  }
  // tableData.splice(0, tableData.length, ...data.params[0]);
//  console.log("更新后数据", data.params[0]);
};
// 初始化 WebSocket,并传递消息处理函数
@@ -208,6 +216,7 @@
</script>
<template>
  <div>
    <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="primary" @click="dialogFormVisibleaDownGlass = true">落架详情</el-button>
    <el-card style="flex: 1;" v-loading="loading">
      <el-card style="flex: 1;margin-left: 4px;margin-top: 1px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
@@ -230,7 +239,6 @@
            prop="enableState"
          >
          <template #default="scope">
            <el-tag :type="getTagType(scope.row.enableState)" @click="toggleStatus(scope.row)">
          {{ scope.row.enableState === 1 ? $t('reportWork.enable') : $t('reportWork.unenable') }}
        </el-tag>
@@ -241,9 +249,29 @@
            <el-button size="mini" type="text" plain v-show="scope.row.enableState !== '已启用' " @click="handleBindRack(scope.row)">{{ $t('reportWork.bindingshelves') }}</el-button>
            <el-button size="mini" type="text" plain  @click="handleBindRack2(scope.row)">{{ $t('reportWork.clear') }}</el-button>
          </template>
        </el-table-column>
        </el-table>
      </div>
      <el-dialog v-model="dialogFormVisibleaDownGlass" top="2vh" width="97%" :title="$t('searchOrder.cageinformation')">
        <el-table height="200px" ref="table"
        @selection-change="handleSelectionChange"
        :data="downGlass" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
        <el-table-column prop="workStationId" align="center" :label="$t('工位号')" min-width="80" />
        <el-table-column prop="engineerId" align="center" :label="$t('工程号')" min-width="80" />
          <el-table-column prop="flowCardId" align="center" :label="$t('流程卡号')" min-width="80" />
          <el-table-column prop="layer" align="center" :label="$t('层')" min-width="120" />
          <el-table-column prop="sequence" align="center" :label="$t('顺序')" min-width="150" />
          <el-table-column prop="width" align="center" :label="$t('宽')" min-width="120" />
          <el-table-column prop="height" align="center" :label="$t('高')" min-width="120" />
          <el-table-column prop="Filmsid" align="center" :label="$t('膜系')" min-width="120" />
          <el-table-column prop="thickness" align="center" label="厚度" min-width="120" />
          <el-table-column prop="glassId" align="center" :label="$t('玻璃id')" min-width="120" />
        </el-table>
      </el-dialog>
    </el-card>
    <!-- workstationId: '1',
    workstationId: '1005',
@@ -260,6 +288,7 @@
    </div>
    </div>
    </el-card>
  </div>
    <el-dialog v-model="dialogFormVisiblea" top="21vh" width="40%" :title="$t('reportWork.bindingshelves')">
@@ -279,6 +308,7 @@
    </div>
    <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="handleConfirm">
          {{ $t('reportWork.sure') }}
        </el-button>