Commit d5ba7de8 by 焦子成

1

parent f1f7dd3b
......@@ -150,8 +150,8 @@ export const useDownloadStore = defineStore('download', () => {
// 创建 AbortController 用于取消下载
download.controller = new AbortController()
console.log('download config.url-->',config.downLoadStatus)
console.log('download id-->',download.id)
// console.log('download config.url-->',config.downLoadStatus)
// console.log('download id-->',download.id)
try {
await performDownload(download)
http.post(config.downLoadStatus,{
......@@ -385,7 +385,6 @@ export const useDownloadStore = defineStore('download', () => {
// 保存文件到自定义文件夹
const blob = xhr.response
try {
// 尝试使用现代浏览器的 File System Access API
if ('showSaveFilePicker' in window) {
......
......@@ -355,7 +355,7 @@
<el-table-column label="操作" width="200" align="center" fixed="right">
<template #default="{ row }">
<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">
开始
</el-button>
......@@ -370,7 +370,7 @@
继续
</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">
重试
</el-button>
......@@ -1299,10 +1299,12 @@ const handleStatusFilterChange = () => {
}
// 单个文件下载
const startSingleDownload = async (downloadId) => {
const startSingleDownload = async (row) => {
downloadStore.setCustomSubFolder(row.filePrefix)
downloadStore.isSingleDownloading = true
try {
await downloadStore.startDownload(downloadId)
await downloadStore.startDownload(row.id)
loadDetailTableData()
loadUploadDetailTotalNum()
} 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