修改下载文件逻辑.

This commit is contained in:
lijiahang
2024-06-04 20:01:05 +08:00
parent 59d9739f36
commit 7f24948efa
16 changed files with 234 additions and 112 deletions

View File

@@ -1,5 +1,6 @@
import type { DataGrid, Pagination } from '@/types/global';
import type { TableData } from '@arco-design/web-vue/es/table/interface';
import { httpBaseUrl } from '@/utils/env';
import axios from 'axios';
import qs from 'query-string';
@@ -46,17 +47,25 @@ export interface HostSftpLogExtra {
* SFTP
*/
export function getHostSftpLogPage(request: HostSftpLogQueryRequest) {
return axios.post<DataGrid<HostSftpLogQueryResponse>>('/asset/host-sftp-log/query', request);
return axios.post<DataGrid<HostSftpLogQueryResponse>>('/asset/host-sftp/query-log', request);
}
/**
* SFTP
*/
export function deleteHostSftpLog(idList: Array<number>) {
return axios.delete('/asset/host-sftp-log/delete', {
return axios.delete('/asset/host-sftp/delete-log', {
params: { idList },
paramsSerializer: params => {
return qs.stringify(params, { arrayFormat: 'comma' });
}
});
}
/**
*
*/
export function downloadWithTransferToken(channelId: string, transferToken: string) {
window.open(`${httpBaseUrl}/asset/host-sftp/download?channelId=${channelId}&transferToken=${transferToken}`, 'newWindow');
}