Эх сурвалжийг харах

更新依赖和pdf预览测试

ZaiZai 1 жил өмнө
parent
commit
2181a6338f
34 өөрчлөгдсөн 301 нэмэгдсэн , 181 устгасан
  1. 6 0
      src/router/modules/base.js
  2. 1 0
      src/router/modules/token.js
  3. 32 0
      src/utils/btn-auth.js
  4. 3 1
      src/views/data-fill/collapse-form/index.vue
  5. 6 4
      src/views/data-fill/components/HcUpload.vue
  6. 8 4
      src/views/data-fill/query.vue
  7. 5 2
      src/views/data-fill/wbs.vue
  8. 3 1
      src/views/ledger/components/internal.vue
  9. 4 2
      src/views/ledger/components/table-form.vue
  10. 7 3
      src/views/ledger/components/table-list.vue
  11. 4 2
      src/views/ledger/components/weather.vue
  12. 7 4
      src/views/other-file/image-view.vue
  13. 7 4
      src/views/other-file/project-scanning.vue
  14. 5 3
      src/views/other/components/ListItem.vue
  15. 9 4
      src/views/other/first-item.vue
  16. 9 4
      src/views/other/first-itemcopy.vue
  17. 22 20
      src/views/patrol/add.vue
  18. 3 1
      src/views/tasks/sign-admin.vue
  19. 9 7
      src/views/tentative/detect/collapse-form/src/index.vue
  20. 4 2
      src/views/tentative/detect/components/FormItemUpload.vue
  21. 44 41
      src/views/tentative/detect/components/HcDragUpload.vue
  22. 52 48
      src/views/tentative/detect/components/HcUpload.vue
  23. 5 3
      src/views/tentative/detect/components/ListItem.vue
  24. 3 1
      src/views/tentative/detect/test-form-bak.vue
  25. 3 1
      src/views/tentative/detect/test-form.vue
  26. 9 5
      src/views/tentative/detect/test.vue
  27. 4 2
      src/views/tentative/device/approach.vue
  28. 3 1
      src/views/tentative/device/employ.vue
  29. 3 1
      src/views/tentative/device/overhaul.vue
  30. 4 2
      src/views/tentative/laboratory/components/FormItemUpload.vue
  31. 6 3
      src/views/tentative/laboratory/print.vue
  32. 3 1
      src/views/tentative/material/approach.vue
  33. 4 2
      src/views/tentative/material/components/FormItemUpload.vue
  34. 4 2
      src/views/tentative/material/sampling.vue

+ 6 - 0
src/router/modules/base.js

@@ -55,6 +55,12 @@ export default [
                 meta: { title: '系统设置' },
                 component: () => import('~src/views/home/config.vue'),
             },
