Commit bfd561e0 authored by zhengke's avatar zhengke

修改

parent cf11c2ee
<style>
</style>
<template>
<div class="page-body">
</div>
</template>
<script>
export default {
meta: {
title: "备课编辑"
},
props: {},
data() {
return {
}
},
created() {},
mounted() {
this.getList();
},
methods: {
getList(){
}
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass');
</style>
...@@ -180,6 +180,14 @@ ...@@ -180,6 +180,14 @@
.teacherLesson .timeleft{ .teacherLesson .timeleft{
margin-left:12px; margin-left:12px;
} }
.checkedPlan{
background-color: #2961FE!important;
color:#fff!important;
}
.checkedPlan .beikeStatus{
background-color: #fff;
color:#2961FE!important;
}
</style> </style>
<template> <template>
<div class="page-body teacherLesson"> <div class="page-body teacherLesson">
...@@ -197,9 +205,10 @@ ...@@ -197,9 +205,10 @@
</div> </div>
</div> </div>
<div class="Cal_Content"> <div class="Cal_Content">
<div class="Cal_Inner" v-for="(item,index) in dataNum"> <div class="Cal_Inner" v-for="(item,index) in dataNum" :class="{'checkedPlan':ckedIndex==item}" @click="getItem(item)">
{{item}} {{item}}
<div v-if="index==0" class="beikeStatus">已备课</div> <div v-if="getLessonStatus(item)==1" class="beikeStatus">部分</div>
<div v-if="getLessonStatus(item)==2" class="beikeStatus">已备课</div>
</div> </div>
</div> </div>
<div class="Cal_Qiehuan" @click="getNextMonth()"> <div class="Cal_Qiehuan" @click="getNextMonth()">
...@@ -210,35 +219,33 @@ ...@@ -210,35 +219,33 @@
</div> </div>
</div> </div>
</div> </div>
<div class="TeacherYarr">{{tYear}}{{tMonth}}</div> <div class="TeacherYarr">{{tYear}}{{tMonth}}{{ckedIndex}}</div>
<div style="margin-top:40px;"> <div style="margin-top:30px;">
<template v-for="(item,index) in dataList"> <div class="TeacherInfo_List" v-for="(item,index) in newDataList">
<div class="TeacherInfo_List" v-for="(SubItem,SubIndex) in item.PlanList">
<div class="timeleft"> <div class="timeleft">
<div> <div>
{{SubItem.StartTime}} {{item.StartTime}}
</div> </div>
</div> </div>
<div class="timeright"> <div class="timeright">
<div class="record_List"> <div class="record_List">
<div class="TeacherNameList"> <div class="TeacherNameList">
{{SubItem.ClassName}} {{item.ClassName}}
<li class="cicle1"> <li class="cicle1">
{{SubItem.ClassName.substr(0,1)}} {{item.ClassName.substr(0,1)}}
</li> </li>
</div> </div>
<div class="TeacherContent"> <div class="TeacherContent">
{{SubItem.GuestStr}} {{item.GuestStr}}
</div> </div>
<div style="margin:20px 0 30px 0;"> <div style="margin:20px 0 30px 0;">
<span class="saveModule">存为模板</span> <span class="saveModule">存为模板</span>
<span class="beikeBtn" v-if="SubItem.LessonPlanNum>0" style="background:#3FC4FF;">已备课</span> <span class="beikeBtn" v-if="item.LessonPlanNum>0" style="background:#3FC4FF;">已备课</span>
<span class="beikeBtn" v-else @click="goBeike()">备课</span> <span class="beikeBtn" v-else @click="goBeike(item)">备课</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template>
</div> </div>
</div> </div>
...@@ -258,13 +265,16 @@ ...@@ -258,13 +265,16 @@
dataNum: 0, //天数 dataNum: 0, //天数
tYear: 0, //年 tYear: 0, //年
tMonth: 0, //月 tMonth: 0, //月
tDay:0, //日
ckedIndex:0,// 选中
msg: { msg: {
School_Id: 1, //学校 School_Id: 1, //学校
Teacher_Id: 2, //老师id Teacher_Id: 2, //老师id
StartTime: '2021-01-12', StartTime: '',
EndTime: '2021-01-14' EndTime: ''
}, },
dataList: [] dataList: [],
newDataList:[],
} }
}, },
created() {}, created() {},
...@@ -272,7 +282,11 @@ ...@@ -272,7 +282,11 @@
var myDate = new Date(); var myDate = new Date();
this.tYear = myDate.getFullYear(); this.tYear = myDate.getFullYear();
this.tMonth = myDate.getMonth() + 1; this.tMonth = myDate.getMonth() + 1;
this.tDay = myDate.getDate();
this.ckedIndex = this.tDay;
this.dataNum = this.mGetDate(this.tYear, this.tMonth); this.dataNum = this.mGetDate(this.tYear, this.tMonth);
this.msg.StartTime = this.tYear+'-'+this.tMonth+'-'+'01';
this.msg.EndTime = this.tYear+'-'+this.tMonth+'-'+this.dataNum;
this.getList(); this.getList();
}, },
methods: { methods: {
...@@ -289,6 +303,9 @@ ...@@ -289,6 +303,9 @@
this.tMonth = this.tMonth - 1; this.tMonth = this.tMonth - 1;
} }
this.dataNum = this.mGetDate(this.tYear, this.tMonth); this.dataNum = this.mGetDate(this.tYear, this.tMonth);
this.msg.StartTime = this.tYear+'-'+this.tMonth+'-'+'01';
this.msg.EndTime = this.tYear+'-'+this.tMonth+'-'+this.dataNum;
this.getList();
}, },
//点击下个月 //点击下个月
getNextMonth() { getNextMonth() {
...@@ -299,6 +316,9 @@ ...@@ -299,6 +316,9 @@
this.tMonth = this.tMonth + 1; this.tMonth = this.tMonth + 1;
} }
this.dataNum = this.mGetDate(this.tYear, this.tMonth); this.dataNum = this.mGetDate(this.tYear, this.tMonth);
this.msg.StartTime = this.tYear+'-'+this.tMonth+'-'+'01';
this.msg.EndTime = this.tYear+'-'+this.tMonth+'-'+this.dataNum;
this.getList();
}, },
//获取数据 //获取数据
getList() { getList() {
...@@ -306,12 +326,56 @@ ...@@ -306,12 +326,56 @@
console.log(res, '数据来了'); console.log(res, '数据来了');
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data; this.dataList = res.Data;
var month = this.tMonth;
var day = this.ckedIndex;
if(month<10){
month='0'+month;
}
if(day<10){
day='0'+day;
}
this.dataList.forEach(x=>{
if(x.DateYear==this.tYear&&x.DateMonth==month&&x.DateDay==day){
this.newDataList = x.PlanList;
}
})
}
})
},
//点击
getItem(item){
this.ckedIndex=item;
var month = this.tMonth;
var day = item;
if(month<10){
month='0'+month;
}
if(day<10){
day='0'+day;
}
this.dataList.forEach(x=>{
if(x.DateYear==this.tYear&&x.DateMonth==month&&x.DateDay==day){
this.newDataList = x.PlanList;
}
})
},
//获取备课状态
getLessonStatus(num){
if(num<10){
num='0'+num
}
this.dataList.forEach(x=>{
if(x.DateDay==num){
return x.IsLessonStatus;
} }
}) })
}, },
//跳转至备课 //跳转至备课
goBeike(){ goBeike(item){
var tempStr = '/course/studentClass?ClassId=' + item.ClassId+'&School_Id='+item.School_Id;
this.$router.push({
path: tempStr
});
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment