Browse Source

查阅案卷修改

duy 4 months ago
parent
commit
9534f16292

+ 7 - 2
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">
                 <tepmplate v-loading="pdfLoading">
-                    <HcPdf :src="pdfUrl" />
+                    <HcPdf v-if="ishowPdf" :src="pdfUrl" />
                 </tepmplate>
                 <el-tooltip :disabled="!isBubble" content="展开/收起 右侧目录" placement="top">
                     <div class="hc-csc-pdf-btn" @click="onCarryDataShow">
@@ -170,7 +170,7 @@ import { nextTick, onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
 import MetaTable from './meta-table.vue'
 import archiveQueryApi from '~api/using/query.js'
-import { getArrValue, getObjValue } from 'js-fast-way'
+import { getArrValue, getObjValue, getRandom } from 'js-fast-way'
 import tuningApi from '~api/archiveConfig/tuning.js'
 import initialgApi from '~api/initial/initial'
 
@@ -342,6 +342,7 @@ const getArchiveFileListData = async () => {
 const ishowFile = ref(false)
 const pdfLoading = ref(false)
 const pdfUrl = ref('')
+const ishowPdf = ref(false)
 const checkId = ref('')
 const checkmetaFileId = ref('')
 const ishowAllopinion = ref(false)
@@ -357,6 +358,10 @@ const changePdf = (row) => {
     console.log(row, 'row')
     ishowFile.value = true
     pdfLoading.value = false
+    ishowPdf.value = false
+    setTimeout(() => {
+        ishowPdf.value = true
+    }, 100)
     pdfUrl.value = row['pdfFileUrl'] || ''
     checkId.value = row.id
     checkmetaFileId.value = row.id

+ 6 - 1
src/views/transfer/inspects.vue

@@ -17,7 +17,7 @@
         <HcDrawer v-model="isCarrySpotChecksDrawer" uis="hc-carry-spot-checks-target" to-id="carry-spot-checks-layout-target1" flex @close="onCarrySpotChecksDrawerClose">
             <div class="hc-carry-spot-checks-pdf">
                 <tepmplate v-loading="pdfLoading">
-                    <HcPdf :src="pdfUrl" />
+                    <HcPdf v-if="isshowPdf" :src="pdfUrl" />
                 </tepmplate>
                 <el-tooltip content="展开/收起 右侧目录" placement="top" :disabled="!isBubble">
                     <div class="hc-csc-pdf-btn" @click="onCarryDataShow">
@@ -362,11 +362,16 @@ const serReviewFile = async ()=>{
 }
 const checkId = ref('')
 const pdfUrl = ref('')
+const isshowPdf = ref(true)
 const pdfLoading = ref(false)
 const changePdf = (row)=>{
     console.log(row, 'row')
     ishowFile.value = true
     pdfLoading.value = false
+    isshowPdf.value = false
+    setTimeout(() => {
+        isshowPdf.value = true
+    }, 100)
     pdfUrl.value = row['pdfFileUrl'] || ''
     checkId.value = row.id
     checkmetaFileId.value = row.id

+ 19 - 7
src/views/using/query.vue

@@ -151,13 +151,15 @@
                                     >
                                         <template #action="{ row }">
                                             <el-link
-                                                v-if="AppTheme === 'light'" class="mylink" type="primary"
+                                                v-if="AppTheme === 'light'" v-loading="row.consultLoading" class="mylink"
+                                                type="primary"
                                                 @click.stop="consultFileClick(row, 1)"
                                             >
                                                 查阅案卷
                                             </el-link>
                                             <el-button
-                                                v-else size="small" type="primary"
+                                                v-else v-loading="row.consultLoading" size="small"
+                                                type="primary"
                                                 @click.stop="consultFileClick(row, 1)"
                                             >
                                                 查阅案卷
@@ -340,7 +342,7 @@
             <div class="hc-carry-spot-checks-pdf">
                 <!-- <HcPdf src="https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20221212/ce9799c7d18efc03efefd6f242439f2e.pdf"/> -->
                 <div v-loading="pdfLoading" class="relative h-full w-full">
-                    <hc-pdfs :url="pdfUrl" />
+                    <hc-pdfs v-if="isShowPdf" :url="pdfUrl" />
                 </div>
                 <el-tooltip :disabled="!isBubble" content="展开/收起 右侧目录" placement="top">
                     <div class="hc-csc-pdf-btn" @click="onCarryDataShow">
@@ -395,8 +397,8 @@
                         v-if="tabTypeKey === 'tab1'" :column="cscTableColumn1" :datas="cscTableData1"
                         :is-arr-index="false" :loading="cscTableLoading" is-new
                     >
-                        <template #name="{ row }">
-                            <div :class="row.id === checkId ? 'bg-orange-400' : 'text-hover'" @click="changePdf(row)">
+                        <template #name="{ row, index }">
+                            <div :class="row.id === checkId ? 'bg-orange-400' : 'text-hover'" @click="changePdf(row, index)">
                                 {{ row?.fileName }}
                             </div>
                         </template>
@@ -1176,9 +1178,13 @@ const consultFileClick = async (row, type) => {
   
     if (type === 1) {
         //查阅案卷
+        row.consultLoading = true
+
         getArchivesAutoView(row.id)
         fileInfo.value = row
      await getArchiveFileListData()
+       //查阅案卷
+       row.consultLoading = false
      isCarrySpotChecksDrawer.value = true
         // const url = await viewPdf(row.id, row)
         // pdfUrl.value = url
@@ -1206,13 +1212,19 @@ const fileInfo = ref({
     time: '',
     pageN: 0,
 })//案卷信息
+const isShowPdf = ref(true)
+const changePdf = (row, index) => {
 
-const changePdf = (row) => {
-    console.log(row, 'row')
     if (pdfLoading.value === true) {
         pdfLoading.value = false
     }
+    isShowPdf.value = false
+    setTimeout(() => {
+        isShowPdf.value = true
+    }, 100)
     pdfUrl.value = row['pdfFileUrl'] || ''
+ 
+    
     checkId.value = row.id
     isFile.value = 2
     getmetaInfo(checkId.value)