Commit d5ba7de8 by 焦子成

1

parent f1f7dd3b
...@@ -150,8 +150,8 @@ export const useDownloadStore = defineStore('download', () => { ...@@ -150,8 +150,8 @@ export const useDownloadStore = defineStore('download', () => {
// 创建 AbortController 用于取消下载 // 创建 AbortController 用于取消下载
download.controller = new AbortController() download.controller = new AbortController()
console.log('download config.url-->',config.downLoadStatus) // console.log('download config.url-->',config.downLoadStatus)
console.log('download id-->',download.id) // console.log('download id-->',download.id)
try { try {
await performDownload(download) await performDownload(download)
http.post(config.downLoadStatus,{ http.post(config.downLoadStatus,{
...@@ -385,7 +385,6 @@ export const useDownloadStore = defineStore('download', () => { ...@@ -385,7 +385,6 @@ export const useDownloadStore = defineStore('download', () => {
// 保存文件到自定义文件夹 // 保存文件到自定义文件夹
const blob = xhr.response const blob = xhr.response
try { try {
// 尝试使用现代浏览器的 File System Access API // 尝试使用现代浏览器的 File System Access API
if ('showSaveFilePicker' in window) { if ('showSaveFilePicker' in window) {
......
...@@ -355,7 +355,7 @@ ...@@ -355,7 +355,7 @@
<el-table-column label="操作" width="200" align="center" fixed="right"> <el-table-column label="操作" width="200" align="center" fixed="right">
<template #default="{ row }"> <template #default="{ row }">
<div class="download-actions"> <div class="download-actions">
<el-button v-if="row.status === 'pending'" @click="startSingleDownload(row.id)" type="primary" <el-button v-if="row.status === 'pending'" @click="startSingleDownload(row)" type="primary"
size="small"> size="small">
开始 开始
</el-button> </el-button>
...@@ -370,7 +370,7 @@ ...@@ -370,7 +370,7 @@
继续 继续
</el-button> </el-button>
<el-button v-if="row.status === 'error'" @click="startSingleDownload(row.id)" type="warning" <el-button v-if="row.status === 'error'" @click="startSingleDownload(row)" type="warning"
size="small"> size="small">
重试 重试
</el-button> </el-button>
...@@ -1299,10 +1299,12 @@ const handleStatusFilterChange = () => { ...@@ -1299,10 +1299,12 @@ const handleStatusFilterChange = () => {
} }
// 单个文件下载 // 单个文件下载
const startSingleDownload = async (downloadId) => { const startSingleDownload = async (row) => {
downloadStore.setCustomSubFolder(row.filePrefix)
downloadStore.isSingleDownloading = true downloadStore.isSingleDownloading = true
try { try {
await downloadStore.startDownload(downloadId) await downloadStore.startDownload(row.id)
loadDetailTableData() loadDetailTableData()
loadUploadDetailTotalNum() loadUploadDetailTotalNum()
} finally { } finally {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment