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

代码提交

上级 77d03505
...@@ -13,6 +13,12 @@ export default { ...@@ -13,6 +13,12 @@ export default {
data() { data() {
return {} return {}
}, },
props: {
tabActive: {
type: String,
default: ''
}
},
computed: { computed: {
// 列表配置 // 列表配置
tableOptions() { tableOptions() {
...@@ -42,6 +48,18 @@ export default { ...@@ -42,6 +48,18 @@ export default {
} }
} }
}, },
mounted() {
if (this.tabActive === 'baseInfo') {
// 接口请求 已结束
alert('111')
} else if (this.tabActive === 'toEvaluate') {
// 接口请求 待评价
alert('222')
} else {
// 接口请求 未作答
alert('333')
}
},
methods: { methods: {
toPersonal(row) { toPersonal(row) {
this.$router.push({ this.$router.push({
......
...@@ -6,7 +6,9 @@ ...@@ -6,7 +6,9 @@
<div style="height: 350px; width: 90%; margin: 0 auto"> <div style="height: 350px; width: 90%; margin: 0 auto">
<div id="type" style="width: 100%; height: 90%"></div> <div id="type" style="width: 100%; height: 90%"></div>
<div style="margin-bottom: 10px"> <div style="margin-bottom: 10px">
<div class="dec dec1">客观题正确率:<span class="dec" style="color: #aa1941">待评价</span></div> <div class="dec dec1">
客观题正确率:<span style="color: #aa1941; font-size: 16px; font-weight: 400">待评价</span>
</div>
<div class="dec dec1">主观题正确率:<span class="dec" style="color: #919191">待评价</span></div> <div class="dec dec1">主观题正确率:<span class="dec" style="color: #919191">待评价</span></div>
</div> </div>
</div> </div>
...@@ -62,7 +64,6 @@ export default { ...@@ -62,7 +64,6 @@ export default {
], ],
series: [ series: [
{ {
name: 'Direct',
type: 'bar', type: 'bar',
barWidth: '30%', barWidth: '30%',
data: [20, 40, 60, 80, 100], data: [20, 40, 60, 80, 100],
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<app-container> <app-container>
<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">查看</el-button> <el-button type="text" @click="toDetail(row)">查看</el-button>
</template> </template>
</app-list> </app-list>
</app-container> </app-container>
...@@ -18,16 +18,34 @@ export default { ...@@ -18,16 +18,34 @@ export default {
tableOptions() { tableOptions() {
return { return {
remote: {}, remote: {},
// 'row-style': { height: '10px', color: 'red' },
columns: [ columns: [
{ label: '排名', prop: 'paper_title', align: 'center' }, { label: '排名', prop: 'paper_title', align: 'center' },
{ label: '姓名', slots: 'table-name', align: 'center' }, { label: '姓名', prop: 'class_name', align: 'center' },
{ label: '客观题', prop: 'cankao_num', align: 'center', width: '150', sortable: true }, { label: '客观题', prop: 'cankao_num', align: 'center', sortable: true },
{ label: '主观题', prop: 'efw', align: 'center', width: '150', sortable: true }, { label: '主观题', prop: 'efw', align: 'center', sortable: true },
{ label: '总分', prop: 'average_num', align: 'center', sortable: true }, { label: '总分', prop: 'average_num', align: 'center', sortable: true },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center' }
], ],
data: [ data: [
{
class_name: '1w1e'
},
{
class_name: '1w1e'
},
{
class_name: '1w1e'
},
{
class_name: '1w1e'
},
{
class_name: '1w1e'
},
{
class_name: '1w1e'
},
{ {
class_name: '1w1e' class_name: '1w1e'
} }
...@@ -35,6 +53,8 @@ export default { ...@@ -35,6 +53,8 @@ export default {
} }
} }
}, },
methods: {} methods: {
toDetail() {}
}
} }
</script> </script>
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
<app-card> <app-card>
<h1 class="title" style="font-size: 28px">班级排名</h1> <h1 class="title" style="font-size: 28px">班级排名</h1>
<el-button type="text" style="font-size: 28px; float: right; margin-top: -40px">导出</el-button> <el-button type="text" style="font-size: 28px; float: right; margin-top: -40px">导出</el-button>
<el-tabs v-model="tabActive" style="margin-top: 30px"> <el-tabs v-model="tabActive" style="margin-top: 30px" tab-click="handleClick">
<el-tab-pane label="已结束" name="baseInfo"> <el-tab-pane label="已结束" name="finished">
<Finished /> <Finished :tabActive="tabActive" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="待评价" name="contacts" lazy> <el-tab-pane label="待评价" name="toEvaluate" lazy>
<Finished /> <Finished :tabActive="tabActive" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="未作答" name="project" lazy> <el-tab-pane label="未作答" name="noAnswer" lazy>
<Finished /> <Finished :tabActive="tabActive" />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</app-card> </app-card>
...@@ -27,6 +27,18 @@ export default { ...@@ -27,6 +27,18 @@ export default {
return { return {
tabActive: 'baseInfo' tabActive: 'baseInfo'
} }
},
methods: {
handleClick(tab, event) {
console.log(tab, event)
if (tab.index === 0) {
// 网络请求1
} else if (tab.index === 1) {
// 网络请求2
} else {
// 网络请求3
}
}
} }
} }
</script> </script>
...@@ -5,7 +5,8 @@ const routes = [ ...@@ -5,7 +5,8 @@ const routes = [
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('./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') }
] ]
} }
] ]
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<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">练习数据</el-button> <el-button type="text" size="mini" @click="toTestData(row)">练习数据</el-button>
<el-button type="text" size="mini" @click="toClassData(row)">班级数据</el-button> <el-button type="text" size="mini" @click="toClassData(row)">班级数据</el-button>
</template> </template>
</app-list> </app-list>
...@@ -51,6 +51,12 @@ export default { ...@@ -51,6 +51,12 @@ export default {
row: row row: row
} }
}) })
},
toTestData(row) {
this.$router.push({
path: '/teacher/data/teastData',
row: row
})
} }
} }
} }
......
<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 /></el-col>
<el-col :span="8" class="col"><Submission /></el-col>
<el-col :span="7"><Score /></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'
export default {
components: { ExamInfo, Submission, Score, ScoreRanking, TitleData, Result, ScoreRange, QuestionType },
data() {
return {
options: {}
}
}
}
</script>
<style>
.row-bg {
margin-top: 30px;
padding: 10px 0;
}
.col {
margin-right: 21px;
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论