From 926fd4d1b89e7e5e6338d8f292edc4f728049856 Mon Sep 17 00:00:00 2001 From: zhouwx <1175765986@qq.com> Date: 星期五, 02 八月 2024 17:33:05 +0800 Subject: [PATCH] 试卷批改 --- src/views/onlineEducation/groupExams/components/examDialog.vue | 91 +++++++++++++++++++++++++++++++++++++-------- 1 files changed, 75 insertions(+), 16 deletions(-) diff --git a/src/views/onlineEducation/groupExams/components/examDialog.vue b/src/views/onlineEducation/groupExams/components/examDialog.vue index ba9aa9c..96a6fb0 100644 --- a/src/views/onlineEducation/groupExams/components/examDialog.vue +++ b/src/views/onlineEducation/groupExams/components/examDialog.vue @@ -151,8 +151,49 @@ </el-radio-group> </div> </div> + <div style="display: flex"> + <div class="group"> + <div> + 简答:<el-input style="max-width: 40px" v-model="state.form.easyNum"></el-input> 题 + </div> + <div style="margin-left: 20px"> + 每题:<el-input style="max-width: 40px" v-model="state.form.easyScore"></el-input> 分 + </div> + </div> + <div class="group" > + <div> + 共 + <span style="max-width: 30px" v-show="state.form.easyNum && state.form.easyScore">{{state.form.easyNum * state.form.easyScore}}</span> + <!-- <span v-else></span>--> + 分 + </div> + <el-select + clearable + v-model="state.form.easyBankId" + style="width: 160px;margin: 0 20px" + v-loadMoreNew:[reselectSingle]="handleScroll" + :popper-class="reselectSingle.name" + class="item-width" + placeholder="请选择简答题题库" + > + <el-option + v-for="item in state.bankListSingle" + :key="item.id" + :label="item.name" + :value="item.id" + /> + </el-select> + <el-radio-group v-model="state.form.easyMethod" > + <el-radio :label="1" style="max-width: 30px">随机</el-radio> + <el-radio :label="2" style="max-width: 30px">顺序</el-radio> + </el-radio-group> + <el-radio-group v-model="state.form.easyRebuild" style="margin-left: 30px" > + <el-radio :label="1" v-if="title === '编辑'" style="max-width: 30px">重新出题</el-radio> + </el-radio-group> + </div> + </div> <span class="group" style="margin-bottom: 20px">共计: - {{state.form.judgeNum * state.form.judgeScore+state.form.multiNum * state.form.multiScore+state.form.singleNum * state.form.singleScore}} + {{state.form.judgeNum * state.form.judgeScore+state.form.multiNum * state.form.multiScore+state.form.singleNum * state.form.singleScore+state.form.easyNum * state.form.easyScore}} 分</span> <div style="display: flex;justify-content: space-between;align-items: center"> <el-form-item label="合格分数:" prop="passScore"> @@ -273,10 +314,15 @@ limited: 1, limitTime: null, passScore: null, - judgeRebuild: 0, - multiRebuild: 0, - singleRebuild: 0, - deadline: '' + judgeRebuild: null, + multiRebuild: null, + singleRebuild: null, + easyRebuild: null, + deadline: '', + easyNum: null, + easyScore: null, + easyBankId: null, + easyMethod: 1, }, formRules: { @@ -315,6 +361,14 @@ title.value = type === 'addFirst' || type === 'add' ? '新增' : type ==='edit' ? '编辑' : '' ; if(type === 'edit') { state.form = value + state.form.easyNum = state.form.easyNum ? state.form.easyNum: null + state.form.easyScore = state.form.easyScore ? state.form.easyScore: null + state.form.singleNum = state.form.singleNum ? state.form.singleNum: null + state.form.singleScore = state.form.singleScore ? state.form.singleScore: null + state.form.multiNum = state.form.multiNum ? state.form.multiNum: null + state.form.multiScore = state.form.multiScore ? state.form.multiScore: null + state.form.judgeNum = state.form.judgeNum ? state.form.judgeNum: null + state.form.judgeScore = state.form.judgeScore ? state.form.judgeScore: null startUsername.value = value.name; }else if(type === 'add' && value ){ state.form.parentId = value.id @@ -330,7 +384,7 @@ // }); // return; // } - const total = state.form.judgeNum * state.form.judgeScore+state.form.multiNum * state.form.multiScore+state.form.singleNum * state.form.singleScore + const total = state.form.judgeNum * state.form.judgeScore+state.form.multiNum * state.form.multiScore+state.form.singleNum * state.form.singleScore+state.form.easyNum * state.form.easyScore if(state.form.passScore > total){ ElMessage({ type: 'warning', @@ -338,13 +392,13 @@ }); return; } - if(!(state.form.judgeBankId || state.form.multiBankId || state.form.singleBankId)){ - ElMessage({ - type: 'warning', - message: '请选择题库' - }); - return; - } + // if(!(state.form.judgeBankId || state.form.multiBankId || state.form.singleBankId)){ + // ElMessage({ + // type: 'warning', + // message: '请选择题库' + // }); + // return; + // } const valid = await busRef.value.validate(); if(valid){ if(title.value === '新增'){ @@ -447,9 +501,14 @@ limited: 1, limitTime: null, passScore: null, - judgeRebuild: 0, - multiRebuild: 0, - singleRebuild: 0, + judgeRebuild: null, + multiRebuild: null, + singleRebuild: null, + easyRebuild: null, + easyNum: null, + easyScore: null, + easyBankId: null, + easyMethod: 1, deadline: '' } state.bankListSingle = []; -- Gitblit v1.9.2