diff --git a/src/api/course/courseware.js b/src/api/course/courseware.js index e69de29..9b07dec 100644 --- a/src/api/course/courseware.js +++ b/src/api/course/courseware.js @@ -0,0 +1,33 @@ +import request from '@/utils/request' + +const coursewareApi = { + add: '/courseManagement/xmCourseCourseware/addOrUpdate', +// get: '/courseManagement/course/details', +// update: 'sys/menu/update', + del: 'courseManagement/xmCourseCourseware/delete', +// updateStatus: 'sys/menu/updateStatus', +// list: '/courseManagement/course/listPage', +// coursewareList:'/courseManagement/course/courseware/details', +// questionList:'/courseManagement/course/questionList' + +} + + + +//删除课件 +export function deleteCourseware (params) { + return request({ + url: coursewareApi.del, + method: 'delete', + params: params + }) + } + + // 课件新增 + export function coursewareAdd (params) { + return request({ + url: coursewareApi.add, + method: 'post', + data: params + }) + } \ No newline at end of file diff --git a/src/views/course/CourseList.vue b/src/views/course/CourseList.vue index bff806c..be21017 100644 --- a/src/views/course/CourseList.vue +++ b/src/views/course/CourseList.vue @@ -13,6 +13,8 @@ 课件 + 课件预览 + 删除 @@ -46,7 +48,7 @@ export default { { title: '课程名称', width: 'auto', align: 'center', dataIndex: 'courseName', key: 'courseName' }, { title: '课时/分', width: '160px', align: 'center', dataIndex: 'hour', key: 'hour' }, { title: '数量', width: '160px', align: 'center', dataIndex: 'questionCount', key: 'questionCount' }, - { title: '操作', key: 'operation', width: '200px', align: 'center', scopedSlots: { customRender: 'action' } } + { title: '操作', key: 'operation', width: '300px', align: 'center', scopedSlots: { customRender: 'action' } } ], } }, @@ -70,7 +72,6 @@ export default { //課程新增 courseAdd(){ - console.log("OK你已經死亡!"); this.$router.push({ path : '/course/CourseAdd' , query : {}}) }, diff --git a/src/views/course/CoursewareList.vue b/src/views/course/CoursewareList.vue index d8485d1..3490a3a 100644 --- a/src/views/course/CoursewareList.vue +++ b/src/views/course/CoursewareList.vue @@ -1,6 +1,11 @@