吉安感知网项目-前端
chenyao
2026-07-11 abf9a8727876e79d47f02264f89a96ddab582d46
applications/task-work-order/src/views/orderView/orderManage/inspectionReport/index.vue
@@ -279,12 +279,20 @@
   if (!row.link) {
      ElMessage.warning('文件链接不存在')
   } else if (allSupportedExtensions.includes(fileType)){
      let url = `${VITE_APP_PREVIEW_URL}/onlinePreview?url=` + encodeURIComponent(Base64.encode(row.link))
      // word/pdf 以可编辑的 html 模式打开(与 excel 一致)
      if (editableOfficeTypes.includes(fileType)) {
         url += '&officePreviewType=html'
      }
      window.open(url)
      // let url = `${VITE_APP_PREVIEW_URL}/onlinePreview?url=` + encodeURIComponent(Base64.encode(row.link))
      // // word/pdf 以可编辑的 html 模式打开(与 excel 一致)
      // if (editableOfficeTypes.includes(fileType)) {
      //    url += '&officePreviewType=html'
      // }
      // window.open(url)
      const route = router.resolve({
         path: '/documentPreview/officeEdit',
         query: {
            attachId: row.id,
            mode: 'view',
         },
      })
      window.open(route.href, '_blank')
   } else {
      ElMessage.warning(`${fileType}文件格式,可以下载再查看`)
   }
@@ -304,6 +312,7 @@
      path: '/documentPreview/officeEdit',
      query: {
         attachId: row.id,
         mode: 'edit',
      },
   })
   window.open(route.href, '_blank')