27 lines
750 B
TypeScript
27 lines
750 B
TypeScript
import { ElMessageBox } from 'element-plus'
|
|
|
|
export interface ExportTaskCreatedDialogOptions {
|
|
taskName: string
|
|
taskNo?: string | null
|
|
}
|
|
|
|
export async function showExportTaskCreatedDialog(options: ExportTaskCreatedDialogOptions) {
|
|
const taskReference = options.taskNo ? `\n任务编号:${options.taskNo}` : ''
|
|
|
|
try {
|
|
await ElMessageBox.confirm(
|
|
`${options.taskName}已进入后台生成队列。文件生成后可在下载中心查看并下载。${taskReference}`,
|
|
'导出任务已创建',
|
|
{
|
|
type: 'success',
|
|
confirmButtonText: '前往下载中心',
|
|
cancelButtonText: '留在当前页',
|
|
distinguishCancelAndClose: true,
|
|
},
|
|
)
|
|
return true
|
|
} catch {
|
|
return false
|
|
}
|
|
}
|