This commit is contained in:
2026-01-26 18:18:52 +08:00
parent 35a1a0d247
commit 756271abe1

View File

@ -1,7 +1,7 @@
<template>
<div>
<div ref="searchBox" class="mt10">
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount" />
<Search :searchArr="searchConfiger" @submit="onSearch" />
</div>
<PageTitle :malginLeft="10" :height="35" backgroundColor="#ffff" :marginBottom="5" :marginTop="5">
<template #left>
@ -70,8 +70,6 @@ const qxkz = reactive({
})
const searchConfiger = ref([
{ label: "文件名称", prop: 'wjmc', placeholder: "请输入文件名称", showType: "input" },
// { label: "情报来源", prop: 'cjLx', placeholder: "请选择情报来源", showType: "select", options: D_BZ_CJLX },
// { label: "来源单位", prop: 'ssbmdm', placeholder: "请选择来源单位", showType: "department" }
]);
const pageData = reactive({
@ -184,7 +182,8 @@ const downloadFile = async (item) => {
const downloadPromises = dataList.map(async (fileData, index) => {
try {
// 使用fetch获取文件内容
const response = await fetch(fileData.url);
const downloadUrl = fileData.url.replace(/^https?:\/\/[^/]+/, '/zyminio');
const response = await fetch(downloadUrl);
if (!response.ok) throw new Error('文件下载失败');
// 将响应转换为Blob对象
const blob = await response.blob();
@ -221,7 +220,6 @@ const downloadFile = async (item) => {
proxy.$message.warning(`成功下载${successCount}个文件,失败${failCount}个文件`);
}
} catch (error) {
console.error('文件下载失败:', error);
proxy.$message.error('文件下载失败,请稍后重试');
}
}