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

feat:题目数据增加接口

上级 a7282053
......@@ -35,3 +35,9 @@ export function getExamDataInfo(params) {
export function getScoreRanking(params) {
return httpRequest.get('/api/zy/v3-teacher/statistics/sheet-score-ranking', { params })
}
/**
* 考试数据-看板(题目数据)
*/
export function getTitleList(params) {
return httpRequest.get('/api/zy/v3-teacher/statistics/sheet-questions', { params })
}
......@@ -2,21 +2,32 @@
<el-card class="box-card">
<img class="bg" src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/x-learning/data/bgc1.png" alt="" />
<div slot="header" style="display: flex; align-items: center">
<h1 style="font-size: 16px">考试信息</h1>
<h1 style="font-size: 16px">
<span style="color: #c01540" v-show="dataInfo.need_check_num === 0">*</span>考试信息
</h1>
<img class="logo" src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/x-learning/data/exam.png" alt="" />
</div>
<el-row :gutter="20" class="row-bg" justify="space-around">
<el-col :span="8">
<div class="title">总分</div>
<div><span class="num">{{ dataInfo.paper_info.total_score }}</span><span class="fen"></span></div>
<div>
<span class="num">{{ dataInfo.paper_info.total_score }}</span
><span class="fen"></span>
</div>
</el-col>
<el-col :span="8">
<div class="title">及格分数</div>
<div><span class="num">{{ dataInfo.paper_info.pass_score }}</span><span class="fen"></span></div>
<div>
<span class="num">{{ dataInfo.paper_info.pass_score }}</span
><span class="fen"></span>
</div>
</el-col>
<el-col :span="8">
<div class="title">考试总时长</div>
<div><span class="num">{{ dataInfo.paper_info.times }}</span><span class="fen">小时</span></div>
<div>
<span class="num">{{ dataInfo.paper_info.times }}</span
><span class="fen">小时</span>
</div>
</el-col>
</el-row>
</el-card>
......@@ -48,7 +59,7 @@ export default {
}
.title {
white-space:nowrap;
white-space: nowrap;
font-size: 16px;
color: #909090;
font-weight: 400;
......
<template>
<el-card class="box-card" style="height: 450px">
<div slot="header" class="clearfix">
<h1 style="color: #333; font-size: 16px; border-left: 3px solid #aa1941; padding-left: 7px">题型数据</h1>
<h1 style="color: #333; font-size: 16px; border-left: 3px solid #aa1941; padding-left: 7px">
<span style="color: #c01540" v-show="dataInfo.need_check_num === 0">*</span>题型数据
</h1>
</div>
<div style="height: 350px; width: 90%; margin: 0 auto">
<div id="type" style="width: 100%; height: 90%"></div>
<div style="margin-bottom: 10px" v-if="correctRate.subjective">
<div class="dec dec1">
客观题正确率:<span style="color: #aa1941; font-size: 16px; font-weight: 400">{{ correctRate.objective.rate }}%</span>
客观题正确率:<span style="color: #aa1941; font-size: 16px; font-weight: 400"
>{{ correctRate.objective.rate }}%</span
>
</div>
<div class="dec dec1">
主观题正确率:<span class="dec" style="color: #919191">{{ correctRate.subjective.rate }}%</span>
</div>
<div class="dec dec1">主观题正确率:<span class="dec" style="color: #919191">{{ correctRate.subjective.rate }}%</span></div>
</div>
</div>
</el-card>
......@@ -96,11 +102,14 @@ export default {
methods: {
initEchart() {
const type = { 1: '单选', 2: '多选', 3: '问答', 5: '案例', 6: '判断', 7: '实操', 8: '情景' }
const data = this.dataInfo.questions_info.reduce((prev, cur) => {
const data = this.dataInfo.questions_info.reduce(
(prev, cur) => {
prev.x.push(type[cur.type])
prev.y.push(cur.rate)
return prev
}, { x: [], y: [] })
},
{ x: [], y: [] }
)
this.option.xAxis[0].data = data.x
this.option.series[0].data = data.y
const myChart = echarts.init(document.getElementById('type'))
......
<template>
<el-card class="box-card" style="height: 450px">
<div slot="header" class="clearfix">
<h1 style="color: #333; font-size: 16px; border-left: 3px solid #aa1941; padding-left: 7px">结果统计</h1>
<h1 style="color: #333; font-size: 16px; border-left: 3px solid #aa1941; padding-left: 7px">
<span style="color: #c01540" v-show="dataInfo.need_check_num === 0">*</span>结果统计
</h1>
</div>
<div style="height: 400px; width: 90%; margin: 0 auto">
<div id="main" style="width: 100%; height: 90%"></div>
......
......@@ -2,21 +2,32 @@
<el-card class="box-card">
<img class="bg" src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/x-learning/data/bgc3.png" alt="" />
<div slot="header" style="display: flex; align-items: center">
<h1 style="font-size: 16px">分数统计</h1>
<h1 style="font-size: 16px">
<span style="color: #c01540" v-show="dataInfo.need_check_num === 0">*</span>分数统计
</h1>
<img class="logo" src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/x-learning/data/score.png" alt="" />
</div>
<el-row :gutter="20" class="row-bg" justify="space-around">
<el-col :span="8">
<div class="title">平均分</div>
<div><span class="num">{{ dataInfo.score_info.average }}</span><span class="fen"></span></div>
<div>
<span class="num">{{ dataInfo.score_info.average }}</span
><span class="fen"></span>
</div>
</el-col>
<el-col :span="8">
<div class="title">最高分</div>
<div><span class="num">{{ dataInfo.score_info.max }}</span><span class="fen"></span></div>
<div>
<span class="num">{{ dataInfo.score_info.max }}</span
><span class="fen"></span>
</div>
</el-col>
<el-col :span="8">
<div class="title">最低分</div>
<div><span class="num">{{ dataInfo.score_info.min }}</span><span class="fen"></span></div>
<div>
<span class="num">{{ dataInfo.score_info.min }}</span
><span class="fen"></span>
</div>
</el-col>
</el-row>
</el-card>
......@@ -48,7 +59,7 @@ export default {
}
.title {
font-size: 16px;
white-space:nowrap;
white-space: nowrap;
color: #909090;
font-weight: 400;
}
......
......@@ -2,7 +2,9 @@
<div class="score-range-box">
<el-card class="box-card" style="height: 450px">
<div slot="header" class="clearfix">
<h1 style="color: #333; font-size: 16px; border-left: 3px solid #aa1941; padding-left: 7px">考分区间</h1>
<h1 style="color: #333; font-size: 16px; border-left: 3px solid #aa1941; padding-left: 7px">
<span style="color: #c01540" v-show="dataInfo.need_check_num === 0">*</span>考分区间
</h1>
<el-button
type="text"
style="font-size: 16px; color: #aa1941; float: right; margin-top: -35px"
......
<template>
<el-card style="height: 650px">
<div slot="header" class="clearfix">
<h1 style="color: #333; font-size: 16px; border-left: 3px solid #aa1941; padding-left: 7px">分数排名</h1>
<h1 style="color: #333; font-size: 16px; border-left: 3px solid #aa1941; padding-left: 7px">
<span style="color: #c01540" v-show="dataInfo.need_check_num === 0">*</span>分数排名
</h1>
<el-button type="text" style="font-size: 16px; color: #aa1941; float: right; margin-top: -30px">导出</el-button>
</div>
<el-tabs v-model="tabActive" @tab-click="handleClick">
......@@ -42,6 +44,10 @@ export default {
type: {
type: String,
default: ''
},
dataInfo: {
type: String,
default: ''
}
},
data() {
......
......@@ -2,7 +2,7 @@
<el-card class="box-card">
<img class="bg" src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/x-learning/data/bgc2.png" alt="" />
<div slot="header" style="display: flex; align-items: center">
<h1 style="font-size: 16px">交卷统计</h1>
<h1 style="font-size: 16px"> <span style="color: #c01540" v-show="dataInfo.need_check_num === 0">*</span>交卷统计</h1>
<img class="logo" src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/x-learning/data/time.png" alt="" />
</div>
<el-row :gutter="20" class="row-bg" justify="space-around">
......
<template>
<el-card style="margin-right: -20px; height: 650px">
<div slot="header" class="clearfix">
<h1 style="color: #333; font-size: 16px; border-left: 3px solid #aa1941; padding-left: 7px">题目数据</h1>
<el-button type="text" style="font-size: 16px; color: #aa1941; float: right; margin-top: -30px">导出</el-button>
<h1 style="color: #333; font-size: 16px; border-left: 3px solid #aa1941; padding-left: 7px">
<span style="color: #c01540" v-show="dataInfo.need_check_num === 0">*</span>题目数据
</h1>
<el-button
type="text"
style="font-size: 16px; color: #aa1941; float: right; margin-top: -30px"
@click="exportTitleData"
>导出</el-button
>
</div>
<app-list v-bind="tableOptions" ref="list"></app-list>
</el-card>
</template>
<script>
import { getTitleList } from '../api'
export default {
data() {
return {
......@@ -18,63 +26,57 @@ export default {
}
}
},
computed: {
// 列表配置
tableOptions() {
return {
remote: {},
columns: [
{ label: '排序', prop: 'paper_title', align: 'center' },
{ label: '题干简述', prop: 'class_name', align: 'center' },
{ label: '题型', prop: 'cankao_num', align: 'center' },
{ label: '正确率', prop: 'rfert', align: 'center' },
{ label: '总分', prop: 'average_num', align: 'center' },
{ label: '平均得分', prop: 'top', align: 'center' }
],
data: [
{
class_name: 'dsjfks'
props: {
examination_id: {
type: String,
default: ''
},
{
class_name: 'dsjfks'
course_id: {
type: String,
default: ''
},
{
class_name: 'dsjfks'
chapter_id: {
type: String,
default: ''
},
{
class_name: 'dsjfks'
type: {
type: String,
default: ''
},
{
class_name: 'dsjfks'
},
{
class_name: 'dsjfks'
dataInfo: {
type: String,
default: ''
}
},
{
class_name: 'dsjfks'
computed: {
// 列表配置
tableOptions() {
return {
remote: {
httpRequest: getTitleList,
params: {
type: this.type,
course_id: this.course_id,
examination_id: this.examination_id,
chapter_id: this.chapter_id
}
},
columns: [
{ label: '排序', prop: 'ranking', align: 'center' },
{ label: '题干简述', prop: 'title', align: 'center' },
{ label: '题型', prop: 'type', align: 'center' },
{ label: '正确率', prop: 'rate', align: 'center' },
{ label: '总分', prop: 'total_score', align: 'center' },
{ label: '平均得分', prop: 'average', align: 'center' }
]
}
}
},
methods: {
toExamData(row) {
this.$router.push({
path: '/examData',
query: {
row: row
}
})
mounted() {
console.log(this.type, 'type')
},
// 班级数据
toClassData(row) {
this.$router.push({
path: '/class',
query: {
row: row
}
})
}
methods: {
exportTitleData() {}
}
}
</script>
<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
><h1 style="padding-left: 0px; font-size: 30px">
{{ $route.query.examination_name }} <span style="color: #c01540; font-size: 14px">*部分数据未进行评价</span>
</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-select v-model="value" placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
</el-select>
......@@ -25,8 +26,16 @@
:examination_id="$route.query.examination_id"
:chapter_id="$route.query.chapter_id"
:type="$route.query.type"
:dataInfo="dataInfo.need_check_num"
/></el-col>
<el-col :span="11"
><TitleData
:course_id="$route.query.course_id"
:examination_id="$route.query.examination_id"
:chapter_id="$route.query.chapter_id"
:type="$route.query.type"
:dataInfo="dataInfo.need_check_num"
/></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 :dataInfo="dataInfo" /></el-col>
......@@ -74,7 +83,9 @@ export default {
}
],
value: '',
dataInfo: {}
dataInfo: {
need_check_num: ''
}
}
},
......
......@@ -85,7 +85,8 @@ export default {
query: {
course_id: row.course_id,
examination_id: row.examination_id,
type: 'examination'
type: 'examination',
examination_name: row.examination_name
}
})
},
......
......@@ -34,7 +34,7 @@ export default {
{
type: 'select',
prop: 'examination_id',
placeholder: '考试名称',
placeholder: '练习名称',
label: '练习名称',
options: this.conditionList.examination_list,
labelKey: 'paper_title',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论