2026-01-19 17:07:05 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="upload-status">
|
|
|
|
|
<div class="upload-status-item">
|
|
|
|
|
<div class="upload-status-item-icon">
|
|
|
|
|
<img
|
|
|
|
|
v-if="status === 'uploading'"
|
|
|
|
|
src="@/assets/images/award/progress.png"
|
|
|
|
|
alt=""
|
|
|
|
|
class="progress-icon"
|
|
|
|
|
/>
|
|
|
|
|
<img
|
|
|
|
|
v-if="status === 'success'"
|
|
|
|
|
src="@/assets/images/award/successful.png"
|
|
|
|
|
alt=""
|
|
|
|
|
class="progress-icon successful-icon"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2026-02-04 13:33:05 +08:00
|
|
|
<div class="text">{{ $t(text) }}</div>
|
|
|
|
|
<div class="tips">{{ $t(tips) }}</div>
|
2026-01-19 17:07:05 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { computed, watch } from 'vue'
|
2026-02-04 10:57:25 +08:00
|
|
|
import { useI18n } from 'vue-i18n'
|
|
|
|
|
|
|
|
|
|
const { t } = useI18n()
|
2026-01-19 17:07:05 +08:00
|
|
|
const props = defineProps<{
|
|
|
|
|
status: string
|
|
|
|
|
type: 'pdf' | 'video'
|
|
|
|
|
}>()
|
|
|
|
|
|
|
|
|
|
const textMap: Record<string, string> = {
|
|
|
|
|
idle: '',
|
2026-02-04 13:33:05 +08:00
|
|
|
uploading: 'AwardsPage.uploadInProgress',
|
|
|
|
|
success:'AwardsPage.uploadSuccess',
|
|
|
|
|
error: 'AwardsPage.fileUploadFailed'
|
2026-01-19 17:07:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const tips = computed(() => {
|
|
|
|
|
if (props.type === 'pdf') {
|
2026-02-04 13:33:05 +08:00
|
|
|
return 'AwardsPage.pdfFileTip'
|
2026-01-19 17:07:05 +08:00
|
|
|
} else if (props.type === 'video') {
|
2026-02-04 13:33:05 +08:00
|
|
|
return 'AwardsPage.videoFileTip'
|
2026-01-19 17:07:05 +08:00
|
|
|
}
|
|
|
|
|
return ''
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const text = computed(() => {
|
|
|
|
|
return textMap[props.status] ?? textMap.uploading
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
<style scoped lang="less">
|
|
|
|
|
.upload-status {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
.upload-status-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
.progress-icon {
|
|
|
|
|
width: 12rem;
|
|
|
|
|
height: 12rem;
|
|
|
|
|
}
|
|
|
|
|
.text {
|
|
|
|
|
font-family: Arial;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #585858;
|
|
|
|
|
font-size: 2.4rem;
|
|
|
|
|
}
|
|
|
|
|
.tips{
|
|
|
|
|
font-family: Arial;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-size: 1.8rem;
|
|
|
|
|
color: #aaa;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|