Merge branch 'bjxz-cjw' into bjxz-dev
This commit is contained in:
commit
8cbbcf53dc
@ -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){
|
||||
|
||||
@ -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) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user