提交 a4806469 authored 作者: lihuihui's avatar lihuihui

Merge branch 'vite' of https://gitlab.ezijing.com/ezijing/x-learn into vite

......@@ -162,7 +162,7 @@ export default {
.then(res => {
const { data = {} } = res || {}
this.page.total = parseInt(data.total || 0)
this.dataList = callback ? callback(data) : data
this.dataList = callback ? callback(data) : data.list
})
.catch(() => {
this.page.total = 0
......
......@@ -5,3 +5,27 @@ import httpRequest from '@/utils/axios'
export function getExamReivewList(params) {
return httpRequest.get('/api/zy/v3-teacher/examination/examination-list', { params })
}
/**
* 获取课程列表
*/
export function getCourseNameList(params) {
return httpRequest.get('/api/zy/v3-teacher/course/names', { params })
}
/**
* 获取课程列表
*/
export function getCourseList(params) {
return httpRequest.get('/api/zy/v3-teacher/course/list', { params })
}
/**
* 获取班级列表
*/
export function getClassList(params) {
return httpRequest.get(`/api/zy/v3-teacher/course/classes/${params.course_id}`, { params })
}
/**
* 获取学员列表
*/
export function getStuList(params) {
return httpRequest.get(`/api/zy/v3-teacher/course/students/${params.course_id}`, { params })
}
......@@ -4,9 +4,9 @@ const routes = [
component: () => import('@/components/layout/index.vue'),
children: [
{ path: '/teacher/data/course', component: () => import('./views/List.vue') },
{ path: '/teacher/data/classDatas', component: () => import('./views/ClassList.vue') },
{ path: '/teacher/data/personal', component: () => import('./views/PersonalList.vue') },
{ path: '/teacher/data/detail', component: () => import('./views/CourseProcessList.vue') }
{ path: '/teacher/data/course/classDatas', component: () => import('./views/ClassList.vue') },
{ path: '/teacher/data/course/personal', component: () => import('./views/PersonalList.vue') },
{ path: '/teacher/data/course/detail', component: () => import('./views/CourseProcessList.vue') }
]
}
]
......
......@@ -9,25 +9,34 @@
</template>
<script>
import { getClassList } from '../api'
export default {
computed: {
id() {
return this.$route.query.id
},
// 列表配置
tableOptions() {
return {
remote: {},
remote: {
httpRequest: getClassList,
params: {
course_id: this.id,
class_name: '',
id: ''
}
},
filters: [{ type: 'input', prop: 'class_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: 'wryrty', align: 'center', sortable: true },
{ label: '累计学习时长', prop: 'time', align: 'center', sortable: true },
{ label: '人均学习时长', prop: 'average', align: 'center', sortable: true }
],
data: [{ class_name: 'weq' }]
{ label: '班级名称', prop: 'class_name', slots: 'table-name' },
{ 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 }
]
}
}
},
methods: {}
}
}
</script>
......@@ -2,8 +2,8 @@
<app-container>
<app-list v-bind="tableOptions" ref="list">
<!-- 操作 -->
<template v-slot:table-img="{row}">
<img :src="row.tableImg" alt="" />
<template v-slot:table-img="{ row }">
<img :src="row.course_picture" alt="" style="width: 100px; height: 100px" />
</template>
<template v-slot:table-operate="{ row }">
<el-button type="text" size="mini" @click="toClassData(row)">班级数据</el-button>
......@@ -14,11 +14,12 @@
</template>
<script>
import { getCourseNameList, getCourseList } from '../api'
export default {
data() {
return {
conditionList: {
courseList: []
list: []
}
}
},
......@@ -27,49 +28,59 @@ export default {
tableOptions() {
return {
remote: {
httpRequest: getCourseList,
params: {
course_name: '',
id: ''
}
},
filters: [
{
type: 'select',
prop: 'class_name',
prop: 'id',
placeholder: '课程名称',
label: '课程名称',
options: this.conditionList.courseList,
options: this.conditionList.list,
labelKey: 'course_name',
valueKey: 'course_id',
filterable: true,
remote: true
valueKey: 'id',
filterable: true
}
],
columns: [
{ label: '图片', prop: 'tableImg', slots: 'table-img' },
{ label: '课程名称', prop: 'class_name', align: 'center' },
{ label: '人均学习时长', prop: 'cankao_num', align: 'center', sortable: true },
{ label: '课程完成率', prop: 'ewt4t43', align: 'center', sortable: true },
{ 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: '操作', align: 'center', slots: 'table-operate' }
],
data: [
{
class_name: '1'
}
]
}
}
},
created() {
this.getCourseNameList()
},
methods: {
// 获取课程名称
getCourseNameList() {
getCourseNameList().then(res => {
this.conditionList = res.data
console.log(res, 'fdd')
})
},
toClassData(row) {
console.log(row)
this.$router.push({
path: '/teacher/data/classDatas',
path: '/teacher/data/course/classDatas',
query: {
row: row
id: row.id
}
})
},
toPersonal(row) {
this.$router.push({
path: '/teacher/data/personal',
path: '/teacher/data/course/personal',
query: {
row: row
id: row.id
}
})
}
......
......@@ -13,34 +13,41 @@
</template>
<script>
import { getStuList } from '../api'
export default {
data() {
return {}
},
computed: {
id() {
return this.$route.query.id
},
// 列表配置
tableOptions() {
return {
remote: {},
filters: [{ type: 'input', prop: 'class_name', placeholder: '学生姓名', label: '学生姓名' }],
remote: {
httpRequest: getStuList,
params: {
course_id: this.id,
personal_name: '',
id: ''
}
},
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: 'commit_num', align: 'center', sortable: true },
{ label: '本课学习时长', prop: 'etert', align: 'center', sortable: true },
{ label: '本课完成率', prop: 'grthr', align: 'center', sortable: true },
{ 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: '操作', slots: 'table-operate', align: 'center' }
],
data: [{ class_name: 'dfwjehf' }]
]
}
}
},
methods: {
toPersonDetail(row) {
this.$router.push({
path: '/teacher/data/detail',
path: '/teacher/data/course/detail',
query: {
row: row
id: row.id
}
})
}
......
......@@ -31,7 +31,7 @@ export default {
type: 'shadow'
},
formatter: function (data) {
const res = `<div>${data[0].axisValue}</div><div>${data[0].value}%</div>`
const res = `<span>${data[0].axisValue}</span>&nbsp<span>${data[0].value}%</span>`
return res
}
},
......
......@@ -21,7 +21,7 @@ export default {
tooltip: {
trigger: 'item',
formatter: function (params) {
const str = params.data.name + '<br/>' + params.data.value + '<br/>' + params.percent + '%'
const str = params.data.name + '&nbsp' + params.data.value + '人' + '&nbsp' + params.percent + '%'
return str
}
},
......
......@@ -3,7 +3,12 @@
<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>
<el-button type="text" style="font-size: 16px; color: #aa1941; float: right; margin-top: -35px" @click="isSetScoreRange = true">设置</el-button>
<el-button
type="text"
style="font-size: 16px; color: #aa1941; float: right; margin-top: -35px"
@click="isSetScoreRange = true"
>设置</el-button
>
</div>
<div style="height: 400px; width: 90%; margin: 0 auto">
<div id="score" style="width: 100%; height: 90%"></div>
......@@ -36,7 +41,7 @@ export default {
tooltip: {
trigger: 'item',
formatter: function (params) {
const str = params.data.name + '<br/>' + params.data.value + '人'
const str = params.data.name + '&nbsp' + params.data.value + '人' + '&nbsp' + params.percent + '%'
return str
}
},
......@@ -50,7 +55,7 @@ export default {
},
series: [
{
name: 'Access From',
// name: 'Access From',
type: 'pie',
radius: ['50%', '70%'],
avoidLabelOverlap: false,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论