From 6ce99cb40ee88271fa0d0d8daea99ba0eaec122f Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 05 Nov 2021 16:01:39 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises

---
 src/views/securityGuard/securityGuard.vue |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index 6f8ce0f..69862c6 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -266,7 +266,7 @@
                                :upload-after="uploadAfter2">
                     </avue-form>
                 </el-dialog>
-                <div style="position: fixed; top: 9999px; width: 100%; height: 100%;">
+                <div style="position: fixed; top: 9999px; width: 100%; height: 100%; ">
                     <div class="certificate_box"
                          id="certificateDom">
                         <div class="security_main"
@@ -1131,19 +1131,26 @@
                 return
             }
             //更新发证时间
-            this.updateUserInfo();
             var printDom = document.getElementById("certificateDom");
-            printDom.style.position = "fixed";
+            printDom.style.position = "absolute";
             printDom.style.top = "-27.5%";
             printDom.style.left = "-23%";
             printDom.style.width = "120%";
             printDom.style.height = "100%";
             printDom.style.fontFamily = "SimSun";
-            this.$Print(this.$refs.certificateBox);
-            printDom.style.position = "relative";
-            printDom.style.left = "0";
-            printDom.style.width = "100%";
-            printDom.style.height = "auto";
+
+            this.$print('#certificateDom', {
+                noPrint: '.noPrint',
+                onStart: () => {
+                    // console.log('打印开始', Date.parse(new Date()));
+                },
+                onEnd: () => {
+                    this.updateUserInfo();
+                    // console.log('打印完成', Date.parse(new Date()));
+                }
+            });
+
+
         },
         getNewTime () {
             var nowTime = new Date()

--
Gitblit v1.9.3