更新内容: - 后端 AI 服务优化(能力分析、知识点解析等) - 前端考试和陪练界面更新 - 修复多个 prompt 和 JSON 解析问题 - 更新 Coze 语音客户端
This commit is contained in:
@@ -78,7 +78,7 @@
|
||||
<div class="header-actions">
|
||||
<el-button
|
||||
type="primary"
|
||||
:loading="loadingRecommendations"
|
||||
:loading="analyzing"
|
||||
@click="refreshRecommendations"
|
||||
class="refresh-btn"
|
||||
>
|
||||
@@ -405,7 +405,6 @@ const abilityFeedback = ref<AbilityFeedback[]>([])
|
||||
|
||||
// AI 分析和推荐相关
|
||||
const analyzing = ref(false)
|
||||
const loadingRecommendations = ref(false)
|
||||
const selectedPriority = ref('all')
|
||||
|
||||
// 计算属性:过滤后的课程
|
||||
@@ -723,81 +722,11 @@ const analyzeSmartBadgeData = async () => {
|
||||
|
||||
/**
|
||||
* 刷新AI推荐课程
|
||||
* 重新调用AI分析接口,获取最新的课程推荐
|
||||
*/
|
||||
const refreshRecommendations = async () => {
|
||||
loadingRecommendations.value = true
|
||||
|
||||
try {
|
||||
// 模拟AI推荐算法
|
||||
await new Promise(resolve => setTimeout(resolve, 1500))
|
||||
|
||||
// 根据能力评估结果生成推荐
|
||||
const weakPoints = abilityData.value
|
||||
.filter(item => item.value < 85)
|
||||
.sort((a, b) => a.value - b.value)
|
||||
.slice(0, 3)
|
||||
|
||||
// 更新推荐课程(基于薄弱环节)
|
||||
const newRecommendations = []
|
||||
|
||||
if (weakPoints.some(p => p.name === '沟通技巧')) {
|
||||
newRecommendations.push({
|
||||
id: 1,
|
||||
name: '美容咨询与沟通技巧',
|
||||
description: '提升与客户的沟通能力,学习专业的美容咨询技巧',
|
||||
duration: 8,
|
||||
difficulty: 'medium',
|
||||
learnerCount: 156,
|
||||
priority: 'high',
|
||||
targetWeakPoints: ['沟通技巧'],
|
||||
expectedImprovement: 12,
|
||||
matchScore: 95,
|
||||
progress: 85,
|
||||
examPassed: false
|
||||
})
|
||||
}
|
||||
|
||||
if (weakPoints.some(p => p.name === '应变能力')) {
|
||||
newRecommendations.push({
|
||||
id: 2,
|
||||
name: '皮肤问题识别与处理',
|
||||
description: '学习识别常见皮肤问题,掌握针对性的护理和治疗方案',
|
||||
duration: 12,
|
||||
difficulty: 'hard',
|
||||
learnerCount: 89,
|
||||
priority: 'medium',
|
||||
targetWeakPoints: ['应变能力'],
|
||||
expectedImprovement: 15,
|
||||
matchScore: 88,
|
||||
progress: 95,
|
||||
examPassed: true
|
||||
})
|
||||
}
|
||||
|
||||
if (weakPoints.some(p => p.name === '安全意识')) {
|
||||
newRecommendations.push({
|
||||
id: 3,
|
||||
name: '轻医美项目与效果管理',
|
||||
description: '深入了解各种轻医美项目,掌握效果评估和管理方法',
|
||||
duration: 16,
|
||||
difficulty: 'hard',
|
||||
learnerCount: 234,
|
||||
priority: 'medium',
|
||||
targetWeakPoints: ['安全意识'],
|
||||
expectedImprovement: 10,
|
||||
matchScore: 82,
|
||||
progress: 60,
|
||||
examPassed: false
|
||||
})
|
||||
}
|
||||
|
||||
recommendedCourses.value = newRecommendations
|
||||
|
||||
} catch (error) {
|
||||
ElMessage.error('获取推荐课程失败')
|
||||
} finally {
|
||||
loadingRecommendations.value = false
|
||||
}
|
||||
// 直接调用AI分析智能工牌数据的方法,复用已有逻辑
|
||||
await analyzeSmartBadgeData()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user