diff --git a/src/views/TaskManagement.vue b/src/views/TaskManagement.vue
index a0dbc1f..9d12198 100644
--- a/src/views/TaskManagement.vue
+++ b/src/views/TaskManagement.vue
@@ -34,7 +34,17 @@
:header-cell-style="{ background: '#f5f7fa' }"
border>
-
+
+
+
+ {{ row.client_ip }}
+
+
+
{{ formatDateTime(scope.row.add_time) }}
@@ -235,6 +245,12 @@
下载文件
+
+ 下载文件(已代理)
+
@@ -249,8 +265,9 @@ import {
Plus, Delete, Monitor, Search,
InfoFilled, DocumentCopy, Download,
VideoPlay, VideoPause, RefreshRight,
- Top
+ Top, Connection
} from '@element-plus/icons-vue'
+import { API_BASE_URL } from '../config/api.config'
const loading = ref(false)
const total = ref(0)
@@ -643,6 +660,25 @@ onUnmounted(() => {
isMobile.value = window.innerWidth <= 768
})
})
+
+// 判断是否可以使用代理下载
+const canDownloadProxied = computed(() => {
+ if (!currentTaskDetails.value) return false
+
+ const validStatus = [3, 4] // 3: 已完成, 4: 已缓存
+ return (
+ validStatus.includes(currentTaskDetails.value.status) &&
+ currentTaskDetails.value.tag !== 'CLEANED'
+ )
+})
+
+// 添加代理下载方法
+const downloadProxiedFile = () => {
+ if (!currentTaskDetails.value || !canDownloadProxied.value) return
+
+ const downloadUrl = `${API_BASE_URL}/Download/${currentTaskDetails.value.tid}`
+ window.open(downloadUrl, '_blank')
+}
\ No newline at end of file