|
@@ -1,5 +1,5 @@
|
|
|
<script setup lang="ts">
|
|
|
-import { ref, onMounted } from 'vue'
|
|
|
+import { ref, onMounted, computed } from 'vue'
|
|
|
import { message } from 'ant-design-vue'
|
|
|
import type { FormInstance } from 'ant-design-vue'
|
|
|
import { useRoute } from 'vue-router'
|
|
@@ -1277,6 +1277,36 @@ const getHandPhotos = (hand: 'left' | 'right'): PhotoResult[] => {
|
|
|
|
|
|
return result;
|
|
|
};
|
|
|
+
|
|
|
+// 在script setup部分添加以下函数
|
|
|
+const getScoreLevel = (score: number): string => {
|
|
|
+ if (score >= 90) return '优秀';
|
|
|
+ if (score >= 80) return '良好';
|
|
|
+ if (score >= 70) return '中等';
|
|
|
+ if (score >= 60) return '及格';
|
|
|
+ return '较差';
|
|
|
+}
|
|
|
+
|
|
|
+// 添加一个计算属性来获取competency_scores
|
|
|
+const competencyScores = computed(() => {
|
|
|
+ return apiData.value?.application?.comprehensive_analysis?.competency_scores || {};
|
|
|
+})
|
|
|
+
|
|
|
+// 添加一个函数来获取标签的背景色
|
|
|
+const getTagColorClass = (tagName: string): string => {
|
|
|
+ const colorMap: Record<string, string> = {
|
|
|
+ '沟通表达能力': 'bg-blue-100 text-blue-800',
|
|
|
+ '工作经历匹配度': 'bg-green-100 text-green-800',
|
|
|
+ '操作技能水平': 'bg-yellow-100 text-yellow-800',
|
|
|
+ '质量意识': 'bg-indigo-100 text-indigo-800',
|
|
|
+ '安全意识': 'bg-pink-100 text-pink-800',
|
|
|
+ '团队协作能力': 'bg-purple-100 text-purple-800',
|
|
|
+ '问题解决能力': 'bg-orange-100 text-orange-800',
|
|
|
+ '学习能力': 'bg-red-100 text-red-800',
|
|
|
+ '初级统筹能力': 'bg-teal-100 text-teal-800'
|
|
|
+ };
|
|
|
+ return colorMap[tagName] || 'bg-gray-100 text-gray-800';
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -1292,7 +1322,7 @@ const getHandPhotos = (hand: 'left' | 'right'): PhotoResult[] => {
|
|
|
<div class="bg-[#1d1e3a] text-white p-4 rounded-t-lg">
|
|
|
<div class="flex justify-between items-center">
|
|
|
<div class="text-sm">No.{{ apiData?.application?.report_id || candidateInfo.idNumber }}</div>
|
|
|
- <div class="text-sm">{{ new Date().toLocaleString() }}</div>
|
|
|
+ <div class="text-sm">{{ apiData?.application?.interview_duration_formatted || new Date().toLocaleString() }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -1396,7 +1426,7 @@ const getHandPhotos = (hand: 'left' | 'right'): PhotoResult[] => {
|
|
|
<div id="comprehensive-assessment" class="mb-8 pt-4 border-t border-transparent">
|
|
|
<!-- 1. 综合评估 -->
|
|
|
<div class="mb-8">
|
|
|
- <h2 class="text-xl font-bold mb-6">1. 综合评估</h2>
|
|
|
+ <h1 class="font-bold mb-6">1. 综合评估</h1>
|
|
|
|
|
|
<div class="space-y-4">
|
|
|
<!-- 为每个部分添加 id -->
|
|
@@ -1414,75 +1444,7 @@ const getHandPhotos = (hand: 'left' | 'right'): PhotoResult[] => {
|
|
|
<p class="text-gray-600 text-sm" style="font-size: 14px;">{{ candidateInfo.hireReason || '无详细说明' }}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- 添加评分计算细节部分 -->
|
|
|
- <div id="score-calculation" class="border-b pb-4">
|
|
|
- <!-- <h3 class="font-semibold mb-2">评分详情</h3> -->
|
|
|
- <div class="bg-gray-50 p-4 rounded-lg space-y-3">
|
|
|
- <!-- 团队合作能力 -->
|
|
|
- <div class="flex items-start space-x-2" style="font-size: 14px;">
|
|
|
- <div style="font-size: 16px;" class="bg-blue-100 text-blue-800 px-2 py-1 rounded text-sm whitespace-nowrap">团队合作能力</div>
|
|
|
- <div class="flex-1">
|
|
|
- <p class="text-gray-700">{{ candidateInfo.dimensions.teamwork }}</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 学习能力 -->
|
|
|
- <div class="flex items-start space-x-2" style="font-size: 14px;">
|
|
|
- <div style="font-size: 16px;" class="bg-green-100 text-green-800 px-2 py-1 rounded text-sm whitespace-nowrap">学习能力</div>
|
|
|
- <div class="flex-1">
|
|
|
- <p class="text-gray-700">{{ candidateInfo.dimensions.learningAbility }}</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 细致严谨 -->
|
|
|
- <div class="flex items-start space-x-2" style="font-size: 14px;">
|
|
|
- <div style="font-size: 16px;" class="bg-yellow-100 text-yellow-800 px-2 py-1 rounded text-sm whitespace-nowrap">细致严谨</div>
|
|
|
- <div class="flex-1">
|
|
|
- <p class="text-gray-700">{{ candidateInfo.dimensions.attention }}</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 工作适应性 -->
|
|
|
- <div class="flex items-start space-x-2" style="font-size: 14px;">
|
|
|
- <div style="font-size: 16px;" class="bg-indigo-100 text-indigo-800 px-2 py-1 rounded text-sm whitespace-nowrap">工作适应性</div>
|
|
|
- <div class="flex-1">
|
|
|
- <p class="text-gray-700">{{ candidateInfo.dimensions.workAdaptability }}</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 服务意识 -->
|
|
|
- <div class="flex items-start space-x-2" style="font-size: 14px;">
|
|
|
- <div style="font-size: 16px;" class="bg-pink-100 text-pink-800 px-2 py-1 rounded text-sm whitespace-nowrap">服务意识</div>
|
|
|
- <div class="flex-1">
|
|
|
- <p class="text-gray-700">{{ candidateInfo.dimensions.serviceAwareness }}</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 稳定性 -->
|
|
|
- <div class="flex items-start space-x-2" style="font-size: 14px;">
|
|
|
- <div style="font-size: 16px;" class="bg-purple-100 text-purple-800 px-2 py-1 rounded text-sm whitespace-nowrap">稳定性</div>
|
|
|
- <div class="flex-1">
|
|
|
- <p class="text-gray-700">优秀</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 沟通表达 -->
|
|
|
- <div class="flex items-start space-x-2" style="font-size: 14px;">
|
|
|
- <div style="font-size: 16px;" class="bg-orange-100 text-orange-800 px-2 py-1 rounded text-sm whitespace-nowrap">沟通表达</div>
|
|
|
- <div class="flex-1">
|
|
|
- <p class="text-gray-700">优秀</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 人脸一致性 (保留原有的) -->
|
|
|
- <div class="flex items-start space-x-2" style="font-size: 14px;">
|
|
|
- <div style="font-size: 16px;" class="bg-purple-100 text-purple-800 px-2 py-1 rounded text-sm whitespace-nowrap">人脸一致性</div>
|
|
|
- <div class="flex-1">
|
|
|
- <p class="text-gray-700">{{ apiData?.application?.comprehensive_analysis?.score_calculation?.face_consistency_score || '暂无数据' }}</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <!-- 替换原有的评分详情部分 -->
|
|
|
<div id="red-line" class="border-b pb-4">
|
|
|
<!-- 红线题检测部分的现有代码 -->
|
|
|
<div class="flex items-center justify-between mb-2">
|
|
@@ -1542,12 +1504,41 @@ const getHandPhotos = (hand: 'left' | 'right'): PhotoResult[] => {
|
|
|
<strong>录用建议:</strong> {{ getDuvHireRecommendation(apiData?.scoring_summary?.total_score_obtained) }}
|
|
|
</p>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 替换原有的评分详情部分 -->
|
|
|
+ <div id="score-calculation" class="border-b pb-4">
|
|
|
+ <div class="rounded-lg space-y-3">
|
|
|
+ <!-- 动态渲染competency_scores中的标签 -->
|
|
|
+ <div v-for="(score, tagId) in competencyScores"
|
|
|
+ :key="tagId"
|
|
|
+ class="flex items-start space-x-2"
|
|
|
+ style="font-size: 14px;">
|
|
|
+ <div :class="[getTagColorClass(score.tag_name), 'px-2 py-1 rounded text-sm whitespace-nowrap']"
|
|
|
+ style="font-size: 14px;">
|
|
|
+ {{ score.tag_name }}
|
|
|
+ </div>
|
|
|
+ <div class="flex-1">
|
|
|
+ <p class="text-gray-700">
|
|
|
+ {{ getScoreLevel(score.normalized_score) }}
|
|
|
+ <!-- <span class="text-sm text-gray-500 ml-2">({{ score.normalized_score }}分)</span> -->
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 人脸一致性 (保留原有的) -->
|
|
|
+ <div class="flex items-start space-x-2" style="font-size: 14px;">
|
|
|
+ <div style="font-size: 14px;" class="bg-purple-100 text-purple-800 px-2 py-1 rounded text-sm whitespace-nowrap">人脸一致性</div>
|
|
|
+ <div class="flex-1">
|
|
|
+ <p class="text-gray-700">{{ apiData?.application?.comprehensive_analysis?.score_calculation?.face_consistency_score || '暂无数据' }}</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div id="image-analysis" class="mb-8 pt-4 border-t border-transparent">
|
|
|
- <h2 class="text-xl font-bold mb-6">2. 图片分析评估</h2>
|
|
|
+ <h2 class=" font-bold mb-6">2. 图片分析评估</h2>
|
|
|
<div class="space-y-4">
|
|
|
|
|
|
|
|
@@ -1566,7 +1557,7 @@ const getHandPhotos = (hand: 'left' | 'right'): PhotoResult[] => {
|
|
|
</div>
|
|
|
|
|
|
<div id="answer-records" class="mb-8 pt-4 border-t border-transparent">
|
|
|
- <h2 class="text-xl font-bold mb-6">3. 回答记录</h2>
|
|
|
+ <h2 class="font-bold mb-6">3. 回答记录</h2>
|
|
|
<div class="space-y-4">
|
|
|
<div v-for="(record, index) in candidateInfo.interviewRecord" :key="index" class="bg-gray-50 rounded-lg p-4">
|
|
|
<!-- 题目标题部分 -->
|
|
@@ -1769,7 +1760,7 @@ const getHandPhotos = (hand: 'left' | 'right'): PhotoResult[] => {
|
|
|
</div>
|
|
|
|
|
|
<div id="other-info" class="mb-8 pt-4 border-t border-transparent">
|
|
|
- <h2 class="text-xl font-bold mb-6">4. 其他信息</h2>
|
|
|
+ <h2 class="font-bold mb-6">4. 其他信息</h2>
|
|
|
<div class="space-y-6">
|
|
|
<!-- 验证状态列表 -->
|
|
|
<div class="space-y-2">
|