提交 a7282053 authored 作者: matian's avatar matian

feat:练习看板增加接口

上级 ce0cc898
...@@ -34,13 +34,20 @@ export default { ...@@ -34,13 +34,20 @@ export default {
course_id: { course_id: {
type: String, type: String,
default: '' default: ''
},
chapter_id: {
type: String,
default: ''
},
type: {
type: String,
default: ''
} }
}, },
data() { data() {
return { return {
tabActive: 'finished', tabActive: 'finished',
scoreRanking: {} scoreRanking: {}
// status: '1'
} }
}, },
computed: { computed: {
...@@ -64,7 +71,8 @@ export default { ...@@ -64,7 +71,8 @@ export default {
const params = { const params = {
course_id: this.course_id, course_id: this.course_id,
examination_id: this.examination_id, examination_id: this.examination_id,
type: 'examination', chapter_id: this.chapter_id,
type: this.type,
status: this.status status: this.status
} }
getScoreRanking(params).then(res => { getScoreRanking(params).then(res => {
......
...@@ -20,7 +20,11 @@ ...@@ -20,7 +20,11 @@
</el-row> </el-row>
<el-row :gutter="10" class="row-bg"> <el-row :gutter="10" class="row-bg">
<el-col :span="12" class="col" <el-col :span="12" class="col"
><ScoreRanking :course_id="$route.query.course_id" :examination_id="$route.query.examination_id" ><ScoreRanking
:course_id="$route.query.course_id"
:examination_id="$route.query.examination_id"
:chapter_id="$route.query.chapter_id"
:type="$route.query.type"
/></el-col> /></el-col>
<el-col :span="11"><TitleData /></el-col> <el-col :span="11"><TitleData /></el-col>
</el-row> </el-row>
...@@ -70,10 +74,10 @@ export default { ...@@ -70,10 +74,10 @@ export default {
} }
], ],
value: '', value: '',
dataInfo: {}, dataInfo: {}
scoreRanking: {} // 分数排名
} }
}, },
created() { created() {
this.getExamDataInfo() this.getExamDataInfo()
}, },
...@@ -82,7 +86,8 @@ export default { ...@@ -82,7 +86,8 @@ export default {
const params = { const params = {
course_id: this.$route.query.course_id, course_id: this.$route.query.course_id,
examination_id: this.$route.query.examination_id, examination_id: this.$route.query.examination_id,
type: 'examination' chapter_id: this.$route.query.chapter_id,
type: this.$route.query.type
} }
getExamDataInfo(params).then(res => { getExamDataInfo(params).then(res => {
this.dataInfo = res.data this.dataInfo = res.data
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<app-list v-bind="tableOptions" ref="list"> <app-list v-bind="tableOptions" ref="list">
<!-- 操作 --> <!-- 操作 -->
<template v-slot:table-operate="{ row }"> <template v-slot:table-operate="{ row }">
<el-button type="text" size="mini" @click="toExamData(row)">考试数据</el-button> <el-button type="text" size="mini" @click="toExamData(row)" :disabled="row.join_num === 0">考试数据</el-button>
<el-button type="text" size="mini" @click="toClassData(row)">班级数据</el-button> <el-button type="text" size="mini" @click="toClassData(row)" :disabled="row.join_num === 0">班级数据</el-button>
</template> </template>
</app-list> </app-list>
</app-container> </app-container>
...@@ -84,7 +84,8 @@ export default { ...@@ -84,7 +84,8 @@ export default {
path: '/teacher/data/exam/examData', path: '/teacher/data/exam/examData',
query: { query: {
course_id: row.course_id, course_id: row.course_id,
examination_id: row.examination_id examination_id: row.examination_id,
type: 'examination'
} }
}) })
}, },
......
...@@ -6,7 +6,7 @@ const routes = [ ...@@ -6,7 +6,7 @@ const routes = [
{ path: '/teacher/data/test', component: () => import('./views/List.vue') }, { path: '/teacher/data/test', component: () => import('./views/List.vue') },
{ path: '/teacher/data/classList', component: () => import('./views/ClassList.vue') }, { path: '/teacher/data/classList', component: () => import('./views/ClassList.vue') },
{ path: '/teacher/data/person', component: () => import('./views/PersonalList.vue') }, { path: '/teacher/data/person', component: () => import('./views/PersonalList.vue') },
{ path: '/teacher/data/teastData', component: () => import('./views/testData.vue') } { path: '/teacher/data/testData', component: () => import('../exam/views/ExamData.vue') }
] ]
} }
] ]
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<app-list v-bind="tableOptions" ref="list"> <app-list v-bind="tableOptions" ref="list">
<!-- 操作 --> <!-- 操作 -->
<template v-slot:table-operate="{ row }"> <template v-slot:table-operate="{ row }">
<el-button type="text" size="mini" @click="toTestData(row)">练习数据</el-button> <el-button type="text" size="mini" @click="toTestData(row)" :disabled="row.join_num === 0">练习数据</el-button>
<el-button type="text" size="mini" @click="toClassData(row)">班级数据</el-button> <el-button type="text" size="mini" @click="toClassData(row)" :disabled="row.join_num === 0">班级数据</el-button>
</template> </template>
</app-list> </app-list>
</app-container> </app-container>
...@@ -87,8 +87,12 @@ export default { ...@@ -87,8 +87,12 @@ export default {
}, },
toTestData(row) { toTestData(row) {
this.$router.push({ this.$router.push({
path: '/teacher/data/teastData', path: '/teacher/data/testData',
row: row query: {
course_id: row.course_id,
chapter_id: row.chapter_id,
type: 'chapter'
}
}) })
} }
} }
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
<el-row type="flex" class="row-bg" justify="space-between" style="margin-bottom: 30px"> <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><h1 style="padding-left: 0px; font-size: 30px">模拟测试一</h1></el-col>
<el-col :span="10"> <el-col :span="10">
<el-select v-model="label" placeholder="请选择"> <!-- <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-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
</el-select> </el-select> -->
<el-button type="text" style="margin-left: 30px">导出pdf</el-button> <el-button type="text" style="margin-left: 30px">导出pdf</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="10" class="row-bg"> <el-row :gutter="10" class="row-bg">
<el-col :span="8" class="col"><ExamInfo /></el-col> <el-col :span="8" class="col"><ExamInfo :dataInfo="dataInfo" /></el-col>
<el-col :span="8" class="col"><Submission /></el-col> <el-col :span="8" class="col"><Submission :dataInfo="dataInfo" /></el-col>
<el-col :span="7"><Score /></el-col> <el-col :span="7"><Score :dataInfo="dataInfo" /></el-col>
</el-row> </el-row>
<el-row :gutter="10" class="row-bg"> <el-row :gutter="10" class="row-bg">
<el-col :span="12" class="col"><ScoreRanking /></el-col> <el-col :span="12" class="col"><ScoreRanking /></el-col>
...@@ -35,11 +35,28 @@ import TitleData from '../../exam/components/TitleData.vue' ...@@ -35,11 +35,28 @@ import TitleData from '../../exam/components/TitleData.vue'
import Result from '../../exam/components/Result.vue' import Result from '../../exam/components/Result.vue'
import ScoreRange from '../../exam/components/ScoreRange.vue' import ScoreRange from '../../exam/components/ScoreRange.vue'
import QuestionType from '../../exam/components/QuestionType.vue' import QuestionType from '../../exam/components/QuestionType.vue'
import { getExamDataInfo } from '../api'
export default { export default {
components: { ExamInfo, Submission, Score, ScoreRanking, TitleData, Result, ScoreRange, QuestionType }, components: { ExamInfo, Submission, Score, ScoreRanking, TitleData, Result, ScoreRange, QuestionType },
data() { data() {
return { return {
options: {} 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
})
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论