|
@@ -30,6 +30,7 @@ export default defineComponent({
|
|
|
catchItem: {} as any,
|
|
|
loading: true,
|
|
|
detail: {
|
|
|
+ id: null,
|
|
|
cover: '',
|
|
|
name: '',
|
|
|
des: ''
|
|
@@ -49,6 +50,7 @@ export default defineComponent({
|
|
|
`${state.platformApi}/lessonCourseware/getLessonCoursewareDetail/${route.query.id}`
|
|
|
);
|
|
|
if (res?.data) {
|
|
|
+ data.detail.id = res.data.id;
|
|
|
data.detail.cover = res.data.coverImg;
|
|
|
data.detail.name = res.data.name;
|
|
|
data.detail.des = res.data.lessonTargetDesc;
|
|
@@ -73,13 +75,13 @@ export default defineComponent({
|
|
|
});
|
|
|
|
|
|
data.list = res.data;
|
|
|
- console.log(data.list, 'data.list', data.disabledIds);
|
|
|
+ // console.log(data.list, 'data.list', data.disabledIds);
|
|
|
|
|
|
const allIds = {} as any;
|
|
|
data.disabledIds.forEach((item: any) => {
|
|
|
allIds[item] = formatGetIds(item, data.list);
|
|
|
});
|
|
|
- console.log(allIds, 'allIds');
|
|
|
+ // console.log(allIds, 'allIds');
|
|
|
|
|
|
for (const item in allIds) {
|
|
|
const ids = allIds[item];
|
|
@@ -154,7 +156,6 @@ export default defineComponent({
|
|
|
let tempI: any = {};
|
|
|
for (const item of list) {
|
|
|
if (item.id === id) {
|
|
|
- console.log(item, id);
|
|
|
tempI = item;
|
|
|
}
|
|
|
if (item.children && item.children.length > 0 && !tempI.id) {
|
|
@@ -172,7 +173,8 @@ export default defineComponent({
|
|
|
if (item.status === 'checked') {
|
|
|
tempList.push({
|
|
|
id: item.id,
|
|
|
- name: item.name
|
|
|
+ name: item.name,
|
|
|
+ lessonCoursewareId: data.detail.id
|
|
|
});
|
|
|
}
|
|
|
});
|