|
@@ -3,11 +3,10 @@
|
|
|
<el-row>
|
|
|
<el-col :span="24" class="style">
|
|
|
<el-col :span="24" class="top">
|
|
|
- <!-- <topInfo></topInfo> -->
|
|
|
<NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="main">
|
|
|
- <mainData :lessionclassInfo="lessionclassInfo" :week="week"></mainData>
|
|
|
+ <mainData :lessons="lessons" :week="week"></mainData>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="foot">
|
|
|
<footInfo></footInfo>
|
|
@@ -21,8 +20,9 @@
|
|
|
import NavBar from '@/layout/common/topInfo.vue';
|
|
|
import footInfo from '@/layout/common/footInfo.vue';
|
|
|
import mainData from '@/layout/index/mainData.vue';
|
|
|
-const { mapActions: lesson } = createNamespacedHelpers('lesson');
|
|
|
import { mapState, createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
+const { mapActions: lesson } = createNamespacedHelpers('lesson');
|
|
|
+const { mapActions: classes } = createNamespacedHelpers('classes');
|
|
|
|
|
|
export default {
|
|
|
name: 'index',
|
|
@@ -33,12 +33,11 @@ export default {
|
|
|
mainData, //课程安排主体
|
|
|
},
|
|
|
data: () => ({
|
|
|
- lessionclassInfo: { lessons: [] },
|
|
|
+ lessons: [],
|
|
|
dates: '',
|
|
|
week: '',
|
|
|
title: '日程安排',
|
|
|
isleftarrow: '',
|
|
|
- transitionName: 'fade',
|
|
|
navShow: true,
|
|
|
}),
|
|
|
created() {
|
|
@@ -60,38 +59,31 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...lesson({ lessionInfo: 'fetch', lessionlist: 'query' }),
|
|
|
- async searchInfo({ ...info } = {}) {
|
|
|
- const res = await this.lessionlist({ ...info });
|
|
|
- for (const val of res.data) {
|
|
|
- console.log(this.user.classid);
|
|
|
- var arr = res.data.filter(item => item.class === this.user.classid);
|
|
|
- console.log(arr);
|
|
|
- var aff = res.data[0].lessons;
|
|
|
- console.log(aff);
|
|
|
- var ahh = aff.map((i, index) => {
|
|
|
- let word = '';
|
|
|
- if (index == 1) word = '拓展交流';
|
|
|
- if (index == 2) word = '课程作业小组展示';
|
|
|
- if (index == 3) word = '课程作业';
|
|
|
- if (index == 4) word = '礼仪课小组面试';
|
|
|
- if (index == 5) word = '结业仪式';
|
|
|
- i.lastLesson = word;
|
|
|
- return i;
|
|
|
- });
|
|
|
- for (const aqq of aff) {
|
|
|
- var aee = aff.filter(item => item.date === '2020-01-04');
|
|
|
- this.$set(this.lessionclassInfo, `lessons`, aee);
|
|
|
- console.log(aee);
|
|
|
- }
|
|
|
- }
|
|
|
+ ...classes({ classesInfo: 'fetch', classeslist: 'query' }),
|
|
|
+ // 查询课程详情
|
|
|
+ async searchInfo() {
|
|
|
+ const res = await this.classesInfo(this.user.classid);
|
|
|
+ const result = await this.lessionInfo(res.data.lessonid);
|
|
|
+ var ahh = result.data.lessons.map((i, index) => {
|
|
|
+ let word = '';
|
|
|
+ if (index == 1) word = '拓展交流';
|
|
|
+ if (index == 2) word = '课程作业小组展示';
|
|
|
+ if (index == 3) word = '课程作业';
|
|
|
+ if (index == 4) word = '礼仪课小组面试';
|
|
|
+ if (index == 5) word = '结业仪式';
|
|
|
+ i.lastLesson = word;
|
|
|
+ return i;
|
|
|
+ });
|
|
|
+ var aee = result.data.lessons.filter(item => item.date === '2020-01-02');
|
|
|
+ this.$set(this, `lessons`, aee);
|
|
|
},
|
|
|
+ // 获取时间
|
|
|
getDate() {
|
|
|
var adate = new Date();
|
|
|
this.value = adate.getFullYear() + '-' + (adate.getMonth() + 1) + '-' + adate.getDate();
|
|
|
this.$set(this, `dates`, this.value);
|
|
|
var str = '星期' + '日一二三四五六'.charAt(new Date().getDay());
|
|
|
this.$set(this, `week`, str);
|
|
|
- console.log(str);
|
|
|
},
|
|
|
},
|
|
|
};
|