|
@@ -6,7 +6,7 @@
|
|
|
<NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="main" v-if="view === 'arrange'">
|
|
|
- <mainData :lesson="lesson" :today="today" :arrange="arrange" @getLesson="getLesson"></mainData>
|
|
|
+ <mainData :lesson="lesson" :today="today" :arrange="arrange" @getLesson="getLesson" :locationList="locationList" :classInfo="classInfo"></mainData>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="24" class="foot">
|
|
@@ -26,6 +26,7 @@ import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
const { mapActions: lesson } = createNamespacedHelpers('lesson');
|
|
|
const { mapActions: classes } = createNamespacedHelpers('classes');
|
|
|
const { mapActions: util } = createNamespacedHelpers('util');
|
|
|
+const { mapActions: location } = createNamespacedHelpers('location');
|
|
|
import moment from 'moment';
|
|
|
|
|
|
export default {
|
|
@@ -49,8 +50,11 @@ export default {
|
|
|
classid: undefined,
|
|
|
classList: [],
|
|
|
teaids: '',
|
|
|
+ classInfo: {},
|
|
|
+ locationList: [],
|
|
|
}),
|
|
|
created() {
|
|
|
+ this.getOtherList();
|
|
|
let today = this.getDay();
|
|
|
// let month = this.getMonth();
|
|
|
let todate = this.getDate();
|
|
@@ -77,13 +81,14 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ ...location({ getLocalList: 'query' }),
|
|
|
...lesson({ lessionInfo: 'fetch', lessionlist: 'query' }),
|
|
|
...classes({ classesInfo: 'fetch', classeslist: 'query' }),
|
|
|
...util({ uiltfetch: 'newfetch', utillist: 'query' }),
|
|
|
// 查询课程详情
|
|
|
async searchInfo() {
|
|
|
const res = await this.classesInfo(this.classid);
|
|
|
-
|
|
|
+ if (res.errcode == '0') this.$set(this, `classInfo`, res.data);
|
|
|
let classid = this.classid;
|
|
|
const result = await this.lessionlist({ classid });
|
|
|
|
|
@@ -166,6 +171,10 @@ export default {
|
|
|
this.searchInfo();
|
|
|
this.view = 'arrange';
|
|
|
},
|
|
|
+ async getOtherList() {
|
|
|
+ const res = await this.getLocalList();
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `locationList`, res.data);
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|