作业设计-习题训练 添加知识点

This commit is contained in:
白了个白 2024-09-24 13:52:52 +08:00
parent 5f8ea627d0
commit 458596547e
2 changed files with 115 additions and 29 deletions

View File

@ -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'
})
}

View File

@ -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,31 +385,19 @@ const changeFormType = (val) => {
classWorkForm.worktype = val;
}
const queryForm = reactive({
//
eid: props.bookobj.levelSecondId,
sectionName: props.bookobj.coursetitle,
edusubject: userStore.edusubject,
edustage: userStore.edustage,
//
//
worktype: entpCourseWorkQueryParams.worktype.label,
workTypeId: entpCourseWorkQueryParams.worktype.value,
//
workgroup: entpCourseWorkQueryParams.workgroup,
//
yearStr: entpCourseWorkQueryParams.yearStr !== '-1' ? entpCourseWorkQueryParams.yearStr:'',
//
thirdId: entpCourseWorkQueryParams.point.length > 0 ? entpCourseWorkQueryParams.point[0]:'',
//
keyword: entpCourseWorkQueryParams.keyWord && entpCourseWorkQueryParams.keyWord !== '' ? entpCourseWorkQueryParams.keyWord:'',
//
// pageNum: paginationParams.pageNum,
// pageSize: paginationParams.pageSize,
})
/**
* @desc: 根据查询参数查询试题
* @return: {*}
* @param {*} queryType
* 1 - 按条件查询
* 2 - 按关键词查询
*/
const handleQueryParamFromEntpCourseWork = (queryType) => {
//
// this.paginationParams = {pageNum: 1,pageSize: 10};
handleQueryFromEntpCourseWork(queryType);
};
/**
* @desc: 1习题训练 - 新查询试题
@ -422,6 +411,31 @@ const handleQueryFromEntpCourseWork= (queryType) => {
//queryForm.pageNum = this.paginationParams.pageNum;
//queryForm.pageSize = this.paginationParams.pageSize;
const queryForm = {
//
eid: props.bookobj.levelSecondId,
sectionName: props.bookobj.coursetitle,
edusubject: userStore.edusubject,
edustage: userStore.edustage,
//
//
worktype: entpCourseWorkQueryParams.worktype.label,
workTypeId: entpCourseWorkQueryParams.worktype.value,
//
workgroup: entpCourseWorkQueryParams.workgroup,
//
yearStr: entpCourseWorkQueryParams.yearStr !== '-1' ? entpCourseWorkQueryParams.yearStr:'',
//
thirdId: entpCourseWorkQueryParams.point.length > 0 ? entpCourseWorkQueryParams.point[0]:'',
//
keyword: entpCourseWorkQueryParams.keyWord && entpCourseWorkQueryParams.keyWord !== '' ? entpCourseWorkQueryParams.keyWord:'',
}
//
// pageNum: paginationParams.pageNum,
// pageSize: 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>