This commit is contained in:
18571350067 2021-11-08 10:18:52 +08:00
parent 249ebff4ed
commit ab7007d7b4
2 changed files with 18 additions and 2 deletions

View File

@ -4,7 +4,7 @@ const questionApi = {
add: 'courseManagement/question/addOrUpdate',
get: '/courseManagement/question/details',
// update: 'sys/menu/update',
// del: 'courseManagement/course/delete',
del: 'courseManagement/course/delete',
// updateStatus: 'sys/menu/updateStatus',
// list: '/courseManagement/course/listPage',
// coursewareList:'/courseManagement/course/courseware/details',
@ -37,6 +37,14 @@ export function questionAdd (params) {
// }
export function deleteQuestion (params) {
return request({
url: questionApi.del,
method: 'delete',
params: params
})
}
// 查看课程详情
export function getQuestionDeatil (params) {
return request({

View File

@ -43,7 +43,7 @@
<script>
import { getQuestionListByCourseId } from '@/api/course/course'
import { getQuestionDeatil } from '@/api/course/question/question'
import { getQuestionDeatil,deleteQuestion } from '@/api/course/question/question'
export default {
data() {
@ -91,6 +91,14 @@ export default {
console.log(record)
this.$router.push({ path : '/course/question/QuestionAdd', query:{ id: record , questionType:this.questionDetail.questionType ,courseId:this.$route.query.id}});
},
del(record){
console.log(record)
deleteQuestion({id:record}).then(res => {
if(res.code == 200) this.$refs.table.refresh(true);
})
},
//
questionBatch(){
alert('批量导入')