33 lines
729 B
JavaScript
33 lines
729 B
JavaScript
export function getUploadFileAction(status) {
|
|
const actionMap = {
|
|
parsed_failed: { key: "viewError", text: "查看错误原因" },
|
|
parsed_success: { key: "delete", text: "删除" }
|
|
};
|
|
|
|
return actionMap[status] || null;
|
|
}
|
|
|
|
export function getUploadFileStatusText(status) {
|
|
const map = {
|
|
uploading: "上传中",
|
|
parsing: "解析中",
|
|
parsed_success: "解析成功",
|
|
parsed_failed: "解析失败",
|
|
deleted: "已删除"
|
|
};
|
|
|
|
return map[status] || status;
|
|
}
|
|
|
|
export function getUploadFileStatusType(status) {
|
|
const map = {
|
|
uploading: "primary",
|
|
parsing: "warning",
|
|
parsed_success: "success",
|
|
parsed_failed: "danger",
|
|
deleted: "info"
|
|
};
|
|
|
|
return map[status] || "info";
|
|
}
|