|
|
@ -60,7 +60,7 @@ const handleClose = () => { |
|
|
|
const submit = async () => { |
|
|
|
const submit = async () => { |
|
|
|
if (flog.value) { |
|
|
|
if (flog.value) { |
|
|
|
await editCourse({ |
|
|
|
await editCourse({ |
|
|
|
id: activeIndex.value, |
|
|
|
...editdata.value, |
|
|
|
content: formData.value.description, |
|
|
|
content: formData.value.description, |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -114,11 +114,13 @@ const filterTarger = (target) => { |
|
|
|
return res.label |
|
|
|
return res.label |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const editdata = ref({ id: '', objectiveId:'' }) |
|
|
|
// 编辑事件 |
|
|
|
// 编辑事件 |
|
|
|
const flog = ref(false) |
|
|
|
const flog = ref(false) |
|
|
|
const editBook = async (obj) => { |
|
|
|
const editBook = async (obj) => { |
|
|
|
const res = await getCourseInfo({ id: obj.id }) |
|
|
|
const res = await getCourseInfo({ id: obj.id }) |
|
|
|
|
|
|
|
editdata.value.id = res.data.id |
|
|
|
|
|
|
|
editdata.value.objectiveId = res.data.objectiveId |
|
|
|
flog.value = true |
|
|
|
flog.value = true |
|
|
|
console.log(obj) |
|
|
|
console.log(obj) |
|
|
|
activeIndex.value = res.data.id |
|
|
|
activeIndex.value = res.data.id |
|
|
|