瀏覽代碼

印章图标显示

duy 1 年之前
父節點
當前提交
d7a782d17c

+ 5 - 1
public/plugins/pdfjs/web/viewer.css

@@ -1248,8 +1248,12 @@
   height: 100%;
   z-index: 1;
 }
-
+.stamp-cursor{
+  cursor: none;    
+  cursor: url('yinzhang.ico') 12 12, auto !important;
+}
 .pdfViewer .page {
+
   direction: ltr;
   width: 816px;
   height: 1056px;

二進制
public/plugins/pdfjs/web/yinzhang.ico


+ 7 - 3
src/plugins/HcPdfSign.js

@@ -23,7 +23,7 @@ export default class HcPdfSign {
      * @param img   签章图片url
      * @param func  回调函数
      */
-    static createPdf({ ele, url, img, change, load }) {
+    static createPdf({ ele, url, img, change, load, isShowYinzhang }) {
         this.initVarNull()
         //判断参数是否合法
         if (isNullES(ele)) {
@@ -73,7 +73,7 @@ export default class HcPdfSign {
         iframe.style.border = '1px solid #ccc'
         iframe.name = 'HcPdfSign'
         iframe.addEventListener('load', () => {
-            this.iframeLoad()
+            this.iframeLoad(isShowYinzhang)
         })
         dom.appendChild(iframe)
         this.iframeDom = iframe
@@ -203,8 +203,12 @@ export default class HcPdfSign {
     }
 
     //PDF加载完成
-    static iframeLoad() {
+    static iframeLoad(isShowYinzhang) {
         const viewer = this.iframeDom?.contentDocument?.getElementById('viewer')
+        if (isShowYinzhang) {
+            viewer.classList.add('stamp-cursor')
+        }
+       
         //页面被点击
         viewer.addEventListener('click', (event) => {
             this.viewerClick(event).then()

+ 2 - 0
src/views/tasks/components/hc-pdf1.vue

@@ -50,6 +50,7 @@ watch(() => props.src, (src) => {
 //监听签章图片
 watch(() => props.sign, (val) => {
     signImg.value = val
+    getPdf()
 })
 
 //监听是否批量签章
@@ -85,6 +86,7 @@ const getPdf = () => {
         change: (data) => {
             emit('change', data)
         },
+        isShowYinzhang:signImg.value.length > 0 ? true : false,
     })
 }
 

+ 5 - 1
src/views/tasks/hc-data.vue

@@ -273,7 +273,11 @@ const rowTaskName = async (row) => {
             taskReviewData.value = approvalFileList
             if (approvalFileList.length > 0) {
                 batchPdfUrl.value = approvalFileList[0].pdfUrl
-                await queryCurrentUserData()
+              if (sbTableKey.value === 'key1') {
+                queryCurrentUserData()
+              } else {
+                logoName.value = ''
+              }
                 pdfItem.value.pdfUrl = approvalFileList[0].pdfUrl