From 3386f62590f42d760059dcbc6c236a6da7f78ffc Mon Sep 17 00:00:00 2001 From: 18571350067 Date: Wed, 25 Aug 2021 15:34:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/router.config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config/router.config.js b/src/config/router.config.js index 43424b5..24474fe 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -100,13 +100,13 @@ export const asyncRouterMap = [ }, // 课程管理 { - path: '/course', - redirect: '/course/courseList', + path: '/courseManagement', + redirect: '/course/courseManagement/courseList', component: RouteView, meta: { title: '课程管理', icon: bxAnaalyse, permission: ['from'] }, children: [ { - path: '/course/courseList', + path: '/course/courseManagement/courseList', name: 'courseList', component: () => import('@/views/course/CourseList'), meta: { title: '课程项目', keepAlive: true, permission: ['form'] } From ece8691b16388fa2875399b289928bcc902c3140 Mon Sep 17 00:00:00 2001 From: 18571350067 Date: Wed, 25 Aug 2021 15:45:24 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/course/course.js | 20 +- src/api/course/customCourse.js | 53 ++++++ src/config/router.config.js | 16 +- src/views/course/CourseList.vue | 150 +++------------ src/views/course/courseDetail.vue | 27 +++ src/views/course/customCourseList.vue | 265 ++++++++++++++++++++++++++ 6 files changed, 401 insertions(+), 130 deletions(-) create mode 100644 src/api/course/customCourse.js create mode 100644 src/views/course/courseDetail.vue create mode 100644 src/views/course/customCourseList.vue diff --git a/src/api/course/course.js b/src/api/course/course.js index 161d7ed..1c6d574 100644 --- a/src/api/course/course.js +++ b/src/api/course/course.js @@ -1,12 +1,12 @@ import request from '@/utils/request' -const projectApi = { +const courseApi = { // add: 'sys/menu/add', -// get: 'sys/menu/get', + get: '/courseManagement/course/details', // update: 'sys/menu/update', // del: 'sys/menu/delete', // updateStatus: 'sys/menu/updateStatus', - list: 'course/pageList' + list: '/courseManagement/course/listPage' } // export function menuAdd (params) { @@ -37,6 +37,8 @@ const projectApi = { // data: params // }) // } + +// 查询课程列表 export function getCourseList (params) { return request({ url: courseApi.list, @@ -44,6 +46,18 @@ export function getCourseList (params) { params: params }) } + +// 查看课程详情 +export function getCourseDetails (params) { + return request({ + url:courseApi.get, + method:'get', + params:params + }) +} + + + // export function menuUpdateStatus (params) { // return request({ // url: menuApi.updateStatus, diff --git a/src/api/course/customCourse.js b/src/api/course/customCourse.js new file mode 100644 index 0000000..b2dc4e7 --- /dev/null +++ b/src/api/course/customCourse.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +const projectApi = { +// add: 'sys/menu/add', +// get: 'sys/menu/get', +// update: 'sys/menu/update', +// del: 'sys/menu/delete', +// updateStatus: 'sys/menu/updateStatus', + list: 'courseManagement/customCourse/listPage' +} + +// export function menuAdd (params) { +// return request({ +// url: menuApi.add, +// method: 'post', +// data: params +// }) +// } +// export function menuGet (params) { +// return request({ +// url: menuApi.get, +// method: 'post', +// data: params +// }) +// } +// export function menuUpdate (params) { +// return request({ +// url: menuApi.update, +// method: 'post', +// data: params +// }) +// } +// export function menuDelete (params) { +// return request({ +// url: menuApi.del, +// method: 'post', +// data: params +// }) +// } +export function getcustomCourseList (params) { + return request({ + url: customApi.list, + method: 'get', + params: params + }) +} +// export function menuUpdateStatus (params) { +// return request({ +// url: menuApi.updateStatus, +// method: 'post', +// data: params +// }) +// } diff --git a/src/config/router.config.js b/src/config/router.config.js index 24474fe..bc54d7f 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -101,27 +101,27 @@ export const asyncRouterMap = [ // 课程管理 { path: '/courseManagement', - redirect: '/course/courseManagement/courseList', + redirect: '/courseManagement/course/courseList', component: RouteView, meta: { title: '课程管理', icon: bxAnaalyse, permission: ['from'] }, children: [ { - path: '/course/courseManagement/courseList', + path: '/courseManagement/course/courseList', name: 'courseList', component: () => import('@/views/course/CourseList'), - meta: { title: '课程项目', keepAlive: true, permission: ['form'] } + meta: { title: '系统课程', keepAlive: true, permission: ['form'] } }, { - path: '/form/step-form', - name: 'StepForm', - component: () => import('@/views/form/stepForm/StepForm'), - meta: { title: '系统推荐', keepAlive: true, permission: ['form'] } + path: '/courseManagement/customCourseList', + name: 'customCourse', + component: () => import('@/views/course/customCourseList'), + meta: { title: '自制课程', keepAlive: true, permission: ['form'] } }, { path: '/form/advanced-form', name: 'AdvanceForm', component: () => import('@/views/form/advancedForm/AdvancedForm'), - meta: { title: '终端培训', keepAlive: true, permission: ['form'] } + meta: { title: '资源库', keepAlive: true, permission: ['form'] } } ] }, diff --git a/src/views/course/CourseList.vue b/src/views/course/CourseList.vue index 61b642b..ed1966b 100644 --- a/src/views/course/CourseList.vue +++ b/src/views/course/CourseList.vue @@ -3,72 +3,11 @@
- - - + + + - - - - 全部 - 运行中 - 已结束 - 未发布 - - - - - - - - - - - - - - - - - 全部 - 培训 - 考试 - 培训-练习 - 培训-练习-考试 - - - - 删除 - 锁定 批量操作 @@ -104,29 +42,19 @@ :alert="options.alert" :rowSelection="options.rowSelection" > - - {{ index + 1 }} - - - @@ -152,52 +80,36 @@ export default { columns: [ { title: '序号', + dataIndex: 'index', width: 60, - scopedSlots: { customRender: 'serial' }, + customRender: (text, record, index) => { + return index + 1 + } }, { - title: '项目名称', - dataIndex: 'projectName', - key: 'projectName' + title: '课程编号', + dataIndex: 'id', + align: 'center', }, { - title: '时间', - dataIndex: 'description', + title:'课程名称', + dataIndex:'courseName', + align:'center' }, { - title: '人数', - dataIndex: 'callNo', - // sorter: true, - needTotal: true, - // customRender: (text) => text + ' 次', + title: '课时/分', + dataIndex: 'hour', + align:'center' }, { - title: '项目类型', - dataIndex: 'description', + title: '数量', + dataIndex: 'questionCount', + align:'center' }, - { - title: '项目状态', - dataIndex: 'description', - }, - { - title: '创建人员', - dataIndex: 'projectStatus', - }, - { - title: '创建时间', - dataIndex: 'updatedAt', - sorter: true, - }, - // { - // title: '操作', - // dataIndex: 'action', - // width: '150px', - // scopedSlots: { customRender: 'action' }, - // }, { title: '操作', key: 'operation', - width: 100, + width: 300, align: 'center', scopedSlots: { customRender: 'action' } } diff --git a/src/views/course/courseDetail.vue b/src/views/course/courseDetail.vue new file mode 100644 index 0000000..d5f01d2 --- /dev/null +++ b/src/views/course/courseDetail.vue @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/src/views/course/customCourseList.vue b/src/views/course/customCourseList.vue new file mode 100644 index 0000000..06fcab8 --- /dev/null +++ b/src/views/course/customCourseList.vue @@ -0,0 +1,265 @@ + + + + + \ No newline at end of file