Bläddra i källkod

pdf预览测试

ZaiZai 1 år sedan
förälder
incheckning
6501c473dc

+ 4 - 2
src/views/archives/rolling.vue

@@ -1,7 +1,7 @@
 <template>
     <hc-body split :loading="treeLoading" :project-nmae="projectInfo.name">
         <template #tree>
-            <HcTree :project-id="projectId" :contract-id="contractId" :auto-expand-keys="treeAutoExpandKeys" @nodeTap="nodeElTreeClick" @nodeLoading="treeNodeLoading" @menuTap="ElTreeMenuClick" />
+            <HcTree :project-id="projectId" :contract-id="contractId" :auto-expand-keys="treeAutoExpandKeys" @node-tap="nodeElTreeClick" @node-loading="treeNodeLoading" @menu-tap="ElTreeMenuClick" />
         </template>
         <hc-new-card title="已形成的案卷">
             <!-- <template  #header>
@@ -48,6 +48,7 @@ const contractId = ref(useAppState.getContractId)
 const projectInfo = ref(useAppState.getProjectInfo)
 const isCollapse = ref(useAppState.getCollapse)
 import tuningApi from '~api/archiveConfig/tuning.js'
+import { toPdfPage } from '~uti/btn-auth'
 
 //监听
 watch(() => useAppState.getCollapse, (Collapse) => {
@@ -183,7 +184,8 @@ const viewPdf = async (id)=>{
     })
     if (!error && code === 200) {
       if (data) {
-        window.open(data, '_blank')
+          toPdfPage(data)
+        //window.open(data, '_blank')
       } else {
         window.$message?.warning('文件不存在')
       }

+ 7 - 4
src/views/archives/tuning.vue

@@ -2,8 +2,8 @@
     <hc-body split :loading="treeLoading" :project-nmae="projectInfo.name">
         <template #tree>
             <HcTree
-                :project-id="projectId" :contract-id="contractId" :auto-expand-keys="treeAutoExpandKeys" @nodeTap="nodeElTreeClick" @menuTap="ElTreeMenuClick"
-                @nodeLoading="treeNodeLoading"
+                :project-id="projectId" :contract-id="contractId" :auto-expand-keys="treeAutoExpandKeys" @node-tap="nodeElTreeClick" @menu-tap="ElTreeMenuClick"
+                @node-loading="treeNodeLoading"
             />
         </template>
         <hc-new-card>
@@ -256,6 +256,7 @@ import tuningApi from '~api/archiveConfig/tuning.js'
 import archiveFileApi from '~api/archiveFile/archiveFileAuto.js'
 
 import { getStoreValue, setStoreValue } from '~src/utils/storage'
+import { toPdfPage } from '~uti/btn-auth'
 
 //变量
 const useAppState = useAppStore()
@@ -891,7 +892,8 @@ const viewPdf = async (id) => {
     })
     if (!error && code === 200) {
         if (data) {
-            window.open(data, '_blank')
+            toPdfPage(data)
+            //window.open(data, '_blank')
         } else {
             window.$message?.warning('文件不存在')
         }
@@ -904,7 +906,8 @@ const viewPdf = async (id) => {
 //查看卷内文件pdf
 const viewfilePdf = (row)=>{
     if (row?.pdfFileUrl) {
-        window.open(row?.pdfFileUrl, '_blank')
+        toPdfPage(row?.pdfFileUrl)
+        //window.open(row?.pdfFileUrl, '_blank')
     } else {
         window.$message?.warning('文件不存在')
     }

+ 3 - 1
src/views/custody/backup.vue

@@ -179,6 +179,7 @@ import { useAppStore } from '~src/store'
 import backupApi from '~api/backup/backupApi.js'
 import { Loading } from 'element-plus/es/components/loading/src/service'
 import { setUrlHttps } from '~src/utils/tools'
+import { toPdfPage } from '~uti/btn-auth'
 
 //变量
 const useAppState = useAppStore()
@@ -221,7 +222,8 @@ const getFileData = async ()=>{
 }
 const downUtilsClick = () => {
     if (downFileUrl.value) {
-         window.open(downFileUrl.value, '_blank')
+        toPdfPage(downFileUrl.value)
+         //window.open(downFileUrl.value, '_blank')
         // console.log(setUrlHttps(downFileUrl.value), 'setUrlHttps(downFileUrl.value)')
         // window.open( setUrlHttps(downFileUrl.value), '_blank')
     }

+ 4 - 2
src/views/custody/components/tab-reform.vue

@@ -22,6 +22,7 @@ import { nextTick, ref, watch } from 'vue'
 import archiveFileApi from '~api/archiveFile/archiveFile'
 import earlyApi from '~api/custody/early'
 import { getArrValue } from 'js-fast-way'
+import { toPdfPage } from '~uti/btn-auth'
 
 //参数
 const props = defineProps({
@@ -95,7 +96,8 @@ const tabChange = (item) => {
 //名称被点击
 const tableRowName = (row) => {
     if (row['pdfFileUrl']) {
-        window.open(row['pdfFileUrl'], '_blank')
+        toPdfPage(row['pdfFileUrl'])
+        //window.open(row['pdfFileUrl'], '_blank')
     } else {
         window.$message?.warning('文件不存在')
     }
@@ -158,7 +160,7 @@ const getTableData = async () => {
             }
         }
     }
-        
+
 
 
 // 暴露出去

+ 5 - 2
src/views/custody/testing.vue

@@ -257,6 +257,7 @@ import truePng from '~src/assets/testphoto/true.png'
 import fullPng from '~src/assets/testphoto/full.png'
 import usePng from '~src/assets/testphoto/use.png'
 import safePng from '~src/assets/testphoto/safe.png'
+import { toPdfPage } from '~uti/btn-auth'
 
 //消息数量
 const props = defineProps(
@@ -447,7 +448,8 @@ const getReportData = async () => {
 const viewHpdf = (item)=>{
     console.log(item, 'item')
     if (item.reportPdfUrl) {
-        window.open(item.reportPdfUrl, '_blank')
+        toPdfPage(item.reportPdfUrl)
+        //window.open(item.reportPdfUrl, '_blank')
     } else {
         window.$message.warning('暂无pdf')
     }
@@ -483,7 +485,8 @@ const imageDialogClose = ()=>{
 //查看报告
 const viewReport = ()=>{
     if (finalUrl.value) {
-        window.open(finalUrl.value, '_blank')
+        toPdfPage(finalUrl.value)
+        //window.open(finalUrl.value, '_blank')
     } else {
         window.$message.warning('暂无pdf')
     }

+ 8 - 5
src/views/file/collection.vue

@@ -423,6 +423,7 @@ import { arrKeySort, arrToId, deepClone, getArrValue, getObjVal } from 'js-fast-
 import { getTokenHeader } from '~src/api/request/header'
 import tasksApi from '~api/tasks/data'
 import ossApi from '~api/oss'
+import { toPdfPage } from '~uti/btn-auth'
 
 //变量
 const useAppState = useAppStore()
@@ -1596,16 +1597,18 @@ const tableRowName = (row) => {
     console.log(row, 'row')
     if (row?.isCertificationValue === '已认证' || row?.isApprovalValue === '已审批') {
         if (row['eVisaFile']) {
-            window.open(row['eVisaFile'], '_blank')
+            toPdfPage(row['eVisaFile'])
+            //window.open(row['eVisaFile'], '_blank')
         } else if (row['pdfFileUrl']) {
-            window.open(row['pdfFileUrl'], '_blank')
-
+            toPdfPage(row['pdfFileUrl'])
+            //window.open(row['pdfFileUrl'], '_blank')
         } else {
             window.$message?.warning('文件不存在')
         }
     } else {
         if (row['pdfFileUrl']) {
-            window.open(row['pdfFileUrl'], '_blank')
+            toPdfPage(row['pdfFileUrl'])
+            //window.open(row['pdfFileUrl'], '_blank')
         } else {
             window.$message?.warning('文件不存在')
         }
@@ -1735,7 +1738,7 @@ html.dark .hc-online-verify-drawer .el-card.hc-new-card-box{
     .hc-card-header-box {
         .online-verify-icon {
             color: var(--el-color-primary);
-           
+
         }
     }
 }

+ 5 - 3
src/views/file/records.vue

@@ -1,7 +1,7 @@
 <template>
     <hc-body class="hc-file-records-page" split :loading="treeLoading" :project-nmae="projectInfo.name">
         <template #tree>
-            <HcTree :project-id="projectId" :contract-id="contractId" :auto-expand-keys="treeAutoExpandKeys" @nodeTap="projectTreeClick" @nodeLoading="treeNodeLoading" @menuTap="ElTreeMenuClick" />
+            <HcTree :project-id="projectId" :contract-id="contractId" :auto-expand-keys="treeAutoExpandKeys" @node-tap="projectTreeClick" @node-loading="treeNodeLoading" @menu-tap="ElTreeMenuClick" />
         </template>
         <hc-new-card>
             <template #header>
@@ -108,7 +108,7 @@
                         <el-scrollbar>
                             <HcTree
                                 ref="movesTreeRef" id-prefix="hc-tree-moves-" :project-id="projectId" :contract-id="contractId" is-radio
-                                :show-radio-fun="showRadioFun" @radioChange="radioChange"
+                                :show-radio-fun="showRadioFun" @radio-change="radioChange"
                             />
                         </el-scrollbar>
                     </div>
@@ -277,6 +277,7 @@ import { getStoreValue, setStoreValue } from '~src/utils/storage'
 import tasksApi from '~api/tasks/data'
 import ossApi from '~api/oss'
 import { arrKeySort, deepClone, downloadBlob, getArrValue, getObjVal } from 'js-fast-way'
+import { toPdfPage } from '~uti/btn-auth'
 
 //变量
 const useAppState = useAppStore()
@@ -1397,7 +1398,8 @@ const tableRowName = async (row) => {
     })
     //处理数据
     if (!error && code === 200) {
-        window.open(data, '_blank')
+        toPdfPage(data)
+        //window.open(data, '_blank')
     }
 }
 

+ 20 - 18
src/views/transfer/initial-expert.vue

@@ -32,7 +32,7 @@
                     </el-button>
                 </HcTooltip>
             </template>
-           
+
             <div v-if="totalData.length > 0" v-loading="totalLoaing" class="h-screen">
                 <div v-for="(item, index) in totalData" :key="index">
                     <div class="hc-card-table-title">{{ item?.unitInfo }}</div>
@@ -54,7 +54,7 @@
                     </template>
                 </div>
             </div>
-            
+
             <div v-else class=" h-screen">
                 <HcNoData />
             </div>
@@ -90,6 +90,7 @@ import { useAppStore } from '~src/store'
 import initialgApi from '~api/initial/initial'
 import { arrToKey, getArrValue, isObjNull } from 'js-fast-way'
 import visualTable from './components/visual-table.vue'
+import { toPdfPage } from '~uti/btn-auth'
 //变量
 const router = useRouter()
 const useAppState = useAppStore()
@@ -135,11 +136,11 @@ const getTotalData = async ()=>{
         } else {
             totalData.value = []
         }
-        
-     
+
+
     } else {
         totalData.value = []
-     
+
     }
 }
 
@@ -263,14 +264,14 @@ const writingConclusionClick = async () => {
     const { error, code, data, msg } = await initialgApi.startInspect({
         projectId: projectId.value,
         type:2,
-       
+
     })
     if (!error && code === 200) {
-       
+
             router.push({ name: 'transfer-writing-conclusion' })
-        
-       
-     
+
+
+
     }
 }
 
@@ -280,11 +281,11 @@ const submitReportClick = async () => {
     const { error, code, data, msg } = await initialgApi.startInspect({
         projectId: projectId.value,
         type:1,
-       
+
     })
- 
+
     if (!error && code === 200) {
-    
+
             console.log(data, 'data')
             if (data) {
                  router.push({
@@ -295,7 +296,7 @@ const submitReportClick = async () => {
                     name: 'transfer-preliminary-examination',
                 })
             }
-     
+
     }
     // router.push({
     //     name: 'transfer-entry-sampling',
@@ -321,12 +322,12 @@ const onSubmitReportClick = async () => {
         tableTitle.value = reportData.value[0].tableTitle
         isSubmitReportDrawer.value = true
       }
-       
+
     } else {
         reportData.value = []
-     
+
     }
-   
+
 }
 const pdfDate = ref(null)
 const curPdf = ref('')
@@ -352,7 +353,8 @@ const previewClick = async ()=>{
     })
     if (!error && code === 200) {
         if (data) {
-            window.open(data, '_blank')
+            toPdfPage(data)
+            //window.open(data, '_blank')
         } else {
             window.$message?.warning('文件不存在')
         }