|
@@ -315,14 +315,31 @@ const updateCandidateInfo = (data: any) => {
|
|
if (interview_progress && interview_progress.length > 0) {
|
|
if (interview_progress && interview_progress.length > 0) {
|
|
candidateInfo.value.interviewRecord = interview_progress
|
|
candidateInfo.value.interviewRecord = interview_progress
|
|
.filter((q: any) => q.video_answer)
|
|
.filter((q: any) => q.video_answer)
|
|
- .map((q: any) => ({
|
|
|
|
- question: q.question_text || '未提供问题',
|
|
|
|
- answer: q.video_answer?.transcript || '未提供回答',
|
|
|
|
- analysis: q.video_answer?.ai_analysis?.comment || '面试官正在评估中',
|
|
|
|
- score: q.video_answer?.ai_score ? `${q.video_answer.ai_score}分` : '评估中',
|
|
|
|
- videoUrl: q.video_answer?.video_url || '',
|
|
|
|
- thumbnail: '/images/video-placeholder.jpg'
|
|
|
|
- }))
|
|
|
|
|
|
+ .map((q: any) => {
|
|
|
|
+ // 处理答案文本
|
|
|
|
+ let answerText = q.video_answer?.transcript || '未提供回答';
|
|
|
|
+ let is_correct = false;
|
|
|
|
+ // 如果有answer_data且包含选项,则使用选项文本
|
|
|
|
+ if (q.answer_data && q.answer_data.selected_option_details && q.answer_data.selected_option_details.length > 0) {
|
|
|
|
+ answerText = q.answer_data.selected_option_details
|
|
|
|
+ .map((option: any) => option.option_text)
|
|
|
|
+ .join(', ');
|
|
|
|
+ is_correct = q.answer_data.selected_option_details
|
|
|
|
+ .map((option: any) => option.is_correct)
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ console.log(q)
|
|
|
|
+ return {
|
|
|
|
+ question: q.question_text || '未提供问题',
|
|
|
|
+ answer: answerText,
|
|
|
|
+ analysis: q.video_answer?.ai_analysis?.comment || '面试官正在评估中',
|
|
|
|
+ score: q.video_answer?.ai_score ? `${q.video_answer.ai_score}分` : '评估中',
|
|
|
|
+ question_form: q.question_form,
|
|
|
|
+ is_correct:is_correct,
|
|
|
|
+ videoUrl: q.video_answer?.video_url || '',
|
|
|
|
+ thumbnail: '/images/video-placeholder.jpg'
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
// 更新DUV分析
|
|
// 更新DUV分析
|
|
@@ -646,7 +663,7 @@ const handleVideoError = (event: Event) => {
|
|
<div class="mb-2">
|
|
<div class="mb-2">
|
|
<h3 class="font-semibold">问题:{{ record.question }}</h3>
|
|
<h3 class="font-semibold">问题:{{ record.question }}</h3>
|
|
<p class="text-gray-600 mt-2">答案:{{ record.answer }}</p>
|
|
<p class="text-gray-600 mt-2">答案:{{ record.answer }}</p>
|
|
- <p class="text-gray-500 mt-2 text-sm">分析:{{ record.analysis }}</p>
|
|
|
|
|
|
+ <p class="text-gray-500 mt-2 text-sm" v-if="record.question_form === 0">分析:{{ record.analysis }}</p>
|
|
|
|
|
|
<!-- 视频回放 -->
|
|
<!-- 视频回放 -->
|
|
<div v-if="record.videoUrl" class="mt-4">
|
|
<div v-if="record.videoUrl" class="mt-4">
|
|
@@ -656,18 +673,22 @@ const handleVideoError = (event: Event) => {
|
|
controls
|
|
controls
|
|
:src="record.videoUrl"
|
|
:src="record.videoUrl"
|
|
preload="metadata"
|
|
preload="metadata"
|
|
- :poster="record.thumbnail || fallbackImageBase64Ref.value"
|
|
|
|
|
|
+ :poster="record.thumbnail || fallbackImageBase64Ref"
|
|
@loadeddata="handleVideoLoaded"
|
|
@loadeddata="handleVideoLoaded"
|
|
@error="handleVideoError"
|
|
@error="handleVideoError"
|
|
>
|
|
>
|
|
- <source :src="record.videoUrl" type="video/mp4">
|
|
|
|
- 您的浏览器不支持视频播放。
|
|
|
|
|
|
+ <!-- <source src="http://121.36.251.245:9000/minlong/tenant_1/general_uploads/d9082487afc4499c97407aa3cebd1923.jpeg" type="video/mp4">
|
|
|
|
+ 您的浏览器不支持视频播放。 -->
|
|
</video>
|
|
</video>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="mt-2 flex justify-end">
|
|
<div class="mt-2 flex justify-end">
|
|
- <span class="text-blue-500">得分:{{ record.score }}</span>
|
|
|
|
|
|
+ <span class="text-blue-500" v-if="record.question_form === 0">得分:{{ record.score }}</span>
|
|
|
|
+ <span class="text-gray-500" v-else>
|
|
|
|
+ <span class="text-green-500" v-if="record.is_correct">正确</span>
|
|
|
|
+ <span class="text-red-500" v-else>错误</span>
|
|
|
|
+ </span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -688,12 +709,12 @@ const handleVideoError = (event: Event) => {
|
|
controls
|
|
controls
|
|
:src="video.url"
|
|
:src="video.url"
|
|
preload="metadata"
|
|
preload="metadata"
|
|
- :poster="video.thumbnail || fallbackImageBase64Ref.value"
|
|
|
|
|
|
+ :poster="video.thumbnail || fallbackImageBase64Ref"
|
|
@loadeddata="handleVideoLoaded"
|
|
@loadeddata="handleVideoLoaded"
|
|
@error="handleVideoError"
|
|
@error="handleVideoError"
|
|
>
|
|
>
|
|
- <source :src="video.url" type="video/mp4">
|
|
|
|
- 您的浏览器不支持视频播放。
|
|
|
|
|
|
+ <!-- <source src="http://121.36.251.245:9000/minlong/tenant_1/general_uploads/d9082487afc4499c97407aa3cebd1923.jpeg" type="video/mp4">
|
|
|
|
+ 您的浏览器不支持视频播放。 -->
|
|
</video>
|
|
</video>
|
|
</div>
|
|
</div>
|
|
<p class="text-sm text-gray-600 mt-2">{{ video.description }}</p>
|
|
<p class="text-sm text-gray-600 mt-2">{{ video.description }}</p>
|