Prechádzať zdrojové kódy

抽检时间计算修改

duy 2 týždňov pred
rodič
commit
ddfccf11e4

+ 1 - 1
package.json

@@ -25,7 +25,7 @@
         "dayjs": "^1.11.13",
         "echarts": "^5.5.1",
         "element-plus": "^2.8.5",
-        "hc-vue3-ui": "^4.8.4",
+        "hc-vue3-ui": "^4.8.5",
         "js-base64": "^3.7.7",
         "js-cookie": "^3.0.5",
         "js-fast-way": "^0.5.7",

+ 10 - 2
src/views/archives/manage/inspects.vue

@@ -24,7 +24,7 @@
         <HcDrawer v-model="isCarrySpotChecksDrawer" ui="hc-carry-spot-checks-target" to-id="carry-spot-checks-layout-target1" flex @close="onCarrySpotChecksDrawerClose">
             <div class="hc-carry-spot-checks-pdf">
                 <div v-loading="pdfLoading" class="h-full">
-                    <HcPdf v-if="isshowPdf" :src="pdfUrl" />
+                    <HcPdf v-if="isshowPdf" :src="pdfUrl" @rendered="getPdfTime" />
                 </div>
                 <el-tooltip content="展开/收起 右侧目录" placement="top" :disabled="!isBubble">
                     <div class="hc-csc-pdf-btn" @click="onCarryDataShow">
@@ -388,6 +388,7 @@ const changePdf = (row)=>{
         isshowPdf.value = true
     }, 100)
     // pdfUrl.value = row['pdfFileUrl'] || ''
+    pdfShowTime.value = 0
 
     let rawUrl = row['pdfFileUrl'] || ''
 
@@ -402,6 +403,11 @@ const changePdf = (row)=>{
 
 
 }
+const pdfShowTime = ref(0)
+const getPdfTime = (val)=>{
+    pdfShowTime.value = val
+}
+
 // 监控pdfUrl和shouldCarryOutSpotChecks的变化
 watch([pdfUrl, isCarrySpotChecksDrawer], ([newPdfUrl, newShouldCarryOutSpotChecks]) => {
   if (newPdfUrl && newPdfUrl.length > 0 && newShouldCarryOutSpotChecks) {
@@ -410,7 +416,8 @@ watch([pdfUrl, isCarrySpotChecksDrawer], ([newPdfUrl, newShouldCarryOutSpotCheck
       if (pdfUrl.value === newPdfUrl && isCarrySpotChecksDrawer.value) {
         serReviewFile()
       }
-    }, 30000)
+      
+    }, pdfShowTime.value ? pdfShowTime.value + 30000 : 30000)
   }
 }, { deep: true })
 const opid = ref('')
@@ -623,6 +630,7 @@ const onCarrySpotChecksDrawerClose = () => {
     ishowFile.value = false
     checkmetaFileId.value = ''
     tabTypeKey.value = 'tab1'
+    pdfShowTime.value = 0
     getTableData()
 }
 

+ 8 - 3
src/views/transfer/components/carry-spot-checks.vue

@@ -3,7 +3,7 @@
         <HcDrawer v-model="isDrawer" to-id="carry-spot-checks-layout-target" ui="hc-carry-spot-checks-target" flex @close="onCarrySpotChecksDrawerClose">
             <div class="hc-carry-spot-checks-pdf">
                 <div v-loading="pdfLoading" class="h-full">
-                    <HcPdf v-if="ishowPdf" :src="pdfUrl" />
+                    <HcPdf v-if="ishowPdf" :src="pdfUrl" @rendered="getPdfTime" />
                 </div>
                 <el-tooltip :disabled="!isBubble" content="展开/收起 右侧目录" placement="top">
                     <div class="hc-csc-pdf-btn" @click="onCarryDataShow">
@@ -349,6 +349,7 @@ const changePdf = (row) => {
     console.log(row, 'row')
     ishowFile.value = true
     pdfLoading.value = false
+    pdfShowTime.value = 0
     ishowPdf.value = false
     setTimeout(() => {
         ishowPdf.value = true
@@ -366,7 +367,10 @@ const changePdf = (row) => {
 
 
 }
-
+const pdfShowTime = ref(0)
+const getPdfTime = (val)=>{
+    pdfShowTime.value = val
+}
 // 监控pdfUrl和shouldCarryOutSpotChecks的变化
 watch([pdfUrl, isDrawer], ([newPdfUrl, newShouldCarryOutSpotChecks]) => {
   if (newPdfUrl && newPdfUrl.length > 0 && newShouldCarryOutSpotChecks) {
@@ -375,7 +379,7 @@ watch([pdfUrl, isDrawer], ([newPdfUrl, newShouldCarryOutSpotChecks]) => {
       if (pdfUrl.value === newPdfUrl && isDrawer.value) {
         serReviewFile()
       }
-    }, 30000)
+    }, pdfShowTime.value ? pdfShowTime.value + 30000 : 30000)
   }
 }, { deep: true })
 //设置为已查阅
@@ -510,6 +514,7 @@ const onCarrySpotChecksDrawerClose = () => {
     checkmetaFileId.value = ''
     checkId.value = ''
     pdfUrl.value = ''
+    pdfShowTime.value = 0
     cscTableData1.value = []
     emit('close', false)
 }

+ 4 - 4
yarn.lock

@@ -2164,10 +2164,10 @@ has-flag@^4.0.0:
   resolved "http://219.151.181.73:9000/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
   integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
 
-hc-vue3-ui@^4.8.4:
-  version "4.8.4"
-  resolved "http://219.151.181.73:9000/hc-vue3-ui/-/hc-vue3-ui-4.8.4.tgz#ba34700e398b9e9bef0eefc5b8abfba686e13d2e"
-  integrity sha512-Djx2kXI0qYL/yolW2LqVwl0kdcTIFqsrN9+yyOAeuoeWK3P6O3hmPQ/6Drdumu3gS1qEP7O/FYlKk/ox9QnZbQ==
+hc-vue3-ui@^4.8.5:
+  version "4.8.5"
+  resolved "http://219.151.181.73:9000/hc-vue3-ui/-/hc-vue3-ui-4.8.5.tgz#3c2a159f5337b37b93d6b8ae466a395dc122ba3b"
+  integrity sha512-awTXjNeBkDpTsqsCCT4MAI2d3XFFR2a/wdIH5BeF+FDJwa/LDeEISv6g3JQrIF3NKZxaB8qEpQcpcHr9dlvQvA==
   dependencies:
     axios "^1.7.7"
     dayjs "^1.11.13"