Compare commits

..

No commits in common. "727299aac91bf5519be3201338701c60ff807e11" and "27b0457eefca57678fc83a1730a12f2e282b708b" have entirely different histories.

6 changed files with 17 additions and 98 deletions

View File

@ -2,21 +2,12 @@
import request from '@/utils/request'
// 查询知识点列表
export function listKnowlegepoint(query) {
return request({
url: '/point/list',
method: 'get',
params: query
})
}
// 查询知识点列表
export function listKnowlegepointFormat(query) {
return request({
url: '/point/formatList',
method: 'get',
params: query
})
}
return request({
url: '/point/list',
method: 'get',
params: query
})
}
// 查询一级知识点查下级所有层级

View File

@ -71,9 +71,4 @@ defineExpose({
justify-content: flex-end;
box-sizing: border-box;
}
:deep(.format-work-desc > :is(div):first-child){
display: inline-block;
}
</style>

View File

@ -59,14 +59,14 @@ export const processList = (row, aloneOption=false) => {
for(; j<workDescArr.length; j++){
const char = String.fromCharCode(65+j);
if (aloneOption) {
tmp += `<div class="format-work-desc" style='width:100%;display:flex;padding: 2px 0'>${char}.${workDescArr[j]}</div>`;
tmp += `<div style='width:100%;display:flex;padding: 2px 0'>${char}.${workDescArr[j]}</div>`;
}
else {
if(j%2 == 0){
tmp += `<div style='width:100%;display:flex;'>`;
}
tmp += `<div class="format-work-desc" style='padding-left:10px;width:50%;overflow:hidden;text-overflow:ellipsis;font-size:0.9em;'>${char}.${workDescArr[j]}</div>`;
tmp += `<div style='padding-left:10px;width:50%;overflow:hidden;text-overflow:ellipsis;font-size:0.9em;'>${char}.${workDescArr[j]}</div>`;
if(j%2 == 1){
tmp += '</div>';
}
@ -153,14 +153,14 @@ export const processList = (row, aloneOption=false) => {
for(; j<optionsArr.length; j++){
const char = String.fromCharCode(65+j);
if (aloneOption) {
tmp += `<div class="format-work-desc" style='width:100%;display:flex;padding: 2px 0'>${char}.${optionsArr[j]}</div>`;
tmp += `<div style='width:100%;display:flex;padding: 2px 0'>${char}.${optionsArr[j]}</div>`;
}
else {
if(j%2 == 0){
tmp += `<div style='width:100%;display:flex;'>`;
}
tmp += `<div class="format-work-desc" style='padding-left: 10px; width: 50%'>${char}.${optionsArr[j]}</div>`;
tmp += `<div style='padding-left: 10px; width: 50%'>${char}.${optionsArr[j]}</div>`;
if(j%2 == 1){
tmp += '</div>';
}
@ -280,14 +280,14 @@ export const processList = (row, aloneOption=false) => {
for(; j<workDescArr.length; j++){
const char = String.fromCharCode(65+j);
if (aloneOption) {
tmp += `<div class="format-work-desc" style='width:100%;display:flex;padding: 2px 0'>${char}.${workDescArr[j]}</div>`;
tmp += `<div style='width:100%;display:flex;padding: 2px 0'>${char}.${workDescArr[j]}</div>`;
}
else {
if(j%2 == 0){
tmp += `<div style='width:100%;display:flex;'>`;
}
tmp += `<div class="format-work-desc" style='padding-left: 10px; width: 50%'>${char}.${workDescArr[j]}</div>`;
tmp += `<div style='padding-left: 10px; width: 50%'>${char}.${workDescArr[j]}</div>`;
if(j%2 == 1){
tmp += '</div>';
}

View File

@ -488,10 +488,6 @@ watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => {
width: 100%;
height: calc(100% - 100px);
}
:deep(.format-work-desc > :is(div):first-child){
display: inline-block;
}
// :deep(.el-dialog .question-dialog){
// height: 80vh !important;

View File

@ -99,8 +99,6 @@ const router = useRouter()
const { proxy } = getCurrentInstance()
const props = defineProps({
})
const curLessionList = ref([]);
const activeParams = reactive({
version: {},
lession: {},

View File

@ -405,10 +405,9 @@
<script setup>
import { ElMessage, ElNotification } from 'element-plus'
import { Search } from '@element-plus/icons-vue'
import { onMounted, ref, watch, reactive, getCurrentInstance,nextTick } from 'vue'
import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue'
import { getBindlist, listKnowlegepointFormat } from '@/api/education/knowledgePoint'
import { listEvaluation } from '@/api/subject'
import { getBindlist } from '@/api/education/knowledgePoint'
import { listEntpcoursework, getEntpcoursework, delEntpcoursework, addEntpcoursework, updateEntpcoursework, uploadEntpcourseworkFile } from "@/api/education/entpCourseWork";
import { isJson } from "@/hooks/useProcessList";
@ -612,13 +611,10 @@ onMounted(() => {
}
yearList.value.push(s)
};
//
})
const checkBoxChange=(v)=>{
// v: []
console.log(v,'vvvvvv')
@ -1670,56 +1666,10 @@ const myMessageShow=(title, msg, status)=>{
// },
// },
/**
* @desc: 遍历原知识点数据, 将title字段转为knowTitle以供knowledgePointProps进行tree的格式转换显示
* @return: {*}
* @param {*} list
*/
const updateKnowledgePoint = (list) => {
list.forEach(item => {
if (item.title && item.title != '') {
item.knowTitle = item.title;
}
if (item.children && Array.isArray(item.children)) {
updateKnowledgePoint(item.children);
}
});
return list;
};
watch(() => props.bookobj.levelSecondId, async (newVal, oldVal) => {
watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => {
console.log(props.bookobj,'课程选择')
// props.bookobj.levelSecondId? props.bookobj.levelSecondId : props.bookobj.levelFirstId
lessionid.value = props.bookobj.levelSecondId? props.bookobj.levelSecondId : props.bookobj.levelFirstId;
/**
* 格式化知识点: 分两种情况
* 1. 语文/英语: 获取学科下的所有知识点(该学科对应无章节与知识点绑定, 故只获取全知识点)
* 2. 其他: 获取当前章节下的所有知识点
*/
let id = props.bookobj.levelSecondId;
if(props.bookobj.node.edusubject == '语文' || props.bookobj.node.edusubject == '英语'){
id = props.bookobj.node.rootid;
const res = await listEvaluation({ edusubject: props.bookobj.node.edusubject, edustage: props.bookobj.node.edustage, itemkey: "subject", pageSize: 10 });
id = res.rows[0]?.id;
if (id) {
listKnowlegepointFormat({evalId: id, pageNum: 1, pageSize: 5000,}).then(res => {
//console.log('listKnowlegepointFormat->', res.rows);
curKnowledgePointList.value = updateKnowledgePoint(res.rows);
});
}
}else{
getBindlist({ eid: id }).then(res => {
if (!res.data || res.data.length < 1) {
ElMessage.warning('当前章节下未绑定知识点,暂不更新该试题知识点!');
curKnowledgePointList.value = [];
}
else {
curKnowledgePointList.value = res.data;
}
})
}
})
@ -1730,20 +1680,7 @@ defineExpose({
cropperFormItemCallBack,
})
</script>
<style lang="scss">
.el-cascader-panel {
li[aria-haspopup="true"] {
.el-checkbox {
display: none;
}
}
}
</style>
<style scoped lang="scss">
.questForm-item-cover{
position: relative;
@ -1761,4 +1698,6 @@ defineExpose({
z-index: 9999;
}
}
</style>