提交 02a3f2f2 authored 作者: matian's avatar matian

Auto stash before merge of "vite" and "origin/vite"

上级 ebd09796
<template>
<app-container>
<app-list v-bind="tableOptions" ref="list">
<app-list v-bind="tableOptions" ref="list" @sort-change="sortChange">
<template #header-aside>
<el-button type="text" @click="exportClass">导出</el-button>
</template>
......@@ -28,11 +28,11 @@ export default {
filters: [{ type: 'input', prop: 'class_name', placeholder: '班级名称', label: '班级名称' }],
columns: [
{ label: '班级名称', prop: 'class_name', align: 'center' },
{ label: '班级人数', prop: 'student_total', align: 'center', sortable: true },
{ label: '完成人数', prop: 'finished_student_total', align: 'center', sortable: true },
{ label: '课程完成率', prop: 'course_completion_rate', align: 'center', sortable: true },
{ label: '累计学习时长', prop: 'study_length', align: 'center', sortable: true },
{ label: '人均学习时长', prop: 'avg_study_length', align: 'center', sortable: true }
{ label: '班级人数', prop: 'student_total', align: 'center', sortable: 'custom' },
{ label: '完成人数', prop: 'finished_student_total', align: 'center', sortable: 'custom' },
{ label: '课程完成率', prop: 'course_completion_rate', align: 'center', sortable: 'custom' },
{ label: '累计学习时长', prop: 'study_length', align: 'center', sortable: 'custom' },
{ label: '人均学习时长', prop: 'avg_study_length', align: 'center', sortable: 'custom' }
]
}
}
......@@ -54,6 +54,16 @@ export default {
document.body.removeChild(elink)
}
})
},
sortChange(columns) {
console.log(columns, '123')
if (columns.order === 'ascending') {
this.tableOptions.remote.params.sort = columns.prop
} else {
columns.prop = '-' + columns.prop
this.tableOptions.remote.params.sort = columns.prop
}
this.$refs.list.refetch()
}
}
}
......
......@@ -49,8 +49,8 @@ export default {
columns: [
{ label: '图片', prop: 'course_picture', slots: 'table-img' },
{ label: '课程名称', prop: 'course_name', align: 'center' },
{ label: '人均学习时长', prop: 'course_avg_study_len', align: 'center', sortable: true },
{ label: '课程完成率', prop: 'course_finish_progress', align: 'center', sortable: true },
{ label: '人均学习时长', prop: 'course_avg_study_len', align: 'center', sortable: 'custom' },
{ label: '课程完成率', prop: 'course_finish_progress', align: 'center', sortable: 'custom' },
{ label: '操作', align: 'center', slots: 'table-operate' }
]
}
......
<template>
<app-container>
<app-list v-bind="tableOptions" ref="list">
<app-list v-bind="tableOptions" ref="list" @sort-change="sortChange">
<template v-slot:table-name="{ row }">
<el-link type="primary">{{ row.paper_title }}</el-link>
</template>
......@@ -33,10 +33,10 @@ export default {
filters: [{ type: 'input', prop: 'personal_name', placeholder: '学生姓名', label: '学生姓名' }],
columns: [
{ label: '学生姓名', prop: 'personal_name', slots: 'table-name' },
{ label: '总学习时长', prop: 'all_study_length', align: 'center', sortable: true },
{ label: '总完成率', prop: 'all_course_completion_rate', align: 'center', sortable: true },
{ label: '本课学习时长', prop: 'study_length', align: 'center', sortable: true },
{ label: '本课完成率', prop: 'course_completion_rate', align: 'center', sortable: true },
{ label: '总学习时长', prop: 'all_study_length', align: 'center', sortable: 'custom' },
{ label: '总完成率', prop: 'all_course_completion_rate', align: 'center', sortable: 'custom' },
{ label: '本课学习时长', prop: 'study_length', align: 'center', sortable: 'custom' },
{ label: '本课完成率', prop: 'course_completion_rate', align: 'center', sortable: 'custom' },
{ label: '操作', slots: 'table-operate', align: 'center' }
]
}
......@@ -50,6 +50,16 @@ export default {
id: row.id
}
})
},
sortChange(columns) {
console.log(columns, '123')
if (columns.order === 'ascending') {
this.tableOptions.remote.params.sort = columns.prop
} else {
columns.prop = '-' + columns.prop
this.tableOptions.remote.params.sort = columns.prop
}
this.$refs.list.refetch()
}
}
}
......
......@@ -57,3 +57,28 @@ export function exportTitleList(params) {
responseType: 'blob'
})
}
/**
* 考试数据-看板(题目数据导出)
*/
export function getClassList(params) {
return httpRequest.get('/api/zy/v3-teacher/statistics/class-list', {
params
})
}
/**
* 导出班级统计数据
*/
export function exportClassList(params) {
return httpRequest.get('/api/zy/v3-teacher/statistics/class-list', {
params,
responseType: 'blob'
})
}
/**
* 获取班级详情
*/
export function getClassDetail(params) {
return httpRequest.get('/api/zy/v3-teacher/statistics/class-details', {
params
})
}
<template>
<app-container>
<app-list v-bind="tableOptions" ref="list" @sort-change="sortChange">
<template v-slot:paper_title="{ row }">
<div :class="`paper-title active${row.ranking}`">{{ row.ranking }}</div>
</template>
<template v-slot:table-name="{ row }">
<el-button type="text" @click="toPersonal(row)">{{ row.class_name }}</el-button>
</template>
......@@ -17,56 +20,115 @@ export default {
tabActive: {
type: String,
default: ''
},
classList: {
type: Object,
default: () => {}
},
course_id: {
type: String,
default: ''
},
examination_id: {
type: String,
default: ''
},
chapter_id: {
type: String,
default: ''
},
type: {
type: String,
default: ''
}
},
computed: {
// 列表配置
tableOptions() {
return {
remote: {},
data: this.classList.list,
columns: [
{
label: '排名',
prop: 'paper_title',
align: 'center'
prop: 'ranking',
align: 'center',
slots: 'paper_title'
},
{ label: '班级', slots: 'table-name', prop: 'class_name', align: 'center' },
{ label: '平均分', prop: 'cankao_num', align: 'center', sortable: 'custom' },
{ label: '客观题平均分', prop: 'efw', align: 'center', sortable: 'custom' },
{ label: '客观题最高分', prop: 'average_num', align: 'center', sortable: 'custom' },
{ label: '客观题最低分', prop: 'top', align: 'center', sortable: 'custom' },
{ label: '主观题平均分', prop: 'low', align: 'center', sortable: 'custom' },
{ label: '主观题最高分', prop: 'title_num', align: 'center', sortable: 'custom' },
{ label: '主观题最低分', prop: 'title_percent', align: 'center', sortable: 'custom' }
],
data: [
{
class_name: '1w1e'
}
{ label: '平均分', prop: 'total_average', align: 'center', sortable: 'custom' },
{ label: '客观题平均分', prop: 'objective_average', align: 'center', sortable: 'custom' },
{ label: '客观题最高分', prop: 'objective_max', align: 'center', sortable: 'custom' },
{ label: '客观题最低分', prop: 'objective_min', align: 'center', sortable: 'custom' },
{ label: '主观题平均分', prop: 'subjective_average', align: 'center', sortable: 'custom' },
{ label: '主观题最高分', prop: 'subjective_max', align: 'center', sortable: 'custom' },
{ label: '主观题最低分', prop: 'subjective_min', align: 'center', sortable: 'custom' }
]
}
}
},
mounted() {},
mounted() {
console.log(this.type, '123dfs')
},
methods: {
toPersonal(row) {
this.$router.push({
path: '/teacher/data/exam/PersonalList',
query: {
row: row
class_id: row.class_id,
params: {
course_id: this.course_id,
examination_id: this.examination_id,
chapter_id: this.chapter_id,
type: this.type
}
}
})
},
sortChange(columns) {
console.log(columns, '123')
if (columns.order === 'ascending') {
this.tableOptions.remote.params.sort = columns.prop
this.$parent.$parent.$parent.$parent.getClassList()
return columns.prop
} else {
columns.prop = '-' + columns.prop
this.tableOptions.remote.params.sort = columns.prop
this.$parent.$parent.$parent.$parent.getClassList()
}
this.$refs.list.refetch()
}
}
}
</script>
<style lang="scss" scoped>
.paper-title {
text-align: center;
line-height: 27px;
width: 27px;
height: 27px;
// background: #E3EAFF;
color: #606266;
border-radius: 50%;
margin: 0 auto;
&.active1 {
color: #6c83ce;
background: #e3eaff;
}
&.active2 {
color: #8fb87a;
background: #ebfce2;
}
&.active3 {
color: #d96685;
background: #ffeaef;
}
}
::v-deep {
.el-table {
th {
padding: 0;
}
td {
padding: 0;
height: 41px;
}
}
}
</style>
......@@ -97,7 +97,7 @@ export default {
mounted() {
this.initEchart()
this.initCorrectRate()
console.log(this.dataInfo.questions_info_2, '12')
// console.log(this.dataInfo.questions_info_2, '12')
},
methods: {
initEchart() {
......@@ -117,7 +117,7 @@ export default {
},
initCorrectRate() {
this.correctRate = this.dataInfo.questions_info_2.reduce((a, b) => ({ ...a, [b.type]: b }), {})
console.log(this.correctRate, '=123')
// console.log(this.correctRate, '=123')
}
}
}
......
<template>
<app-list v-bind="tableOptions" ref="list">
<app-list v-bind="tableOptions" ref="list" @sort-change="sortChange">
<template v-slot:paper_title="{ row }">
<div :class="`paper-title active${row.paper_title}`">{{ row.paper_title }}</div>
</template>
......@@ -35,8 +35,8 @@ export default {
{ label: '排名', slots: 'paper_title', prop: 'paper_title', align: 'center' },
{ label: '姓名', prop: 'personal_name', align: 'center' },
{ label: '客观题', prop: 'subjective', align: 'center', sortable: 'custom', minWidth: 100 },
{ label: '主观题', prop: 'objective', align: 'center', sortable: true, minWidth: 100 },
{ label: '总分', prop: 'score', align: 'center', sortable: true },
{ label: '主观题', prop: 'objective', align: 'center', sortable: 'custom', minWidth: 100 },
{ label: '总分', prop: 'score', align: 'center', sortable: 'custom' },
{ label: '操作', slots: 'table_operate', align: 'center' }
]
}
......@@ -64,12 +64,12 @@ export default {
// 根据首次缴费时间排序
sortChange(columns) {
if (columns.order === 'ascending') {
this.tableOptions.remote.params.sort = columns.prop
this.$parent.$parent.$parent.$parent.getScoreRanking()
return columns.prop
} else {
columns.prop = '-' + columns.prop
this.tableOptions.remote.params.sort = columns.prop
this.$parent.$parent.$parent.$parent.getScoreRanking()
}
this.$refs.list.refetch()
}
}
}
......
......@@ -12,16 +12,16 @@
>
</div>
<el-tabs v-model="tabActive" @tab-click="handleClick">
<el-tab-pane label="已完成" name="finished">
<el-tab-pane :label="`已完成${scoreRanking.checked_count}`" name="finished">
<RankingAll :tabActive="tabActive" :scoreRanking="scoreRanking" />
</el-tab-pane>
<el-tab-pane label="待评价" name="toEvaluate" lazy>
<el-tab-pane :label="`已完成${scoreRanking.commit_count}`" name="toEvaluate" lazy>
<RankingAll :tabActive="tabActive" :scoreRanking="scoreRanking" />
</el-tab-pane>
<el-tab-pane label="未作答" name="noAnswer" lazy>
<el-tab-pane :label="`未作答${scoreRanking.no_sheet_count}`" name="noAnswer" lazy>
<RankingAll :scoreRanking="scoreRanking" />
</el-tab-pane>
<el-tab-pane label="待提交" name="toSubmit" lazy>
<el-tab-pane :label="`未提交${scoreRanking.cache_count}`" name="toSubmit" lazy>
<RankingAll :scoreRanking="scoreRanking" />
</el-tab-pane>
</el-tabs>
......@@ -50,7 +50,11 @@ export default {
type: String,
default: ''
},
dataInfo: {}
dataInfo: {},
classValue: {
type: String,
default: ''
}
},
data() {
return {
......@@ -81,7 +85,8 @@ export default {
examination_id: this.examination_id,
chapter_id: this.chapter_id,
type: this.type,
status: this.status
status: this.status,
class_id: this.classValue
}
getScoreRanking(params).then(res => {
this.scoreRanking = res.data
......
<template>
<el-card style="margin-right: -20px; height: 650px">
<div slot="header" class="clearfix">
<div slot="header" class="clearfix" style="position: relative">
<h1 style="color: #333; font-size: 16px; border-left: 3px solid #aa1941; padding-left: 7px">
<span style="color: #c01540" v-show="dataInfo == 0">*</span>题目数据
</h1>
<el-select
v-model="value"
placeholder="全部题型"
@change="changeSeclect"
style="position: absolute; right: 60px; top: -5px"
>
<el-option label="单选题" :value="1"></el-option>
<el-option label="多选题" :value="2"></el-option>
<el-option label="实操题" :value="7"></el-option>
<el-option label="案例题" :value="5"></el-option>
<el-option label="情景题" :value="8"></el-option>
<el-option label="判断题" :value="6"></el-option>
<el-option label="问答题" :value="3"></el-option>
</el-select>
<el-button
type="text"
style="font-size: 16px; color: #aa1941; float: right; margin-top: -30px"
......@@ -11,7 +25,7 @@
>导出</el-button
>
</div>
<app-list v-bind="tableOptions" ref="list"></app-list>
<app-list v-bind="tableOptions" ref="list" @sort-change="sortChange"></app-list>
</el-card>
</template>
......@@ -20,6 +34,7 @@ import { getTitleList, exportTitleList } from '../api'
export default {
data() {
return {
value: 1,
conditionList: {
examList: [],
courseList: []
......@@ -43,42 +58,76 @@ export default {
type: String,
default: ''
},
dataInfo: {}
dataInfo: {},
classValue: {
type: String,
default: ''
}
},
computed: {
// 列表配置
tableOptions() {
return {
remote: {
beforeRequest: this.beforeRequest,
httpRequest: getTitleList,
params: {
type: this.type,
course_id: this.course_id,
examination_id: this.examination_id,
chapter_id: this.chapter_id
chapter_id: this.chapter_id,
question_type: this.value,
class_id: this.classValue
}
},
columns: [
{ label: '排序', prop: 'ranking', align: 'center' },
{ label: '题干简述', prop: 'title', align: 'center' },
{ label: '题型', prop: 'type', align: 'center' },
{ label: '正确率', prop: 'rate', align: 'center' },
{
label: '题型',
prop: 'type',
align: 'center',
computed({ row }) {
if (row.type === 1) {
return '单选题'
} else if (row.type === 2) {
return '多选题'
} else if (row.type === 3) {
return '问答题'
} else if (row.type === 5) {
return '案例题'
} else if (row.type === 6) {
return '判断题'
} else if (row.type === 7) {
return '实操题'
} else if (row.type === 8) {
return '情景题'
}
}
},
{ label: '正确率', prop: 'rate', align: 'center', sortable: 'custom' },
{ label: '总分', prop: 'total_score', align: 'center' },
{ label: '平均得分', prop: 'average', align: 'center' }
{ label: '平均得分', prop: 'average', align: 'center', sortable: 'custom' }
]
}
}
},
mounted() {
console.log(this.type, 'type')
},
methods: {
beforeRequest(params, isReset) {
params.question_type = this.value
params.class_id = this.classValue
return params
},
changeSeclect() {
this.$refs.list.refetch()
},
exportTitleData() {
const params = {
type: this.type,
course_id: this.course_id,
examination_id: this.examination_id,
download: 'true'
download: 'true',
question_type: this.value
}
exportTitleList(params).then(r => {
const content = r
......@@ -94,6 +143,16 @@ export default {
document.body.removeChild(elink)
}
})
},
sortChange(columns) {
console.log(columns, '123')
if (columns.order === 'ascending') {
this.tableOptions.remote.params.sort = columns.prop
} else {
columns.prop = '-' + columns.prop
this.tableOptions.remote.params.sort = columns.prop
}
this.$refs.list.refetch()
}
}
}
......
......@@ -3,16 +3,43 @@
<div style="font-size: 32px; margin-bottom: 15px">测试班级一</div>
<app-card>
<h1 class="title" style="font-size: 28px">班级排名</h1>
<el-button type="text" style="float: right; margin-top: -40px">导出</el-button>
<el-button type="text" style="float: right; margin-top: -40px" @click="exportClassList">导出</el-button>
<el-tabs v-model="tabActive" style="margin-top: 30px" @tab-click="handleClick">
<el-tab-pane label="已结束" name="finished">
<Finished />
<el-tab-pane :label="`已结束${classList.checked_count}`" name="finished">
<Finished
:classList="classList"
:course_id="$route.query.course_id"
:examination_id="$route.query.examination_id"
:chapter_id="$route.query.chapter_id"
:type="$route.query.type"
/>
</el-tab-pane>
<el-tab-pane label="待评价" name="toEvaluate" lazy>
<Finished />
<el-tab-pane :label="`待评价${classList.commit_count}`" name="toEvaluate" lazy>
<Finished
:classList="classList"
:course_id="$route.query.course_id"
:examination_id="$route.query.examination_id"
:chapter_id="$route.query.chapter_id"
:type="$route.query.type"
/>
</el-tab-pane>
<el-tab-pane label="未作答" name="noAnswer" lazy>
<Finished />
<el-tab-pane :label="`未作答${classList.no_sheet_count}`" name="noAnswer" lazy>
<Finished
:classList="classList"
:course_id="$route.query.course_id"
:examination_id="$route.query.examination_id"
:chapter_id="$route.query.chapter_id"
:type="$route.query.type"
/>
</el-tab-pane>
<el-tab-pane :label="`未提交${classList.cache_count}`" name="toSubmit" lazy>
<Finished
:classList="classList"
:course_id="$route.query.course_id"
:examination_id="$route.query.examination_id"
:chapter_id="$route.query.chapter_id"
:type="$route.query.type"
/>
</el-tab-pane>
</el-tabs>
</app-card>
......@@ -21,26 +48,83 @@
<script>
import Finished from '../components/Finished.vue'
import { getClassList, exportClassList } from '../api'
export default {
components: { Finished },
data() {
return {
tabActive: 'finished'
tabActive: 'finished',
classList: {}
}
},
computed: {
status() {
if (this.tabActive === 'finished') {
return '2'
} else if (this.tabActive === 'toEvaluate') {
return '1'
} else if (this.tabActive === 'noAnswer') {
return '100'
} else {
return '0'
}
}
},
created() {
// 已结束网络请求
this.getClassList()
console.log(this.$route.query.type, 'type123')
},
methods: {
getClassList() {
const params = {
course_id: this.$route.query.course_id,
examination_id: this.$route.query.examination_id,
chapter_id: this.$route.query.chapter_id,
type: this.$route.query.type,
status: this.status
}
console.log(this.$route.query.type, 'type')
getClassList(params).then(res => {
this.classList = res.data
})
},
handleClick(tab, event) {
// console.log(tab, event)
console.log(tab, event)
if (tab.index === 1) {
// 待评价
alert('111')
} else {
this.getClassList()
} else if (tab.index === 2) {
// 未作答
alert('222')
this.getClassList()
} else {
this.getClassList()
}
},
// 导出
exportClassList() {
const params = {
type: this.$route.query.type,
course_id: this.$route.query.course_id,
examination_id: this.$route.query.examination_id,
chapter_id: this.$route.query.chapter_id,
download: 'true',
status: this.status
}
exportClassList(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)
}
})
}
}
}
......
......@@ -76,29 +76,7 @@ export default {
components: { VueHtml2pdf, ExamInfo, Submission, Score, ScoreRanking, TitleData, Result, ScoreRange, QuestionType },
data() {
return {
options: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎'
},
{
value: '选项4',
label: '龙须面'
},
{
value: '选项5',
label: '北京烤鸭'
}
],
value: '',
value: '001',
dataInfo: {
need_check_num: ''
}
......@@ -109,12 +87,18 @@ export default {
this.getExamDataInfo()
},
methods: {
refreshPage() {
this.getExamDataInfo()
this.$refs.scoreRankingRef.getScoreRanking()
this.$refs.titleDataRef.getTitleList()
},
getExamDataInfo() {
const params = {
course_id: this.$route.query.course_id,
examination_id: this.$route.query.examination_id,
chapter_id: this.$route.query.chapter_id,
type: this.$route.query.type
type: this.$route.query.type,
class_id: this.value
}
getExamDataInfo(params).then(res => {
this.dataInfo = res.data
......
......@@ -95,7 +95,9 @@ export default {
this.$router.push({
path: '/teacher/data/exam/class',
query: {
row: row
course_id: row.course_id,
examination_id: row.examination_id,
type: 'examination'
}
})
}
......
<template>
<app-container>
<app-list v-bind="tableOptions" ref="list">
<app-list v-bind="tableOptions" ref="list" @sort-change="sortChange">
<template #header-aside>
<el-button type="text" size="mini" @click="toExamData(row)">导出</el-button>
</template>
......@@ -13,6 +13,7 @@
</template>
<script>
import { getClassDetail } from '../api'
export default {
data() {
return {}
......@@ -21,25 +22,33 @@ export default {
// 列表配置
tableOptions() {
return {
remote: {},
filters: [{ type: 'input', prop: 'paper_title', placeholder: '学生姓名', label: '学生姓名' }],
remote: {
httpRequest: getClassDetail,
params: {
type: this.$route.query.params.type,
course_id: this.$route.query.params.course_id,
examination_id: this.$route.query.params.examination_id,
chapter_id: this.$route.query.params.chapter_id,
class_id: this.$route.query.class_id,
status: this.$route.query.params.status
}
},
filters: [{ type: 'input', prop: 'personal_name', placeholder: '学生姓名', label: '学生姓名' }],
columns: [
{ label: '学生姓名', prop: 'paper_title', slots: 'table-name' },
{ label: '总得分', prop: 'class_name', align: 'center', sortable: true },
{ label: '主观题得分', prop: 'cankao_num', align: 'center', sortable: true },
{ label: '客观题得分', prop: 'ewfr', align: 'center', sortable: true },
{ label: '完成时间', prop: 'average_num', align: 'center', sortable: true },
{ label: '状态', prop: 'top', align: 'center' },
{ label: '学生姓名', prop: 'personal_name', slots: 'table-name' },
{ label: '总得分', prop: 'score', align: 'center', sortable: 'custom' },
{ label: '主观题得分', prop: 'subjective', align: 'center', sortable: 'custom' },
{ label: '客观题得分', prop: 'objective', align: 'center', sortable: 'custom' },
{ label: '完成时间', prop: 'duration', align: 'center', sortable: 'custom' },
{ label: '状态', prop: 'status', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center' }
],
data: [
{
class_name: '1w1e'
}
]
}
}
},
mounted() {
console.log(this.$route.query.type, 'fughdkugh')
},
methods: {
toExamData(row) {
// this.$router.push({
......@@ -48,6 +57,16 @@ export default {
// row: row
// }
// })
},
sortChange(columns) {
console.log(columns, '123')
if (columns.order === 'ascending') {
this.tableOptions.remote.params.sort = columns.prop
} else {
columns.prop = '-' + columns.prop
this.tableOptions.remote.params.sort = columns.prop
}
this.$refs.list.refetch()
}
}
}
......
......@@ -4,8 +4,8 @@ const routes = [
component: () => import('@/components/layout/index.vue'),
children: [
{ path: '/teacher/data/test', component: () => import('./views/List.vue') },
{ path: '/teacher/data/classList', component: () => import('./views/ClassList.vue') },
{ path: '/teacher/data/person', component: () => import('./views/PersonalList.vue') },
{ path: '/teacher/data/classList', component: () => import('../exam/views/ClassList.vue') },
{ path: '/teacher/data/person', component: () => import('../exam/views/PersonalList.vue') },
{ path: '/teacher/data/testData', component: () => import('../exam/views/ExamData.vue') }
]
}
......
<template>
<div>
<div style="font-size: 32px; margin-bottom: 15px">测试班级一</div>
<app-card>
<h1 class="title" style="font-size: 28px">班级排名</h1>
<el-button type="text" style="float: right; margin-top: -40px">导出</el-button>
<el-tabs v-model="tabActive" style="margin-top: 30px">
<el-tab-pane label="已结束" name="baseInfo">
<Finished />
</el-tab-pane>
<el-tab-pane label="待评价" name="contacts" lazy>
<Finished />
</el-tab-pane>
<el-tab-pane label="未作答" name="project" lazy>
<Finished />
</el-tab-pane>
</el-tabs>
</app-card>
</div>
</template>
<script>
import Finished from '../components/Finished.vue'
export default {
components: { Finished },
data() {
return {
tabActive: 'baseInfo'
}
}
}
</script>
......@@ -81,7 +81,10 @@ export default {
this.$router.push({
path: '/teacher/data/classList',
query: {
row: row
course_id: row.course_id,
chapter_id: row.chapter_id,
type: 'chapter'
// examination_name: row.examination_name
}
})
},
......
<template>
<app-container>
<app-list v-bind="tableOptions" ref="list">
<template #header-aside>
<el-button type="text" style="margin-top: 5px; font-size: 24px">导出</el-button>
</template>
<!-- 操作 -->
<template v-slot:table-operate="{ row }">
<el-button type="text" size="mini" @click="toDetail(row)">查看</el-button>
</template>
</app-list>
</app-container>
</template>
<script>
export default {
data() {
return {}
},
computed: {
// 列表配置
tableOptions() {
return {
remote: {},
filters: [{ type: 'input', prop: 'class_name', placeholder: '学生姓名', label: '学生姓名' }],
columns: [
{ label: '学生姓名', prop: 'paper_title', align: 'center' },
{ label: '总得分', prop: 'class_name', align: 'center' },
{ label: '主观题得分', prop: 'commit_num', align: 'center' },
{ label: '客观题得分', prop: 'qwrw4t', align: 'center' },
{ label: '完成时间', prop: 'etwtw', align: 'center' },
{ label: '状态', prop: 'sdgerte', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center' }
],
data: [{ paper_title: '99' }]
}
}
},
methods: {
toDetail(row) {
// this.$router.push({
// path:'',
// query:{
// row:row
// }
// })
}
}
}
</script>
......@@ -14,20 +14,20 @@ const httpRequest = axios.create({
// 请求拦截
httpRequest.interceptors.request.use(
function(config) {
function (config) {
if (config.headers['Content-Type'] === 'application/x-www-form-urlencoded') {
config.data = qs.stringify(config.data)
}
return config
},
function(error) {
function (error) {
return Promise.reject(error)
}
)
// 响应拦截
httpRequest.interceptors.response.use(
function(response) {
function (response) {
const { data } = response
if (data.code) {
Message.error(data.msg || data.message)
......@@ -35,7 +35,7 @@ httpRequest.interceptors.response.use(
}
return data
},
function(error) {
function (error) {
if (error.response) {
const { status, message, code } = error.response.data
// 未登录
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论