修改bug
This commit is contained in:
parent
a838aca210
commit
a411ef4ab7
@ -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
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user