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> <template>
<div class="page"> <div class="page-myquest">
<!-- 习题筛选1 --> <!-- 习题筛选1 -->
<el-row style="width: 100%; height: 50px;"> <el-row style="width: 100%; height: 50px;">
<el-col :span="7"> <el-col :span="7">
@ -72,7 +72,9 @@
<template #default="scope"> <template #default="scope">
<div> <div>
<el-button type="primary" @click="handleClassWorkQuizAdd('entpcourseworklist', scope.row.id)">添加</el-button> <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> <el-button type="danger" @click="handleDelete(scope.row, scope.$index)">删除</el-button>
</div> </div>
</template> </template>
@ -91,6 +93,23 @@
</div> </div>
<!-- 试题详细信息 --> <!-- 试题详细信息 -->
<examDetailsDrawer ref="examDetailsDrawerRef"></examDetailsDrawer> <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> </div>
</template> </template>
<script setup> <script setup>
@ -102,6 +121,7 @@ import { listEvaluationclue } from '@/api/classTask'
import { delEntpcoursework } from "@/api/education/entpCourseWork"; import { delEntpcoursework } from "@/api/education/entpCourseWork";
import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue' import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue'
import QuesItem from "@/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue";
import { useHandleData } from "@/hooks/useHandleData"; import { useHandleData } from "@/hooks/useHandleData";
import { processList } from '@/hooks/useProcessList' import { processList } from '@/hooks/useProcessList'
@ -190,6 +210,11 @@ const workResource = reactive({
entpCourseWorkTotal: 0, // entpCourseWorkTotal: 0, //
}); // }); //
const dlgImportSingle = reactive({
title: '单题上传',
open: false,
})
onMounted(() => { onMounted(() => {
debounceQueryData(); // debounceQueryData(); //
}) })
@ -356,6 +381,44 @@ const getPaginationList = ( page, limit ) => {
handleQueryFromEntpCourseWork(0); 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) => { const handleDelete = async(item, index) => {
@ -413,7 +476,7 @@ watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.page { .page-myquest {
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -422,7 +485,26 @@ watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => {
width: 100%; width: 100%;
height: calc(100% - 100px); 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>
<style src="@/assets/styles/JYStyle.css"></style> <style src="@/assets/styles/JYStyle.css"></style>

View File

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