WEB/src/views/order/orderManagement/component/OrderExportProgressDialog.vue
2026-05-29 18:21:11 +08:00

72 lines
1.6 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<el-dialog
:model-value="visible"
title="订单导出进度"
width="520px"
align-center
:close-on-click-modal="false"
:show-close="!loading"
@update:model-value="emit('update:visible', $event)"
>
<div class="export-progress-panel">
<el-progress
:percentage="progressPercent"
:status="progressStatus"
:stroke-width="16"
striped
striped-flow
/>
<div class="export-progress-panel__meta">
<span>任务状态:{{ statusLabel }}</span>
<span>任务ID:{{ taskId || '—' }}</span>
</div>
<div v-if="message || error" class="export-progress-panel__message">
{{ error || message }}
</div>
</div>
<template #footer>
<el-button :disabled="loading" @click="emit('update:visible', false)">关闭</el-button>
</template>
</el-dialog>
</template>
<script setup lang="ts">
defineProps<{
visible: boolean
loading: boolean
progressPercent: number
progressStatus?: '' | 'success' | 'exception' | 'warning'
statusLabel: string
taskId: string
message: string
error: string
}>()
const emit = defineEmits<{
(e: 'update:visible', value: boolean): void
}>()
</script>
<style scoped lang="scss">
.export-progress-panel {
display: flex;
flex-direction: column;
gap: 12px;
}
.export-progress-panel__meta {
display: flex;
flex-direction: column;
gap: 4px;
color: #606266;
font-size: 13px;
}
.export-progress-panel__message {
color: #909399;
font-size: 13px;
line-height: 1.5;
word-break: break-all;
}
</style>