This commit is contained in:
白了个白 2024-11-21 15:06:44 +08:00
parent 30b2b9b964
commit d25f2521a6
2 changed files with 86 additions and 3 deletions

View File

@ -1,5 +1,5 @@
<template>
<div class="page">
<div class="page-myquest">
<!-- 习题筛选1 -->
<el-row style="width: 100%; height: 50px;">
<el-col :span="7">
@ -72,7 +72,9 @@
<template #default="scope">
<div>
<el-button type="primary" @click="handleClassWorkQuizAdd('entpcourseworklist', scope.row.id)">添加</el-button>
<div style="padding: 5px;"></div>
<div style="padding: 2px;"></div>
<el-button type="warning" @click="handleImportSingleDlg(scope.row)">纠错</el-button>
<div style="padding: 2px;"></div>
<el-button type="danger" @click="handleDelete(scope.row, scope.$index)">删除</el-button>
</div>
</template>
@ -91,6 +93,23 @@
</div>
<!-- 试题详细信息 -->
<examDetailsDrawer ref="examDetailsDrawerRef"></examDetailsDrawer>
<!-- 单题上传的对话框/ 纠错对话框 close-on-click-modal|close-on-press-escape 避免误点dialog区域外导致白填入大量题目内容-->
<el-dialog
v-model="dlgImportSingle.open"
:title="dlgImportSingle.title"
append-to-body
:close-on-click-modal="false"
:close-on-press-escape="false"
style="width: 70%; height: 80%; overflow: hidden"
>
<QuesItem
ref="refquesItem"
:bookobj="props.bookobj"
@submit-exam-single-callback="onSubmitExamSingleCallback"
@cancel-exam-single-callback="onCancelExamSingleCallback"
>
</QuesItem>
</el-dialog>
</div>
</template>
<script setup>
@ -102,6 +121,7 @@ import { listEvaluationclue } from '@/api/classTask'
import { delEntpcoursework } from "@/api/education/entpCourseWork";
import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue'
import QuesItem from "@/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue";
import { useHandleData } from "@/hooks/useHandleData";
import { processList } from '@/hooks/useProcessList'
@ -190,6 +210,11 @@ const workResource = reactive({
entpCourseWorkTotal: 0, //
}); //
const dlgImportSingle = reactive({
title: '单题上传',
open: false,
})
onMounted(() => {
debounceQueryData(); //
})
@ -356,6 +381,44 @@ const getPaginationList = ( page, limit ) => {
handleQueryFromEntpCourseWork(0);
}
/** 单题上传弹出框----纠错修改框 */
const handleImportSingleDlg=(item, index) => {
dlgImportSingle.open = true;
//
// this.handleImportSingle();
//console.log("")
if (item == '{}') {
//
//
proxy.$nextTick(() => {
proxy.$refs.refquesItem.resetForm();
})
dlgImportSingle.title = "单题上传";
} else {
//
proxy.$nextTick(() => {
item.status = '1';
proxy.$refs.refquesItem.updateForm(item, index, 1);
})
dlgImportSingle.title = "纠错上传";
}
}
//
const onCancelExamSingleCallback=()=>{
//
dlgImportSingle.open = false;
};
/** 单题上传/纠错 完成后的回调 */
const onSubmitExamSingleCallback=(callback) =>{
if (callback.submitType !== 1) {
console.log('999-999');
return;
}
//
debounceQueryData();
//
dlgImportSingle.open = false;
};
/** 删除题目按钮操作 */
const handleDelete = async(item, index) => {
@ -413,7 +476,7 @@ watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => {
</script>
<style scoped lang="scss">
.page {
.page-myquest {
height: 100%;
display: flex;
flex-direction: column;
@ -422,7 +485,26 @@ watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => {
width: 100%;
height: calc(100% - 100px);
}
// :deep(.el-dialog .question-dialog){
// height: 80vh !important;
// width: 80% !important;
// overflow: hidden !important;
// }
// .el-dialog .question-dialog{
// height: 80vh !important;
// width: 80% !important;
// overflow: hidden !important;
// }
}
// .question-dialog{
// width: 80% !important;
// }
</style>
<style src="@/assets/styles/JYStyle.css"></style>

View File

@ -1733,6 +1733,7 @@ watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => {
// ()
defineExpose({
updateForm,
resetForm,
cropperFormItemCallBack,
})
</script>