暂时提交

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

@ -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 });
}
}
};
</script>

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': {
@ -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;
}
</style>
</style>

View File

@ -1,29 +1,41 @@
<template>
<div>
<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">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
<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"
row-key="id"
border
default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column
prop="name"
border
label="课程">
</el-table-column>
<el-table-column
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>