| | |
| | | component: () => import('@/views/education/cheat/list'), |
| | | name: 'EducationCheatPage', |
| | | meta: { title: '作弊记录', noCache: true } |
| | | }, |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | |
| | | affix: true |
| | | }, |
| | | component: () => import('@/views/sys/SysSetting') |
| | | }, |
| | | } |
| | | ] |
| | | }, |
| | | |
| | |
| | | {{ row.questionCorrect }} / {{ row.questionCount }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="doTime" label="耗时" width="80px" align="center" /> |
| | | <el-table-column prop="doTime" label="耗时" width="100px" align="center"> |
| | | <template slot-scope="{row}"> |
| | | {{ formattedDoTime(row) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="submitTime" label="提交时间" width="240px" align="center"> |
| | | <template slot-scope="{row}"> |
| | | <span :style="row.status === 0 ? '' : 'color: red'"> |
| | |
| | | tableData: [], |
| | | visible: false, |
| | | subjects: [] |
| | | }; |
| | | } |
| | | }, |
| | | created() { |
| | | this.queryParam.examId = this.$route.query.id; |
| | | this.queryParam.userId = this.$route.query.userId; |
| | | this.search(); |
| | | this.queryParam.examId = this.$route.query.id |
| | | this.queryParam.userId = this.$route.query.userId |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | formattedDoTime (row) { |
| | | const totalSeconds = row.doTime |
| | | const minutes = Math.floor(totalSeconds / 60) |
| | | const seconds = totalSeconds % 60 |
| | | return `${minutes}分${seconds < 10 ? '0' + seconds : seconds}秒` |
| | | }, |
| | | // 获取列表 |
| | | search() { |
| | | this.listLoading = true |
| | |
| | | }) |
| | | }, |
| | | view(row) { |
| | | this.$router.push({ path: '/answer/answer-detail', query: { id: row.id } }); |
| | | this.$router.push({ path: '/answer/answer-detail', query: { id: row.id } }) |
| | | }, |
| | | handleExport() { |
| | | let that = this |
| | | let url = '/api/admin/examPaperAnswer/exportExcel?userName=' + this.queryParam.userName; |
| | | if (this.queryParam.userId) url += '&userId=' + this.queryParam.userId; |
| | | if (this.queryParam.examId) url += '&examId=' + this.queryParam.examId; |
| | | var x = new XMLHttpRequest(); |
| | | x.open("POST", url, true); |
| | | x.responseType = "blob"; |
| | | let url = '/api/admin/examPaperAnswer/exportExcel?userName=' + this.queryParam.userName |
| | | if (this.queryParam.userId) url += '&userId=' + this.queryParam.userId |
| | | if (this.queryParam.examId) url += '&examId=' + this.queryParam.examId |
| | | var x = new XMLHttpRequest() |
| | | x.open('POST', url, true) |
| | | x.responseType = 'blob' |
| | | x.onload = function () { |
| | | var url = window.URL.createObjectURL(x.response); |
| | | var a = document.createElement("a"); |
| | | a.href = url; |
| | | if (that.queryParam.examId) a.download = that.tableData[0].examName + '.xlsx'; |
| | | if (that.queryParam.userId) a.download = that.tableData[0].userName + '.xlsx'; |
| | | a.click(); |
| | | }; |
| | | x.send(); |
| | | var url = window.URL.createObjectURL(x.response) |
| | | var a = document.createElement('a') |
| | | a.href = url |
| | | if (that.queryParam.examId) a.download = that.tableData[0].examName + '.xlsx' |
| | | if (that.queryParam.userId) a.download = that.tableData[0].userName + '.xlsx' |
| | | a.click() |
| | | } |
| | | x.send() |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .flex { |
| | |
| | | <el-button slot="reference" type="danger" size="small">删除</el-button> |
| | | </el-popconfirm> |
| | | |
| | | <el-button v-if="scope.row.status === 'finished'" type="success" size="small" @click="markPaper(scope.row)">阅卷</el-button> |
| | | <el-button type="danger" size="small" @click="deleteExam(scope.row.id)">删除</el-button> |
| | | <el-button v-if="scope.row.status === 'finished'" type="success" size="small" @click="markPaper(scope.row)"> |
| | | 阅卷 |
| | | </el-button> |
| | | <el-button type="danger" size="small" @click="deleteExam(scope.row)">删除</el-button> |
| | | <el-button type="warning" size="small" @click="monitor(scope.row)">监控</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | this.classesList = res.data.data |
| | | }) |
| | | }, |
| | | deleteExam (id) { |
| | | deleteExamById(id).then(res => { |
| | | deleteExam (row) { |
| | | this.$confirm('确认是否删除' + row.examName + '?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteExamById(row.id).then(res => { |
| | | this.$message.success('删除成功') |
| | | this.page() |
| | | }) |
| | | }) |
| | | }, |
| | | handlerEdit (row) { |
| | | this.examForm = { |
| | |
| | | mounted () { |
| | | this.examInfo.examName = this.$route.query.examName |
| | | this.examInfo.examId = this.$route.query.examId |
| | | console.log('------->' + this.examInfo.examName + '------->' + this.examInfo.examId) |
| | | if (this.examInfo.examId) { |
| | | this.getExamInfo() |
| | | } |
| | |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <el-empty v-if="empty" style="width:1200px;height:500px;"></el-empty> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | getStudentExam(this.$route.query.examId, this.$route.query.userId).then(re => { |
| | | this.formLoading = true |
| | | this.form = re.data.data |
| | | if (!this.form.titleItems) this.empty = true; |
| | | this.formLoading = false |
| | | }) |
| | | }, |
| | | data () { |
| | | return { |
| | | empty: false, |
| | | paperQuestionList: [], |
| | | form: {}, |
| | | formLoading: false, |
| | |
| | | { required: true, message: '请输入加时时间', trigger: 'blur' } |
| | | ] |
| | | }, |
| | | }; |
| | | } |
| | | }, |
| | | created() { |
| | | this.queryParam.examId = this.$route.query.examId; |
| | | this.queryParam.examId = this.$route.query.examId |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | // 处理加时 |
| | | handlerAddTime() { |
| | | handlerAddTime (row) { |
| | | this.$refs['addTimeForm'].validate((valid) => { |
| | | if (valid) { |
| | | this.addTimeForm.examId = this.queryParam.examId |
| | | this.addTimeForm.userId = row.userId |
| | | addTime(this.addTimeForm).then(res => { |
| | | this.$message.success('加时成功') |
| | | }) |
| | |
| | | }) |
| | | }, |
| | | handleNullify(row) { |
| | | let cheatObj = { examId: row.examId, cheatUser: row.userId }; |
| | | let cheatObj = { examId: row.examId, cheatUser: row.userId } |
| | | cheatApi.edit(cheatObj).then(res => { |
| | | this.$message.success(res.message); |
| | | this.$message.success(res.message) |
| | | }) |
| | | }, |
| | | statusFormatter(row) { |
| | |
| | | return '进行中' |
| | | } else if (row.status === 'finish') { |
| | | return '已结束' |
| | | } else if (!row.status) { |
| | | return '未开始' |
| | | } |
| | | }, |
| | | // 获取列表 |
| | |
| | | edit(row) { |
| | | cheatApi.select(row.id).then(re => { |
| | | if (re.code === 1) { |
| | | this.form = re.data; |
| | | this.visible = true; |
| | | this.form = re.data |
| | | this.visible = true |
| | | } else { |
| | | this.$message.error(re.message) |
| | | } |
| | |
| | | jitsiApi.addListener('readyToClose', () => { |
| | | window.close() |
| | | }) |
| | | |
| | | } |
| | | } |
| | | |