From c9570a4631ec60c5e3585b7e41c0e4558042cd86 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Sun, 29 Sep 2019 15:55:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 2 +- src/views/designPlatform/index.vue | 4 +- src/views/designPlatform/userDemonList.vue | 8 +- src/views/lesson/home.vue | 105 +++++++++------------ 4 files changed, 53 insertions(+), 66 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index cd1fdb6cc..ae8c064c6 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -421,7 +421,7 @@ export const asyncRouter = [ hidden: true }, { - path: 'lesson/home', + path: 'lesson/home/:mapId', component: LessonHome, hidden: true }, diff --git a/src/views/designPlatform/index.vue b/src/views/designPlatform/index.vue index 825eed8f9..906281c06 100644 --- a/src/views/designPlatform/index.vue +++ b/src/views/designPlatform/index.vue @@ -76,7 +76,7 @@ drapWidth(width) { this.widthLeft = Number(width); }, - + refresh1() { }, @@ -96,7 +96,7 @@ const heights = this.$store.state.app.height - 90; this.$store.dispatch('config/resize', { width: widths, height: heights }); } - + } }; diff --git a/src/views/designPlatform/userDemonList.vue b/src/views/designPlatform/userDemonList.vue index 59749d159..e73e57a30 100644 --- a/src/views/designPlatform/userDemonList.vue +++ b/src/views/designPlatform/userDemonList.vue @@ -189,7 +189,7 @@ break; } case 'lessonDesign': { - this.$router.push({ path: `${UrlConfig.designUser.lessonHome}` }); + this.$router.push({ path: `${UrlConfig.designUser.lessonHome}/${this.mapId}` }); break; } case 'runPlanDesign': { @@ -217,11 +217,11 @@ } }, refresh1(){ - this.$refs.myfilerCity.loadInitData(); + this.$refs.myfilerCity.loadInitData(); this.refresh(); }, refresh2(){ - this.$refs.myfilerCity.loadInitData(); + this.$refs.myfilerCity.loadInitData(); this.refresh(); }, jlmap3d() { @@ -287,4 +287,4 @@ .map-list-main{ text-align:left; } - \ No newline at end of file + diff --git a/src/views/lesson/home.vue b/src/views/lesson/home.vue index be72f3d28..92aa9a904 100644 --- a/src/views/lesson/home.vue +++ b/src/views/lesson/home.vue @@ -1,29 +1,41 @@ @@ -41,49 +53,20 @@ }, data() { return { - tableData: [{ - id: 1, - date: '2016-05-02', - name: '王小虎', - address: '上海市普陀区金沙江路 1518 弄' - }, { - id: 2, - date: '2016-05-04', - name: '王小虎', - address: '上海市普陀区金沙江路 1517 弄' - }, { - id: 3, - date: '2016-05-01', - name: '王小虎', - address: '上海市普陀区金沙江路 1519 弄', - children: [{ - id: 31, - date: '2016-05-01', - name: '王小虎', - address: '上海市普陀区金沙江路 1519 弄' - }, { - id: 32, - date: '2016-05-01', - name: '王小虎', - address: '上海市普陀区金沙江路 1519 弄' - }] - }, { - id: 4, - date: '2016-05-03', - name: '王小虎', - address: '上海市普陀区金沙江路 1516 弄' - }], + tableData: [], + loading: 'false' }; }, mounted() { - console.log('=============='); + this.loading = true; this.loadInitData(); }, methods: { loadInitData() { getDraftLesson({},this.mapId).then(response=> { - console.log(response); + this.tableData = response.data; + this.loading = false; }); } } @@ -95,4 +78,8 @@ text-align: center; margin: 20px auto; } + .button_group { + float: right; + margin: 10px 10px; + }