修复无法下载问题 update web/src/views/system/downloadCenter/crud.tsx.

Signed-off-by: lxy <46486798@qq.com>
This commit is contained in:
lxy
2025-03-20 11:28:09 +00:00
committed by Gitee
parent 351bae1fea
commit 86c202b94a

View File

@@ -2,7 +2,8 @@ import { CrudOptions, AddReq, DelReq, EditReq, dict, CrudExpose, compute } from
import * as api from './api'; import * as api from './api';
import { dictionary } from '/@/utils/dictionary'; import { dictionary } from '/@/utils/dictionary';
import { successMessage } from '../../../utils/message'; import { successMessage } from '../../../utils/message';
import { auth } from '/@/utils/authFunction' import { auth } from '/@/utils/authFunction';
import { getBaseURL } from '/@/utils/baseUrl';
interface CreateCrudOptionsTypes { interface CreateCrudOptionsTypes {
output: any; output: any;
@@ -27,7 +28,6 @@ export const createCrudOptions = function ({ crudExpose }: { crudExpose: CrudExp
//权限判定 //权限判定
// @ts-ignore
// @ts-ignore // @ts-ignore
return { return {
crudOptions: { crudOptions: {
@@ -72,7 +72,7 @@ export const createCrudOptions = function ({ crudExpose }: { crudExpose: CrudExp
show: compute(ctx => ctx.row.task_status === 2), show: compute(ctx => ctx.row.task_status === 2),
text: '下载文件', text: '下载文件',
type: 'warning', type: 'warning',
click: (ctx) => window.open(ctx.row.url, '_blank') click: (ctx) => window.open(getBaseURL(ctx.row.url), '_blank')
} }
}, },
}, },