暂时提交

This commit is contained in:
fan 2019-09-29 15:55:01 +08:00
parent dae0ceff57
commit c9570a4631
4 changed files with 53 additions and 66 deletions

View File

@ -421,7 +421,7 @@ export const asyncRouter = [
hidden: true
},
{
path: 'lesson/home',
path: 'lesson/home/:mapId',
component: LessonHome,
hidden: true
},

View File

@ -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': {

View File

@ -1,29 +1,41 @@
<template>
<div>
<div style="height: 100%; overflow: hidden">
<el-card>
<div class="button_group">
<el-button type="primary" >查询</el-button>
</div>
</el-card>
<el-card v-loading="loading">
<el-table
:data="tableData"
style="margin-bottom: 20px;"
row-key="id"
border
default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column
prop="date"
label="日期"
sortable
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
sortable
width="180">
border
label="课程">
</el-table-column>
<el-table-column
prop="address"
label="地址">
label="操作">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
>创建章节</el-button>
<el-button
size="mini"
type="primary" plain
v-if="scope.row.type === 'lesson'"
>内容排序</el-button>
<el-button size="mini"
type="info"
>{{ scope.row.type==='lesson'? '编辑课程':'更新章节' }}</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
@ -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;
}
</style>