+            {
+                path: '/pdf',
+                name: 'pdf',
+                meta: { title: 'pdf文件预览' },
+                component: () => import('~src/views/home/pdf.vue'),
+            },
         ],
     },
     {

+ 1 - 0
src/router/modules/token.js

@@ -4,6 +4,7 @@ export default [
     'home-index',
     'home-index-static',
     'home-config',
+    'pdf',
     'data-division',
     'other-file-view',
     'other-file-form',

+ 32 - 0
src/utils/btn-auth.js

@@ -0,0 +1,32 @@
+import pinia from '~src/store/init'
+import router from '~src/router/index'
+import { useAppStore } from '~src/store'
+import { decode, encode } from 'js-base64'
+import { getObjVal, isNullES } from 'js-fast-way'
+
+//初始变量
+const store = useAppStore(pinia)
+
+// 按钮权限
+export const btnAuth = (key) => {
+    try {
+        const info = store.getButtonsVal(key)
+        return !!getObjVal(info)
+    } catch {
+        return false
+    }
+}
+
+// 跳转到PDF页面
+export const toPdfPage = (url) => {
+    if (isNullES(url)) {
+        window.$message.warning('pdf地址为空')
+        return
+    }
+    router.push({
+        name: 'pdf',
+        query: { code: encode(url) },
+    })
+}
+
+export { encode, decode }

+ 3 - 1
src/views/data-fill/collapse-form/index.vue

@@ -328,6 +328,7 @@ import {
 } from 'js-fast-way'
 import { delMessageV2 } from '~com/message/index.js'
 import { getTokenHeader } from '~src/api/request/header'
+import { toPdfPage } from '~uti/btn-auth'
 //参数
 const props = defineProps({
     datas: {
@@ -1273,7 +1274,8 @@ const getBussPdfInfo = async ({ pkeyId }, dragItem = null, showTip = true) => {
     setDragModalLoading(dragItem)
     if (!error && code === 200) {
         if (data) {
-            window.open(data, '_blank')
+            toPdfPage(data)
+            //window.open(data, '_blank')
         } else if (showTip) {
             window?.$message?.warning('PDF错误')
         }

+ 6 - 4
src/views/data-fill/components/HcUpload.vue

@@ -24,6 +24,7 @@ import { onMounted, ref, watch } from 'vue'
 import { getTokenHeader } from '~src/api/request/header'
 import wbsApi from '~api/data-fill/wbs'
 import { isFileSize } from 'js-fast-way'
+import { toPdfPage } from '~uti/btn-auth'
 
 const props = defineProps({
     fileList: {
@@ -41,7 +42,7 @@ const props = defineProps({
     action:{
         type:String,
         default:'/api/blade-manager/exceltab/add-buss-file',
-    },   
+    },
     accept:{
         type:String,
         default:'image/png,image/jpg,image/jpeg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/pdf,.doc,.docx,application/msword',
@@ -50,7 +51,7 @@ const props = defineProps({
         type:String,
         default:'允许格式:jpg/png/pdf/excel/word, 文件大小 小于 60MB',
     },
-    
+
 })
 
 //事件
@@ -136,9 +137,10 @@ const uploadError = () => {
 
 //预览
 const uploadPreview = ({ url }) => {
-    if (url) {
+    toPdfPage(url)
+    /*if (url) {
         window.open(url, '_blank')
-    }
+    }*/
 }
 
 //删除文件

+ 8 - 4
src/views/data-fill/query.vue

@@ -266,6 +266,7 @@ import { getStoreValue, setStoreValue } from '~src/utils/storage'
 import { arrToId, arrToKey, downloadBlob, getArrValue, getObjValue, isString } from 'js-fast-way'
 import queryApi from '~api/data-fill/query'
 import { eVisaTaskCheckApi } from '~api/other'
+import { toPdfPage } from '~uti/btn-auth'
 
 //变量
 const useAppState = useAppStore()
@@ -596,9 +597,11 @@ const tableSelectionChange = (rows) => {
 const tableRowName = (row) => {
     //如果 evisaPdfUrl 不为空,使用evisaPdfUrl,反之使用pdfUrl
     if (row['evisaPdfUrl']) {
-        window.open(row['evisaPdfUrl'], '_blank')
+        toPdfPage(row['evisaPdfUrl'])
+        //window.open(row['evisaPdfUrl'], '_blank')
     } else if (row['pdfUrl']) {
-        window.open(row['pdfUrl'], '_blank')
+        toPdfPage(row['pdfUrl'])
+        //window.open(row['pdfUrl'], '_blank')
     } else {
         window.$message?.warning('文件不存在')
     }
@@ -705,7 +708,8 @@ const batchPrint = async () => {
     printLoading.value = false
     const res = isString(data) ? data ?? '' : ''
     if (!error && code === 200 && res) {
-        window.open(res, '_blank')
+        toPdfPage(res)
+        //window.open(res, '_blank')
     }
 }
 
@@ -911,7 +915,7 @@ const signClick = async () => {
     })
     //处理数据
     signLoading.value = false
-  
+
     if (!error && code === 200) {
         window.$message?.success(msg ?? '提交成功,请请耐心等待重签,可继续操作其它的功能。')
         getTableData().then()

+ 5 - 2
src/views/data-fill/wbs.vue

@@ -531,6 +531,7 @@ import queryApi from '~api/data-fill/query'
 import Draggable from 'vuedraggable'
 import { delMessageV2 } from '~com/message/index.js'
 import HcUpload from './components/HcUpload.vue'
+import { toPdfPage } from '~uti/btn-auth'
 
 //初始变量
 const router = useRouter()
@@ -1737,7 +1738,8 @@ const bussPdfsClick = async () => {
     tableFormSaveLoading.value = false
     bussPdfsLoading.value = false
     if (!error && code === 200) {
-        window.open(data, '_blank')
+        toPdfPage(data)
+        //window.open(data, '_blank')
     } else {
         window.$message?.warning('获取PDF失败')
     }
@@ -1805,7 +1807,8 @@ const getAttachmentList = async ()=>{
  }
  //预览
  const previewFile = (item)=>{
-    window.open(item['domainPdfUrl'], '_blank')
+     toPdfPage(item['domainPdfUrl'])
+    //window.open(item['domainPdfUrl'], '_blank')
  }
  //删除
  const delFile = async (item)=>{

+ 3 - 1
src/views/ledger/components/internal.vue

@@ -86,6 +86,7 @@ import { nextTick, ref, watch } from 'vue'
 import internalApi from '~api/ledger/internal'
 import queryApi from '~api/data-fill/query'
 import { arrToId, downloadBlob, getArrValue, isString } from 'js-fast-way'
+import { toPdfPage } from '~uti/btn-auth'
 
 //参数
 const props = defineProps({
@@ -288,7 +289,8 @@ const batchPrint = async () => {
     printLoading.value = false
     const res = isString(data) ? data ?? '' : ''
     if (!error && code === 200 && res) {
-        window.open(res, '_blank')
+        toPdfPage(res)
+        //window.open(res, '_blank')
     }
 }
 </script>

+ 4 - 2
src/views/ledger/components/table-form.vue

@@ -185,6 +185,7 @@ import HTableForm from '~src/plugins/HTableForm'
 import wbsQueryApi from '~api/data-fill/query'
 import queryApi from '~api/ledger/query'
 import { useAppStore } from '~src/store'
+import { toPdfPage } from '~uti/btn-auth'
 
 //参数
 const props = defineProps({
@@ -327,7 +328,7 @@ const getTheLogBusinessData = async (excelId, recordDate) => {
         formArrData = [setFormDefaultData()]
     }
     formLogDataList.value = formArrData
-   
+
     getBussDataInfo()
 }
 
@@ -593,7 +594,8 @@ const getBussPdfInfo = async () => {
     previewLoading.value = false
     const resData = isString(data) ? data || '' : ''
     if (!error && code === 200 && resData) {
-        window.open(resData, '_blank')
+        toPdfPage(resData)
+        //window.open(resData, '_blank')
     } else {
         window?.$message?.warning('暂无PDF,无法预览')
     }

+ 7 - 3
src/views/ledger/components/table-list.vue

@@ -104,6 +104,7 @@ import { nextTick, ref, watch } from 'vue'
 import queryApi from '~api/ledger/query'
 import { eVisaTaskCheckApi } from '~api/other'
 import { arrToId, getArrValue, getObjValue, isString } from 'js-fast-way'
+import { toPdfPage } from '~uti/btn-auth'
 
 //参数
 const props = defineProps({
@@ -361,16 +362,19 @@ const previewAndPrintClick = async () => {
     previewPrintLoading.value = false
     const res = isString(data) ? data || '' : ''
     if (!error && code === 200 && res) {
-        window.open(res, '_blank')
+        toPdfPage(res)
+        //window.open(res, '_blank')
     }
 }
 
 //查询
 const handleTableQuery = ({ evisaPdfUrl, pdfUrl }) => {
     if (evisaPdfUrl) {
-        window.open(evisaPdfUrl, '_blank')
+        toPdfPage(evisaPdfUrl)
+        //window.open(evisaPdfUrl, '_blank')
     } else if (pdfUrl) {
-        window.open(pdfUrl, '_blank')
+        toPdfPage(pdfUrl)
+        //window.open(pdfUrl, '_blank')
     } else {
         window.$message?.warning('该数据暂无PDF')
     }

+ 4 - 2
src/views/ledger/components/weather.vue

@@ -77,7 +77,8 @@
 import { nextTick, ref } from 'vue'
 import weatherApi from '~api/ledger/weather'
 import queryApi from '~api/data-fill/query'
-import { arrToId, deepClone, formValidate, getArrValue } from 'js-fast-way'
+import { arrToId, deepClone, formValidate, getArrValue, isString } from 'js-fast-way'
+import { toPdfPage } from '~uti/btn-auth'
 
 //参数
 const props = defineProps({
@@ -257,7 +258,8 @@ const batchPrint = async () => {
     printLoading.value = false
     const res = isString(data) ? data ?? '' : ''
     if (!error && code === 200 && res) {
-        window.open(res, '_blank')
+        toPdfPage(res)
+        //window.open(res, '_blank')
     }
 }
 </script>

+ 7 - 4
src/views/other-file/image-view.vue

@@ -14,7 +14,7 @@
                     <el-scrollbar>
                         <WbsTree
                             :auto-expand-keys="TreeAutoExpandKeys" :contract-id="contractId" :project-id="projectId"
-                            :class-id="dataId" @nodeTap="nodeWbsElTreeClick"
+                            :class-id="dataId" @node-tap="nodeWbsElTreeClick"
                         />
                     </el-scrollbar>
                 </div>
@@ -23,7 +23,7 @@
                 <el-scrollbar v-if="dataType === 2">
                     <HcTreeData
                         :auto-expand-keys="TreeExpandedKeys" :datas="dateElTreeData"
-                        @nodeTap="dateWbsElTreeClick"
+                        @node-tap="dateWbsElTreeClick"
                     />
                 </el-scrollbar>
             </div>
@@ -140,6 +140,7 @@ import imageApi from '~api/other-file/imageData'
 import { getStoreValue, setStoreValue } from '~src/utils/storage'
 import { arrToId, downloadBlob, getArrValue, isString } from 'js-fast-way'
 import { delMessageV2 } from '~com/message/index.js'
+import { toPdfPage } from '~uti/btn-auth'
 //变量
 const router = useRouter()
 const useRoutes = useRoute()
@@ -376,7 +377,8 @@ const previewClick = async (item) => {
         }
     } else if (parseInt(type) === 2) {
         if (margePdfUrl) {
-            window.open(margePdfUrl, '_blank')
+            toPdfPage(margePdfUrl)
+            //window.open(margePdfUrl, '_blank')
         } else {
             previewLoading.value = true
             const { error, code, data } = await imageApi.imageClassificationFile({
@@ -386,7 +388,8 @@ const previewClick = async (item) => {
             previewLoading.value = false
             if (!error && code === 200 && isString(data)) {
                 item.margePdfUrl = data
-                window.open(data, '_blank')
+                toPdfPage(data)
+                //window.open(data, '_blank')
             } else {
                 window.$message?.warning('预览资料文件异常')
             }

+ 7 - 4
src/views/other-file/project-scanning.vue

@@ -11,7 +11,7 @@
             </div>
             <div class="hc-tree-box">
                 <el-scrollbar>
-                    <ProjectTree :auto-expand-keys="TreeAutoExpandKeys" :datas="ElTreeData" @nodeTap="nodeElTreeClick" />
+                    <ProjectTree :auto-expand-keys="TreeAutoExpandKeys" :datas="ElTreeData" @node-tap="nodeElTreeClick" />
                 </el-scrollbar>
             </div>
             <!-- 左右拖动 -->
@@ -245,7 +245,7 @@
             url="archiveFile/batchApproval2"
             @finish="showReportFinish"
             @hide="showReportModal = false"
-            @tagClose="reportTaskTagClose"
+            @tag-close="reportTaskTagClose"
         />
 
         <!-- 批量认证 -->
@@ -302,6 +302,7 @@ import tasksDataApi from '~api/tasks/data'
 import ossApi from '~api/oss'
 import dayjs from 'dayjs'
 import { delMessageV2 } from '~com/message/index.js'
+import { toPdfPage } from '~uti/btn-auth'
 
 //变量
 const router = useRouter()
@@ -530,9 +531,11 @@ const tablePreview = (row) => {
     const pdfUrl = row['pdfFileUrl'] || ''
     const evisaFile = row['evisaFile'] || ''
     if (evisaFile) {
-        window.open(evisaFile, '_blank')
+        toPdfPage(evisaFile)
+        //window.open(evisaFile, '_blank')
     } else if (pdfUrl) {
-        window.open(pdfUrl, '_blank')
+        toPdfPage(pdfUrl)
+        //window.open(pdfUrl, '_blank')
     } else {
         window.$message?.warning('该数据暂无PDF')
     }

+ 5 - 3
src/views/other/components/ListItem.vue

@@ -302,8 +302,8 @@
                     <WbsTree
                         :contract-id="contractId"
                         :project-id="projectId"
-                        @nodeLoading="ElTreeNodeLoading"
-                        @nodeTap="wbsElTreeClick"
+                        @node-loading="ElTreeNodeLoading"
+                        @node-tap="wbsElTreeClick"
                     />
                 </el-scrollbar>
             </div>
@@ -431,6 +431,7 @@ import {
     setPosInsert,
     setPosRange,
 } from 'js-fast-way'
+import { toPdfPage } from '~uti/btn-auth'
 
 //初始
 const props = defineProps({
@@ -829,7 +830,8 @@ const getBussPdfInfo = async (item, showTip = true, resid) => {
         }, false)
         if (!error && code === 200) {
             if (data) {
-                window.open(data, '_blank')
+                toPdfPage(data)
+                //window.open(data, '_blank')
             } else if (showTip) {
                 window?.$message?.warning('PDF错误')
             }

+ 9 - 4
src/views/other/first-item.vue

@@ -241,6 +241,7 @@ import queryApi from '~api/data-fill/query'
 import wbsApi from '~api/data-fill/wbs'
 import { arrToId, deepClone, getArrValue, getObjVal, getObjValue, isString } from 'js-fast-way'
 import { delMessageV2 } from '~com/message/index.js'
+import { toPdfPage } from '~uti/btn-auth'
 //变量
 const router = useRouter()
 const useRoutes = useRoute()
@@ -463,9 +464,11 @@ const tableRowName = (row) => {
         //首件查询时,直接调用接口
         getBussPdfInfo(row.id + '')
     } else if (row['evisaPdfUrl']) {
-        window.open(row['evisaPdfUrl'], '_blank')
+        toPdfPage(row['evisaPdfUrl'])
+        //window.open(row['evisaPdfUrl'], '_blank')
     } else if (row['pdfUrl']) {
-        window.open(row['pdfUrl'], '_blank')
+        toPdfPage(row['pdfUrl'])
+        //window.open(row['pdfUrl'], '_blank')
     } else {
         window.$message?.warning('文件不存在')
     }
@@ -712,7 +715,8 @@ const getBussPdfInfo = async (pkeyId) => {
     //判断状态
     const res = isString(data) ? data ?? '' : ''
     if (!error && code === 200 && res) {
-        window.open(res, '_blank')
+        toPdfPage(res)
+        //window.open(res, '_blank')
     }
 }
 
@@ -852,7 +856,8 @@ const batchPrint = async () => {
     //判断状态
     const res = isString(data) ? data ?? '' : ''
     if (!error && code === 200 && res) {
-        window.open(res, '_blank')
+        toPdfPage(res)
+        //window.open(res, '_blank')
     }
 }
 

+ 9 - 4
src/views/other/first-itemcopy.vue

@@ -249,6 +249,7 @@ import queryApi from '~api/data-fill/query'
 import wbsApi from '~api/data-fill/wbs'
 import ListItem from './components/ListItem.vue'
 import { delMessageV2 } from '~com/message/index.js'
+import { toPdfPage } from '~uti/btn-auth'
 //变量
 const router = useRouter()
 const useRoutes = useRoute()
@@ -485,9 +486,11 @@ const tableRowName = (row) => {
         //首件查询时,直接调用接口
         getBussPdfInfo(row.id + '')
     } else if (row['evisaPdfUrl']) {
-        window.open(row['evisaPdfUrl'], '_blank')
+        toPdfPage(row['evisaPdfUrl'])
+        //window.open(row['evisaPdfUrl'], '_blank')
     } else if (row['pdfUrl']) {
-        window.open(row['pdfUrl'], '_blank')
+        toPdfPage(row['pdfUrl'])
+        //window.open(row['pdfUrl'], '_blank')
     } else {
         window.$message?.warning('文件不存在')
     }
@@ -707,7 +710,8 @@ const getBussPdfInfo = async (pkeyId) => {
     //判断状态
     const res = isString(data) ? data ?? '' : ''
     if (!error && code === 200 && res) {
-        window.open(res, '_blank')
+        toPdfPage(res)
+        //window.open(res, '_blank')
     }
 }
 
@@ -846,7 +850,8 @@ const batchPrint = async () => {
     //判断状态
     const res = isString(data) ? data ?? '' : ''
     if (!error && code === 200 && res) {
-        window.open(res, '_blank')
+        toPdfPage(res)
+        //window.open(res, '_blank')
     }
 }
 

+ 22 - 20
src/views/patrol/add.vue

@@ -163,7 +163,7 @@
                                 <el-link v-if=" type === 'changeRow' || type === 'add'" type="primary" @click="clickAttachment(row, index)">{{ row.rectifyAttachmentName }}</el-link>
                                 <el-link v-else @click="openAttachment(row)">{{ row.rectifyAttachmentName }}</el-link>
                             </template>
-                              
+
                             <el-link v-else type="primary" :disabled="type === 'review' || type === 'view'" @click="clickAttachment(row, index)">
                                 上传
                             </el-link>
@@ -211,7 +211,7 @@
                                 :default-checked-keys="defaultChecked"
                                 :auto-expand-keys="TreeAutoExpandKeys"
                                 check-strictly
-                                @nodeTap="wbsElTreeClick"
+                                @node-tap="wbsElTreeClick"
                                 @check="divisionTreeCheck"
                                 @check-change="divisionTreeCheckChange"
                             >
@@ -232,7 +232,7 @@
                                 @check-change="divisionTreeCheckChange"
                                 @check="divisionTreeCheck"
                                 @load="treeLoadNode"
-                                @nodeTap="wbsElTreeClick"
+                                @node-tap="wbsElTreeClick"
                             >
                                 <template #default="{ node, data }">
                                     <span style="font-size: 16px;">{{ data.title }}</span>
@@ -265,6 +265,7 @@ import { useRoute, useRouter } from 'vue-router'
 import { getTokenHeader } from '~src/api/request/header'
 import patrolApi from '~api/patrol/patrol'
 import { getDictionary } from '~api/other'
+import { toPdfPage } from '~uti/btn-auth'
 
 //初始变量
 const router = useRouter()
@@ -357,7 +358,7 @@ onActivated(()=>{
         setTimeout(() => {
             isShowUser.value = true
         }, 10)
-        
+
     }
     if (type.value === 'changeRow') {
 
@@ -370,7 +371,7 @@ onActivated(()=>{
             { key: 'action', name: '操作', width:100 },
         ]
     } else if (type.value === 'review' || type.value === 'view') {
-       
+
         tableColumn.value = [
             { key: 'inspectProject', name: '检查项目' },
             { key: 'inspectContent', name: '检查内容' },
@@ -380,7 +381,7 @@ onActivated(()=>{
             { key: 'rectifyFeedback', name: '整改反馈' },
             { key: 'rectifyAttachment', name: '整改附件', width:150 },
             { key: 'rectifyPdfUrl', name: '整改后图片', width:150 },
-         
+
         ]
     } else {
         tableColumn.value = [
@@ -401,7 +402,7 @@ const getDetail = async (id)=>{
 
     })
     //判断状态
-   
+
     if (!error && code === 200) {
         console.log(data, 'data')
         addForm.value = getObjValue(data)
@@ -448,8 +449,8 @@ const clickRectifyPdfUrl = (row, index)=>{
 const clickAttachment = (row, index)=>{
     UploadFileOptions.value = {
             url: '/api/blade-resource/oss/endpoint/put-file',
-       
-          
+
+
             headers: getTokenHeader(),
             multiple: false,
     }
@@ -462,7 +463,8 @@ const clickAttachment = (row, index)=>{
 
 const openAttachment = (row)=>{
     if (row?.rectifyAttachment) {
-        window.open(row?.rectifyAttachment, '_blank')
+        toPdfPage(row?.rectifyAttachment)
+        //window.open(row?.rectifyAttachment, '_blank')
     } else {
         window.$message?.warning('获取PDF失败')
     }
@@ -475,7 +477,7 @@ const HcUploadFileProgress = (res) => {
 }
 // 文件上传成功的回调
 const HcUploadFileSuccess = ({ echoParams, resData }) => {
-   
+
     if (echoParams['type'] === 'image' && resData?.link) {
         setUploadImage(echoParams, resData)
     } else if (echoParams['type'] === 'attachment' && resData?.link) {
@@ -523,7 +525,7 @@ const linksRelateModalClick = ()=>{
     linksRelateModal.value = true
     isSearchTree.value = false
     newPushArr.value = []
-   
+
     defaultChecked.value = arrToKey(processDataList.value, 'primaryKeyId', ',').split(',')
 }
 const linksRelateModalClose = ()=>{
@@ -548,7 +550,7 @@ const linksRelateModalSave = ()=>{
         let pathArr = []
         getKeys(node, pathArr)
         TreeAutoExpandKeys.value = pathArr
-  
+
     }
     newPushArr.value.forEach((ele)=>{
         arr.push({
@@ -557,13 +559,13 @@ const linksRelateModalSave = ()=>{
             autoExpandKeys:TreeAutoExpandKeys.value,
             isShowImage:0,
             contractId:ele.contractId,
-  
+
         })
     })
     processDataList.value = arr
     addForm.value.list = arr
      linksRelateModal.value = false
-   
+
 }
     const getKeys = (node, pathArr) => {
     if (node.parent) {
@@ -689,7 +691,7 @@ const processElTree = ref(null)
 const goList = ()=>{
     router.push({
         path: '/patrol/safe',
-    
+
     })
 }
 const goBack = ()=>{
@@ -712,7 +714,7 @@ const saveInfo = async ()=>{
         saveLoading.value = false
         if (!error && code === 200) {
             window?.$message?.success('操作成功')
-      
+
             goList()
         }
     }
@@ -760,7 +762,7 @@ const changeRowInfo = async ()=>{
             window?.$message?.success('操作成功')
             router.push({
                 path: '/patrol/manage',
-            
+
             })
         }
     }
@@ -785,7 +787,7 @@ const reviewInspect = async (type)=>{
             window?.$message?.success('操作成功')
             goList()
         }
-    
+
 }
 </script>
 
@@ -817,4 +819,4 @@ const reviewInspect = async (type)=>{
         }
     }
 }
-</style>
+</style>

+ 3 - 1
src/views/tasks/sign-admin.vue

@@ -88,6 +88,7 @@ import { onMounted, ref } from 'vue'
 import { useAppStore } from '~src/store'
 import { arrToId, getArrValue, getObjValue } from 'js-fast-way'
 import signApi from '~api/tasks/sign'
+import { toPdfPage } from '~uti/btn-auth'
 
 //变量
 const useAppState = useAppStore()
@@ -233,7 +234,8 @@ const cancelresign = ()=>{
 }
 const rowTaskName = (row)=>{
     if (row?.sigPdf) {
-        window.open(row.sigPdf, '_blank')
+        toPdfPage(row.sigPdf)
+        //window.open(row.sigPdf, '_blank')
     } else {
         window?.$message.warning('暂无文档')
     }

+ 9 - 7
src/views/tentative/detect/collapse-form/src/index.vue

@@ -57,9 +57,9 @@
                             :node-name="item.nodeName"
                             :pid="`table-form-${item?.pKeyId}`"
                             :tid="treeId"
-                            @excelBodyTap="excelTableFormClick($event)"
+                            @excel-body-tap="excelTableFormClick($event)"
                             @render="tableFormRender($event, item, index)"
-                            @rightTap="tableFormRightTap($event, index)"
+                            @right-tap="tableFormRightTap($event, index)"
                         />
                         <el-tooltip :content="item.isWindow ? '关闭窗口并恢复' : '当前表单窗口化'" :hide-after="0" placement="top">
                             <div class="form-window-icon" @click.stop="windowClick(item, index)">
@@ -110,9 +110,9 @@
             :close-icon-arr="closeIconArr" :eid="item.pKeyId" :height="DragModalHeight" :is-show="item.isShow"
             :loading="item.loading" :loading-text="item.loadingText" :title="item.title"
             is-sort-top
-            @close="TableFormClose(item, index)" @closeIconTap="closeIconTap($event, item, index)"
+            @close="TableFormClose(item, index)" @close-icon-tap="closeIconTap($event, item, index)"
         >
-            <HcDragNode :more-menu="dragNodeMoreMenu" @menuTap="dragNodeMoreMenuTap($event, item)">
+            <HcDragNode :more-menu="dragNodeMoreMenu" @menu-tap="dragNodeMoreMenuTap($event, item)">
                 <TableFormItem
                     :ref="(el) => setItemRefs(el, item)"
                     :classify="item.classify"
@@ -124,9 +124,9 @@
                     :scroll="false"
                     :tid="item.treeId"
                     :width="item.width"
-                    @excelBodyTap="excelTableFormClick($event)"
+                    @excel-body-tap="excelTableFormClick($event)"
                     @render="tableFormRender($event, item.item, item.index)"
-                    @rightTap="tableFormRightTap($event, item.index)"
+                    @right-tap="tableFormRightTap($event, item.index)"
                 />
             </HcDragNode>
         </HcDragModal>
@@ -157,6 +157,7 @@ import TableFormItem from './table-form.vue'
 import NoDataSvg from '~src/assets/view/no-data.svg'
 import { arrIndex, deepClone, getArrValue, getObjVal, getObjValue, isNullES } from 'js-fast-way'
 import dataApi from '~api/tentative/detect/test'
+import { toPdfPage } from '~uti/btn-auth'
 
 //参数
 const props = defineProps({
@@ -635,7 +636,8 @@ const getBussPdfInfo = async ({ pKeyId }, dragItem = null, showTip = true) => {
     setDragModalLoading(dragItem)
     if (!error && code === 200) {
         if (data) {
-            window.open(data, '_blank')
+            toPdfPage(data)
+            //window.open(data, '_blank')
         } else if (showTip) {
             window?.$message?.warning('PDF错误')
         }

+ 4 - 2
src/views/tentative/detect/components/FormItemUpload.vue

@@ -37,6 +37,7 @@ import { onMounted, ref, watch } from 'vue'
 import { getTokenHeader } from '~src/api/request/header'
 import { isFileSize } from 'js-fast-way'
 import { genFileId } from 'element-plus'
+import { toPdfPage } from '~uti/btn-auth'
 
 const props = defineProps({
     modelValue: {
@@ -188,8 +189,9 @@ const uploadChange = (file) => {
 
 //预览文件
 const previewClick = () => {
-    const pdfUrl = uploadValue.value ?? ''
-    if (pdfUrl) window.open(pdfUrl, '_blank')
+    toPdfPage(uploadValue.value)
+    //const pdfUrl = uploadValue.value ?? ''
+    //if (pdfUrl) window.open(pdfUrl, '_blank')
 }
 </script>
 

+ 44 - 41
src/views/tentative/detect/components/HcDragUpload.vue

@@ -1,11 +1,13 @@
 <template>
-    <el-upload ref="upload" :accept="accept" :action="action" :before-upload="beforeUpload" :data="uploadData"
-               :disabled="uploadDisabled" :file-list="fileListData" :headers="getTokenHeader()"
-               :on-change="onChangeToolFile" :on-error="uploadError" :on-exceed="uploadExceed" :on-preview="uploadPreview"
-               :on-progress="uploadprogress" :on-remove="uploadRemove"
-               :on-success="uploadSuccess" class="hc-upload-border" drag>
+    <el-upload
+        ref="upload" :accept="accept" :action="action" :before-upload="beforeUpload" :data="uploadData"
+        :disabled="uploadDisabled" :file-list="fileListData" :headers="getTokenHeader()"
+        :on-change="onChangeToolFile" :on-error="uploadError" :on-exceed="uploadExceed" :on-preview="uploadPreview"
+        :on-progress="uploadprogress" :on-remove="uploadRemove"
+        :on-success="uploadSuccess" class="hc-upload-border" drag
+    >
         <div v-loading="uploadDisabled" :element-loading-text="loadingText" class="hc-upload-loading">
-            <HcIcon name="backup" ui="text-5xl mt-4"/>
+            <HcIcon name="backup" ui="text-5xl mt-4" />
             <div class="el-upload__text">拖动文件到这里 或 <em>点击这里选择文件</em> 并上传</div>
         </div>
         <template #tip>
@@ -15,33 +17,36 @@
 </template>
 
 <script setup>
-import {ref, watch, onMounted} from "vue";
-import {getTokenHeader} from '~src/api/request/header';
-import wbsApi from "~api/data-fill/wbs"
-import {isFileSize} from "js-fast-way"
-import {genFileId} from 'element-plus'
+import { onMounted, ref, watch } from 'vue'
+import { getTokenHeader } from '~src/api/request/header'
+import wbsApi from '~api/data-fill/wbs'
+import { isFileSize } from 'js-fast-way'
+import { genFileId } from 'element-plus'
+import { toPdfPage } from '~uti/btn-auth'
 
 const props = defineProps({
     fileList: {
         type: Array,
-        default: () => ([])
+        default: () => ([]),
     },
     datas: {
         type: Object,
-        default: () => ({})
+        default: () => ({}),
     },
     uploadData: {
         type: Array,
-        default: () => ([])
-    }
+        default: () => ([]),
+    },
 })
 
+//事件
+const emit = defineEmits(['change', 'progress', 'finished'])
 //变量
 const uploadData = ref(props.datas)
-const fileListData = ref(props.fileList);
+const fileListData = ref(props.fileList)
 
-const action = '/api/blade-resource/oss/endpoint/put-file-attach';
-const accept = 'image/png,image/jpg,image/jpeg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/pdf,.doc,.docx,application/msword';
+const action = '/api/blade-resource/oss/endpoint/put-file-attach'
+const accept = 'image/png,image/jpg,image/jpeg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/pdf,.doc,.docx,application/msword'
 const uploadDisabled = ref(false)
 
 //监听
@@ -62,18 +67,15 @@ onMounted(() => {
     errorFileNum.value = 0
 })
 
-//事件
-const emit = defineEmits(['change', 'progress', 'finished'])
-
 //上传前
 const beforeFileNum = ref(0)
 const beforeUpload = async (file) => {
     if (isFileSize(file?.size, 60)) {
-        beforeFileNum.value++;
-        return true;
+        beforeFileNum.value++
+        return true
     } else {
-        window?.$message?.warning('文件大小, 不能过60M!');
-        return false;
+        window?.$message?.warning('文件大小, 不能过60M!')
+        return false
     }
 }
 const upload = ref('')
@@ -104,14 +106,14 @@ const finishFileNum = ref(0)
 //     }
 // }
 //上传完成
-const uploadSuccess = ({code, data}) => {
+const uploadSuccess = ({ code, data }) => {
     uploadDisabled.value = false
     emit('progress', false)
     if (code === 200) {
-        window?.$message?.success('上传成功');
+        window?.$message?.success('上传成功')
         emit('finished', data)
     } else {
-        window?.$message?.error('上传失败');
+        window?.$message?.error('上传失败')
     }
 }
 
@@ -119,28 +121,29 @@ const uploadSuccess = ({code, data}) => {
 //上传失败
 const errorFileNum = ref(0)
 const uploadError = () => {
-    errorFileNum.value++;
-    window?.$message?.error('上传失败');
-    const num = finishFileNum.value + errorFileNum.value;
+    errorFileNum.value++
+    window?.$message?.error('上传失败')
+    const num = finishFileNum.value + errorFileNum.value
     if (beforeFileNum.value === num) {
         uploadDisabled.value = false
-        emit('change', {type: 'success'})
+        emit('change', { type: 'success' })
     }
 }
 
 //预览
-const uploadPreview = ({url}) => {
-    if (url) {
+const uploadPreview = ({ url }) => {
+    toPdfPage(url)
+    /*if (url) {
         window.open(url, '_blank')
-    }
+    }*/
 }
 
 //删除文件
-const delUploadData = async ({id}) => {
+const delUploadData = async ({ id }) => {
     loadingText.value = '删除中...'
     uploadDisabled.value = true
-    const {error, code} = await wbsApi.removeBussFile({
-        ids: id
+    const { error, code } = await wbsApi.removeBussFile({
+        ids: id,
     })
     uploadDisabled.value = false
     if (!error && code === 200) {
@@ -151,10 +154,10 @@ const delUploadData = async ({id}) => {
     }
 }
 
-const uploadRemove = ({code, data}) => {
+const uploadRemove = ({ code, data }) => {
     if (fileListData.value.length <= 0) {
-        emit('change', {type: 'del'})
-        emit('delFile', {type: 'del'})
+        emit('change', { type: 'del' })
+        emit('delFile', { type: 'del' })
 
     }
 }

+ 52 - 48
src/views/tentative/detect/components/HcUpload.vue

@@ -1,58 +1,64 @@
 <template>
-    <el-upload :accept="accept" :action="action" :before-remove="delUploadData" :before-upload="beforeUpload" :data="uploadData"
-               :disabled="uploadDisabled" :file-list="fileListData" :headers="getTokenHeader()" :on-error="uploadError"
-               :on-exceed="uploadExceed" :on-preview="uploadPreview" :on-progress="uploadprogress"
-               :on-remove="uploadRemove" :on-success="uploadSuccess" class="hc-upload-border"
-               drag multiple>
+    <el-upload
+        :accept="accept" :action="action" :before-remove="delUploadData" :before-upload="beforeUpload" :data="uploadData"
+        :disabled="uploadDisabled" :file-list="fileListData" :headers="getTokenHeader()" :on-error="uploadError"
+        :on-exceed="uploadExceed" :on-preview="uploadPreview" :on-progress="uploadprogress"
+        :on-remove="uploadRemove" :on-success="uploadSuccess" class="hc-upload-border"
+        drag multiple
+    >
         <div v-loading="uploadDisabled" :element-loading-text="loadingText" class="hc-upload-loading">
-            <HcIcon name="backup" ui="text-5xl mt-4"/>
+            <HcIcon name="backup" ui="text-5xl mt-4" />
             <div class="el-upload__text">拖动文件到这里 或 <em>点击这里选择文件</em> 并上传</div>
         </div>
         <template #tip>
-            <div class="el-upload__tip" style="font-size: 14px;">允许格式:jpg/png/pdf/excel/word, 文件大小 小于 60MB
+            <div class="el-upload__tip" style="font-size: 14px;">
+                允许格式:jpg/png/pdf/excel/word, 文件大小 小于 60MB
             </div>
         </template>
     </el-upload>
 </template>
 
 <script setup>
-import {ref, watch, onMounted} from "vue";
-import {getTokenHeader} from '~src/api/request/header';
-import wbsApi from "~api/data-fill/wbs"
-import {isFileSize} from "js-fast-way"
+import { onMounted, ref, watch } from 'vue'
+import { getTokenHeader } from '~src/api/request/header'
+import wbsApi from '~api/data-fill/wbs'
+import { isFileSize } from 'js-fast-way'
+import { toPdfPage } from '~uti/btn-auth'
 
 const props = defineProps({
     fileList: {
         type: Array,
-        default: () => ([])
+        default: () => ([]),
     },
     datas: {
         type: Object,
-        default: () => ({})
+        default: () => ({}),
     },
     baseData: {
         type: Object,
-        default: () => ({})
+        default: () => ({}),
     },
     contractId: {
         type: String,
-        default: () => ('')
+        default: () => (''),
     },
     tableTypeValue: {
-        type: String,Number,
-        default: () => ('')
-    }
+        type: String, Number,
+        default: () => (''),
+    },
 })
 
+//事件
+const emit = defineEmits(['change'])
 //变量
 const uploadData = ref(props.datas)
-const fileListData = ref(props.fileList);
-const contractId = ref(props.contractId);
-const tableType = ref(props.tableTypeValue);
-const baseData = ref(props.baseData);
+const fileListData = ref(props.fileList)
+const contractId = ref(props.contractId)
+const tableType = ref(props.tableTypeValue)
+const baseData = ref(props.baseData)
 
-const action = '/api/blade-business/detection/self/add-buss-file';
-const accept = 'image/png,image/jpg,image/jpeg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/pdf,.doc,.docx,application/msword';
+const action = '/api/blade-business/detection/self/add-buss-file'
+const accept = 'image/png,image/jpg,image/jpeg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/pdf,.doc,.docx,application/msword'
 const uploadDisabled = ref(false)
 
 //监听
@@ -71,24 +77,21 @@ onMounted(() => {
     errorFileNum.value = 0
 })
 
-//事件
-const emit = defineEmits(['change'])
-
 //上传前
 const beforeFileNum = ref(0)
 const beforeUpload = async (file) => {
     if (isFileSize(file?.size, 60)) {
-        beforeFileNum.value++;
-        return true;
+        beforeFileNum.value++
+        return true
     } else {
-        window?.$message?.warning('文件大小, 不能过60M!');
-        return false;
+        window?.$message?.warning('文件大小, 不能过60M!')
+        return false
     }
 }
 
 //超出限制时
 const uploadExceed = () => {
-    window?.$message?.warning('请上传 jpg/png/pdf/excel/word 的文件,文件大小 不超过60M');
+    window?.$message?.warning('请上传 jpg/png/pdf/excel/word 的文件,文件大小 不超过60M')
 }
 
 //上传中
@@ -101,45 +104,46 @@ const uploadprogress = () => {
 //上传完成
 const finishFileNum = ref(0)
 const uploadSuccess = () => {
-    finishFileNum.value++;
+    finishFileNum.value++
     if (beforeFileNum.value === finishFileNum.value) {
         uploadDisabled.value = false
-        emit('change', {type: 'success'})
+        emit('change', { type: 'success' })
     }
 }
 
 //上传失败
 const errorFileNum = ref(0)
 const uploadError = (data) => {
- let errInfo=JSON.parse(data['message'])
+ let errInfo = JSON.parse(data['message'])
 
- window?.$message?.error(errInfo['msg']);
-    errorFileNum.value++;
+ window?.$message?.error(errInfo['msg'])
+    errorFileNum.value++
 
-    const num = finishFileNum.value + errorFileNum.value;
+    const num = finishFileNum.value + errorFileNum.value
     if (beforeFileNum.value === num) {
         uploadDisabled.value = false
-        emit('change', {type: 'success'})
+        emit('change', { type: 'success' })
     }
 }
 
 //预览
-const uploadPreview = ({url}) => {
-    if (url) {
+const uploadPreview = ({ url }) => {
+    toPdfPage(url)
+    /*if (url) {
         window.open(url, '_blank')
-    }
+    }*/
 }
 
 //删除文件
-const delUploadData = async ({id}) => {
+const delUploadData = async ({ id }) => {
     loadingText.value = '删除中...'
     uploadDisabled.value = true
-    if(id){
-            const {error, code} = await wbsApi.removeBussFile1({
+    if (id) {
+            const { error, code } = await wbsApi.removeBussFile1({
             ids: id,
             tableType: tableType.value,
             contractId: contractId.value,
-            id: baseData.value.id
+            id: baseData.value.id,
         })
         uploadDisabled.value = false
         if (!error && code === 200) {
@@ -148,7 +152,7 @@ const delUploadData = async ({id}) => {
         } else {
             return false
         }
-    }else{
+    } else {
         loadingText.value = ''
         uploadDisabled.value = false
     }
@@ -157,7 +161,7 @@ const delUploadData = async ({id}) => {
 
 const uploadRemove = () => {
     if (fileListData.value.length <= 0) {
-        emit('change', {type: 'del'})
+        emit('change', { type: 'del' })
     }
 }
 </script>

+ 5 - 3
src/views/tentative/detect/components/ListItem.vue

@@ -196,9 +196,9 @@
             :close-icon-arr="closeIconArr" :eid="item.pKeyId" :height="DragModalHeight" :is-show="item.isShow"
             :loading="item.loading" :loading-text="item.loadingText" :title="item.title"
             is-sort-top
-            @close="TableFormClose(item, index, true)" @closeIconTap="closeIconTap($event, item, index)"
+            @close="TableFormClose(item, index, true)" @close-icon-tap="closeIconTap($event, item, index)"
         >
-            <HcDragNode v-loading="item.tableFormSaveLoading" :more-menu="dragNodeMoreMenu" @menuTap="dragNodeMoreMenuTap($event, item, index)">
+            <HcDragNode v-loading="item.tableFormSaveLoading" :more-menu="dragNodeMoreMenu" @menu-tap="dragNodeMoreMenuTap($event, item, index)">
                 <div :id="`table-form-${item?.item.pKeyId}`" class="hc-excel-table-form-view" :style="`width:${item.width};height:${item.height};`" />
                 <div v-if="item?.isTableForm === false" class="hc-no-table-form">
                     <div class="table-form-no">
@@ -256,6 +256,7 @@ import {
 } from 'js-fast-way'
 import ossApi from '~api/oss'
 import { getTokenHeader } from '~src/api/request/header'
+import { toPdfPage } from '~uti/btn-auth'
 
 //初始
 const props = defineProps({
@@ -829,7 +830,8 @@ const getBussPdfInfo = async ({ pKeyId }, showTip = true) => {
         }, false)
         if (!error && code === 200) {
             if (data) {
-                window.open(data, '_blank')
+                toPdfPage(data)
+                //window.open(data, '_blank')
             } else if (showTip) {
                 window?.$message?.warning('PDF错误')
             }

+ 3 - 1
src/views/tentative/detect/test-form-bak.vue

@@ -258,6 +258,7 @@ import dayjs from 'dayjs'
 import { Loading } from 'element-plus/es/components/loading/src/service'
 import { eVisaTaskCheckApi } from '~api/other'
 import wbsApi from '~api/data-fill/wbs'
+import { toPdfPage } from '~uti/btn-auth'
 
 //变量
 const router = useRouter()
@@ -1370,7 +1371,8 @@ const bussPdfsClick = async (nodeId, newaddId) => {
     })
     bussPdfsLoading.value = false
     if (!error && code === 200) {
-        window.open(data, '_blank')
+        toPdfPage(data)
+        //window.open(data, '_blank')
     } else {
         window.$message?.warning('获取PDF失败')
     }

+ 3 - 1
src/views/tentative/detect/test-form.vue

@@ -212,6 +212,7 @@ import { getDictionary } from '~api/other'
 import dayjs from 'dayjs'
 import { eVisaTaskCheckApi } from '~api/other'
 import wbsApi from '~api/data-fill/wbs'
+import { toPdfPage } from '~uti/btn-auth'
 
 //变量
 const router = useRouter()
@@ -1395,7 +1396,8 @@ const bussPdfsClick = async (nodeId, newaddId) => {
     })
     bussPdfsLoading.value = false
     if (!error && code === 200) {
-        window.open(data, '_blank')
+        toPdfPage(data)
+        //window.open(data, '_blank')
     } else {
         window.$message?.warning('获取PDF失败')
     }

+ 9 - 5
src/views/tentative/detect/test.vue

@@ -20,7 +20,7 @@
                         :tenant-id="userInfo?.tenant_id"
                         :wbs-temp-id="projectInfo?.referenceWbsTemplateIdTrial"
                         :wbs-type="2"
-                        @nodeTap="wbsElTreeClick"
+                        @node-tap="wbsElTreeClick"
                     />
                     <!-- <HcLazyTree
                                 :isType="false"
@@ -207,7 +207,7 @@
                     <div class="hc-no-table-form">
                         <div class="table-form-no">
                             <HcDragUpload
-                                :datas="uploadData" :file-list="fileListData" @delFile="delFileData"
+                                :datas="uploadData" :file-list="fileListData" @del-file="delFileData"
                                 @finished="uploadFinished" @progress="uploadprogress"
                             />
                         </div>
@@ -254,6 +254,7 @@ import { arrKeyValue, arrToId, getArrValue, getObjValue, isString } from 'js-fas
 import { Loading } from 'element-plus/es/components/loading/src/service'
 import notableform from '~src/assets/view/notableform.svg'
 import { delMessageV2 } from '~com/message/index.js'
+import { toPdfPage } from '~uti/btn-auth'
 
 //变量
 const router = useRouter()
@@ -505,7 +506,8 @@ const tableRowEdit = (row, tabTypeKey) => {
 //预览PDF
 const tableRowPdf = ({ pdfUrl }) => {
     if (pdfUrl) {
-        window.open(pdfUrl, '_blank')
+        toPdfPage(pdfUrl)
+        //window.open(pdfUrl, '_blank')
     } else {
         window.$message?.warning('该数据暂无PDF')
     }
@@ -593,7 +595,8 @@ const printPdfClick = async () => {
         const pdfUrl = isString(data) ? data || '' : ''
         printPdfLoading.value = false
         if (!error && code === 200 && pdfUrl) {
-            window.open(pdfUrl, '_blank')
+            toPdfPage(pdfUrl)
+            //window.open(pdfUrl, '_blank')
         } else {
             window.$message?.error(msg || '文件异常')
         }
@@ -718,7 +721,8 @@ const printNullPdfClick = async () => {
         const pdfUrl = isString(data) ? data || '' : ''
         printNullPdfLoading.value = false
         if (!error && code === 200 && pdfUrl) {
-            window.open(pdfUrl, '_blank')
+            toPdfPage(pdfUrl)
+            //window.open(pdfUrl, '_blank')
         } else {
             window.$message?.error(msg || '文件异常')
         }

+ 4 - 2
src/views/tentative/device/approach.vue

@@ -15,7 +15,7 @@
                 <el-scrollbar>
                     <HcMenuSimple
                         :datas="menus" :keys="menuKey" :menus="contextMenu" :props="menusProps"
-                        @change="menuChange" @menuTap="contextMenuClick"
+                        @change="menuChange" @menu-tap="contextMenuClick"
                     />
                 </el-scrollbar>
             </div>
@@ -267,6 +267,7 @@ import { formValidate, getArrValue } from 'js-fast-way'
 import { getContractUserList } from '~api/other'
 import { deviceClassListInit, getClassList } from '~api/tentative'
 import { delMessageV2 } from '~com/message/index.js'
+import { toPdfPage } from '~uti/btn-auth'
 
 //初始变量
 const useAppState = useAppStore()
@@ -574,7 +575,8 @@ const printerClick = async () => {
         //处理数据
         printerLoading.value = false
         if (!error && code === 200) {
-            window.open(data, '_blank')
+            toPdfPage(data)
+            //window.open(data, '_blank')
         }
     }
 }

+ 3 - 1
src/views/tentative/device/employ.vue

@@ -213,6 +213,7 @@ import dataApi from '~api/tentative/device/employ'
 import { arrToId, formValidate, getArrValue, getObjValue } from 'js-fast-way'
 import { getRowsValue } from '~uti/tools'
 import { delMessageV2 } from '~com/message/index.js'
+import { toPdfPage } from '~uti/btn-auth'
 
 //初始变量
 const useAppState = useAppStore()
@@ -412,7 +413,8 @@ const printerClick = async () => {
         //处理数据
         printerLoading.value = false
         if (!error && code === 200) {
-            window.open(data, '_blank')
+            toPdfPage(data)
+            //window.open(data, '_blank')
         }
     }
 }

+ 3 - 1
src/views/tentative/device/overhaul.vue

@@ -176,6 +176,7 @@ import { arrToId, formValidate, getArrValue } from 'js-fast-way'
 import dataApi from '~api/tentative/device/overhaul'
 import { getRowsValue } from '~uti/tools'
 import { delMessageV2 } from '~com/message/index.js'
+import { toPdfPage } from '~uti/btn-auth'
 
 
 //初始变量
@@ -371,7 +372,8 @@ const printerClick = async () => {
         //处理数据
         printerLoading.value = false
         if (!error && code === 200) {
-            window.open(data, '_blank')
+            toPdfPage(data)
+            //window.open(data, '_blank')
         }
     }
 }

+ 4 - 2
src/views/tentative/laboratory/components/FormItemUpload.vue

@@ -39,6 +39,7 @@ import { onMounted, ref, watch } from 'vue'
 import { getTokenHeader } from '~src/api/request/header'
 import { isFileSize } from 'js-fast-way'
 import { genFileId } from 'element-plus'
+import { toPdfPage } from '~uti/btn-auth'
 
 const props = defineProps({
     modelValue: {
@@ -177,8 +178,9 @@ const uploadChange = (file) => {
 
 //预览文件
 const previewClick = () => {
-    const pdfUrl = uploadValue.value ?? ''
-    if (pdfUrl) window.open(pdfUrl, '_blank')
+    toPdfPage(uploadValue.value)
+    //const pdfUrl = uploadValue.value ?? ''
+    //if (pdfUrl) window.open(pdfUrl, '_blank')
 }
 </script>
 

+ 6 - 3
src/views/tentative/laboratory/print.vue

@@ -18,7 +18,7 @@
                         :tenant-id="userInfo?.tenant_id"
                         :wbs-temp-id="projectInfo?.referenceWbsTemplateIdTrial"
                         :wbs-type="2"
-                        @nodeTap="wbsElTreeClick"
+                        @node-tap="wbsElTreeClick"
                     />
                 </el-scrollbar>
             </div>
@@ -61,6 +61,7 @@ import TestTree from '../material/components/TestTree.vue'
 import { getStoreValue, setStoreValue } from '~src/utils/storage'
 import dataApi from '~api/tentative/laboratory/print'
 import { arrToKey, getArrValue, isString } from 'js-fast-way'
+import { toPdfPage } from '~uti/btn-auth'
 
 //变量
 const useAppState = useAppStore()
@@ -184,7 +185,8 @@ const batchPrint = async () => {
     printLoading.value = false
     const res = isString(data) ? data ?? '' : ''
     if (!error && code === 200 && res) {
-        window.open(res, '_blank')
+        toPdfPage(res)
+        //window.open(res, '_blank')
     }
 }
 const batchPrintall = async () => {
@@ -197,7 +199,8 @@ const batchPrintall = async () => {
     allprintLoading.value = false
     const res = isString(data) ? data ?? '' : ''
     if (!error && code === 200 && res) {
-        window.open(res, '_blank')
+        toPdfPage(res)
+        //window.open(res, '_blank')
     }
 }
 </script>

+ 3 - 1
src/views/tentative/material/approach.vue

@@ -295,6 +295,7 @@ import approachApi from '~api/tentative/material/approach'
 import { arrIndex, arrToId, deepClone, formValidate, getArrValue } from 'js-fast-way'
 import { getDictionary } from '~api/other'
 import { delMessageV2 } from '~com/message/index.js'
+import { toPdfPage } from '~uti/btn-auth'
 
 //初始变量
 const useAppState = useAppStore()
@@ -675,7 +676,8 @@ const printerClick = async () => {
         //处理数据
         printerLoading.value = false
         if (!error && code === 200) {
-            window.open(data, '_blank')
+            toPdfPage(data)
+            //window.open(data, '_blank')
         }
     }
 }

+ 4 - 2
src/views/tentative/material/components/FormItemUpload.vue

@@ -36,6 +36,7 @@ import { onMounted, ref, watch } from 'vue'
 import { getTokenHeader } from '~src/api/request/header'
 import { isFileSize } from 'js-fast-way'
 import { genFileId } from 'element-plus'
+import { toPdfPage } from '~uti/btn-auth'
 
 const props = defineProps({
     modelValue: {
@@ -184,8 +185,9 @@ const uploadChange = (file) => {
 
 //预览文件
 const previewClick = () => {
-    const pdfUrl = uploadValue.value ?? ''
-    if (pdfUrl) window.open(pdfUrl, '_blank')
+    toPdfPage(uploadValue.value)
+    //const pdfUrl = uploadValue.value ?? ''
+    //if (pdfUrl) window.open(pdfUrl, '_blank')
 }
 </script>
 

+ 4 - 2
src/views/tentative/material/sampling.vue

@@ -17,7 +17,7 @@
                         :tenant-id="userInfo?.tenant_id"
                         :wbs-temp-id="projectInfo?.referenceWbsTemplateIdTrial"
                         :wbs-type="2"
-                        @nodeTap="wbsElTreeClick"
+                        @node-tap="wbsElTreeClick"
                     />
                 </el-scrollbar>
             </div>
@@ -293,6 +293,7 @@ import approachApi from '~api/tentative/material/approach'
 import { getContractUserList, getDictionary } from '~api/other'
 import { arrIndex, arrToId, deepClone, formValidate, getArrValue } from 'js-fast-way'
 import { delMessageV2 } from '~com/message/index.js'
+import { toPdfPage } from '~uti/btn-auth'
 
 //变量
 const useAppState = useAppStore()
@@ -658,7 +659,8 @@ const printerClick = async () => {
         //处理数据
         printerLoading.value = false
         if (!error && code === 200) {
-            window.open(data, '_blank')
+            toPdfPage(data)
+            //window.open(data, '_blank')
         }
     }
 }