1.0版本封版

master
yujialong 4 years ago
parent 5c7300e1b2
commit b95dbbad0e
  1. 2
      src/api/index.js
  2. 2
      src/layouts/header/index.vue
  3. 7
      src/pages/exam/do/index.vue
  4. 13
      src/pages/exam/list/index.vue
  5. 2
      src/setting.js

@ -25,7 +25,7 @@ export default {
addGzAnswerDetails: `/user/exam/addGzAnswerDetails`, addGzAnswerDetails: `/user/exam/addGzAnswerDetails`,
addTestPaperRecord: `/user/exam/addTestPaperRecord`, addTestPaperRecord: `/user/exam/addTestPaperRecord`,
calculationScore: `/user/exam/calculationScore`, calculationScore: `/user/exam/calculationScore`,
enterExam: `/user/exam/enterExam`, enterExam: `user/exam/enterExam`,
queryExam: `/user/exam/queryExam`, queryExam: `/user/exam/queryExam`,
queryGzAnswerDetails: `/user/exam/queryGzAnswerDetails`, queryGzAnswerDetails: `/user/exam/queryGzAnswerDetails`,
coverGzAnswerDetails: `/user/exam/coverGzAnswerDetails`, coverGzAnswerDetails: `/user/exam/coverGzAnswerDetails`,

@ -1,5 +1,5 @@
<template> <template>
<div class="header flex j-between"> <div class="header flex a-center j-between">
<div v-if="showBack" class="goBack" v-throttle @click="back"><i class="el-icon-arrow-left"></i>返回</div> <div v-if="showBack" class="goBack" v-throttle @click="back"><i class="el-icon-arrow-left"></i>返回</div>
<div v-else class="logo"> <div v-else class="logo">
<img src="../../assets/img/logo-fill.png"> <img src="../../assets/img/logo-fill.png">

@ -147,6 +147,7 @@ export default {
let seconds = Math.floor(total % (60 * 60) % 60) let seconds = Math.floor(total % (60 * 60) % 60)
time = `${util.formateTime(hours)}:${util.formateTime(minutes)}:${util.formateTime(seconds)}` time = `${util.formateTime(hours)}:${util.formateTime(minutes)}:${util.formateTime(seconds)}`
}else{ }else{
that.isDone = true
that.save() that.save()
clearInterval(that.timer) clearInterval(that.timer)
} }
@ -168,7 +169,7 @@ export default {
}, },
methods: { methods: {
getData() { getData() {
this.$get(`${this.api.enterExam}?testPaperId=${this.testPaperId}`) this.$get(`${this.api.enterExam}?testPaperId=${this.testPaperId}&userId=${this.userId}&assessmentId=${this.assessmentId}`)
.then(res => { .then(res => {
let data = res.data let data = res.data
this.subjects = [ this.subjects = [
@ -333,7 +334,9 @@ export default {
}) })
.catch(err => {}) .catch(err => {})
}) })
.catch(err => {}) .catch(err => {
clearInterval(this.queryStateTimer)
})
}) })
.catch(err => {}) .catch(err => {})
}, },

@ -41,17 +41,22 @@
</el-table-column> </el-table-column>
<el-table-column prop="startTime" label="考生开始时间" align="center"></el-table-column> <el-table-column prop="startTime" label="考生开始时间" align="center"></el-table-column>
<el-table-column prop="endTime" label="考试结束时间" align="center"></el-table-column> <el-table-column prop="endTime" label="考试结束时间" align="center"></el-table-column>
<el-table-column prop="timeCost" label="用时(分钟)" width="120" align="center"></el-table-column> <el-table-column prop="timeCost" label="用时(分钟)" width="120" align="center">
<template slot-scope="scope">
{{(scope.row.timeCost / 60).toFixed(2)}}
</template>
</el-table-column>
<el-table-column prop="score" label="得分" width="100" align="center"></el-table-column> <el-table-column prop="score" label="得分" width="100" align="center"></el-table-column>
<el-table-column prop="state" label="考试状态" width="100" align="center"> <el-table-column prop="state" label="考试状态" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.state == 2 ? '已提交' : '未提交'}} {{scope.row.state == 2 ? '已提交' : '未提交'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="150"> <el-table-column label="操作" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button type="text" @click="toExam(scope.row)" v-if="scope.row.assessmentState == 2" :disabled="scope.row.state != 0">进入考试</el-button> --> <!-- 学生考试状态:考试状态 state: (0未考 1在考 2已考)
<el-button type="text" @click="toExam(scope.row)">进入考试</el-button> 考核状态: state: 考核状态(1待开始 2进行中 3已结束) -->
<el-button type="text" @click="toExam(scope.row)" v-if="scope.row.assessmentState == 2" :disabled="scope.row.state == 2">进入考试</el-button>
<el-button type="text" @click="query(scope.row)" v-if="scope.row.state == 2">成绩查询</el-button> <el-button type="text" @click="query(scope.row)" v-if="scope.row.state == 2">成绩查询</el-button>
</template> </template>
</el-table-column> </el-table-column>

@ -16,7 +16,7 @@ const Setting = {
showProgressBar: true, showProgressBar: true,
// 接口请求地址 // 接口请求地址
// apiBaseURL: env === 'development' ? 'http://192.168.31.152:8001' : 'http://39.108.250.202:8000', // apiBaseURL: env === 'development' ? 'http://192.168.31.152:8001' : 'http://39.108.250.202:8000',
apiBaseURL: env === 'development' ? 'http://39.108.250.202:9000' : 'http://39.108.250.202:9000', apiBaseURL: env === 'development' ? 'http://192.168.31.152:8001' : 'http://39.108.250.202:9000',
// 接口请求返回错误时,弹窗的持续时间,单位:秒 // 接口请求返回错误时,弹窗的持续时间,单位:秒
modalDuration: 3, modalDuration: 3,
// 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice

Loading…
Cancel
Save