试题编辑-回显知识点

This commit is contained in:
“zouyf” 2024-11-25 15:19:15 +08:00
parent cd1fc036a2
commit d26af6446a
2 changed files with 19 additions and 9 deletions

View File

@ -104,7 +104,7 @@
<div v-if="classWorkForm.worktype == '习题训练'" class="pageRight-list"> <div v-if="classWorkForm.worktype == '习题训练'" class="pageRight-list">
<div :style="{height: '100%', 'overflow': 'auto', 'border':'1px dotted blue','border-radius':'5px', 'background-color': '#f7f7f7'}"> <div :style="{height: '100%', 'overflow': 'auto', 'border':'1px dotted blue','border-radius':'5px', 'background-color': '#f7f7f7'}">
<template v-for="(item,index) in classWorkForm.quizlist" :key="item.id"> <template v-for="(item,index) in classWorkForm.quizlist" :key="item.id">
<div style="margin: 5px; background-color: white"> <div style="margin: 5px; background-color: white; text-align: left;">
<div v-html="item.titleFormat" style="padding: 15px 20px 5px 20px"></div> <div v-html="item.titleFormat" style="padding: 15px 20px 5px 20px"></div>
<div style="display: flex;"> <div style="display: flex;">
<el-form-item label="分值"> <el-form-item label="分值">

View File

@ -990,16 +990,26 @@ const updateForm= async(item, submitIndex=0, submitType=1) =>{
lessionid.value = props.bookobj.levelSecondId? props.bookobj.levelSecondId : props.bookobj.levelFirstId; lessionid.value = props.bookobj.levelSecondId? props.bookobj.levelSecondId : props.bookobj.levelFirstId;
console.log('lessionid', lessionid.value); console.log('lessionid', lessionid.value);
//
const res = await getBindlist({ eid: lessionid.value })
if (!res.data || res.data.length < 1) {
ElMessage.warning('当前章节下未绑定知识点,暂不更新该试题知识点!');
curKnowledgePointList.value = [];
}
else {
curKnowledgePointList.value = res.data;
}
//
if( props.bookobj.node.edustage == '高中' && (props.bookobj.node.edusubject == '语文' || props.bookobj.node.edusubject == '英语') ){
const res = await listEvaluation({ edusubject: props.bookobj.node.edusubject, edustage: props.bookobj.node.edustage, itemkey: "subject", pageSize: 10 });
const id = res.rows[0]?.id;
if (id) {
const res = await listKnowlegepointFormat({evalId: id, pageNum: 1, pageSize: 5000,});
curKnowledgePointList.value = updateKnowledgePoint(res.rows);
//console.log('updateKnowledgePoint->', res.rows);
}
} else {
const res = await getBindlist({ eid: lessionid.value })
if (!res.data || res.data.length < 1) {
ElMessage.warning('当前章节下未绑定知识点,暂不更新该试题知识点!');
curKnowledgePointList.value = [];
}
else {
curKnowledgePointList.value = res.data;
}
}
} }
//item.evalnodeid = '3772b,374112,374233'; //item.evalnodeid = '3772b,374112,374233';