提交 951710b7 authored 作者: matian's avatar matian

代码提交

上级 bf00be8d
...@@ -41,3 +41,9 @@ export function getScoreRanking(params) { ...@@ -41,3 +41,9 @@ export function getScoreRanking(params) {
export function getTitleList(params) { export function getTitleList(params) {
return httpRequest.get('/api/zy/v3-teacher/statistics/sheet-questions', { params }) return httpRequest.get('/api/zy/v3-teacher/statistics/sheet-questions', { params })
} }
/**
* 考试数据-看板(题目数据导出)
*/
export function exportTitleList(params) {
return httpRequest.get('/api/zy/v3-teacher/statistics/sheet-questions/download', { params })
}
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</h1> </h1>
<img class="logo" src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/x-learning/data/exam.png" alt="" /> <img class="logo" src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/x-learning/data/exam.png" alt="" />
</div> </div>
<el-row :gutter="20" class="row-bg" justify="space-around"> <el-row :gutter="20" class="row-bg" justify="space-around" v-if="dataInfo.paper_info">
<el-col :span="8"> <el-col :span="8">
<div class="title">总分</div> <div class="title">总分</div>
<div> <div>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</h1> </h1>
<img class="logo" src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/x-learning/data/score.png" alt="" /> <img class="logo" src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/x-learning/data/score.png" alt="" />
</div> </div>
<el-row :gutter="20" class="row-bg" justify="space-around"> <el-row :gutter="20" class="row-bg" justify="space-around" v-if="dataInfo.score_info">
<el-col :span="8"> <el-col :span="8">
<div class="title">平均分</div> <div class="title">平均分</div>
<div> <div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<el-card style="height: 650px"> <el-card style="height: 650px">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<h1 style="color: #333; font-size: 16px; border-left: 3px solid #aa1941; padding-left: 7px"> <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>分数排名 <span style="color: #c01540" v-show="dataInfo == 0">*</span>分数排名
</h1> </h1>
<el-button type="text" style="font-size: 16px; color: #aa1941; float: right; margin-top: -30px">导出</el-button> <el-button type="text" style="font-size: 16px; color: #aa1941; float: right; margin-top: -30px">导出</el-button>
</div> </div>
...@@ -45,10 +45,7 @@ export default { ...@@ -45,10 +45,7 @@ export default {
type: String, type: String,
default: '' default: ''
}, },
dataInfo: { dataInfo: {}
type: String,
default: ''
}
}, },
data() { data() {
return { return {
......
...@@ -2,21 +2,32 @@ ...@@ -2,21 +2,32 @@
<el-card class="box-card"> <el-card class="box-card">
<img class="bg" src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/x-learning/data/bgc2.png" alt="" /> <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"> <div slot="header" style="display: flex; align-items: center">
<h1 style="font-size: 16px"> <span style="color: #c01540" v-show="dataInfo.need_check_num === 0">*</span>交卷统计</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="" /> <img class="logo" src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/x-learning/data/time.png" alt="" />
</div> </div>
<el-row :gutter="20" class="row-bg" justify="space-around"> <el-row :gutter="20" class="row-bg" justify="space-around" v-if="dataInfo.submit_info">
<el-col :span="8"> <el-col :span="8">
<div class="title">最早交卷</div> <div class="title">最早交卷</div>
<div><span class="num">{{ dataInfo.submit_info.first }}</span><span class="fen">分钟</span></div> <div>
<span class="num">{{ dataInfo.submit_info.first }}</span
><span class="fen">分钟</span>
</div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="title">最迟交卷</div> <div class="title">最迟交卷</div>
<div><span class="num">{{ dataInfo.submit_info.last }}</span><span class="fen">分钟</span></div> <div>
<span class="num">{{ dataInfo.submit_info.last }}</span
><span class="fen">分钟</span>
</div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="title" style="white-space: nowrap">平均交卷时长</div> <div class="title" style="white-space: nowrap">平均交卷时长</div>
<div><span class="num">{{ dataInfo.submit_info.average }}</span><span class="fen">分钟</span></div> <div>
<span class="num">{{ dataInfo.submit_info.average }}</span
><span class="fen">分钟</span>
</div>
</el-col> </el-col>
</el-row> </el-row>
</el-card> </el-card>
...@@ -47,7 +58,7 @@ export default { ...@@ -47,7 +58,7 @@ export default {
margin-left: 9px; margin-left: 9px;
} }
.title { .title {
white-space:nowrap; white-space: nowrap;
font-size: 16px; font-size: 16px;
color: #909090; color: #909090;
font-weight: 400; font-weight: 400;
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<el-card style="margin-right: -20px; height: 650px"> <el-card style="margin-right: -20px; height: 650px">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<h1 style="color: #333; font-size: 16px; border-left: 3px solid #aa1941; padding-left: 7px"> <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>题目数据 {{ dataInfo }}
<span style="color: #c01540" v-show="dataInfo == 0">*</span>题目数据
</h1> </h1>
<el-button <el-button
type="text" type="text"
...@@ -16,7 +17,7 @@ ...@@ -16,7 +17,7 @@
</template> </template>
<script> <script>
import { getTitleList } from '../api' import { getTitleList, exportTitleList } from '../api'
export default { export default {
data() { data() {
return { return {
...@@ -43,10 +44,7 @@ export default { ...@@ -43,10 +44,7 @@ export default {
type: String, type: String,
default: '' default: ''
}, },
dataInfo: { dataInfo: {}
type: String,
default: ''
}
}, },
computed: { computed: {
// 列表配置 // 列表配置
...@@ -76,7 +74,23 @@ export default { ...@@ -76,7 +74,23 @@ export default {
console.log(this.type, 'type') console.log(this.type, 'type')
}, },
methods: { methods: {
exportTitleData() {} exportTitleData() {
const params = this.tableOptions.remote.params
exportTitleList(params).then(r => {
const content = r
const blob = new Blob([content], { type: 'application/vnd.ms-excel' })
if ('download' in document.createElement('a')) {
const elink = document.createElement('a')
elink.download = '题目数据.xlsx'
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)
document.body.removeChild(elink)
}
})
}
} }
} }
</script> </script>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<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>
<template v-if="Object.keys(dataInfo).length"> <template v-if="dataInfo.paper_info">
<el-row :gutter="10" class="row-bg"> <el-row :gutter="10" class="row-bg">
<el-col :span="8" class="col"><exam-info :dataInfo="dataInfo" /></el-col> <el-col :span="8" class="col"><exam-info :dataInfo="dataInfo" /></el-col>
<el-col :span="8" class="col"><submission :dataInfo="dataInfo" /></el-col> <el-col :span="8" class="col"><submission :dataInfo="dataInfo" /></el-col>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论