修改bug

This commit is contained in:
Vce 2024-05-24 00:27:16 +08:00
parent 210b0cacc8
commit 495c94ef51
2 changed files with 27 additions and 7 deletions

View File

@ -830,9 +830,11 @@ export default {
submitBtn() {
console.log(this.compulsoryList)
console.log(this.examForm,111333)
this.$refs.examForm.validate((valid) => {
if (valid) {
let examInfo = {
if (this.title == '新增考试') {
let examInfo = {
checkQuestionType:this.examForm.checkQuestionType,
name:this.examForm.name,
duration:this.examForm.duration,
@ -840,7 +842,7 @@ export default {
projectSn:this.$store.state.projectSn,
subjectId:this.examForm.subjectId,
remark:this.examForm.remark,
questions:this.examForm.checkQuestionType == 1 ? this.examForm.questions.map(item => item.id).join(',') : this.randomQuestionList.map(item => item.id).join(','),
questions: this.examForm.checkQuestionType == 1 ? this.examForm.questions.map(item => item.id).join(',') : this.randomQuestionList.map(item => item.id).join(','),
examRecordList:this.compulsoryList.map(item => {
return {
id:item.id,
@ -848,15 +850,33 @@ export default {
}),
radio:this.examForm.checkQuestionType == 1 ? this.examForm.questions.filter(item => item.type == 1).length : this.randomQuestion.examSingle.count,
multi:this.examForm.checkQuestionType == 1 ? this.examForm.questions.filter(item => item.type == 2).length : this.randomQuestion.examMultiple.count,
}
if (this.title == '新增考试') {
}
// examInfo.questions = this.examForm.checkQuestionType == 1 ? this.examForm.questions.map(item => item.id).join(',') : this.randomQuestionList.map(item => item.id).join(','),
addPaperApi(examInfo).then((res) => {
this.$message.success('新增成功')
this.handleClose()
this.getRecordList()
})
} else {
this.examForm.questions = this.$refs.questionListTable.selection;
let examInfo = {
checkQuestionType:this.examForm.checkQuestionType,
name:this.examForm.name,
duration:this.examForm.duration,
passLine:this.examForm.passLine,
projectSn:this.$store.state.projectSn,
subjectId:this.examForm.subjectId,
remark:this.examForm.remark,
questions: this.examForm.checkQuestionType == 1 ? this.examForm.questions.map(item => item.id).join(',') : this.randomQuestionList.map(item => item.id).join(','),
examRecordList:this.compulsoryList.map(item => {
return {
id:item.id,
}
}),
radio:this.examForm.checkQuestionType == 1 ? this.examForm.questions.filter(item => item.type == 1).length : this.randomQuestion.examSingle.count,
multi:this.examForm.checkQuestionType == 1 ? this.examForm.questions.filter(item => item.type == 2).length : this.randomQuestion.examMultiple.count,
}
// examInfo.questions = this.examForm.checkQuestionType == 1 ? this.examForm.questions.map(item => item.id).join(',') : this.randomQuestionList.map(item => item.id).join(','),
examInfo.id = this.examForm.id
editPaperApi(examInfo).then((res) => {
if(res.success){

View File

@ -478,7 +478,8 @@ export default {
pageNo: this.worker.pageNo,
// pageSize: this.worker.pageSize,
pageSize: 999999,
presence: 1,
// presence: 1,
inserviceType: 1,
departmentId:'',
teamId:'',
}
@ -488,7 +489,6 @@ export default {
}
if(this.workerInfo.departmentAndTeam.gtMaterialDepartmentTeamType?this.workerInfo.departmentAndTeam.gtMaterialDepartmentTeamType === 2:false) {
data.teamId = this.workerInfo.departmentAndTeam?this.workerInfo.departmentAndTeam.gtMaterialDepartmentTeamId:''
}
}
await getWorkerInfoListApi(data).then((res) => {