From a513e8cc2ff76fd60cab665f6bd3174d624c37b4 Mon Sep 17 00:00:00 2001 From: wangfei <3597712270@qq.com> Date: 星期二, 13 八月 2024 08:37:10 +0800 Subject: [PATCH] 钢化更改文字显示,大屏模块、磨边的玻璃显示更改判断条件,下片台注释打印 --- UI-Project/src/views/UnLoadGlass/loadmachinerack.vue | 104 +++++++++++++++++++++++++--------------------------- 1 files changed, 50 insertions(+), 54 deletions(-) diff --git a/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue b/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue index a538d4b..5ffd4ae 100644 --- a/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue +++ b/UI-Project/src/views/UnLoadGlass/loadmachinerack.vue @@ -13,8 +13,7 @@ import request from "@/utils/request"; import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; import { WebSocketHost, host } from '@/utils/constants' -import PrintFlow from './PrintFlow.vue' -import print from 'fromwe-print-nb' +// import PrintFlow from './PrintFlow.vue' const dialogFormVisiblea = ref(false) const dialogFormVisiblea2 = ref(false) const dialogFormVisibleaDownGlass = ref(false) @@ -33,8 +32,8 @@ const selectValuesa = reactive({}); const selectOptionsa = ref([]); const dialogTableVisible = ref(false) -const printFlowCardId = ref('') -const printLayer=ref('') +// const printFlowCardId = ref('') +// const printLayer=ref('') const handleInputChangea = (value, rowId) => { // 鏇存柊瀵瑰簲琛岀殑 select 鍊� @@ -235,56 +234,56 @@ } -const open=async(row)=>{ +// const open=async(row)=>{ - printFlowCardId.value=row.flowCardId; - printLayer.value=row.layer - dialogTableVisible.value = true; - setTimeout(() => { - printFlowCard(); // 鏇挎崲鎴愪綘瑕佹墽琛岀殑鍑芥暟鍚� - }, 1000); - ; -} +// 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(); +// 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 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); +// // 鏍峰紡鎺у埗涓庢墦鍗版棤鍏崇殑鍏冪礌闅愯棌 +// 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); -} +// // 涓巗tyle鍏冪礌璁剧疆鐨勬牱寮忕浉閰嶅悎 +// // 鎶婃墦鍗板唴瀹圭殑鍏冪礌娣诲姞鍒癰ody(浣滀负body鐨勫瓙鍏冪礌锛屽彲鐢╞ody鐨勫瓙閫夋嫨鍣� '>' 鎺у埗鎵撳嵃鏍峰紡) +// body.appendChild(content); +// setTimeout(() => { +// window.print(); +// body.removeChild(content); +// body.removeChild(style); +// }, 20); +// } // beforeUnmount(() => { @@ -430,20 +429,17 @@ </template> </el-dialog> - <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> --> <print-flow id="child" :printFlowCardId="printFlowCardId" :printLayer="printLayer" style="width: 100%;height: 100%"/> - </el-dialog> + </el-dialog> --> </template> <style scoped> -- Gitblit v1.8.0