feat: 添加脚本和视频审核功能
This commit is contained in:
@ -88,6 +88,80 @@ const onStep0 = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const onStep2 = (rejected: boolean = false) => {
|
||||||
|
message.confirm({
|
||||||
|
title: rejected ? '驳回脚本' : '通过脚本',
|
||||||
|
msg: rejected ? '脚本不符合要求,驳回制作方重做' : '请确认脚本合格无误后,再确认审核通过'
|
||||||
|
}).then(() => {
|
||||||
|
if (!selectedLesson.value?.id) {
|
||||||
|
toast.error({
|
||||||
|
msg: '参数错误'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
toast.loading({
|
||||||
|
msg: '正在处理...'
|
||||||
|
})
|
||||||
|
BussApi.editCourse(
|
||||||
|
selectedLesson.value.id,
|
||||||
|
rejected ? {
|
||||||
|
script_file: JSON.stringify({
|
||||||
|
...parseCombinedFileString(selectedLesson.value, 'script_file'),
|
||||||
|
uploaded: false
|
||||||
|
}),
|
||||||
|
script_upload_time: 0
|
||||||
|
} : {
|
||||||
|
script_confirm_time: dayjs().unix()
|
||||||
|
}).then(res => {
|
||||||
|
toast.success({
|
||||||
|
msg: rejected ? '驳回成功' : '审核通过'
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
updateLessons()
|
||||||
|
}, 1500);
|
||||||
|
}).catch(err => {
|
||||||
|
toast.error({ msg: err.message })
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const onStep3 = (rejected: boolean = false) => {
|
||||||
|
message.confirm({
|
||||||
|
title: rejected ? '驳回视频' : '通过视频',
|
||||||
|
msg: rejected ? '视频不符合要求,驳回制作方重做' : '请确认视频合格无误后,再确认审核通过'
|
||||||
|
}).then(() => {
|
||||||
|
if (!selectedLesson.value?.id) {
|
||||||
|
toast.error({
|
||||||
|
msg: '参数错误'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
toast.loading({
|
||||||
|
msg: '正在处理...'
|
||||||
|
})
|
||||||
|
BussApi.editCourse(
|
||||||
|
selectedLesson.value.id,
|
||||||
|
rejected ? {
|
||||||
|
capture_file: JSON.stringify({
|
||||||
|
...parseCombinedFileString(selectedLesson.value, 'capture_file'),
|
||||||
|
uploaded: false
|
||||||
|
}),
|
||||||
|
video_capture_time: 0
|
||||||
|
} : {
|
||||||
|
video_capture_time: dayjs().unix()
|
||||||
|
}).then(res => {
|
||||||
|
toast.success({
|
||||||
|
msg: rejected ? '驳回成功' : '审核通过'
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
updateLessons()
|
||||||
|
}, 1500);
|
||||||
|
}).catch(err => {
|
||||||
|
toast.error({ msg: err.message })
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const updateLessons = () => {
|
const updateLessons = () => {
|
||||||
toast.loading({
|
toast.loading({
|
||||||
msg: '加载中...'
|
msg: '加载中...'
|
||||||
@ -168,13 +242,32 @@ onMounted(() => {
|
|||||||
</template>
|
</template>
|
||||||
</StatusBlock>
|
</StatusBlock>
|
||||||
<div class="mt-4 px-4 space-y-2">
|
<div class="mt-4 px-4 space-y-2">
|
||||||
<wd-button type="primary" :round="false" block>通过</wd-button>
|
<wd-button type="primary" :round="false" block @click="onStep2()">通过</wd-button>
|
||||||
<wd-button type="error" :round="false" block>驳回</wd-button>
|
<wd-button type="error" :round="false" block @click="onStep2(true)">驳回</wd-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="selectedLessonStage?.step === 2"></div>
|
<div v-if="selectedLessonStage?.step === 2">
|
||||||
<div v-if="selectedLessonStage?.step === 3"></div>
|
<StatusBlock v-if="!parseCombinedFileString(selectedLesson!, 'capture_file')?.uploaded" title="视频拍摄进行中"
|
||||||
|
subtitle="请等待线下视频拍摄">
|
||||||
|
<template #icon>
|
||||||
|
<div class="i-tabler-capture text-7xl text-neutral-400"></div>
|
||||||
|
</template>
|
||||||
|
</StatusBlock>
|
||||||
|
<div v-else>
|
||||||
|
<StatusBlock title="视频拍摄已完成" subtitle="请核对后审核">
|
||||||
|
<template #icon>
|
||||||
|
<div class="i-tabler-capture-filled text-7xl text-neutral-400"></div>
|
||||||
|
</template>
|
||||||
|
</StatusBlock>
|
||||||
|
<div class="mt-4 px-4 space-y-2">
|
||||||
|
<wd-button type="primary" :round="false" block @click="onStep3()">通过</wd-button>
|
||||||
|
<wd-button type="error" :round="false" block @click="onStep3(true)">驳回</wd-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="selectedLessonStage?.step === 3">
|
||||||
|
</div>
|
||||||
<div v-else-if="selectedLessonStage?.step === 4">
|
<div v-else-if="selectedLessonStage?.step === 4">
|
||||||
<wd-status-tip image="comment" tip="该微课已完成" />
|
<wd-status-tip image="comment" tip="该微课已完成" />
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user