From 6d313a4a6f9f9d7ea65ec50ab0d4491e595edb97 Mon Sep 17 00:00:00 2001 From: admin <15939171744@163.com> Date: 星期二, 15 十月 2024 09:47:26 +0800 Subject: [PATCH] -打印bug修改 --- jcdm-ui/src/views/main/kb/stationTerminal/index.vue | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 48 insertions(+), 1 deletions(-) diff --git a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue index 1668a5a..ed56f0d 100644 --- a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue +++ b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue @@ -97,9 +97,15 @@ </el-row> <el-row v-show="offlineFlag" style="margin-top: 20px"> - <el-button id="print" v-print="'#printMe'" type="primary">鎵撳嵃涓夎仈鐮�</el-button> + <el-button id="printBack" v-print="'#printMeBack'" type="primary">鎵撳嵃涓�鑱旂爜</el-button><br> + <el-button style="margin-top: 20px" id="print" v-print="'#printMe'" type="primary">鎵撳嵃涓夎仈鐮�</el-button> <el-button style="display: none" @click="test1">鐢熸垚浜岀淮鐮�</el-button> <el-button style="display: none" @click="test2">鐢熸垚 + <span style="font-size: 10px;margin-left: 52px">MADE IN CHINA</span><br> + <br> + <br>浜岀淮鐮�</el-button> + <el-button style="display: none" @click="test4">鐢熸垚浜岀淮鐮�</el-button> + <el-button style="display: none" @click="test5">鐢熸垚 <span style="font-size: 10px;margin-left: 52px">MADE IN CHINA</span><br> <br> <br>浜岀淮鐮�</el-button> @@ -128,6 +134,19 @@ <br> <br> <div ref="canvasWrapper" id="canvasWrapper2" style="display: flex;justify-content: center;margin-top: -27px"></div> + <span style="font-size: 10px;word-break: break-all;display: flex;justify-content: center;width: 155px;margin-left: 20px;margin-top: 3px">P{{printInfoData.partNumber}}#T{{headContent.sfcCode}}#V{{printInfoData.supplierCode}}#S{{printInfoData.softwareVersion}}#H{{printInfoData.hardwareVersion}}#NBMS#</span> + </div> + </div> + + <div style="display: none"> + <div id="printMeBack"> + <br> + <br> + <div ref="canvasWrapper" id="canvasWrapper4" style="display: flex;justify-content: center;margin-top: -27px"></div> + <span style="font-size: 10px;word-break: break-all;display: flex;justify-content: center;width: 155px;margin-left: 20px;margin-top: 3px">P{{printInfoData.partNumber}}#T{{headContent.sfcCode}}#V{{printInfoData.supplierCode}}#S{{printInfoData.softwareVersion}}#H{{printInfoData.hardwareVersion}}#NBMS#</span> + <br> + <br> + <div ref="canvasWrapper" id="canvasWrapper5" style="display: flex;justify-content: center;margin-top: -27px"></div> <span style="font-size: 10px;word-break: break-all;display: flex;justify-content: center;width: 155px;margin-left: 20px;margin-top: 3px">P{{printInfoData.partNumber}}#T{{headContent.sfcCode}}#V{{printInfoData.supplierCode}}#S{{printInfoData.softwareVersion}}#H{{printInfoData.hardwareVersion}}#NBMS#</span> </div> </div> @@ -544,6 +563,32 @@ } ) }, + test4(){ + document.getElementById('canvasWrapper4').innerHTML = ''; + this.$nextTick(() => { + let qrCode = new QRCode('canvasWrapper4',{ + width: 120, + height: 120, + text: 'P'+this.printInfoData.partNumber+'#T'+ this.headContent.sfcCode +'#V'+this.printInfoData.supplierCode+'#S'+this.printInfoData.softwareVersion+'#H'+this.printInfoData.hardwareVersion+'#NBMS#', + colorDark: '#000', + colorLight: '#fff' + }) + } + ) + }, + test5(){ + document.getElementById('canvasWrapper5').innerHTML = ''; + this.$nextTick(() => { + let qrCode = new QRCode('canvasWrapper5',{ + width: 120, + height: 120, + text: 'P'+this.printInfoData.partNumber+'#T'+ this.headContent.sfcCode +'#V'+this.printInfoData.supplierCode+'#S'+this.printInfoData.softwareVersion+'#H'+this.printInfoData.hardwareVersion+'#NBMS#', + colorDark: '#000', + colorLight: '#fff' + }) + } + ) + }, print1() { // 浣跨敤鎻掍欢鎵撳嵃鏂瑰紡 // this.$print(this.$refs.printMe) @@ -731,6 +776,8 @@ if(this.headContent.processesCode === 'POP430'){ this.test1() this.test2() + this.test4() + this.test5() } this.getListFormulaChild() // this.addOverStationCollection() -- Gitblit v1.9.3