diff --git a/src/api/designPlatform.js b/src/api/designPlatform.js new file mode 100644 index 000000000..d743900dc --- /dev/null +++ b/src/api/designPlatform.js @@ -0,0 +1,10 @@ +import request from '@/utils/request'; + +export function getDraftLesson(params, mapId) { + /** 根据mapId获取草稿课程 */ + return request({ + url: `/api/mapSystem/findDraftLessonBy/${mapId}`, + method: 'get', + params + }); +} diff --git a/src/router/index.js b/src/router/index.js index 3ec0099f6..c1073c6d7 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -415,7 +415,7 @@ export const asyncRouter = [ hidden: true }, { - path: 'lesson/home', + path: 'lesson/home/:mapId', component: LessonHome, hidden: true }, diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue index fee2f8173..25d7bf39e 100644 --- a/src/views/designPlatform/demonList.vue +++ b/src/views/designPlatform/demonList.vue @@ -145,7 +145,7 @@ break; } case 'lessonDesign': { - this.$router.push({ path: `${UrlConfig.design.lessonHome}` }); + this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.mapId}` }); break; } case 'runPlanDesign': { @@ -153,7 +153,7 @@ break; } } - this.$refs.menu.doClose(); + // this.$refs.menu.doClose(); }, // async myrefresh(filterSelect){ diff --git a/src/views/lesson/home.vue b/src/views/lesson/home.vue index 4da8e8a7c..be72f3d28 100644 --- a/src/views/lesson/home.vue +++ b/src/views/lesson/home.vue @@ -1,188 +1,98 @@