wu
2024-08-16 5985a3693d4d902455b9fd46b052362417b044d7
UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
@@ -6,6 +6,9 @@
import request from "@/utils/request";
import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
import {host, WebSocketHost} from '@/utils/constants'
import PrintFlow from "@/views/UnLoadGlass/PrintFlow.vue";
import Landingindication from "./Landingindication.vue";
import Landingindicationtwo from "./Landingindicationtwo.vue";
const router = useRouter()
const {t} = useI18n()
@@ -23,6 +26,7 @@
const dialogFormVisible = ref(false);
// 表单数据
const workstationId = ref('');
const workFlowCard = ref('');
const selectedProjectNoa = ref(null); // 当前选中的角色
const flowCardId = ref('');
const flowCardOptions = ref('[]');
@@ -35,7 +39,7 @@
const printFlowCardId = ref('')
const printLayer = ref('')
const now = new Date();
const timeRange = ref([new Date(now.setHours(0, 0, 0, 0)), new Date(now.setHours(23, 59, 59, 999))])
const timeRange = ref([])
const handleChange = async () => {
  console.log("触发开关")
@@ -129,6 +133,7 @@
const handleBindRack2 = (row) => {
  workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名
  dialogFormVisiblea2.value = true; // 打开绑定架子对话框
  workFlowCard.value=row.flowCardId;
};
//清除内容
const handleclear = async () => {
@@ -143,6 +148,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 +197,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 +215,9 @@
      }
    }
  }
  if(data.params!=null){
    tableData.splice(0, tableData.length, ...data.params[0]);
  }
  //  console.log("更新后数据", data.params[0]);
};
@@ -310,7 +319,7 @@
      "{display:none}@media print{" +
      "@page {" +
      "    size: auto; " +
      "    margin: 2mm 2mm 0mm 1mm; " +
      "    margin: 10mm 2mm 10mm 1mm; " +
      "  }body>:not(#" +
      printId +
      "){display:none !important}body>#" +
@@ -339,10 +348,10 @@
</script>
<template>
  <div>
    <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="primary"
    <el-button style="margin-top: 10px;margin-left: 10px;margin-bottom: 10px;" id="searchButton" type="primary"
               @click="dialogFormVisibleaDownGlass = true">落架详情
    </el-button>
    <el-switch style="margin-top: 5px;margin-left: 10px;" v-model="autoPrint" class="mb-2" :inactive-text="$t('自动打印')"
    <el-switch style="margin-top: 10px;margin-left: 15px;margin-bottom: 10px;" v-model="autoPrint" class="mb-2" :inactive-text="$t('自动打印')"
               @change="handleChange"/>
    <el-card style="flex: 1;" v-loading="loading">
      <el-card style="flex: 1;margin-left: 4px;margin-top: 1px;" v-loading="loading">
@@ -403,7 +412,7 @@
          </el-select>
          <span class="demonstration">时间段</span>
          <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" start-placeholder="开始日期"
          <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" start-placeholder="开始日期" value-format = "YYYY-MM-DD hh:mm:ss"
                          end-placeholder="结束日期">
          </el-date-picker>