Compare commits

...

7 Commits

13 changed files with 74 additions and 25 deletions

View File

@ -83,7 +83,7 @@
<!--AI 对话调整--> <!--AI 对话调整-->
<AdjustDialog v-model="isAdjust" :type="type" :item="editItem" :curMode="curMode" :conversation_id="conversation_id"/> <AdjustDialog v-model="isAdjust" :type="type" :item="editItem" :curMode="curMode" :conversation_id="conversation_id"/>
<!--添加编辑提示词--> <!--添加编辑提示词-->
<keywordDialog v-model="isWordDialog" :item="editItem" /> <keywordDialog v-model="isWordDialog" :item="editItem" :modeType="type" />
</template> </template>
<script setup> <script setup>

View File

@ -1,5 +1,7 @@
import { listEntpcoursework,getEvaluationclue } from '@/api/classTask'; import { listEntpcoursework,getEvaluationclue } from '@/api/classTask';
import { processList } from '@/hooks/useProcessList'; import { processList } from '@/hooks/useProcessList';
import useClassTaskStore from '@/store/modules/classTask'
const useClassTaskStores = useClassTaskStore();
const isJson = (str) => { const isJson = (str) => {
if (typeof str == 'string') { if (typeof str == 'string') {
@ -114,6 +116,13 @@ export const editListItem = (row, courseObj) => {
} }
else if (row.worktype == '科学实验') { else if (row.worktype == '科学实验') {
if(isJson(row.workcodes)){ if(isJson(row.workcodes)){
// 同步更新实验内部的科目信息
if (row.worktag && row.worktag.indexOf('-') > -1){
const eduInfo = row.worktag.split('-');
useClassTaskStores.experimentObj.edustage = eduInfo[0];
useClassTaskStores.experimentObj.edusubject = eduInfo[1];
}
// 更新科学实验内容
classtaskObj.fileHomeworkList = JSON.parse(row.workcodes); classtaskObj.fileHomeworkList = JSON.parse(row.workcodes);
// //
// console.log('科学实验', classtaskObj); // console.log('科学实验', classtaskObj);

View File

@ -87,7 +87,7 @@ const getHomeWorkList = async () => {
// } else // } else
// 课标研读 目标设定 教材研读 框架梳理 学科定位 TODO 后续接入在添加 // 课标研读 目标设定 教材研读 框架梳理 学科定位 TODO 后续接入在添加
if (res.rows[i].worktype == '课堂展示') { if (res.rows[i].worktype == '课堂展示') {
res.rows[i].workclass = 'primary'; res.rows[i].workclass = 'success';
} else if (res.rows[i].worktype == '框架梳理') { } else if (res.rows[i].worktype == '框架梳理') {
res.rows[i].workclass = 'warning'; res.rows[i].workclass = 'warning';
} else if (res.rows[i].worktype == '常规作业') { } else if (res.rows[i].worktype == '常规作业') {
@ -95,7 +95,7 @@ const getHomeWorkList = async () => {
} else if (res.rows[i].worktype == '习题训练') { } else if (res.rows[i].worktype == '习题训练') {
res.rows[i].workclass = 'danger'; res.rows[i].workclass = 'danger';
} else if (res.rows[i].worktype == '科学实验') { } else if (res.rows[i].worktype == '科学实验') {
res.rows[i].workclass = 'danger'; res.rows[i].workclass = 'primary';
} else { } else {
res.rows[i].workclass = 'primary'; res.rows[i].workclass = 'primary';
} }

View File

@ -9,6 +9,7 @@ const useClassTaskStore = defineStore('classTask',{
edustage: '小学', // 教育阶段 edustage: '小学', // 教育阶段
edusubject: '', // 学科 edusubject: '', // 学科
experimentList: [], // 实验科目列表 experimentList: [], // 实验科目列表
updateEduInfo: '小学-数学', //实际需上传的学段+学科信息(用于上传及回显实验内的学段学科)
}, },
isOpenQuestUploadView: false, // 是否打开习题上传的页面 isOpenQuestUploadView: false, // 是否打开习题上传的页面
classListIds: [], classListIds: [],

View File

@ -154,14 +154,14 @@ const getClassWorkList = async () => {
// ---------------------------------------------- // ----------------------------------------------
// UI // UI
if (list[i].worktype == '学习目标定位') { if (list[i].worktype == '课堂展示') {
list[i].workclass = 'success' list[i].workclass = 'success'
list[i].workcodesList = JSON.parse(list[i].workcodes) list[i].workcodesList = JSON.parse(list[i].workcodes)
} else if (list[i].worktype == '教材研读') { } else if (list[i].worktype == '科学实验') {
list[i].workclass = 'primary' list[i].workclass = 'primary'
} else if (list[i].worktype == '框架梳理') { } else if (list[i].worktype == '框架梳理') {
list[i].workclass = 'warning' list[i].workclass = 'warning'
} else if (list[i].worktype == '学科定位') { } else if (list[i].worktype == '常规作业') {
list[i].workclass = 'info' list[i].workclass = 'info'
} else if (list[i].worktype == '习题训练') { } else if (list[i].worktype == '习题训练') {
list[i].workclass = 'danger' list[i].workclass = 'danger'

View File

@ -437,13 +437,15 @@ const queryPushRecords = (row) => {
// } else // } else
// TODO // TODO
if (res.rows[i].worktype == '课堂展示') { if (res.rows[i].worktype == '课堂展示') {
res.rows[i].workclass = 'primary'; res.rows[i].workclass = 'success';
} else if (res.rows[i].worktype == '框架梳理') { } else if (res.rows[i].worktype == '框架梳理') {
res.rows[i].workclass = 'warning'; res.rows[i].workclass = 'warning';
} else if (res.rows[i].worktype == '常规作业') { } else if (res.rows[i].worktype == '常规作业') {
res.rows[i].workclass = 'info'; res.rows[i].workclass = 'info';
} else if (res.rows[i].worktype == '习题训练') { } else if (res.rows[i].worktype == '习题训练') {
res.rows[i].workclass = 'danger'; res.rows[i].workclass = 'danger';
} else if (res.rows[i].worktype == '科学实验') {
res.rows[i].workclass = 'primary';
} else { } else {
res.rows[i].workclass = 'primary'; res.rows[i].workclass = 'primary';
} }

View File

@ -29,15 +29,15 @@ import { ElMessage } from 'element-plus'
const emit = defineEmits(['itemClick']) const emit = defineEmits(['itemClick'])
const items = shallowRef([ const items = shallowRef([
{ title: '自主搜题', description: '上千万高质量习题资源,历届考试真题,每道题均有习题解析', icon: '#icon-soutibao-',type:'primary' }, { title: '自主搜题', description: '上千万高质量习题资源,历届考试真题,每道题均有习题解析', icon: '#icon-soutibao-',type:'danger' },
// { title: '', description: '', icon: '#icon-soutibao-',type:'primary' }, // { title: '', description: '', icon: '#icon-soutibao-',type:'danger' },
{ title: '个人题库', description: '老师上传维护自己的个人题库。', icon: '#icon-soutibao-',type:'primary' }, { title: '个人题库', description: '老师上传维护自己的个人题库。', icon: '#icon-soutibao-',type:'danger' },
// { title: '', description: '', icon: '#icon-tubiao_wuxing-',type:'primary' }, // { title: '', description: '', icon: '#icon-tubiao_wuxing-',type:'primary' },
{ title: '课堂展示', description: '通过课堂白板绘制作业,提升学生的创作思维能力。', icon: '#icon-huaban',type:'danger' }, { title: '课堂展示', description: '通过课堂白板绘制作业,提升学生的创作思维能力。', icon: '#icon-huaban',type:'success' },
{ title: '常规作业', description: '推送pdf、视频、音频、图片学生可以拍照上传。', icon: '#icon-zhaoxiangji',type:'danger' }, { title: '常规作业', description: '推送pdf、视频、音频、图片学生可以拍照上传。', icon: '#icon-zhaoxiangji',type:'info' },
// { title: 'AI', description: 'AI', icon: '#icon-jiqiren_o',type:'danger' }, // { title: 'AI', description: 'AI', icon: '#icon-jiqiren_o',type:'danger' },
{ title: '习题上传', description: '自己上传个人题库。', icon: '#icon-shangchuan',type:'danger' }, { title: '习题上传', description: '自己上传个人题库。', icon: '#icon-shangchuan',type:'danger' },
{ title: '科学实验', description: '学生完成虚拟仿真实验,并提交实验结果。', icon: '#icon-shangchuan',type:'danger' }, { title: '科学实验', description: '学生完成虚拟仿真实验,并提交实验结果。', icon: '#icon-shangchuan',type:'primary' },
]); ]);
const handleClick = (item) => { const handleClick = (item) => {

View File

@ -36,16 +36,24 @@ const props = defineProps({
}) })
const value = ref('') const value = ref('')
const updateLabel = (val) => {
value.value = val;
}
const onSelectOption = (option) => {
classTaskStore.updateEduInfo = `${classTaskStore.edustage}-${classTaskStore.edusubject}`;
console.log('updateEduInfo->', classTaskStore.experimentList.updateEduInfo);
console.log(option,'选择的实验课-------')
emit('selectItem', classTaskStore.experimentList.filter(item => item.label === option)[0])
}
onMounted(() => { onMounted(() => {
}) })
const onSelectOption = (option) => { defineExpose({
console.log(option,'选择的实验课-------') updateLabel
emit('selectItem', classTaskStore.experimentList.filter(item => item.label === option)[0]) })
}
</script> </script>
<style scoped> <style scoped>

View File

@ -177,10 +177,29 @@ const handleUserEduSubject = (item) => {
// emit('experlist',checkList.value) // emit('experlist',checkList.value)
} }
const updateCheckList = () => {
const edustage = useClassTaskStore().experimentObj.edustage;
if(edustage === '小学'){
chooseGrade.value = jsonData.data.primary
}else if(edustage === '初中'){
chooseGrade.value = jsonData.data.junior
}else if(edustage === '高中'){
chooseGrade.value = jsonData.data.senior
}
expList.value = chooseGrade.value
const edusubject = useClassTaskStore().experimentObj.edusubject;
handleUserEduSubject(edusubject);
}
onMounted(() => { onMounted(() => {
getSubject() getSubject()
}) })
defineExpose({
updateCheckList
})
</script> </script>
<style scoped> <style scoped>
.custom-button { .custom-button {

View File

@ -3,10 +3,10 @@
<div class="activeExp-header"> <div class="activeExp-header">
<div class="infomation" v-if="isStadium() !== true" > <div class="infomation" v-if="isStadium() !== true" >
<!-- <selectClass v-if="!isSubject" @experlist="getExperimentList" /> --> <!-- <selectClass v-if="!isSubject" @experlist="getExperimentList" /> -->
<selectClass v-if="!isSubject" /> <selectClass ref="selectClassRef"/>
</div> </div>
<div> <div>
<selectExperiment @selectItem="getExperimentListItem" /> <selectExperiment ref="selectExperimentRef" @selectItem="getExperimentListItem" />
</div> </div>
</div> </div>
<div ref="mainDiv" class="activeExp-main" style="overflow: auto"> <div ref="mainDiv" class="activeExp-main" style="overflow: auto">
@ -19,7 +19,7 @@
<script setup> <script setup>
import { Search } from '@element-plus/icons-vue' import { Search } from '@element-plus/icons-vue'
//import html2canvas from 'html2canvas'; //import html2canvas from 'html2canvas';
import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue' import { onMounted, ref, watch, reactive, getCurrentInstance, nextTick } from 'vue'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import useClassTaskStore from '@/store/modules/classTask' import useClassTaskStore from '@/store/modules/classTask'
import selectClass from './components/selectClass.vue' // import selectClass from './components/selectClass.vue' //
@ -44,6 +44,8 @@ const props = defineProps({
// //
// const experimentList = ref([]); // const experimentList = ref([]);
const activeExp = ref({}); const activeExp = ref({});
const selectExperimentRef = ref();
const selectClassRef = ref();
const isStadium = () => { const isStadium = () => {
let roles = userStore.roles let roles = userStore.roles
@ -82,6 +84,13 @@ const getExperimentListItem = (val) => {
watch(() => props.expObj.fileurl, (newVal, oldVal) => { watch(() => props.expObj.fileurl, (newVal, oldVal) => {
console.log(props.expObj,'科学实验科目') console.log(props.expObj,'科学实验科目')
activeExp.value = props.expObj; activeExp.value = props.expObj;
//
nextTick(() => {
selectClassRef.value.updateCheckList();
selectExperimentRef.value.updateLabel(props.expObj.label);
})
}) })
</script> </script>

View File

@ -807,6 +807,7 @@ const editWork = async (cform) =>{
else if (classWorkForm.worktype=='科学实验') { //TODO fileHomeworkList else if (classWorkForm.worktype=='科学实验') { //TODO fileHomeworkList
// 1. (, ) // 1. (, )
cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList); cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
cform.worktag = useClassTaskStores.experimentObj.updateEduInfo;
} }
// 3. // 3.

View File

@ -59,10 +59,10 @@ const getHomework = async () => {
homeworkList.value = rows || []; homeworkList.value = rows || [];
homeworkList.value.forEach((item) => { homeworkList.value.forEach((item) => {
// UI // UI
if (item.worktype == '学习目标定位') { if (item.worktype == '课堂展示') {
item.workclass = 'success' item.workclass = 'success'
item.workcodesList = JSON.parse(item.workcodes) item.workcodesList = JSON.parse(item.workcodes)
} else if (item.worktype == '教材研读') { } else if (item.worktype == '科学实验') {
item.workclass = 'primary' item.workclass = 'primary'
} else if (item.worktype == '框架梳理') { } else if (item.worktype == '框架梳理') {
item.workclass = 'warning' item.workclass = 'warning'

View File

@ -81,10 +81,10 @@ export const getClassWorkList = async (id) => {
// ---------------------------------------------- // ----------------------------------------------
// 处理任务类型的UI // 处理任务类型的UI
if (list[i].worktype == '学习目标定位') { if (list[i].worktype == '课堂展示') {
list[i].workclass = 'success' list[i].workclass = 'success'
list[i].workcodesList = JSON.parse(list[i].workcodes) list[i].workcodesList = JSON.parse(list[i].workcodes)
} else if (list[i].worktype == '教材研读') { } else if (list[i].worktype == '科学实验') {
list[i].workclass = 'primary' list[i].workclass = 'primary'
} else if (list[i].worktype == '框架梳理') { } else if (list[i].worktype == '框架梳理') {
list[i].workclass = 'warning' list[i].workclass = 'warning'