This commit is contained in:
parent
30b2b9b964
commit
d25f2521a6
|
@ -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>
|
|
@ -1733,6 +1733,7 @@ watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => {
|
|||
// 暴露给父组件的参数和方法(外部需要什么,都可以从这里暴露出去)
|
||||
defineExpose({
|
||||
updateForm,
|
||||
resetForm,
|
||||
cropperFormItemCallBack,
|
||||
})
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue