提交 4b318dfd authored 作者: matian's avatar matian

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

上级 940bf31c
...@@ -162,7 +162,7 @@ export default { ...@@ -162,7 +162,7 @@ export default {
.then(res => { .then(res => {
const { data = {} } = res || {} const { data = {} } = res || {}
this.page.total = parseInt(data.total || 0) this.page.total = parseInt(data.total || 0)
this.dataList = callback ? callback(data) : data this.dataList = callback ? callback(data) : data.list
}) })
.catch(() => { .catch(() => {
this.page.total = 0 this.page.total = 0
......
...@@ -5,3 +5,21 @@ import httpRequest from '@/utils/axios' ...@@ -5,3 +5,21 @@ import httpRequest from '@/utils/axios'
export function getExamReivewList(params) { export function getExamReivewList(params) {
return httpRequest.get('/api/zy/v3-teacher/examination/examination-list', { 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('/v3-teacher/course/classes/{course_id}', { params })
}
...@@ -9,12 +9,16 @@ ...@@ -9,12 +9,16 @@
</template> </template>
<script> <script>
import { getClassList } from '../api'
export default { export default {
computed: { computed: {
// 列表配置 // 列表配置
tableOptions() { tableOptions() {
return { return {
remote: {}, remote: {
httpRequest: getClassList,
params: {}
},
filters: [{ type: 'input', prop: 'class_name', placeholder: '班级名称', label: '班级名称' }], filters: [{ type: 'input', prop: 'class_name', placeholder: '班级名称', label: '班级名称' }],
columns: [ columns: [
{ label: '班级名称', prop: 'paper_title', slots: 'table-name' }, { label: '班级名称', prop: 'paper_title', slots: 'table-name' },
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<app-container> <app-container>
<app-list v-bind="tableOptions" ref="list"> <app-list v-bind="tableOptions" ref="list">
<!-- 操作 --> <!-- 操作 -->
<template v-slot:table-img="{row}"> <template v-slot:table-img="{ row }">
<img :src="row.tableImg" alt="" /> <img :src="row.course_picture" alt="" style="width: 100px; height: 100px" />
</template> </template>
<template v-slot:table-operate="{ row }"> <template v-slot:table-operate="{ row }">
<el-button type="text" size="mini" @click="toClassData(row)">班级数据</el-button> <el-button type="text" size="mini" @click="toClassData(row)">班级数据</el-button>
...@@ -14,11 +14,12 @@ ...@@ -14,11 +14,12 @@
</template> </template>
<script> <script>
import { getCourseNameList, getCourseList } from '../api'
export default { export default {
data() { data() {
return { return {
conditionList: { conditionList: {
courseList: [] list: []
} }
} }
}, },
...@@ -27,36 +28,45 @@ export default { ...@@ -27,36 +28,45 @@ export default {
tableOptions() { tableOptions() {
return { return {
remote: { remote: {
httpRequest: getCourseList,
params: {
course_name: '',
id: ''
}
}, },
filters: [ filters: [
{ {
type: 'select', type: 'select',
prop: 'class_name', prop: 'id',
placeholder: '课程名称', placeholder: '课程名称',
label: '课程名称', label: '课程名称',
options: this.conditionList.courseList, options: this.conditionList.list,
labelKey: 'course_name', labelKey: 'course_name',
valueKey: 'course_id', valueKey: 'id',
filterable: true, filterable: true
remote: true
} }
], ],
columns: [ columns: [
{ label: '图片', prop: 'tableImg', slots: 'table-img' }, { label: '图片', prop: 'course_picture', slots: 'table-img' },
{ label: '课程名称', prop: 'class_name', align: 'center' }, { label: '课程名称', prop: 'course_name', align: 'center' },
{ label: '人均学习时长', prop: 'cankao_num', align: 'center', sortable: true }, { label: '人均学习时长', prop: 'course_avg_study_len', align: 'center', sortable: true },
{ label: '课程完成率', prop: 'ewt4t43', align: 'center', sortable: true }, { label: '课程完成率', prop: 'course_finish_progress', align: 'center', sortable: true },
{ label: '操作', align: 'center', slots: 'table-operate' } { label: '操作', align: 'center', slots: 'table-operate' }
],
data: [
{
class_name: '1'
}
] ]
} }
} }
}, },
created() {
this.getCourseNameList()
},
methods: { methods: {
// 获取课程名称
getCourseNameList() {
getCourseNameList().then(res => {
this.conditionList = res.data
console.log(res, 'fdd')
})
},
toClassData(row) { toClassData(row) {
this.$router.push({ this.$router.push({
path: '/teacher/data/classDatas', path: '/teacher/data/classDatas',
......
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
type: 'shadow' type: 'shadow'
}, },
formatter: function (data) { 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 return res
} }
}, },
......
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: function (params) { 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 return str
} }
}, },
......
...@@ -3,7 +3,12 @@ ...@@ -3,7 +3,12 @@
<el-card class="box-card" style="height: 450px"> <el-card class="box-card" style="height: 450px">
<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> <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>
<div style="height: 400px; width: 90%; margin: 0 auto"> <div style="height: 400px; width: 90%; margin: 0 auto">
<div id="score" style="width: 100%; height: 90%"></div> <div id="score" style="width: 100%; height: 90%"></div>
...@@ -36,7 +41,7 @@ export default { ...@@ -36,7 +41,7 @@ export default {
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: function (params) { 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 return str
} }
}, },
...@@ -50,7 +55,7 @@ export default { ...@@ -50,7 +55,7 @@ export default {
}, },
series: [ series: [
{ {
name: 'Access From', // name: 'Access From',
type: 'pie', type: 'pie',
radius: ['50%', '70%'], radius: ['50%', '70%'],
avoidLabelOverlap: false, avoidLabelOverlap: false,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论