ZengTao
2024-08-18 f1916b183ebcff81c64bccae502a63b097c304f5
UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
@@ -107,7 +107,6 @@
      flowCardId: firstPart,
      layer: twoPart
    });
    console.log(response)
    if (response.code == 200) {
      // 绑定成功,处理逻辑
      console.log('绑定成功');
@@ -191,7 +190,7 @@
  // 更新 tableData 的数据
  if (data.downGlassInfos != null) {
    downGlass.value = data.downGlassInfos[0][1];
    downGlass.value = data.downGlassInfos[0];
  }
  if (data.engineerIdList != null) {
    selectOptionsa.value = data.engineerIdList[0]
@@ -294,9 +293,9 @@
  dialogTableVisible.value = true;
  setTimeout(() => {
    printFlowCard(); // 替换成你要执行的函数名
    dialogTableVisible.value = false;
    //dialogTableVisible.value = false;
  }, 1000);
  ;
}
@@ -313,19 +312,22 @@
  // 样式控制与打印无关的元素隐藏
  let style = doc.createElement("style");
  console.log("style1:"+style.innerHTML)
  style.innerHTML =
      "body>#" +
      printId +
      "{display:none}@media print{" +
      "{display:none;}@media print{" +
      "@page {" +
      "    size: auto; " +
      "    margin: 10mm 2mm 10mm 1mm; " +
      "    margin: 10mm 5mm 10mm 5mm; " +
      "  }body>:not(#" +
      printId +
      "){display:none !important}body>#" +
      "){display:none !important;}body>#" +
      printId +
      "{display:block;padding-top:1px}}";
  //
      "{display:block;}#" +
      printId +
      "{display: block; padding: 0; margin: 0;  width: 100%;  position: absolute; top: 0; left: 0; height: 100vh;  box-sizing: border-box;}} ";
  content.innerHTML = el.outerHTML;
  // // console.log("el.outerHTML", el.outerHTML);
  body.appendChild(style);
@@ -339,6 +341,8 @@
    body.removeChild(style);
  }, 20);
}
// beforeUnmount(() => {
@@ -401,9 +405,6 @@
            <el-option label="5" value="5"></el-option>
            <el-option label="6" value="6"></el-option>
            <el-option label="7" value="7"></el-option>
            <el-option label="8" value="8"></el-option>
            <el-option label="9" value="9"></el-option>
            <el-option label="10" value="10"></el-option>
          </el-select>
          <el-select v-model="selectValuesa[1]" filterable :placeholder="$t('basicData.plselectproject')" clearable
@@ -492,10 +493,7 @@
    </template>
  </el-dialog>
  <el-dialog id="sizePrintCalrd" v-model="dialogTableVisible" destroy-on-close style="width: 75%;height:75% ">
    <!-- <template #header="{ close, titleId, titleClass }">
        <el-button  @click="printFlowCard" >打印</el-button>
      </template> -->
  <el-dialog id="sizePrintCalrd" v-model="dialogTableVisible" destroy-on-close >
    <print-flow id="child" :printFlowCardId="printFlowCardId" :printLayer="printLayer"
                style="width: 100%;height: 100%"/>
  </el-dialog>