From 2ca94de8ede18ac07ccfd8dec7b6f6a707adde9b Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Mon, 01 Sep 2025 11:20:24 +0800
Subject: [PATCH] Merge branch 'refs/heads/feature/v5.0/5.0.5' into patch_management

---
 src/views/system/helpCenter.vue |   31 +++++++++++++++++++------------
 1 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/src/views/system/helpCenter.vue b/src/views/system/helpCenter.vue
index 82ac420..2fae289 100644
--- a/src/views/system/helpCenter.vue
+++ b/src/views/system/helpCenter.vue
@@ -60,20 +60,28 @@
   });
 };
 // 查看
-const clickDetail = row => {
-  if (!row.filePath) {
+// const clickDetail = row => {
+//   if (!row.filePath) {
+//     ElMessage.warning('没有可预览的文件');
+//     return;
+//   }
+//   fetch(row.filePath)
+//     .then(response => response.blob())
+//     .then(res => {
+//       let blob = new Blob([res], { type: 'application/pdf' });
+//       // pdfurl即转化后的结果
+//       let pdfurl = window.URL.createObjectURL(blob);
+//       // 新标签页打开,即可预览并下载
+//       window.open(pdfurl);
+//     });
+// };
+const clickDetail = val => {
+  const filePath = val.filePath;
+  if (!val.filePath) {
     ElMessage.warning('没有可预览的文件');
     return;
   }
-  fetch(row.filePath)
-    .then(response => response.blob())
-    .then(res => {
-      let blob = new Blob([res], { type: 'application/pdf' });
-      // pdfurl即转化后的结果
-      let pdfurl = window.URL.createObjectURL(blob);
-      // 新标签页打开,即可预览并下载
-      window.open(pdfurl);
-    });
+  window.open(filePath, '_blank');
 };
 // 文件上传
 const onUploadFileBefore = (file, row) => {
@@ -82,7 +90,6 @@
   const formData = new FormData();
   formData.append('file', file, file.name);
 
-  
   uploadFileAPI(formData).then(res => {
     if (res.data.code === 200) {
       const params = {

--
Gitblit v1.9.3