| | |
| | | </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"> |
| | |
| | | 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: { |
| | |
| | | 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 |
| | |
| | | // }); |
| | | // 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', |
| | |
| | | }); |
| | | 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 === '新增'){ |
| | |
| | | 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 = []; |