diff --git a/src/views/course/CoursewareList.vue b/src/views/course/CoursewareList.vue index 8250ba2..b448cf9 100644 --- a/src/views/course/CoursewareList.vue +++ b/src/views/course/CoursewareList.vue @@ -56,9 +56,11 @@ export default { return res }) }, + courseType: ['视频','文本'], columns: [ { title: '课件名称', width: '160px', align: 'center', dataIndex: 'name', key: 'name' }, - { title: '课件时长/分', width: '160px', align: 'center', dataIndex: 'duration', key: 'duration' }, + { title: '课件时长/分', width: '160px', align: 'center', dataIndex: 'duration', key: 'duration', customRender: (text, record, index) => { if(!text) {return '-' } else {return text} }}, + { title: '类别', width: 'auto', align: 'center', dataIndex: 'type', key: 'type', customRender: (text, record, index) => { return this.courseType[Number(text) - 1] } }, { title: '课件大小(MB)', width: '160px', align: 'center', dataIndex: 'sizeStr', key: 'sizeStr' }, { title: '操作', key: 'operation', width: '200px', align: 'center', scopedSlots: { customRender: 'action' } }, ], @@ -86,7 +88,7 @@ export default { courseId: this.$route.query.id, type: record.type, types: this.$route.query.type, - ifResources:0 + ifResources: 0 }, }) },