试题编辑-回显知识点
This commit is contained in:
parent
cd1fc036a2
commit
d26af6446a
|
@ -104,7 +104,7 @@
|
|||
<div v-if="classWorkForm.worktype == '习题训练'" class="pageRight-list">
|
||||
<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">
|
||||
<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 style="display: flex;">
|
||||
<el-form-item label="分值">
|
||||
|
|
|
@ -990,16 +990,26 @@ const updateForm= async(item, submitIndex=0, submitType=1) =>{
|
|||
|
||||
lessionid.value = props.bookobj.levelSecondId? props.bookobj.levelSecondId : props.bookobj.levelFirstId;
|
||||
console.log('lessionid', lessionid.value);
|
||||
|
||||
// 拿到当前章节下得所有知识点
|
||||
const res = await getBindlist({ eid: lessionid.value })
|
||||
if (!res.data || res.data.length < 1) {
|
||||
ElMessage.warning('当前章节下未绑定知识点,暂不更新该试题知识点!');
|
||||
curKnowledgePointList.value = [];
|
||||
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;
|
||||
}
|
||||
}
|
||||
else {
|
||||
curKnowledgePointList.value = res.data;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//item.evalnodeid = '3772b,374112,374233';
|
||||
|
|
Loading…
Reference in New Issue