|
@@ -2,11 +2,7 @@
|
|
|
<template>
|
|
|
<div class="app-container exam_my">
|
|
|
<div class="pageOne" v-if="pageType==1">
|
|
|
- <p class="reset-button-one"
|
|
|
- v-if="tableType==2"
|
|
|
- @click="tableSwitch(1)"
|
|
|
- ><i class="el-icon-arrow-left"></i>返回</p>
|
|
|
- <div class="el-table-box" v-if="tableType==1">
|
|
|
+ <div class="el-table-box">
|
|
|
<el-table v-loading="loading" border class="table-box" :data="examList">
|
|
|
<el-table-column label="考试名称" align="left" prop="title" show-overflow-tooltip/>
|
|
|
<el-table-column label="描述" align="left" prop="content" show-overflow-tooltip/>
|
|
@@ -32,7 +28,7 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<pagination :page-sizes="[20, 30, 40, 50]"
|
|
|
- v-show="total > 0 && tableType == 1"
|
|
|
+ v-show="total > 0 "
|
|
|
:total="total"
|
|
|
layout="total, prev, pager, next, sizes, jumper"
|
|
|
:page.sync="queryParams.page"
|
|
@@ -40,26 +36,6 @@
|
|
|
@pagination="getList"
|
|
|
/>
|
|
|
</div>
|
|
|
- <div class="for-max-box for-max-box-one" v-if="tableType==2">
|
|
|
- <el-table v-loading="loading" border :data="myListExam" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column label="考试名称" align="left" prop="title" />
|
|
|
- <el-table-column label="考试得分" align="left" prop="userScore" />
|
|
|
- <el-table-column label="是否合格" align="left" prop="passed" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{scope.row.userScore >= scope.row.qualifyScore ?'是':'否'}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="考试时间" align="left" prop="createTime" width="180"/>
|
|
|
- </el-table>
|
|
|
- <pagination :page-sizes="[20, 30, 40, 50]"
|
|
|
- v-show="total>0"
|
|
|
- :total="total"
|
|
|
- layout="total, prev, pager, next, sizes, jumper"
|
|
|
- :page.sync="infoParams.page"
|
|
|
- :limit.sync="infoParams.pageSize"
|
|
|
- @pagination="getMyListExam"
|
|
|
- />
|
|
|
- </div>
|
|
|
</div>
|
|
|
<exam-start v-if="pageType==2" :transferData="transferData" :violationId="violationId"></exam-start>
|
|
|
<exam-info v-if="pageType==3"></exam-info>
|
|
@@ -106,8 +82,6 @@ export default {
|
|
|
value: "已通过",
|
|
|
},
|
|
|
],
|
|
|
- //table状态
|
|
|
- tableType: 1,
|
|
|
//页面状态
|
|
|
pageType: 1,
|
|
|
//传参数据
|
|
@@ -124,7 +98,7 @@ export default {
|
|
|
total: 0,
|
|
|
queryParams: {
|
|
|
page: 1,
|
|
|
- pageSize:20,
|
|
|
+ pageSize:4,
|
|
|
},
|
|
|
infoParams: {
|
|
|
page: 1,
|
|
@@ -139,26 +113,6 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
- // 多选框选中数据
|
|
|
- handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map(item => item.id)
|
|
|
- this.single = selection.length!==1
|
|
|
- this.multiple = !selection.length
|
|
|
- },
|
|
|
- /** 查询我的考试记录列表 */
|
|
|
- getMyListExam() {
|
|
|
- this.loading = true;
|
|
|
- examPaperListAll(this.infoParams).then(response => {
|
|
|
- this.myListExam = response.rows;
|
|
|
- this.total = response.total;
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
- // myListExam({}).then(response => {
|
|
|
- // this.myListExam = response.rows;
|
|
|
- // // this.total = response.total;
|
|
|
- // this.loading = false;
|
|
|
- // });
|
|
|
- },
|
|
|
pageSwitch(type,item){
|
|
|
if(this.pageType!=type){
|
|
|
if(type==1){
|
|
@@ -193,15 +147,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- tableSwitch(type){
|
|
|
- if(this.tableType!=type){
|
|
|
- this.tableType = type;
|
|
|
- this.getList();
|
|
|
- }
|
|
|
- if(this.tableType == 2){
|
|
|
- this.getMyListExam()
|
|
|
- }
|
|
|
- },
|
|
|
/** 查询考试列表 */
|
|
|
getList() {
|
|
|
let prams = JSON.parse(JSON.stringify(this.queryParams))
|
|
@@ -212,7 +157,6 @@ export default {
|
|
|
if(this.$route.query.scopeType){
|
|
|
prams.scopeType = this.$route.query.scopeType
|
|
|
}
|
|
|
- // this.$router.push({query:{}})
|
|
|
this.loading = true;
|
|
|
prams.scopeType = 4;
|
|
|
examExamOnlineExamList(prams).then(response => {
|