From 88c8493c8ccd1d487966069f65ca2c9610683bdf Mon Sep 17 00:00:00 2001
From: hdy <1105738590@qq.com>
Date: 星期二, 11 六月 2024 09:10:34 +0800
Subject: [PATCH] 打印

---
 jcdm-ui/src/views/main/cfkb/Instructions/index.vue |   35 ++++++++++++++++++++++++++---------
 1 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/jcdm-ui/src/views/main/cfkb/Instructions/index.vue b/jcdm-ui/src/views/main/cfkb/Instructions/index.vue
index a351ebd..deb759a 100644
--- a/jcdm-ui/src/views/main/cfkb/Instructions/index.vue
+++ b/jcdm-ui/src/views/main/cfkb/Instructions/index.vue
@@ -30,12 +30,10 @@
             <el-col :span="24">
               <div>
                 <div style="display: none" id="printMe">
+                  <br>
                   <p style="margin-left: 25px">9900166410</p>
                   <p style="margin-left: 25px">HW001.001</p>
                   <p style="margin-left: 25px">SW002.005</p>
-                  <br>
-                  <br>
-                  <br>
                   <br>
                   <span style="font-size: 30px;font-weight: bold;margin-left: 25px;">GEELY</span><br>
                   <span style="font-size: 10px;margin-left: 14px">COMMERCIAL VEHICLE</span><br>
@@ -47,12 +45,16 @@
                   <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;">P9900166410#T{{text1}}#V993983#SSW002.005#HHW001.001#NBMS#</span>
                   <br>
-                  <div ref="canvasWrapper" id="canvasWrapper" style="display: flex;justify-content: center;margin-top: -27px"></div>
-                  <span style="font-size: 7px;word-break: break-all;display: flex;justify-content: center;">P9900166410#T{{text1}}#V993983#SSW002.005#HHW001.001#NBMS#</span>
+                  <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;">P9900166410#T{{text1}}#V993983#SSW002.005#HHW001.001#NBMS#</span>
                 </div>
                 <el-button @click="print1">鎵撳嵃</el-button>
                 <el-button style="display: none" @click="test1">鐢熸垚浜岀淮鐮�</el-button>
+                <el-button style="display: none" @click="test2">鐢熸垚浜岀淮鐮�</el-button>
 
               </div>
             </el-col>
@@ -448,16 +450,30 @@
       return false;
     },
     test1(){
-      document.getElementById('canvasWrapper').innerHTML = '';
+      document.getElementById('canvasWrapper1').innerHTML = '';
       this.$nextTick(() => {
-        let qrCode = new QRCode('canvasWrapper',{
+        let qrCode = new QRCode('canvasWrapper1',{
           width: 120,
           height: 120,
-          text: this.text1,
+          text: 'P9900166410#T'+ this.text1 +'#V993983#SSW002.005#HHW001.001#NBMS#',
           colorDark: '#000',
           colorLight: '#fff'
         })
-      })
+      }
+      )
+    },
+    test2(){
+      document.getElementById('canvasWrapper2').innerHTML = '';
+      this.$nextTick(() => {
+          let qrCode = new QRCode('canvasWrapper2',{
+            width: 120,
+            height: 120,
+            text: 'P9900166410#T'+ this.text1 +'#V993983#SSW002.005#HHW001.001#NBMS#',
+            colorDark: '#000',
+            colorLight: '#fff'
+          })
+        }
+      )
     },
 
     /** 鍏ョ珯澧炲姞杩囩珯閲囬泦璁板綍 **/
@@ -596,6 +612,7 @@
         const scanValue = this.myserialport.hex2atostr(value).replace(/[\r\n]/g, '');
         console.log("涓插彛鏀跺埌鏁版嵁-------------------"+scanValue)
         this.test1()
+        this.test2()
         this.text1 = scanValue
         this.headContent.sfcCode = scanValue
         // this.print1()

--
Gitblit v1.9.3