zhoushihao
2024-08-15 a66b4925a2528ff23a34c3607e9c45bbbdd28e5e
UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
@@ -6,6 +6,7 @@
import request from "@/utils/request";
import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
import {host, WebSocketHost} from '@/utils/constants'
import PrintFlow from "@/views/UnLoadGlass/PrintFlow.vue";
const router = useRouter()
const {t} = useI18n()
@@ -23,6 +24,7 @@
const dialogFormVisible = ref(false);
// 表单数据
const workstationId = ref('');
const workFlowCard = ref('');
const selectedProjectNoa = ref(null); // 当前选中的角色
const flowCardId = ref('');
const flowCardOptions = ref('[]');
@@ -129,6 +131,7 @@
const handleBindRack2 = (row) => {
  workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名
  dialogFormVisiblea2.value = true; // 打开绑定架子对话框
  workFlowCard.value=row.flowCardId;
};
//清除内容
const handleclear = async () => {
@@ -143,6 +146,9 @@
      console.log('清除成功');
      ElMessage.success(response.message);
      dialogFormVisiblea2.value = false;
      if(fullFlowCard.value==workFlowCard.value){
        fullFlowCard.value="";
      }
    } else if (response.code === 500) {
      // 清除失败的逻辑
      console.log('清除失败');
@@ -189,12 +195,11 @@
    selectOptionsa.value = data.engineerIdList[0]
  }
  if (data.autoPrint != null) {
    autoPrint.value = data.autoPrint;
    autoPrint.value = data.autoPrint[0];
  }
  console.log(autoPrint.value)
  tableData.splice(0, tableData.length, ...data.params[0]);
  if (fullFlowCard.value == "") {
  if (fullFlowCard.value == ""&&autoPrint.value==true) {
    for (let i = 0; i < tableData.length; i++) {
      if (tableData[i].totalQuantity != 0) {
        if (tableData[i].totalQuantity == tableData[i].racksNumber + tableData[i].otherNumber && fullFlowCard.value != tableData[i].flowCardId) {
@@ -208,7 +213,9 @@
      }
    }
  }
  if(data.params!=null){
    tableData.splice(0, tableData.length, ...data.params[0]);
  }
  //  console.log("更新后数据", data.params[0]);
};