<template>
|
<div class="app-container">
|
<!-- <el-form :model="queryParam" ref="queryForm" :inline="true " style="display: flex">-->
|
<!-- <el-form-item label="学生:" >-->
|
<!-- <el-input v-model="queryParam.userName"></el-input>-->
|
<!-- </el-form-item>-->
|
<!-- <el-form-item label="试卷题目:">-->
|
<!-- <el-input v-model="queryParam.paperName"></el-input>-->
|
<!-- </el-form-item>-->
|
<!-- <el-form-item>-->
|
<!-- <el-button type="primary" @click="submitForm">查询</el-button>-->
|
<!-- </el-form-item>-->
|
<!-- </el-form>-->
|
|
<el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row style="width: 100%">
|
<el-table-column prop="userName" label="考生名称"/>
|
<el-table-column prop="counts" label="考试次数" width="160px"/>
|
<el-table-column label="操作" align="center" width="300px">
|
<template slot-scope="{row}">
|
<el-button size="mini" @click="$router.push({path:'/answer/achievementStatistics/gradeDetails',query:{id:row.id,userId:row.userId,createUser:row.createUser}})" >查看</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
<pagination v-show="total>0" :total="total" :page.sync="queryParam.pageIndex" :limit.sync="queryParam.pageSize"
|
@pagination="search"/>
|
</div>
|
</template>
|
|
<script>
|
|
import { mapGetters, mapState, mapActions } from 'vuex'
|
import Pagination from '@/components/Pagination'
|
import examPaperAnswerApi from '@/api/examPaperAnwser'
|
import AchievementStatistics from "@/api/AchievementStatistics";
|
|
export default {
|
components: { Pagination },
|
data () {
|
return {
|
avgSource:null,
|
queryParam: {
|
paperName:'',
|
userName:'',
|
subjectId: null,
|
pageIndex: 1,
|
pageSize: 10
|
},
|
listLoading: false,
|
tableData: [],
|
total: 0
|
}
|
},
|
created () {
|
this.initSubject()
|
this.search()
|
},
|
methods: {
|
search () {
|
this.listLoading = true
|
AchievementStatistics.page(this.queryParam).then(data => {
|
const re = data.response
|
this.avgSource = re.list[0].avgSource
|
this.tableData = re.list
|
this.total = re.total
|
this.queryParam.pageIndex = re.pageNum
|
this.listLoading = false
|
})
|
},
|
submitForm () {
|
this.queryParam.pageIndex = 1
|
this.search()
|
},
|
...mapActions('exam', { initSubject: 'initSubject' })
|
},
|
computed: {
|
...mapGetters('enumItem', ['enumFormat']),
|
...mapGetters('exam', ['subjectEnumFormat']),
|
...mapState('exam', { subjects: state => state.subjects })
|
}
|
}
|
</script>
|