吉安感知网项目-前端
罗广辉
2026-07-11 998b9078fb1e7fb99a6c695469e51ea2dd47178b
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}文件格式,可以下载再查看`)
   }
@@ -295,11 +303,16 @@
      ElMessage.warning('附件ID不存在')
      return
   }
   if (row?.extension === 'zip') {
      ElMessage.warning(`${row?.extension}文件格式,不能编辑`)
      return
   }
   const route = router.resolve({
      path: '/documentPreview/officeEdit',
      query: {
         attachId: row.id,
         mode: 'edit',
      },
   })
   window.open(route.href, '_blank')