Merge branch 'bjxz-cjw' into bjxz-dev
This commit is contained in:
commit
8cbbcf53dc
@ -830,9 +830,11 @@ export default {
|
|||||||
submitBtn() {
|
submitBtn() {
|
||||||
|
|
||||||
console.log(this.compulsoryList)
|
console.log(this.compulsoryList)
|
||||||
|
console.log(this.examForm,111333)
|
||||||
this.$refs.examForm.validate((valid) => {
|
this.$refs.examForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let examInfo = {
|
if (this.title == '新增考试') {
|
||||||
|
let examInfo = {
|
||||||
checkQuestionType:this.examForm.checkQuestionType,
|
checkQuestionType:this.examForm.checkQuestionType,
|
||||||
name:this.examForm.name,
|
name:this.examForm.name,
|
||||||
duration:this.examForm.duration,
|
duration:this.examForm.duration,
|
||||||
@ -840,7 +842,7 @@ export default {
|
|||||||
projectSn:this.$store.state.projectSn,
|
projectSn:this.$store.state.projectSn,
|
||||||
subjectId:this.examForm.subjectId,
|
subjectId:this.examForm.subjectId,
|
||||||
remark:this.examForm.remark,
|
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 => {
|
examRecordList:this.compulsoryList.map(item => {
|
||||||
return {
|
return {
|
||||||
id:item.id,
|
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,
|
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,
|
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(','),
|
||||||
if (this.title == '新增考试') {
|
|
||||||
addPaperApi(examInfo).then((res) => {
|
addPaperApi(examInfo).then((res) => {
|
||||||
this.$message.success('新增成功')
|
this.$message.success('新增成功')
|
||||||
this.handleClose()
|
this.handleClose()
|
||||||
this.getRecordList()
|
this.getRecordList()
|
||||||
})
|
})
|
||||||
} else {
|
} 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
|
examInfo.id = this.examForm.id
|
||||||
editPaperApi(examInfo).then((res) => {
|
editPaperApi(examInfo).then((res) => {
|
||||||
if(res.success){
|
if(res.success){
|
||||||
|
|||||||
@ -478,7 +478,8 @@ export default {
|
|||||||
pageNo: this.worker.pageNo,
|
pageNo: this.worker.pageNo,
|
||||||
// pageSize: this.worker.pageSize,
|
// pageSize: this.worker.pageSize,
|
||||||
pageSize: 999999,
|
pageSize: 999999,
|
||||||
presence: 1,
|
// presence: 1,
|
||||||
|
inserviceType: 1,
|
||||||
departmentId:'',
|
departmentId:'',
|
||||||
teamId:'',
|
teamId:'',
|
||||||
}
|
}
|
||||||
@ -488,7 +489,6 @@ export default {
|
|||||||
}
|
}
|
||||||
if(this.workerInfo.departmentAndTeam.gtMaterialDepartmentTeamType?this.workerInfo.departmentAndTeam.gtMaterialDepartmentTeamType === 2:false) {
|
if(this.workerInfo.departmentAndTeam.gtMaterialDepartmentTeamType?this.workerInfo.departmentAndTeam.gtMaterialDepartmentTeamType === 2:false) {
|
||||||
data.teamId = this.workerInfo.departmentAndTeam?this.workerInfo.departmentAndTeam.gtMaterialDepartmentTeamId:''
|
data.teamId = this.workerInfo.departmentAndTeam?this.workerInfo.departmentAndTeam.gtMaterialDepartmentTeamId:''
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await getWorkerInfoListApi(data).then((res) => {
|
await getWorkerInfoListApi(data).then((res) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user