修改bug

This commit is contained in:
Vce 2024-05-23 23:04:48 +08:00
parent a838aca210
commit a411ef4ab7
2 changed files with 29 additions and 64 deletions

View File

@ -73,9 +73,6 @@
<el-input-number :min="0" :max="100" :controls="false" :precision="0" style="width: 190px" v-model="examForm.passLine"></el-input-number>
<span style="margin-left: 10px;color:#a6a7b2;"></span>
</el-form-item>
<!-- <el-form-item label="学习周期" prop="studyCycle">
<el-date-picker v-model="examForm.studyCycle" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item> -->
<el-form-item label="备注" prop="remark">
<el-input type="textarea" rows="3" :show-word-limit="true" v-model="examForm.remark"></el-input>
</el-form-item>
@ -164,29 +161,29 @@
<div class="dialogContainer3">
<div>
<div style="margin-left:56px;margin-bottom:20px">
<el-radio-group v-model="randomQuestion.radio" @input="handleSelect">
<el-radio-group v-model="randomQuestion.radio" @input="handleSelect" clearable>
<el-radio label="0">从指定科目类型中选择</el-radio>
<el-radio label="1">从全部题库中选择</el-radio>
</el-radio-group><br>
<el-select v-model="randomQuestion.name" :disabled="isDisabled" size="mini" placeholder="请选择" style="margin-top: 5px">
<el-select v-model="randomQuestion.name" :disabled="isDisabled" size="mini" placeholder="请选择" style="margin-top: 5px" clearable>
<el-option :label="item.name" :value="item.id" v-for="(item,i) in subjectNameList" :key="i"></el-option>
<!-- <el-option v-for="item in subjectNameList" :key="item.value" :label="item.name" :value="item.value"></el-option> -->
</el-select>
</div>
<div>
<div>单选题:
<el-select v-model="randomQuestion.examSingle.diffculty" @change="singleChange" size="mini" placeholder="请选择难易程度" style="margin-top: 5px">
<el-select v-model="randomQuestion.examSingle.diffculty" @change="singleChange" size="mini" placeholder="请选择难易程度" style="margin-top: 5px" clearable>
<el-option v-for="item in levelArr" :key="item.value" :label="item.name" :value="item.value"></el-option>
</el-select>
<el-select ref="singleRef" v-model="randomQuestion.examSingle.count" size="mini" placeholder="请选择" style="margin-top: 5px;margin-left:5px">
<el-select ref="singleRef" v-model="randomQuestion.examSingle.count" size="mini" placeholder="请选择" style="margin-top: 5px;margin-left:5px" clearable>
<el-option v-for="item in radioDataList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> 当前题库单选题{{radioDataList.length}}
</div>
<div>多选题:
<el-select v-model="randomQuestion.examMultiple.diffculty" @change="multipleChange" size="mini" placeholder="请选择难易程度" style="margin-top: 5px">
<el-select v-model="randomQuestion.examMultiple.diffculty" @change="multipleChange" size="mini" placeholder="请选择难易程度" style="margin-top: 5px" clearable>
<el-option v-for="item in levelArr" :key="item.value" :label="item.name" :value="item.value"></el-option>
</el-select>
<el-select v-model="randomQuestion.examMultiple.count" size="mini" placeholder="请选择" style="margin-top: 5px;margin-left:5px">
<el-select v-model="randomQuestion.examMultiple.count" size="mini" placeholder="请选择" style="margin-top: 5px;margin-left:5px" clearable>
<el-option v-for="item in checkDataList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> 当前题库多选题{{checkDataList.length}}
</div>
@ -510,22 +507,9 @@ export default {
showBigImg: false,
examSubjectList: [], //
laborPersonList: [], //
adminPersonList: [], //
tempPersonList: [], //
checkedPersonList: [], //
personTotal: 0, //
personCheckedTotal: 0, //
compulsoryList: [], //
compulsoryList: [], //
cpsCheckedList:[], //
cpsFormList: [], //
cpsTotal: [], //
cpsCheckedTotal: [], //
compulsoryList: [],
addCourseForm: {}, //
studyCycle: [], //
personType: 0, //
personnelName:"", //
@ -612,11 +596,11 @@ export default {
},
methods: {
cancel2(){
this.examForm.checkQuestionType = null
// this.examForm.checkQuestionType = null
this.dialogVisible2 = false
},
cancel3(){
this.examForm.checkQuestionType = null
// this.examForm.checkQuestionType = null
this.dialogVisible3 = false
},
singleChange(){
@ -774,35 +758,19 @@ export default {
},
openDoor(){
// this.examForm.questions = this.examForm.questions.split(',')
let tempStr = this.examForm.questions.split(',')
console.log(tempStr,789)
console.log(this.questionList,789)
// this.examForm.questions = String.prototype.split(this.examForm.questions,',')
// this.$nextTick(()=>{
// this.examForm.questions = tempStr
// this.questionList.map((item,index) => {
// console.log("33333333333333333333")
// tempStr.map((item2,index2) => {
// if(item.id = item2){
// that.$refs.questionListTable.toggleRowSelection(taht.questionList[index],true)
// console.log("=======================")
// console.log(this.questionList[index])
// }
// })
// })
// })
this.dialogVisible2 = true
this.$nextTick(() => {
for(let i=0;i<this.questionList.length;i++){
for(let j = 0;j<tempStr.length;j++){
if(tempStr[j] == this.questionList[i].id){
this.$refs.questionListTable.toggleRowSelection(this.questionList[i],true)
if(this.title === '编辑考试'){
let tempStr = this.examForm.questions.split(',')
this.$nextTick(() => {
for(let i=0;i<this.questionList.length;i++){
for(let j = 0;j<tempStr.length;j++){
if(tempStr[j] == this.questionList[i].id){
this.$refs.questionListTable.toggleRowSelection(this.questionList[i],true)
}
}
}
}
})
})
}
this.dialogVisible2 = true
},
//
async editExam(row) { //
@ -938,6 +906,7 @@ export default {
},
// select
handleSelect(val){
this.randomQuestion.name = ''
this.clearFilter();
if(val === '0') {
this.isDisabled = false

View File

@ -94,7 +94,7 @@
<div class="item-flex">
<el-form-item label="选择课件" prop="courseId" >
<!-- :rules="[{required:true, message:'必填', trigger:'change'}]"> -->
<el-select v-model="addCourseForm.courseId" placeholder="请选择课件">
<el-select v-model="addCourseForm.courseId" placeholder="请选择课件" clearable>
<el-option :label="item.courseName" :value="item.id" v-for="(item, i) in courseList"
:key="i"></el-option>
</el-select>
@ -103,7 +103,7 @@
<div class="item-flex">
<el-form-item label="选择试卷" prop="examPaperId" >
<!-- :rules="[{required:true, message:'必填', trigger:'change'}]"> -->
<el-select v-model="addCourseForm.examPaperId" placeholder="请选择试卷">
<el-select v-model="addCourseForm.examPaperId" placeholder="请选择试卷" clearable>
<el-option :label="item.name" :value="item.id" v-for="(item, i) in examPaperSubjectList"
:key="i"></el-option>
</el-select>
@ -528,7 +528,10 @@ export default {
// return
// };
// this.active++;
if(!this.addCourseForm.courseId && !this.addCourseForm.examPaperId){
this.$message.error('试卷和课件至少选择一项')
return
}
this.$refs[examForm].validate((valid) => {
if(valid){
if(this.active == 1) {
@ -565,13 +568,6 @@ export default {
// this.$message.error('')
// return
// }
if(!this.addCourseForm.courseId && !this.addCourseForm.examPaperId){
this.$message.error('试卷和课件至少选择一项')
return
}
},
last() {
if(this.active == 2) {
@ -702,8 +698,8 @@ export default {
pageNo: this.pagInfo.pageNo,
pageSize: this.pagInfo.pageSize,
subjectId: this.subjectId,
trainBeginTime: this.starEndTime?this.starEndTime[0]:'',
trainEndTime: this.starEndTime?this.starEndTime[1]:'',
trainBeginTime_begin: this.starEndTime?this.starEndTime[0]:'',
trainEndTime_end: this.starEndTime?this.starEndTime[1]:'',
projectSn: this.$store.state.projectSn,
}).then((result) => {
if (result.success) {