更新:进度管理界面的步骤展示
This commit is contained in:
parent
53e5b5cd85
commit
dc25135dd2
@ -142,9 +142,7 @@ const getUsernameById = (userId: number) => {
|
||||
|
||||
const refresh = async () => {
|
||||
try {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
await loadLessons()
|
||||
} catch (err) {
|
||||
} finally {
|
||||
uni.stopPullDownRefresh()
|
||||
|
@ -57,9 +57,7 @@ onMounted(() => {
|
||||
|
||||
const refresh = async () => {
|
||||
try {
|
||||
uni.reLaunch({
|
||||
url: `/pages/lesson/index?courseId=${route.params?.courseId}`
|
||||
})
|
||||
await loadLesson()
|
||||
} catch (err) {
|
||||
} finally {
|
||||
uni.stopPullDownRefresh()
|
||||
|
@ -26,7 +26,7 @@ const pickerCourseValue = ref()
|
||||
const pickerLessonColumns = computed(() => {
|
||||
return pickerCourseValue.value ? groupedLessons.value[pickerCourseValue.value].map((lesson: LessonTask) => {
|
||||
return {
|
||||
label: (extractLessonStage(lesson).step === 4 ? '✅ ' : '') + lesson.microLessonName,
|
||||
label: (extractLessonStage(lesson).step === 5 ? '✅ ' : '') + lesson.microLessonName,
|
||||
value: lesson.id,
|
||||
}
|
||||
}) : []
|
||||
@ -141,8 +141,8 @@ const onStep1 = (rejected: boolean = false) => {
|
||||
const onStep2 = (rejected: boolean = false) => {
|
||||
const msg = rejected ? message_reject : message
|
||||
msg.confirm({
|
||||
title: rejected ? '驳回视频拍摄制作' : '通过视频拍摄制作',
|
||||
msg: rejected ? '视频拍摄制作不符合要求,驳回拍摄制作方重做' : '请确认视频拍摄制作合格无误后,再确认审核通过'
|
||||
title: rejected ? '驳回确认脚本内容' : '通过确认脚本内容',
|
||||
msg: rejected ? '脚本内容不符合要求,驳回脚本审核方重做' : '请确认脚本内容合格无误后,再确认审核通过'
|
||||
}).then(() => {
|
||||
if (!selectedLesson.value?.id) {
|
||||
toast.error({
|
||||
@ -184,7 +184,7 @@ const onStep3 = (rejected: boolean = false) => {
|
||||
const msg = rejected ? message_reject : message
|
||||
msg.confirm({
|
||||
title: rejected ? '驳回视频拍摄制作' : '通过视频拍摄制作',
|
||||
msg: rejected ? '视频拍摄制作不符合要求,驳回拍摄制作方重做' : '请确认视频拍摄制作合格无误后,再确认审核通过'
|
||||
msg: rejected ? '视频拍摄制作不符合要求,驳回拍摄方重新拍摄' : '请确认视频拍摄制作合格无误后,再确认审核通过'
|
||||
}).then(() => {
|
||||
if (!selectedLesson.value?.id) {
|
||||
toast.error({
|
||||
@ -202,13 +202,54 @@ const onStep3 = (rejected: boolean = false) => {
|
||||
courseName: selectedLesson.value.courseName,
|
||||
microLessonName: selectedLesson.value.microLessonName,
|
||||
userId: selectedLesson.value.userId,
|
||||
progressStatus: ProgressStatus.VIDEO_CONFIRMED
|
||||
progressStatus: ProgressStatus.SCRIPT_CONFIRMED//3
|
||||
} : {
|
||||
advise: "",
|
||||
courseName: selectedLesson.value.courseName,
|
||||
microLessonName: selectedLesson.value.microLessonName,
|
||||
userId: selectedLesson.value.userId,
|
||||
progressStatus: ProgressStatus.VIDEO_CONFIRMED
|
||||
progressStatus: ProgressStatus.VIDEO_CREATING//4
|
||||
}).then(res => {
|
||||
toast.success({
|
||||
msg: rejected ? '驳回成功' : '审核通过'
|
||||
})
|
||||
setTimeout(() => {
|
||||
updateLessons()
|
||||
}, 1500);
|
||||
}).catch(err => {
|
||||
toast.error({ msg: err.message })
|
||||
})
|
||||
})
|
||||
}
|
||||
const onStep4 = (rejected: boolean = false) => {
|
||||
const msg = rejected ? message_reject : message
|
||||
msg.confirm({
|
||||
title: rejected ? '驳回视频内容' : '通过视频内容',
|
||||
msg: rejected ? '视频内容不符合要求,驳回制作方重新制作' : '请确认视频内容合格无误后,再确认审核通过'
|
||||
}).then(() => {
|
||||
if (!selectedLesson.value?.id) {
|
||||
toast.error({
|
||||
msg: '参数错误'
|
||||
})
|
||||
return
|
||||
}
|
||||
toast.loading({
|
||||
msg: '正在处理...'
|
||||
})
|
||||
BussApi.updateLessonTask(
|
||||
selectedLesson.value.id,
|
||||
rejected ? {
|
||||
advise: adviseText.value.toString(),
|
||||
courseName: selectedLesson.value.courseName,
|
||||
microLessonName: selectedLesson.value.microLessonName,
|
||||
userId: selectedLesson.value.userId,
|
||||
progressStatus: ProgressStatus.VIDEO_CREATING//4
|
||||
} : {
|
||||
advise: "",
|
||||
courseName: selectedLesson.value.courseName,
|
||||
microLessonName: selectedLesson.value.microLessonName,
|
||||
userId: selectedLesson.value.userId,
|
||||
progressStatus: ProgressStatus.VIDEO_CONFIRMED//5
|
||||
}).then(res => {
|
||||
toast.success({
|
||||
msg: rejected ? '驳回成功' : '审核通过'
|
||||
@ -284,9 +325,7 @@ onMounted(() => {
|
||||
|
||||
const refresh = async () => {
|
||||
try {
|
||||
uni.reLaunch({
|
||||
url: '/pages/progress/index'
|
||||
})
|
||||
await updateLessons()
|
||||
} catch (err) {
|
||||
} finally {
|
||||
uni.stopPullDownRefresh()
|
||||
@ -346,11 +385,13 @@ onPullDownRefresh(() => {
|
||||
</div>
|
||||
|
||||
<div v-if="selectedLessonStage?.step === 1">
|
||||
<StatusBlock v-if="user.hasRole('teacher')" title="脚本已提交" subtitle="请耐心等待审核">
|
||||
<template #icon>
|
||||
<div class="i-tabler-progress-bolt text-7xl text-neutral-400 "></div>
|
||||
</template>
|
||||
</StatusBlock>
|
||||
<div v-if="user.hasRole('teacher')">
|
||||
<StatusBlock title="脚本已提交" subtitle="请耐心等待审核">
|
||||
<template #icon>
|
||||
<div class="i-tabler-progress-bolt text-7xl text-neutral-400 "></div>
|
||||
</template>
|
||||
</StatusBlock>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="selectedLesson?.advise && selectedLesson.advise.length > 0" class=" m-2 text-sm">
|
||||
<wd-card title="修改建议">
|
||||
@ -372,11 +413,13 @@ onPullDownRefresh(() => {
|
||||
</div>
|
||||
|
||||
<div v-if="selectedLessonStage?.step === 2">
|
||||
<StatusBlock v-if="!user.hasRole('teacher')" title="脚本确认进行中" subtitle="请等待脚本内容确认">
|
||||
<template #icon>
|
||||
<div class="i-tabler-file-text text-7xl text-neutral-400"></div>
|
||||
</template>
|
||||
</StatusBlock>
|
||||
<div v-if="!user.hasRole('teacher')">
|
||||
<StatusBlock title="脚本确认进行中" subtitle="请等待脚本内容确认">
|
||||
<template #icon>
|
||||
<div class="i-tabler-file-text text-7xl text-neutral-400"></div>
|
||||
</template>
|
||||
</StatusBlock>
|
||||
</div>
|
||||
<div v-else>
|
||||
<StatusBlock title="脚本审核已完成" subtitle="请确认脚本内容">
|
||||
<template #icon>
|
||||
@ -393,11 +436,18 @@ onPullDownRefresh(() => {
|
||||
</div>
|
||||
|
||||
<div v-if="selectedLessonStage?.step === 3">
|
||||
<StatusBlock v-if="user.hasRole('teacher')" title="视频拍摄制作进行中" subtitle="请等待视频拍摄制作">
|
||||
<template #icon>
|
||||
<div class="i-tabler-video text-7xl text-neutral-400"></div>
|
||||
</template>
|
||||
</StatusBlock>
|
||||
<div v-if="user.hasRole('teacher')">
|
||||
<div v-if="selectedLesson?.advise && selectedLesson.advise.length > 0" class=" m-2 text-sm">
|
||||
<wd-card title="修改建议">
|
||||
{{ selectedLesson?.advise }}
|
||||
</wd-card>
|
||||
</div>
|
||||
<StatusBlock title="视频拍摄制作进行中" subtitle="请等待视频拍摄制作">
|
||||
<template #icon>
|
||||
<div class="i-tabler-video text-7xl text-neutral-400"></div>
|
||||
</template>
|
||||
</StatusBlock>
|
||||
</div>
|
||||
<div v-else>
|
||||
<StatusBlock title="视频拍摄制作进行中" subtitle="完成后请确认">
|
||||
<template #icon>
|
||||
@ -411,22 +461,24 @@ onPullDownRefresh(() => {
|
||||
</div>
|
||||
<div class="flex gap-3 px-4 center">
|
||||
<wd-button type="primary" block @click="onStep3()">通过</wd-button>
|
||||
<!-- <wd-button type="error" block @click="onStep3(true)">驳回</wd-button> -->
|
||||
<wd-button type="error" block @click="onStep3(true)">驳回</wd-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="selectedLessonStage?.step === 4">
|
||||
<StatusBlock v-if="user.hasRole('teacher')" title="视频拍摄制作进行中" subtitle="请等待视频拍摄制作">
|
||||
<template #icon>
|
||||
<div class="i-tabler-video text-7xl text-neutral-400"></div>
|
||||
</template>
|
||||
</StatusBlock>
|
||||
<div v-else>
|
||||
<StatusBlock title="视频拍摄制作进行中" subtitle="完成后请确认">
|
||||
<div v-if="!user.hasRole('teacher')">
|
||||
<StatusBlock title="视频内容确认中" subtitle="请等待视频内容确认">
|
||||
<template #icon>
|
||||
<div class="i-tabler-video text-7xl text-neutral-400"></div>
|
||||
<div class="i-tabler-brand-parsinta text-7xl text-neutral-400"></div>
|
||||
</template>
|
||||
</StatusBlock>
|
||||
</div>
|
||||
<div v-else>
|
||||
<StatusBlock title="视频拍摄制作已完成" subtitle="请确认视频内容">
|
||||
<template #icon>
|
||||
<div class="i-tabler-brand-parsinta text-7xl text-neutral-400"></div>
|
||||
</template>
|
||||
</StatusBlock>
|
||||
<div class="mt-4 space-y-4">
|
||||
@ -435,15 +487,20 @@ onPullDownRefresh(() => {
|
||||
show-word-limit :focus-when-clear="false" :maxlength="100" placeholder="请输入审核建议..." block />
|
||||
</div>
|
||||
<div class="flex gap-3 px-4">
|
||||
<wd-button type="primary" block @click="onStep3()">通过</wd-button>
|
||||
<wd-button type="error" block @click="onStep3(true)">驳回</wd-button>
|
||||
<wd-button type="primary" block @click="onStep4()">通过</wd-button>
|
||||
<wd-button type="error" block @click="onStep4(true)">驳回</wd-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if="selectedLessonStage?.step === 5">
|
||||
<wd-status-tip image="comment" tip="该微课已完成" />
|
||||
<StatusBlock title="已完成" subtitle="该微课已完成">
|
||||
<template #icon>
|
||||
<div class="i-tabler-clipboard-check text-7xl text-neutral-400"></div>
|
||||
</template>
|
||||
</StatusBlock>
|
||||
<!-- <wd-status-tip image="comment" tip="该微课已完成" /> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -74,12 +74,12 @@ export const getLessonSteps = (lesson: LessonTask, simplify: boolean = false) =>
|
||||
: "确认脚本内容",
|
||||
},
|
||||
{
|
||||
title: progress.video_creating ? "视频拍摄制作" : undefined,
|
||||
title: progress.video_creating ? "拍摄制作" : undefined,
|
||||
description: progress.video_creating
|
||||
? simplify
|
||||
? "已完成"
|
||||
: `已于 ${formatTime(lesson.videoCreateTime)} 完成拍摄制作`
|
||||
: "视频拍摄制作",
|
||||
: "拍摄制作",
|
||||
},
|
||||
{
|
||||
title: progress.video_confirmed ? "视频确认" : undefined,
|
||||
|
Loading…
Reference in New Issue
Block a user