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/page/index/top/top-qna.vue |   68 +++++++++++++++------------------
 1 files changed, 31 insertions(+), 37 deletions(-)

diff --git a/src/page/index/top/top-qna.vue b/src/page/index/top/top-qna.vue
index d2f6b24..18c4de6 100644
--- a/src/page/index/top/top-qna.vue
+++ b/src/page/index/top/top-qna.vue
@@ -1,14 +1,19 @@
 <template>
   <div class="top-qna">
-    <el-dropdown @command="dropdownClick">
-      <img alt="" src="@/assets/images/helpCenter/helpIcon.png" />
+     <el-icon class="help-icon" color="#707070" size="17" @click="dropdownClick('guide')">
+        <QuestionFilled />
+      </el-icon>
+    <!-- <el-dropdown @command="dropdownClick">
+      <el-icon class="help-icon" color="#707070" size="17">
+        <QuestionFilled />
+      </el-icon>
       <template #dropdown>
         <el-dropdown-menu>
           <el-dropdown-item command="guide">入门指南</el-dropdown-item>
           <el-dropdown-item command="systemupdate">系统更新</el-dropdown-item>
         </el-dropdown-menu>
       </template>
-    </el-dropdown>
+    </el-dropdown> -->
   </div>
 </template>
 
@@ -19,7 +24,7 @@
 const router = useRouter();
 const systemupdateFilePath = ref(null);
 const rumenPath = ref(null);
-const fileData = ref([]); // 存储所有文件数据
+const fileData = ref([]);
 const loading = ref(false);
 const getlistDataAPI = async () => {
   loading.value = true;
@@ -27,21 +32,19 @@
     const res = await listDataAPI();
     if (res.data.code === 200 && res.data.data) {
       fileData.value = res.data.data;
-      
-      // 使用 find 方法查找特定条目
-      const systemUpdateItem = res.data.data.find(item => item.id === 4);
-      const rumenItem = res.data.data.find(item => item.id === 2);
-      
+      const systemUpdateItem = res.data.data.find(item => item.id === 4); //系统更新
+      const rumenItem = res.data.data.find(item => item.id === 2); //入门指南
+
       if (systemUpdateItem) {
         systemupdateFilePath.value = systemUpdateItem.filePath;
       } else {
-        console.warn('未找到系统更新条目');
+        console.warn('暂无系统更新');
       }
-      
+
       if (rumenItem) {
         rumenPath.value = rumenItem.filePath;
       } else {
-        console.warn('未找到入门指南条目');
+        console.warn('暂无入门指南');
       }
     } else {
       ElMessage.error('获取帮助数据失败');
@@ -54,40 +57,24 @@
   }
 };
 const dropdownClick = val => {
-  // 确保数据已加载
   if (loading.value) {
     ElMessage.warning('数据正在加载,请稍后');
     return;
   }
-  
+
   if (val === 'guide') {
     if (!rumenPath.value) {
-      ElMessage.warning('入门指南文件未找到');
+      ElMessage.warning('暂无入门指南文件');
       return;
     }
-   fetch(rumenPath.value)
-        .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(rumenPath.value, '_blank');
   } else if (val === 'systemupdate') {
-
-     fetch(systemupdateFilePath.value)
-        .then((response) => response.blob())
-        .then((res) => {
-          let blob = new Blob([res], { type: "application/pdf" });
-          // pdfurl即转化后的结果
-          let pdfurl = window.URL.createObjectURL(blob);
-          // 新标签页打开,即可预览并下载
-          window.open(pdfurl);
-        });
- 
-
-
+    if (!systemupdateFilePath.value) {
+      ElMessage.warning('暂无系统更新文件');
+      return;
+    }
+    window.open(systemupdateFilePath.value, '_blank');
   }
 };
 
@@ -103,5 +90,12 @@
   font-size: 18px;
   justify-content: center;
   cursor: pointer;
+  .help-icon {
+    width: 25px;
+    height: 25px;
+  }
+  .theme-white .el-dropdown {
+    color: none !important;
+  }
 }
 </style>

--
Gitblit v1.9.3