This commit is contained in:
lyc 2024-11-07 14:14:46 +08:00
parent d05e50218d
commit 756d7fdaa1
4 changed files with 124 additions and 89 deletions

View File

@ -0,0 +1,39 @@
<template>
<div class="container-header flex">
<div class="header-left flex">
<el-button link>
高中语文课程标准<i class="iconfont icon-xiangxia"></i>
</el-button>
</div>
<div class="header-right flex">
<el-button link>
课标研读模板一<i class="iconfont icon-xiangxia"></i>
</el-button>
</div>
</div>
</template>
<script setup>
</script>
<style lang="scss" scoped>
.container-header {
height: 45px;
background: #fff;
border-radius: 5px 5px 0 0;
box-shadow: 0px 0px 20px 0px rgba(99, 99, 99, 0.06);
.header-left {
width: 50%;
align-items: center;
padding-left: 20px;
}
.icon-xiangxia {
margin-left: 5px;
font-weight: bold;
}
}
</style>

View File

@ -0,0 +1,13 @@
<template>
<div class="page-template">
<Header/>
</div>
</template>
<script setup>
import Header from './container/header.vue'
</script>
<style lang="scss" scoped>
</style>

View File

@ -1,48 +1,22 @@
<template>
<div class="read-container">
<div class="template-list">
<el-row>
<el-scrollbar height="100%">
<div class="template-list" v-loading="loading">
<el-row v-for="item in 6">
<el-col :span="24">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>核心素养与课程目标</div>
<div class="item-header"><span class="blue">#</span>{{ item }}</div>
<div class="item-text" >
<div class="item-icon">
<i class="iconfont icon-ai"></i>
</div>
<div class="item-answer" v-html="str"></div>
<div class="item-answer" v-html="item"></div>
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>课程内容相关</div>
<div class="item-text">研读课程标准提取出与本课相关的课程内容要求
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>学业质量要求</div>
<div class="item-text">研读课程标准提取出与本课相关的学业水平要求包括水平一水平二水平三各自的要求描述
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>教学实施建议</div>
<div class="item-text">研读课程标准提取出与本课相关的教学实施建议
</div>
</div>
</el-col>
</el-row>
<el-row>
<!-- <el-row>
<el-col :span="24">
<div class="template-item template-item-result">
<div class="result-item-header">
@ -68,8 +42,9 @@
</div>
</div>
</el-col>
</el-row>
</el-row> -->
</div>
</el-scrollbar>
</div>
</template>
@ -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 =>{
const res = await completion(params)
console.log('对话结果===》', res)
let answer = res.data.data.answer
const arr = getResult(answer);
console.log(arr,'arr')
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, '<div>$1</div>');
str.value = str.value.replace(/^\n(.*?)\n$/s, '<p>$1</p>');
str.value = str.value.replace(/\*\*(.*?)\*\*/g, "<div class='text-tit'>$1</div>");
str.value = str.value.replace(/(\d+\..*?)\n/g, "<div class='text-num'>$1</div>\n");
console.log(str.value)
let getResult = (text) => {
text = text.replace(/^\n\n(.*?)\n\n$/s, '<div>$1</div>');
text = text.replace(/^\n(.*?)\n$/s, '<p>$1</p>');
text = text.replace(/\*\*(.*?)\*\*/g, "<div class='text-tit'>$1</div>");
text = text.replace(/(\d+\..*?)\n/g, "<div class='text-num'>$1</div>\n");
return text
}
@ -153,17 +130,18 @@ onMounted(() => {
Object.assign(curNode, data);
console.log(props.curTemp,'curTemp')
// getConversation()
// getResult()
//
getCompletion()
})
</script>
<style lang="scss" scoped>
.read-container {
display: flex;
flex-direction: column;
width: 100%;
padding: 15px;
height: 100%;
.el-dropdown-link {
font-weight: bold;
@ -186,6 +164,9 @@ onMounted(() => {
}
}
.right-con{
display: flex;
}
.template-list {

View File

@ -1,5 +1,6 @@
<template>
<div class="page-curriculum flex">
<TemplateStudy/>
<!-- <div class="page-curriculum flex">
<el-row>
<el-col :span="12" class="flex">
<div class="page-left">
@ -38,11 +39,12 @@
</div>
</el-col>
</el-row>
</div>
</div> -->
</template>
<script setup>
import { ref } from 'vue'
import TemplateStudy from '@/components/template-study/index.vue'
import ReadTemplate from './container/read-template.vue';
import QuestionAnswer from './container/question-answer.vue'
import ReadResult from './container/read-result.vue'