提交 8d034b63 authored 作者: matian's avatar matian

代码更新

上级 fd2f0d54
......@@ -61,7 +61,8 @@ export default {
methods: {
toPersonal(row) {
this.$router.push({
path: '/teacher/data/exam/PersonalList',
path:
this.paramList.type === 'examination' ? '/teacher/data/exam/PersonalList' : '/teacher/data/test/PersonalList',
query: {
class_id: row.class_id,
course_id: this.paramList.course_id,
......
......@@ -61,7 +61,10 @@ export default {
methods: {
toDetail(data) {
this.$router.push({
path: '/teacher/data/exam/examData/classDetail',
path:
this.scoreRanking.type === 'examination'
? '/teacher/data/exam/examData/classDetail'
: '/teacher/data/test/examData/classDetail',
query: {
id: data.id,
type: this.scoreRanking.type
......
......@@ -168,7 +168,10 @@ export default {
},
toDetail(row) {
this.$router.push({
path: '/teacher/data/exam/examData/topicData',
path:
this.type === 'examination'
? '/teacher/data/exam/examData/topicData'
: '/teacher/data/test/examData/topicData',
query: {
course_id: this.course_id,
examination_id: this.examination_id,
......
......@@ -64,7 +64,10 @@ export default {
methods: {
toExamData(row) {
this.$router.push({
path: '/teacher/data/exam/examData/classDetail',
path:
this.$route.query.type === 'examination'
? '/teacher/data/exam/examData/classDetail'
: '/teacher/data/test/examData/classDetail',
query: {
id: row.id,
type: this.$route.query.type
......
<template>
<app-container>
<app-list v-bind="tableOptions" ref="list">
<template v-slot:table-name="{ row }">
<el-button type="text" @click="toPersonal">{{ row.class_name }}</el-button>
</template>
</app-list>
</app-container>
</template>
<script>
export default {
data() {
return {}
},
computed: {
// 列表配置
tableOptions() {
return {
remote: {},
columns: [
{ label: '排名', prop: 'paper_title', align: 'center' },
{ label: '班级', slots: 'table-name', align: 'center' },
{ label: '平均分', prop: 'cankao_num', align: 'center', sortable: true },
{ label: '客观题平均分', prop: 'ret5t', align: 'center', sortable: true },
{ label: '客观题最高分', prop: 'average_num', align: 'center', sortable: true },
{ label: '客观题最低分', prop: 'top', align: 'center', sortable: true },
{ label: '主观题平均分', prop: 'low', align: 'center', sortable: true },
{ label: '主观题最高分', prop: 'title_num', align: 'center', sortable: true },
{ label: '主观题最低分', prop: 'title_percent', align: 'center', sortable: true }
],
data: [
{
class_name: '121321431'
}
]
}
}
},
methods: {
toPersonal(row) {
this.$router.push({
path: '/teacher/data/person',
query: {
row: row
}
})
}
}
}
</script>
......@@ -4,9 +4,11 @@ const routes = [
component: () => import('@/components/layout/index.vue'),
children: [
{ path: '/teacher/data/test', component: () => import('./views/List.vue') },
{ path: '/teacher/data/classList', component: () => import('../exam/views/ClassList.vue') },
{ path: '/teacher/data/person', component: () => import('../exam/views/PersonalList.vue') },
{ path: '/teacher/data/testData', component: () => import('../exam/views/ExamData.vue') }
{ path: '/teacher/data/test/classList', component: () => import('../exam/views/ClassList.vue') },
{ path: '/teacher/data/test/PersonalList', component: () => import('../exam/views/PersonalList.vue') },
{ path: '/teacher/data/test/testData', component: () => import('../exam/views/ExamData.vue') },
{ path: '/teacher/data/test/examData/classDetail', component: () => import('../exam/views/classDetail.vue') },
{ path: '/teacher/data/test/examData/topicData', component: () => import('../exam/views/TopicData.vue') }
]
}
]
......
......@@ -79,7 +79,7 @@ export default {
},
toClassData(row) {
this.$router.push({
path: '/teacher/data/classList',
path: '/teacher/data/test/classList',
query: {
course_id: row.course_id,
chapter_id: row.chapter_id,
......@@ -90,7 +90,7 @@ export default {
},
toTestData(row) {
this.$router.push({
path: '/teacher/data/testData',
path: '/teacher/data/test/testData',
query: {
course_id: row.course_id,
chapter_id: row.chapter_id,
......
<template>
<div class="container">
<el-row type="flex" class="row-bg" justify="space-between" style="margin-bottom: 30px">
<el-col><h1 style="padding-left: 0px; font-size: 30px">模拟测试一</h1></el-col>
<el-col :span="10">
<!-- <el-select v-model="label" placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
</el-select> -->
<el-button type="text" style="margin-left: 30px">导出pdf</el-button>
</el-col>
</el-row>
<el-row :gutter="10" class="row-bg">
<el-col :span="8" class="col"><ExamInfo :dataInfo="dataInfo" /></el-col>
<el-col :span="8" class="col"><Submission :dataInfo="dataInfo" /></el-col>
<el-col :span="7"><Score :dataInfo="dataInfo" /></el-col>
</el-row>
<el-row :gutter="10" class="row-bg">
<el-col :span="12" class="col"><ScoreRanking /></el-col>
<el-col :span="11"><TitleData /></el-col>
</el-row>
<el-row :gutter="10" class="row-bg">
<el-col :span="8" class="col"><Result /></el-col>
<el-col :span="8" class="col"><ScoreRange /></el-col>
<el-col :span="7"><QuestionType /></el-col>
</el-row>
</div>
</template>
<script>
import ExamInfo from '../../exam/components/ExamInfo.vue'
import Submission from '../../exam/components/Submission.vue'
import Score from '../../exam/components/Score.vue'
import ScoreRanking from '../../exam/components/ScoreRanking.vue'
import TitleData from '../../exam/components/TitleData.vue'
import Result from '../../exam/components/Result.vue'
import ScoreRange from '../../exam/components/ScoreRange.vue'
import QuestionType from '../../exam/components/QuestionType.vue'
import { getExamDataInfo } from '../api'
export default {
components: { ExamInfo, Submission, Score, ScoreRanking, TitleData, Result, ScoreRange, QuestionType },
data() {
return {
options: {},
dataInfo: {}
}
},
created() {
this.getExamDataInfo()
},
methods: {
getExamDataInfo() {
const params = {
course_id: this.$route.query.course_id,
chapter_id: this.$route.query.chapter_id,
type: 'chapter'
}
getExamDataInfo(params).then(res => {
this.dataInfo = res.data
})
}
}
}
</script>
<style>
.row-bg {
margin-top: 30px;
padding: 10px 0;
}
.col {
margin-right: 21px;
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论