课程管理更新
This commit is contained in:
parent
cb34056f4c
commit
82dce0315d
|
@ -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
|
||||||
|
})
|
||||||
|
}
|
|
@ -13,6 +13,8 @@
|
||||||
<a-divider type="vertical" />
|
<a-divider type="vertical" />
|
||||||
<a href="javascript:;" @click="courseWare(record)">课件</a>
|
<a href="javascript:;" @click="courseWare(record)">课件</a>
|
||||||
<a-divider type="vertical" />
|
<a-divider type="vertical" />
|
||||||
|
<a href="javascript:;" @click="courseWare(record)">课件预览</a>
|
||||||
|
<a-divider type="vertical" />
|
||||||
<a-popconfirm title="是否删除?" @confirm="() => del(record)">
|
<a-popconfirm title="是否删除?" @confirm="() => del(record)">
|
||||||
<a href="javascript:;">删除</a>
|
<a href="javascript:;">删除</a>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
|
@ -46,7 +48,7 @@ export default {
|
||||||
{ title: '课程名称', width: 'auto', align: 'center', dataIndex: 'courseName', key: 'courseName' },
|
{ title: '课程名称', width: 'auto', align: 'center', dataIndex: 'courseName', key: 'courseName' },
|
||||||
{ title: '课时/分', width: '160px', align: 'center', dataIndex: 'hour', key: 'hour' },
|
{ title: '课时/分', width: '160px', align: 'center', dataIndex: 'hour', key: 'hour' },
|
||||||
{ title: '数量', width: '160px', align: 'center', dataIndex: 'questionCount', key: 'questionCount' },
|
{ 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(){
|
courseAdd(){
|
||||||
console.log("OK你已經死亡!");
|
|
||||||
this.$router.push({ path : '/course/CourseAdd' , query : {}})
|
this.$router.push({ path : '/course/CourseAdd' , query : {}})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<page-header-wrapper :title="false">
|
<page-header-wrapper :title="false">
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
|
<span style="font-size : 20px; margin-left :15px">课件信息</span>
|
||||||
|
<div class="button" style="width: 100%; height: 32px; margin-bottom: 8px; margin-left: 85%;">
|
||||||
|
<a-button type="primary" @click="goback">返回</a-button>
|
||||||
|
<a-button type="primary" @click="coursewareAdd">上传课件</a-button>
|
||||||
|
</div>
|
||||||
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData">
|
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData">
|
||||||
<template slot="action" slot-scope="text, record">
|
<template slot="action" slot-scope="text, record">
|
||||||
<a href="javascript:;" @click="detail(record)">预览</a>
|
<a href="javascript:;" @click="detail(record)">预览</a>
|
||||||
|
@ -20,6 +25,8 @@
|
||||||
<script>
|
<script>
|
||||||
import { STable, SearchCom } from '@/components'
|
import { STable, SearchCom } from '@/components'
|
||||||
import { getCoursewareListByCourseId } from '@/api/course/course'
|
import { getCoursewareListByCourseId } from '@/api/course/course'
|
||||||
|
import { deleteCourseware } from '@/api/course/courseware'
|
||||||
|
import { coursewareAdd } from '@/api/course/courseware'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -36,8 +43,8 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '课程名称', width: '160px', align: 'center', dataIndex: 'name', key: 'name' },
|
{ title: '课件名称', width: '160px', align: 'center', dataIndex: 'name', key: 'name' },
|
||||||
{ title: '课程分类',width: '300px',align: 'center', dataIndex: 'coursewareClassifyId', key: 'coursewareClassifyId',},
|
{ title: '课件分类',width: '300px',align: 'center', dataIndex: 'coursewareClassifyId', key: 'coursewareClassifyId',},
|
||||||
{ title: '课时/分', width: '160px', align: 'center', dataIndex: 'hour', key: 'hour' },
|
{ title: '课时/分', width: '160px', align: 'center', dataIndex: 'hour', key: 'hour' },
|
||||||
{ title: '课件大小', width: '160px', align: 'center', dataIndex: 'coursewareSize', key: 'coursewareSize' },
|
{ title: '课件大小', width: '160px', align: 'center', dataIndex: 'coursewareSize', key: 'coursewareSize' },
|
||||||
{ title: '操作', key: 'operation', width: '200px', align: 'center', scopedSlots: { customRender: 'action' } },
|
{ title: '操作', key: 'operation', width: '200px', align: 'center', scopedSlots: { customRender: 'action' } },
|
||||||
|
@ -45,10 +52,27 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//新增课件
|
||||||
|
coursewareAdd(){
|
||||||
|
this.$router.push({path:"/course/courseware/coursewareAdd",query:{}})
|
||||||
|
},
|
||||||
|
|
||||||
|
//返回
|
||||||
|
goback(){
|
||||||
|
this.$router.push({path:"/course/CourseList",query:{} })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 刪除課件
|
||||||
del(record){
|
del(record){
|
||||||
|
deleteCourseware({id:record.id}).then(res => {
|
||||||
|
if(res.code == 200) this.$refs.table.refresh(true);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 抽考題
|
||||||
|
courseQuestion(record){
|
||||||
|
console.log("哈哈");
|
||||||
|
this.$router.push({path :'/course/question/examQuestion',query:{id : record.id} });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
|
@ -4,15 +4,15 @@
|
||||||
<a-descriptions title="课程详情" layout="horizontal" bordered size="small" :column="1">
|
<a-descriptions title="课程详情" layout="horizontal" bordered size="small" :column="1">
|
||||||
<a-descriptions-item label="课程编号"> {{ detailData.courseCode }} </a-descriptions-item>
|
<a-descriptions-item label="课程编号"> {{ detailData.courseCode }} </a-descriptions-item>
|
||||||
<a-descriptions-item label="课程名称"> {{ detailData.courseName }} </a-descriptions-item>
|
<a-descriptions-item label="课程名称"> {{ detailData.courseName }} </a-descriptions-item>
|
||||||
<a-descriptions-item label="课程类别"> {{ detailData.courseName }} </a-descriptions-item>
|
<a-descriptions-item label="课程类别"> {{ detailData.courseType }} </a-descriptions-item>
|
||||||
<a-descriptions-item label="课时"> {{ detailData.hour }} </a-descriptions-item>
|
<a-descriptions-item label="课时"> {{ detailData.hour }} </a-descriptions-item>
|
||||||
<a-descriptions-item label="试题数量"> {{ detailData.questionCount }} </a-descriptions-item>
|
<a-descriptions-item label="试题数量"> {{ detailData.questionCount }} </a-descriptions-item>
|
||||||
<a-descriptions-item label="学习内容"> {{ detailData.courseName }} </a-descriptions-item>
|
<a-descriptions-item label="学习内容"> {{ detailData.learningContent }} </a-descriptions-item>
|
||||||
<a-descriptions-item label="备注"> {{ detailData.courseName }} </a-descriptions-item>
|
<a-descriptions-item label="备注"> {{ detailData.remark }} </a-descriptions-item>
|
||||||
</a-descriptions>
|
</a-descriptions>
|
||||||
<div class="buttonGroup">
|
<div class="buttonGroup">
|
||||||
<a-button type="primary" @click="close"> 返回 </a-button>
|
<a-button type="primary" @click="close"> 返回 </a-button>
|
||||||
<a-button type="primary"> 编辑 </a-button>
|
<a-button type="primary" @click="edit"> 编辑 </a-button>
|
||||||
</div>
|
</div>
|
||||||
</a-card>
|
</a-card>
|
||||||
</page-header-wrapper>
|
</page-header-wrapper>
|
||||||
|
@ -36,6 +36,9 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
close () {
|
close () {
|
||||||
this.$router.push({ path: '/course/CourseList', query: { } });
|
this.$router.push({ path: '/course/CourseList', query: { } });
|
||||||
|
},
|
||||||
|
edit(record) {
|
||||||
|
this.$router.push({ path : '/course/CourseAdd', query:{record}})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<h1>
|
||||||
|
hello World
|
||||||
|
</h1>
|
Loading…
Reference in New Issue