This commit is contained in:
“zouyf” 2024-11-22 16:57:19 +08:00
parent c4c1115abb
commit 630a7b4c50
4 changed files with 48 additions and 9 deletions

View File

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

View File

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

View File

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

View File

@ -405,9 +405,10 @@
<script setup> <script setup>
import { ElMessage, ElNotification } from 'element-plus' import { ElMessage, ElNotification } from 'element-plus'
import { Search } from '@element-plus/icons-vue' 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 } from '@/api/education/knowledgePoint' import { getBindlist, listKnowlegepoint } from '@/api/education/knowledgePoint'
import { listEvaluation } from '@/api/subject'
import { listEntpcoursework, getEntpcoursework, delEntpcoursework, addEntpcoursework, updateEntpcoursework, uploadEntpcourseworkFile } from "@/api/education/entpCourseWork"; import { listEntpcoursework, getEntpcoursework, delEntpcoursework, addEntpcoursework, updateEntpcoursework, uploadEntpcourseworkFile } from "@/api/education/entpCourseWork";
import { isJson } from "@/hooks/useProcessList"; import { isJson } from "@/hooks/useProcessList";
@ -611,10 +612,13 @@ onMounted(() => {
} }
yearList.value.push(s) yearList.value.push(s)
}; };
//
}) })
const checkBoxChange=(v)=>{ const checkBoxChange=(v)=>{
// v: [] // v: []
console.log(v,'vvvvvv') console.log(v,'vvvvvv')
@ -1666,10 +1670,36 @@ const myMessageShow=(title, msg, status)=>{
// }, // },
// }, // },
watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => { watch(() => props.bookobj.levelSecondId, async (newVal, oldVal) => {
console.log(props.bookobj,'课程选择') console.log(props.bookobj,'课程选择')
// props.bookobj.levelSecondId? props.bookobj.levelSecondId : props.bookobj.levelFirstId // props.bookobj.levelSecondId? props.bookobj.levelSecondId : props.bookobj.levelFirstId
lessionid.value = props.bookobj.levelSecondId? props.bookobj.levelSecondId : props.bookobj.levelFirstId; lessionid.value = props.bookobj.levelSecondId? props.bookobj.levelSecondId : props.bookobj.levelFirstId;
//
console.log('123', props.bookobj.node.edusubject == '语文' );
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;
listKnowlegepoint({evalId: id}).then(res => {
curKnowledgePointList.value = res.rows;
curKnowledgePointList.value.forEach(item => {
item.knowTitle = item.title;
});
});
}else{
getBindlist({ eid: id }).then(res => {
if (!res.data || res.data.length < 1) {
ElMessage.warning('当前章节下未绑定知识点,暂不更新该试题知识点!');
curKnowledgePointList.value = [];
}
else {
curKnowledgePointList.value = res.data;
}
})
}
}) })