作业设计-习题训练 添加知识点
This commit is contained in:
parent
5f8ea627d0
commit
458596547e
|
@ -0,0 +1,53 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询KnowledgePoint列表
|
||||
export function listKnowledgePoint(query) {
|
||||
return request({
|
||||
url: '/point/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询KnowledgePoint详细
|
||||
export function getKnowledgePoint(id) {
|
||||
return request({
|
||||
url: '/point/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增KnowledgePoint
|
||||
export function addKnowledgePointBase(data) {
|
||||
return request({
|
||||
url: '/point/addBase',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增KnowledgePoint
|
||||
export function addKnowledgePoint(data) {
|
||||
return request({
|
||||
url: '/point/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改KnowledgePoint
|
||||
export function updateKnowledgePoint(data) {
|
||||
return request({
|
||||
url: '/point/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除KnowledgePoint
|
||||
export function delKnowledgePoint(id) {
|
||||
return request({
|
||||
url: '/point/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -29,7 +29,7 @@
|
|||
<whiteboard ref="boardref" :height="mainHeight - 150" :isShowSave="false" :data="whiteboardObj"/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-else class="el-form-work-list">
|
||||
<el-form-item label="作业资源:" class="el-form-work-list">
|
||||
<!-- 左侧作业资源 -->
|
||||
<el-col :span="15" class="work-left">
|
||||
|
@ -215,7 +215,7 @@
|
|||
</el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" style="margin: auto;">
|
||||
<el-button type="primary" @click="handleClassWorkSave">确 定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -253,6 +253,7 @@ import { addClassworkReturnId } from '@/api/teaching/classwork'
|
|||
import { updateClasswork, listEvaluationclue,readFile } from '@/api/classTask'
|
||||
import { listEvaluation } from '@/api/subject'
|
||||
import { listEntpcoursefile } from '@/api/education/entpcoursefile'
|
||||
import { listKnowledgePoint } from "@/api/knowledge/knowledgePoint";
|
||||
|
||||
import { useGetHomework } from '@/hooks/useGetHomework'
|
||||
import { processList } from '@/hooks/useProcessList'
|
||||
|
@ -314,7 +315,7 @@ const entpCourseWorkGroupList = ref([{
|
|||
const entpCourseWorkPointList = ref([
|
||||
{label: '不限', value: []},
|
||||
]); // 习题查询条件 - 知识点
|
||||
|
||||
const knowledgePointProps = ref({value: 'thirdId', label: 'title'});
|
||||
const entpCourseWorkYearList =ref([
|
||||
{label: '不限', value: '-1'},
|
||||
{label: '2024', value: '2024'},
|
||||
|
@ -384,7 +385,33 @@ const changeFormType = (val) => {
|
|||
classWorkForm.worktype = val;
|
||||
}
|
||||
|
||||
const queryForm = reactive({
|
||||
|
||||
/**
|
||||
* @desc: 根据查询参数查询试题
|
||||
* @return: {*}
|
||||
* @param {*} queryType
|
||||
* 1 - 按条件查询
|
||||
* 2 - 按关键词查询
|
||||
*/
|
||||
const handleQueryParamFromEntpCourseWork = (queryType) => {
|
||||
// 确保更改了搜索参数后从第一页开始查询
|
||||
// this.paginationParams = {pageNum: 1,pageSize: 10}; 分页这里展示弃用了
|
||||
handleQueryFromEntpCourseWork(queryType);
|
||||
};
|
||||
|
||||
/**
|
||||
* @desc: 1、习题训练 - 新查询试题
|
||||
* @return: {*}
|
||||
* @param {*} queryType
|
||||
* 0 - 标准查询
|
||||
* 1 - 按条件查询
|
||||
* 2 - 按关键词查询
|
||||
*/
|
||||
const handleQueryFromEntpCourseWork= (queryType) => {
|
||||
//queryForm.pageNum = this.paginationParams.pageNum;
|
||||
//queryForm.pageSize = this.paginationParams.pageSize;
|
||||
|
||||
const queryForm = {
|
||||
// 课程相关参数
|
||||
eid: props.bookobj.levelSecondId,
|
||||
sectionName: props.bookobj.coursetitle,
|
||||
|
@ -403,25 +430,12 @@ const queryForm = reactive({
|
|||
// 关键字
|
||||
keyword: entpCourseWorkQueryParams.keyWord && entpCourseWorkQueryParams.keyWord !== '' ? entpCourseWorkQueryParams.keyWord:'',
|
||||
|
||||
}
|
||||
|
||||
// 分页参数
|
||||
// pageNum: paginationParams.pageNum,
|
||||
// pageSize: paginationParams.pageSize,
|
||||
|
||||
})
|
||||
|
||||
|
||||
/**
|
||||
* @desc: 1、习题训练 - 新查询试题
|
||||
* @return: {*}
|
||||
* @param {*} queryType
|
||||
* 0 - 标准查询
|
||||
* 1 - 按条件查询
|
||||
* 2 - 按关键词查询
|
||||
*/
|
||||
const handleQueryFromEntpCourseWork= (queryType) => {
|
||||
//queryForm.pageNum = this.paginationParams.pageNum;
|
||||
//queryForm.pageSize = this.paginationParams.pageSize;
|
||||
|
||||
// 初中政治特殊处理( warn: 需确认是否修改 )
|
||||
// if (this.courseObj.edusubject=='政治' && this.courseObj.edustage=='初中') {
|
||||
// // [初中+政治]需改为[初中+道德与法治]
|
||||
|
@ -494,6 +508,25 @@ const getQueryFromEvaluationclue = () => {
|
|||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 3、知识点
|
||||
*/
|
||||
const getEntpCourseWorkPointList = () => {
|
||||
// 更新考点
|
||||
// 拿到当前章节下得所有知识点
|
||||
listEvaluation({ itemkey: "subject", pageSize: 10, edustage: userStore.edustage, edusubject: userStore.edusubject }).then((res) => {
|
||||
const evalId = res.rows
|
||||
const queryParams = {
|
||||
evalId: evalId[0]?.id,
|
||||
pageNum: 1,
|
||||
pageSize: 5000,
|
||||
}
|
||||
listKnowledgePoint(queryParams).then(res => {
|
||||
entpCourseWorkPointList.value = res.rows;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加资源
|
||||
* @param fromsrc - 试题来源
|
||||
|
@ -951,12 +984,12 @@ onMounted(() => {
|
|||
|
||||
watch(() => props.bookobj.levelSecondId, (newVal) => {
|
||||
console.log(props.bookobj,'课程选择')
|
||||
queryForm.eid = props.bookobj.levelSecondId,
|
||||
queryForm.sectionName = props.bookobj.coursetitle,
|
||||
// 习题资源
|
||||
handleQueryFromEntpCourseWork(0);
|
||||
// 框架梳理
|
||||
getQueryFromEvaluationclue();
|
||||
// 知识点
|
||||
getEntpCourseWorkPointList();
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue