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 @@
.teacherLesson .timeleft{
margin-left:12px;
}
.checkedPlan{
background-color: #2961FE!important;
color:#fff!important;
}
.checkedPlan .beikeStatus{
background-color: #fff;
color:#2961FE!important;
}
</style>
<template>
<div class="page-body teacherLesson">
......@@ -197,9 +205,10 @@
</div>
</div>
<div class="Cal_Content">
<div class="Cal_Inner" v-for="(item,index) in dataNum">
{{item}}
<div v-if="index==0" class="beikeStatus">已备课</div>
<div class="Cal_Inner" v-for="(item,index) in dataNum" :class="{'checkedPlan':ckedIndex==item}" @click="getItem(item)">
{{item}}
<div v-if="getLessonStatus(item)==1" class="beikeStatus">部分</div>
<div v-if="getLessonStatus(item)==2" class="beikeStatus">已备课</div>
</div>
</div>
<div class="Cal_Qiehuan" @click="getNextMonth()">
......@@ -210,35 +219,33 @@
</div>
</div>
</div>
<div class="TeacherYarr">{{tYear}}{{tMonth}}</div>
<div style="margin-top:40px;">
<template v-for="(item,index) in dataList">
<div class="TeacherInfo_List" v-for="(SubItem,SubIndex) in item.PlanList">
<div class="timeleft">
<div>
{{SubItem.StartTime}}
</div>
<div class="TeacherYarr">{{tYear}}{{tMonth}}{{ckedIndex}}</div>
<div style="margin-top:30px;">
<div class="TeacherInfo_List" v-for="(item,index) in newDataList">
<div class="timeleft">
<div>
{{item.StartTime}}
</div>
<div class="timeright">
<div class="record_List">
<div class="TeacherNameList">
{{SubItem.ClassName}}
<li class="cicle1">
{{SubItem.ClassName.substr(0,1)}}
</li>
</div>
<div class="TeacherContent">
{{SubItem.GuestStr}}
</div>
<div style="margin:20px 0 30px 0;">
<span class="saveModule">存为模板</span>
<span class="beikeBtn" v-if="SubItem.LessonPlanNum>0" style="background:#3FC4FF;">已备课</span>
<span class="beikeBtn" v-else @click="goBeike()">备课</span>
</div>
</div>
<div class="timeright">
<div class="record_List">
<div class="TeacherNameList">
{{item.ClassName}}
<li class="cicle1">
{{item.ClassName.substr(0,1)}}
</li>
</div>
<div class="TeacherContent">
{{item.GuestStr}}
</div>
<div style="margin:20px 0 30px 0;">
<span class="saveModule">存为模板</span>
<span class="beikeBtn" v-if="item.LessonPlanNum>0" style="background:#3FC4FF;">备课</span>
<span class="beikeBtn" v-else @click="goBeike(item)">备课</span>
</div>
</div>
</div>
</template>
</div>
</div>
</div>
......@@ -258,13 +265,16 @@
dataNum: 0, //天数
tYear: 0, //年
tMonth: 0, //月
tDay:0, //日
ckedIndex:0,// 选中
msg: {
School_Id: 1, //学校
Teacher_Id: 2, //老师id
StartTime: '2021-01-12',
EndTime: '2021-01-14'
StartTime: '',
EndTime: ''
},
dataList: []
dataList: [],
newDataList:[],
}
},
created() {},
......@@ -272,7 +282,11 @@
var myDate = new Date();
this.tYear = myDate.getFullYear();
this.tMonth = myDate.getMonth() + 1;
this.tDay = myDate.getDate();
this.ckedIndex = this.tDay;
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();
},
methods: {
......@@ -289,6 +303,9 @@
this.tMonth = this.tMonth - 1;
}
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() {
......@@ -299,6 +316,9 @@
this.tMonth = this.tMonth + 1;
}
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() {
......@@ -306,12 +326,56 @@
console.log(res, '数据来了');
if (res.Code == 1) {
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