| | |
| | | type="primary" |
| | | >下一题</el-button |
| | | > |
| | | <el-button |
| | | <!-- <el-button |
| | | :disabled="timesIT" |
| | | type="success" |
| | | @click="submitExam" |
| | |
| | | : '点击完成考试' |
| | | " |
| | | >完成考试 {{ time }}</el-button |
| | | > |
| | | <!-- <el-button |
| | | type="success" |
| | | @click="submitExam" |
| | | >完成考试 {{ time }}</el-button |
| | | > --> |
| | | <el-button type="success" @click="submitExam" |
| | | >完成考试 {{ time }}</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | |
| | | examResultVOS: null, |
| | | }; |
| | | var arr = []; |
| | | // console.log(this.subjectIds); |
| | | console.log(this.subjectIds); |
| | | // debugger; |
| | | console.log(this.subjectIds.length, 111); |
| | | for (var i = 0; i < this.subjectIds.length; i++) { |
| | | let item = this.subjectIds[i]; |
| | | // console.log(item.answer, i); |
| | | if (item.type == 3 || item.type == 1) { |
| | | var str = ""; |
| | | |
| | | if (item.answer.length > 0) { |
| | | item.answer.forEach((it) => { |
| | | if (it.value != "") { |
| | | str += it.value + ","; |
| | | } |
| | | }); |
| | | //如果是数组 |
| | | if (item.answer instanceof Array) { |
| | | item.answer.forEach((it) => { |
| | | if (it.value != "") { |
| | | str += it.value + ","; |
| | | } |
| | | }); |
| | | |
| | | var a = str.substr(0, str.length - 1); |
| | | var a = str.substr(0, str.length - 1); |
| | | |
| | | arr.push({ |
| | | subjectChoicesId: item.everyID, |
| | | value: a, |
| | | grade: item.score, |
| | | }); |
| | | arr.push({ |
| | | subjectChoicesId: item.everyID, |
| | | value: a, |
| | | grade: item.score, |
| | | }); |
| | | }else{ |
| | | arr.push({ |
| | | subjectChoicesId: item.everyID, |
| | | value: item.answer, |
| | | grade: item.score, |
| | | }); |
| | | } |
| | | } |
| | | } else { |
| | | arr.push({ |
| | |
| | | }); |
| | | } |
| | | } |
| | | // console.log(arr); |
| | | // console.log(arr, 123); |
| | | // return; |
| | | obj.examResultVOS = arr; |
| | | // console.log(this.subjectIds); |
| | | // console.log(obj.examResultVOS); |
| | | // console.log(this.subjectIds, 456); |
| | | // console.log(obj.examResultVOS, 789); |
| | | |
| | | saveAndNext(obj) |
| | | .then((response) => { |