提交 21f3fed0 authored 作者: lihuihui's avatar lihuihui

Merge branch 'vite' of https://gitlab.ezijing.com/ezijing/x-learn into vite

...@@ -61,7 +61,8 @@ export default { ...@@ -61,7 +61,8 @@ export default {
methods: { methods: {
toPersonal(row) { toPersonal(row) {
this.$router.push({ this.$router.push({
path: '/teacher/data/exam/PersonalList', path:
this.paramList.type === 'examination' ? '/teacher/data/exam/PersonalList' : '/teacher/data/test/PersonalList',
query: { query: {
class_id: row.class_id, class_id: row.class_id,
course_id: this.paramList.course_id, course_id: this.paramList.course_id,
......
...@@ -39,8 +39,8 @@ export default { ...@@ -39,8 +39,8 @@ export default {
columns: [ columns: [
{ label: '排名', slots: 'paper_title', prop: 'ranking', align: 'center' }, { label: '排名', slots: 'paper_title', prop: 'ranking', align: 'center' },
{ label: '姓名', prop: 'personal_name', align: 'center', minWidth: 150 }, { label: '姓名', prop: 'personal_name', align: 'center', minWidth: 150 },
{ label: '客观题', prop: 'subjective', align: 'center', sortable: 'custom', minWidth: 100 }, { label: '客观题', prop: 'objective', align: 'center', sortable: 'custom', minWidth: 100 },
{ label: '主观题', prop: 'objective', align: 'center', sortable: 'custom', minWidth: 100 }, { label: '主观题', prop: 'subjective', align: 'center', sortable: 'custom', minWidth: 100 },
{ label: '总分', prop: 'score', align: 'center', sortable: 'custom' }, { label: '总分', prop: 'score', align: 'center', sortable: 'custom' },
{ label: '操作', slots: 'table_operate', align: 'center' } { label: '操作', slots: 'table_operate', align: 'center' }
], ],
...@@ -61,7 +61,10 @@ export default { ...@@ -61,7 +61,10 @@ export default {
methods: { methods: {
toDetail(data) { toDetail(data) {
this.$router.push({ 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: { query: {
id: data.id, id: data.id,
type: this.scoreRanking.type type: this.scoreRanking.type
......
...@@ -80,9 +80,7 @@ export default { ...@@ -80,9 +80,7 @@ export default {
} }
} }
}, },
mounted() {
console.log(this.scoreRanking, '9189839')
},
methods: { methods: {
handleResCount(val) { handleResCount(val) {
this.count = val this.count = val
...@@ -93,6 +91,7 @@ export default { ...@@ -93,6 +91,7 @@ export default {
type: this.type, type: this.type,
course_id: this.course_id, course_id: this.course_id,
examination_id: this.examination_id, examination_id: this.examination_id,
chapter_id: this.chapter_id,
download: 'true' download: 'true'
} }
exportScoreList(params).then(r => { exportScoreList(params).then(r => {
......
...@@ -115,7 +115,20 @@ export default { ...@@ -115,7 +115,20 @@ export default {
} }
} }
}, },
{ label: '正确率', prop: 'rate', align: 'center', minWidth: 150, sortable: 'custom' }, {
label: '正确率',
prop: 'rate',
align: 'center',
minWidth: 150,
sortable: 'custom',
computed({ row }) {
if (row.rate > 0) {
return `${row.rate.toFixed(1)}%`
} else {
return row.rate
}
}
},
{ label: '总分', prop: 'total_score', align: 'center' }, { label: '总分', prop: 'total_score', align: 'center' },
{ label: '平均得分', prop: 'average', align: 'center', sortable: 'custom', minWidth: 150 } { label: '平均得分', prop: 'average', align: 'center', sortable: 'custom', minWidth: 150 }
], ],
...@@ -168,7 +181,10 @@ export default { ...@@ -168,7 +181,10 @@ export default {
}, },
toDetail(row) { toDetail(row) {
this.$router.push({ this.$router.push({
path: '/teacher/data/exam/examData/topicData', path:
this.type === 'examination'
? '/teacher/data/exam/examData/topicData'
: '/teacher/data/test/examData/topicData',
query: { query: {
course_id: this.course_id, course_id: this.course_id,
examination_id: this.examination_id, examination_id: this.examination_id,
......
...@@ -59,12 +59,34 @@ export default { ...@@ -59,12 +59,34 @@ export default {
{ label: '考试名称', prop: 'examination_name', align: 'center' }, { label: '考试名称', prop: 'examination_name', align: 'center' },
{ label: '所属课程', prop: 'course_name', align: 'center' }, { label: '所属课程', prop: 'course_name', align: 'center' },
{ label: '参考人数', prop: 'join_num', align: 'center' }, { label: '参考人数', prop: 'join_num', align: 'center' },
{ label: '参考率', prop: 'join_rate', align: 'center' }, {
label: '参考率',
prop: 'join_rate',
align: 'center',
computed({ row }) {
if (row.join_rate > 0) {
return `${row.join_rate.toFixed(1)}%`
} else {
return row.join_rate
}
}
},
{ label: '平均得分', prop: 'average', align: 'center' }, { label: '平均得分', prop: 'average', align: 'center' },
{ label: '最高分', prop: 'max', align: 'center' }, { label: '最高分', prop: 'max', align: 'center' },
{ label: '最低分', prop: 'min', align: 'center' }, { label: '最低分', prop: 'min', align: 'center' },
{ label: '题目总数', prop: 'question_num', align: 'center' }, { label: '题目总数', prop: 'question_num', align: 'center' },
{ label: '及格率', prop: 'pass_rate', align: 'center' }, {
label: '及格率',
prop: 'pass_rate',
align: 'center',
computed({ row }) {
if (row.pass_rate > 0) {
return `${row.pass_rate.toFixed(1)}%`
} else {
return row.pass_rate
}
}
},
{ label: '操作', slots: 'table-operate', align: 'center', minWidth: 150 } { label: '操作', slots: 'table-operate', align: 'center', minWidth: 150 }
] ]
} }
......
...@@ -64,7 +64,10 @@ export default { ...@@ -64,7 +64,10 @@ export default {
methods: { methods: {
toExamData(row) { toExamData(row) {
this.$router.push({ 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: { query: {
id: row.id, id: row.id,
type: this.$route.query.type 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 = [ ...@@ -4,9 +4,11 @@ const routes = [
component: () => import('@/components/layout/index.vue'), component: () => import('@/components/layout/index.vue'),
children: [ children: [
{ path: '/teacher/data/test', component: () => import('./views/List.vue') }, { path: '/teacher/data/test', component: () => import('./views/List.vue') },
{ path: '/teacher/data/classList', component: () => import('../exam/views/ClassList.vue') }, { path: '/teacher/data/test/classList', component: () => import('../exam/views/ClassList.vue') },
{ path: '/teacher/data/person', component: () => import('../exam/views/PersonalList.vue') }, { path: '/teacher/data/test/PersonalList', component: () => import('../exam/views/PersonalList.vue') },
{ path: '/teacher/data/testData', component: () => import('../exam/views/ExamData.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') }
] ]
} }
] ]
......
...@@ -57,12 +57,34 @@ export default { ...@@ -57,12 +57,34 @@ export default {
{ label: '所属章节', prop: 'parent_name', align: 'center' }, { label: '所属章节', prop: 'parent_name', align: 'center' },
{ label: '所属课程', prop: 'course_name', align: 'center' }, { label: '所属课程', prop: 'course_name', align: 'center' },
{ label: '练习总人数', prop: 'join_num', align: 'center' }, { label: '练习总人数', prop: 'join_num', align: 'center' },
{ label: '练习率', prop: 'join_rate', align: 'center' }, {
label: '练习率',
prop: 'join_rate',
align: 'center',
computed({ row }) {
if (row.join_rate > 0) {
return `${row.join_rate.toFixed(1)}%`
} else {
return row.join_rate
}
}
},
{ label: '平均得分', prop: 'average', align: 'center' }, { label: '平均得分', prop: 'average', align: 'center' },
{ label: '最高分', prop: 'max', align: 'center' }, { label: '最高分', prop: 'max', align: 'center' },
{ label: '最低分', prop: 'min', align: 'center' }, { label: '最低分', prop: 'min', align: 'center' },
{ label: '题目总数', prop: 'question_num', align: 'center' }, { label: '题目总数', prop: 'question_num', align: 'center' },
{ label: '及格率', prop: 'pass_rate', align: 'center' }, {
label: '及格率',
prop: 'pass_rate',
align: 'center',
computed({ row }) {
if (row.pass_rate > 0) {
return `${row.pass_rate.toFixed(1)}%`
} else {
return row.pass_rate
}
}
},
{ label: '操作', slots: 'table-operate', align: 'center', minWidth: 150 } { label: '操作', slots: 'table-operate', align: 'center', minWidth: 150 }
] ]
} }
...@@ -79,7 +101,7 @@ export default { ...@@ -79,7 +101,7 @@ export default {
}, },
toClassData(row) { toClassData(row) {
this.$router.push({ this.$router.push({
path: '/teacher/data/classList', path: '/teacher/data/test/classList',
query: { query: {
course_id: row.course_id, course_id: row.course_id,
chapter_id: row.chapter_id, chapter_id: row.chapter_id,
...@@ -89,8 +111,9 @@ export default { ...@@ -89,8 +111,9 @@ export default {
}) })
}, },
toTestData(row) { toTestData(row) {
console.log(row, 'row')
this.$router.push({ this.$router.push({
path: '/teacher/data/testData', path: '/teacher/data/test/testData',
query: { query: {
course_id: row.course_id, course_id: row.course_id,
chapter_id: row.chapter_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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论