diff --git a/src/views/monitor/monitor/index.vue b/src/views/monitor/monitor/index.vue index 45e6b74..f4ed455 100644 --- a/src/views/monitor/monitor/index.vue +++ b/src/views/monitor/monitor/index.vue @@ -206,7 +206,7 @@ @@ -378,8 +378,8 @@ const handleDelete = async (id: number) => { } catch {} } -const downloadFile = async (temporaryId: string) => { - const res = await MonitorApi.getMonitorStuFileUrl(temporaryId) +const downloadFile = async (row: any) => { + const res = await MonitorApi.getMonitorStuFileUrl(row.temporaryId) console.log(res) const url = res try { @@ -391,7 +391,7 @@ const downloadFile = async (temporaryId: string) => { const blobUrl = window.URL.createObjectURL(blob) // 提取文件名 - const filename = url.substring(url.lastIndexOf('/') + 1).split('?')[0] + const filename = row.username // 创建 a 标签并下载 const a = document.createElement('a')