From ec5b218c2bcde068524012d49ae41a11a96aab06 Mon Sep 17 00:00:00 2001 From: Yjhon Date: Wed, 16 Mar 2022 11:40:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E4=BB=B6=E5=88=97=E8=A1=A8=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/course/CoursewareList.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 }, }) },