diff --git a/src/renderer/src/components/template-study/container/header.vue b/src/renderer/src/components/template-study/container/header.vue new file mode 100644 index 0000000..2147ac2 --- /dev/null +++ b/src/renderer/src/components/template-study/container/header.vue @@ -0,0 +1,39 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/components/template-study/index.vue b/src/renderer/src/components/template-study/index.vue new file mode 100644 index 0000000..0db45ec --- /dev/null +++ b/src/renderer/src/components/template-study/index.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/views/curriculum-standards/container/read-result.vue b/src/renderer/src/views/curriculum-standards/container/read-result.vue index a23bed7..30159c1 100644 --- a/src/renderer/src/views/curriculum-standards/container/read-result.vue +++ b/src/renderer/src/views/curriculum-standards/container/read-result.vue @@ -1,75 +1,50 @@ @@ -90,6 +65,8 @@ const props = defineProps({ } }) +const loading = ref(false) + // 获取会话ID const params = reactive( { @@ -108,43 +85,43 @@ const curNode = reactive({}) const getConversation = async() =>{ const { user: { userId } } = userStore const result = await conversation({ user_id: String(userId) }) - console.log('result=====',result) params.conversation_id = result.data.data.id getCompletion() } // 大模型对话 +const resultList = ref([]) const getCompletion = async() =>{ console.log('params=====>',params) + for (const item of props.curTemp) { try { - console.log(item.name) + loading.value = true params.messages[0].content = `根据${curNode.edustage}语文课标,提炼出${item.name}` - completion(params).then(res =>{ - console.log('对话结果===》', res) - let answer = res.data.data.answer - const arr = getResult(answer); - console.log(arr,'arr') + const res = await completion(params) + console.log('对话结果===》', res) + let answer = res.data.data.answer + answer = getResult(answer); + resultList.value.push({ + title: item.name, + answer }) } finally{ - + loading.value = false } } - } // 分析获取课标对话结果 -let getResult = () => { - let text = "根据高中的语文课程标准和相关内容,我总结出了以下的核心素养和课标目标:\n\n**核心素养:**\n\n1. 语言建构与运用(Language Construction and Application):学生能够正确地使用语言文字,表达思想、情感和经验。\n2. 思维发展与提升(Thinking Development and Enhancement):学生能够独立思考、分析问题、解决问题,并且具有良好的思维品质。\n3. 审美鉴赏与创造(Aesthetic Appreciation and Creation):学生能够欣赏和理解不同类型的文学作品,具备自觉的审美意识和高尚的审美情趣。\n4. 文化传承与理解(Cultural Heritage and Understanding):学生能够了解和尊重中国文化、历史和社会背景,并且具有良好的文化素养。\n\n**课标目标:**\n\n1. 提升学生综合素质,着力发展核心素养,使学生具有理想信念和社会责任感。\n2. 培养学生的语言文字运用能力,掌握学习语文的基本方法,养成良好的学习习惯。\n3. 提高学生思维能力的发展与思维品质的提升,让学生能够独立思考、分析问题、解决问题。\n4. 培养学生自觉的审美意识和高尚的审美情趣,让学生在语言文字运用的学习中受到美的熏陶。\n\n这些核心素养和课标目标是根据高中语文课程标准提炼出来的,旨在帮助教师更好地指导学生发展核心素养,并且提高学生综合素质。" - str.value = text.replace(/^\n\n(.*?)\n\n$/s, '
$1
'); - str.value = str.value.replace(/^\n(.*?)\n$/s, '

$1

'); - str.value = str.value.replace(/\*\*(.*?)\*\*/g, "
$1
"); - str.value = str.value.replace(/(\d+\..*?)\n/g, "
$1
\n"); - console.log(str.value) - +let getResult = (text) => { + text = text.replace(/^\n\n(.*?)\n\n$/s, '
$1
'); + text = text.replace(/^\n(.*?)\n$/s, '

$1

'); + text = text.replace(/\*\*(.*?)\*\*/g, "
$1
"); + text = text.replace(/(\d+\..*?)\n/g, "
$1
\n"); + return text } @@ -153,17 +130,18 @@ onMounted(() => { Object.assign(curNode, data); console.log(props.curTemp,'curTemp') // getConversation() - // getResult() - // - getCompletion() + })