From 2d3530a7c11557a40807ad7c0b9e302ce6ce3a9f Mon Sep 17 00:00:00 2001
From: hsy <1029150275@qq.com>
Date: 星期五, 28 八月 2026 10:16:32 +0800
Subject: [PATCH] feat: 综合业务模块页面重构与交互完善
---
src/views/qualityManagement/finalInspection/index.vue | 33 +++++++++++++++++++++++++++++----
1 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/src/views/qualityManagement/finalInspection/index.vue b/src/views/qualityManagement/finalInspection/index.vue
index 4a59fa4..6c60f86 100644
--- a/src/views/qualityManagement/finalInspection/index.vue
+++ b/src/views/qualityManagement/finalInspection/index.vue
@@ -128,6 +128,7 @@
import { ElMessageBox } from "element-plus";
import {
downloadQualityInspect,
+ downloadQualityInspectPdf,
qualityInspectDel,
qualityInspectListPage,
qualityInspectUpdate,
@@ -315,9 +316,17 @@
},
{
name: "涓嬭浇",
- type: "text",
- clickFun: row => {
- downLoadFile(row);
+ type: "dropdown",
+ dropdownItems: [
+ { label: "Word鏍煎紡", command: "word" },
+ { label: "PDF鏍煎紡", command: "pdf" }
+ ],
+ commandFun: (command, row) => {
+ if (command === 'word') {
+ downLoadFile(row);
+ } else if (command === 'pdf') {
+ downLoadPdfFile(row);
+ }
},
},
],
@@ -500,7 +509,23 @@
const link = document.createElement("a");
link.href = downloadUrl;
- link.download = "鍘熸潗鏂欐楠屾姤鍛�.docx";
+ link.download = "鍑哄巶妫�楠屾姤鍛�.docx";
+ document.body.appendChild(link);
+ link.click();
+
+ document.body.removeChild(link);
+ window.URL.revokeObjectURL(downloadUrl);
+ });
+ };
+
+ const downLoadPdfFile = row => {
+ downloadQualityInspectPdf({ id: row.id }).then(blobData => {
+ const blob = new Blob([blobData], { type: "application/pdf" });
+ const downloadUrl = window.URL.createObjectURL(blob);
+
+ const link = document.createElement("a");
+ link.href = downloadUrl;
+ link.download = "鍑哄巶妫�楠屾姤鍛�.pdf";
document.body.appendChild(link);
link.click();
--
Gitblit v1.9.3