From 48c7ffb6e7137b4b62bfdc63be8aa72d085ba40e Mon Sep 17 00:00:00 2001 From: admin <15939171744@163.com> Date: 星期三, 19 二月 2025 11:56:04 +0800 Subject: [PATCH] -换型bug修改 --- jcdm-ui/src/views/main/kb/stationTerminal/index.vue | 71 +++++++++++++++++++++++++++++++---- 1 files changed, 62 insertions(+), 9 deletions(-) diff --git a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue index a8b1c55..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> @@ -115,18 +121,33 @@ <br> <img style="width: 140px;height: 20px;margin-left: 30px" :src="require('@/assets/images/a8963a24920640508e96150a053fc41.png')"/> <span style="margin-left: 72px">{{printInfoData.printModel}}</span><br> - <span style="margin-left: 75px">{{printInfoData.supplierCode}}</span><br> - <span style="margin-left: 52px">{{printInfoData.partNumber}}</span><br> - <span style="font-size: 10px;margin-left: 29px;">{{headContent.sfcCode}}</span><br> + <span style="margin-left: 73px">{{printInfoData.supplierCode}}</span><br> + <span style="margin-left: 55px">{{printInfoData.partNumber}}</span><br> + <span style="font-size: 10px;margin-left: 28px;">{{headContent.sfcCode}}</span><br> + <span style="font-size: 10px;margin-left: 60px">MADE IN CHINA</span><br> + <br> <br> <br> <div ref="canvasWrapper" id="canvasWrapper1" 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">P{{printInfoData.partNumber}}#T{{headContent.sfcCode}}#V{{printInfoData.supplierCode}}#S{{printInfoData.softwareVersion}}#H{{printInfoData.hardwareVersion}}#NBMS#</span> + <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="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">P{{printInfoData.partNumber}}#T{{headContent.sfcCode}}#V{{printInfoData.supplierCode}}#S{{printInfoData.softwareVersion}}#H{{printInfoData.hardwareVersion}}#NBMS#</span> + <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> </el-row> @@ -398,8 +419,8 @@ content: '', activeName: 'first', // url: "ws://192.168.2.248:8080/websocket/message/", - url: "ws://10.103.210.248:8080/websocket/message/", - // url: "ws://192.168.2.76:8080/websocket/message/", + // url: "ws://10.103.210.248:8080/websocket/message/", + url: "ws://192.168.2.76:8080/websocket/message/", message: "", text_content: "", ws: null, @@ -533,6 +554,32 @@ document.getElementById('canvasWrapper2').innerHTML = ''; this.$nextTick(() => { let qrCode = new QRCode('canvasWrapper2',{ + 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' + }) + } + ) + }, + 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#', @@ -729,6 +776,8 @@ if(this.headContent.processesCode === 'POP430'){ this.test1() this.test2() + this.test4() + this.test5() } this.getListFormulaChild() // this.addOverStationCollection() @@ -825,7 +874,11 @@ }; this.ws.onmessage = function (event) { - if (event.data === "print") { + if (event.data === "reportError") { + self.$message.error('涓嬬嚎鎶ュ伐寮傚父澶辫触锛�'); + }else if (event.data === "reportSuccess") { + self.$message('涓嬬嚎鎶ュ伐鎴愬姛锛�'); + }else if (event.data === "print") { self.$message('postman璋冪敤鎵撳嵃鏂规硶鎵撳嵃锛�'); // self.print1() document.getElementById('print').click(); -- Gitblit v1.9.3