From 2eaf83edd22ed90db1d2b1c972e148b0ddab8729 Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期二, 13 八月 2024 08:42:47 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes

---
 UI-Project/src/views/UnLoadGlass/loadmachinerack.vue |   78 +++++++++++++++++++++++++++++++++++++--
 1 files changed, 74 insertions(+), 4 deletions(-)

diff --git a/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue b/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
index a6b9c45..5ffd4ae 100644
--- a/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
+++ b/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
@@ -13,6 +13,7 @@
 import request from "@/utils/request";
 import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
 import { WebSocketHost, host } from '@/utils/constants'
+// import PrintFlow from './PrintFlow.vue'
 const dialogFormVisiblea = ref(false)
 const dialogFormVisiblea2 = ref(false)
 const dialogFormVisibleaDownGlass = ref(false)
@@ -30,6 +31,9 @@
 const timeRange = ref(["2022-01-01", "2025-01-01"])
 const selectValuesa = reactive({});
 const selectOptionsa = ref([]);
+const dialogTableVisible = ref(false)
+// const printFlowCardId = ref('')
+// const printLayer=ref('')
 
 const handleInputChangea = (value, rowId) => {
   // 鏇存柊瀵瑰簲琛岀殑 select 鍊�  
@@ -230,9 +234,56 @@
 }
 
 
-const open=async()=>{
-  router.push({path: '/UnLoadGlass/PrintFlow'})
-}
+// const open=async(row)=>{
+
+//   printFlowCardId.value=row.flowCardId;
+//   printLayer.value=row.layer
+//   dialogTableVisible.value = true;
+//   setTimeout(() => {
+//     printFlowCard(); // 鏇挎崲鎴愪綘瑕佹墽琛岀殑鍑芥暟鍚�
+//     }, 1000);
+//   ;
+// }
+
+// const printFlowCard = () => {
+//   // 闇�瑕佹墦鍗扮殑灞�閮ㄥ尯鍩熻祴浜�"print-wrap"鐨刬d
+//   let el = document.getElementById("child");
+//   let doc = document;
+//   let body = doc.body || doc.getElementsByTagName("body")[0];
+//   let printId = "print-" + Date.now();
+
+//   // 鍒涘缓鏃犲壇浣滅敤鐨勬墦鍗板鍣�(鍥犱笉纭畾椤甸潰鐨勬墦鍗板厓绱犳湁鏃犲叾瀹冩牱寮�)
+//   let content = doc.createElement("div");
+//   content.id = printId;
+
+//   // 鏍峰紡鎺у埗涓庢墦鍗版棤鍏崇殑鍏冪礌闅愯棌
+//   let style = doc.createElement("style");
+//   style.innerHTML =
+//       "body>#" +
+//       printId +
+//       "{display:none}@media print{" +
+//       "@page {" +
+//       "    size: auto; " +
+//       "    margin: 2mm 2mm 0mm 1mm; " +
+//       "  }body>:not(#" +
+//       printId +
+//       "){display:none !important}body>#" +
+//       printId +
+//       "{display:block;padding-top:1px}}";
+//   //
+//   content.innerHTML = el.outerHTML;
+//   // // console.log("el.outerHTML", el.outerHTML);
+//   body.appendChild(style);
+
+//   // 涓巗tyle鍏冪礌璁剧疆鐨勬牱寮忕浉閰嶅悎
+//   // 鎶婃墦鍗板唴瀹圭殑鍏冪礌娣诲姞鍒癰ody(浣滀负body鐨勫瓙鍏冪礌锛屽彲鐢╞ody鐨勫瓙閫夋嫨鍣� '>' 鎺у埗鎵撳嵃鏍峰紡)
+//   body.appendChild(content);
+//   setTimeout(() => {
+//     window.print();
+//     body.removeChild(content);
+//     body.removeChild(style);
+//   }, 20);
+// }
 
 
 // beforeUnmount(() => {
@@ -273,7 +324,7 @@
                   @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>
-                  <el-button @click="open()">111</el-button>
+                  <el-button @click="open(scope.row)" :disabled="scope.row.flowCardId==null">鎵撳嵃</el-button>
               </template>
 
             </el-table-column>
@@ -377,6 +428,19 @@
       </div>
     </template>
   </el-dialog>
+
+  <!-- <el-dialog
+        id="sizePrintCalrd"
+        v-model="dialogTableVisible"
+        destroy-on-close
+        style="width: 75%;height:75% ">
+      <print-flow
+          id="child"
+          :printFlowCardId="printFlowCardId"
+          :printLayer="printLayer"
+          style="width: 100%;height: 100%"/>
+    </el-dialog> -->
+
 </template>
 <style scoped>
 #dt {
@@ -421,4 +485,10 @@
   margin-top: -40px;
   margin-left: 100px;
 }
+
+:deep(#sizePrintCalrd .el-dialog__body) {
+  height: 85%;
+  width: 100%;
+  overflow-y: auto;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0