Commit 0c822f2b authored by zhengke's avatar zhengke

修改

parent a12bb4cb
......@@ -126,11 +126,24 @@
text-align: center;
margin-right:10px;
cursor: pointer;
box-shadow: 4px 4px 5px #d1d1d1;
}
.less_Isout{
font-size:12px;
color:#2961FE;
}
.classQue{
background-color: rgb(63, 196, 255);
}
.classChu{
background-color: #f2f2f2;
}
.classChu .commonLessName{
color:#000;
}
.classQue .commonLessName{
color:#fff;
}
</style>
<template>
<div v-if="!isShowSign">
......@@ -314,19 +327,27 @@
<div class="lessStudentList">
<div class="lessStuTitle">学生签到情况</div>
<div class="lessStuInnerList">
<div class="lessList" v-for="(item,index) in dayObj.GuestList" :key="index">
<q-avatar style="margin:10px 0 5px 0">
<img :src="item.UserIcon">
<div class="lessList" v-for="(item,index) in dayObj.GuestList" :key="index" :class="{'classQue':isShowSignBtn&&item.IsCheck==0,'classChu':isShowSignBtn&&
item.IsCheck==1}" @click="changeStatus(item)">
<q-avatar size="md" style="margin:12px 0 5px 0" v-if="item.UserIcon">
<img :src="item.UserIcon" />
</q-avatar>
<div>{{item.GuestName}}</div>
<div class="less_Isout">
<span v-if="item.IsCheck==0">正常</span>
<q-avatar size="md" color="teal-10" style="margin:12px 0 5px 0" text-color="white" v-if="!item.UserIcon">
{{item.GuestName[0]}}</q-avatar>
<div style="margin:5px 0;" class="commonLessName">{{item.GuestName}}</div>
<div class="less_Isout" v-if="isShowSignBtn">
<span v-if="item.IsCheck==0">出勤</span>
<span v-if="item.IsCheck==1">缺勤</span>
<!-- <span v-if="item.IsCheck==-1">缺勤</span> -->
</div>
<div class="less_Isout" v-else>
<span v-if="item.IsCheck==0">出勤</span>
<span v-if="item.IsCheck==1">缺勤</span>
<span v-if="item.IsCheck==-1">未签到</span>
</div>
</div>
</div>
<q-card-actions align="right" class="bg-white">
<q-card-actions align="right" class="bg-white" v-if="isShowSignBtn">
<q-btn label="取消" flat color="grey-10"
style="font-weight:400 !important" @click="isShowSign=false" />
<q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important"
......@@ -395,6 +416,8 @@
ClassId:0
},
dayObj:{},
isShowSignBtn:false, //是否显示签到提交按钮
comChecked:{}, //点击选中复制
}
},
created() {
......@@ -543,31 +566,63 @@
},
//点击日历
getClicked(item){
console.log(item,'rili');
if(item.IsEndDate){
this.isShowSign=true;
this.dayMsg.ClassPlanId = item.ClassPlanId;
this.dayMsg.School_Id = this.setingObj.School_Id;
this.dayMsg.ClassId = this.setingObj.ClassId;
this.comChecked = item;
this.getDayClassPlan();
}
},
//获取某一天的计划信息
getDayClassPlan(){
GetDayClassPlan(this.dayMsg).then(res => {
console.log(res,'数据来了');
if (res.Code == 1) {
this.dayObj = res.Data;
var d = new Date();
var datetime = d.getFullYear() + '-' + (d.getMonth() + 1)+ '-'+ d.getDate();
if(this.dayObj.ClassDate==datetime){
this.isShowSignBtn=true;
}else{
this.isShowSignBtn=false;
}
this.dayObj.GuestList.forEach(x=>{
if(this.isShowSignBtn&&x.IsCheck==-1){
x.IsCheck=0;
}
})
}
})
},
//点击切换签到
changeStatus(item){
if(this.isShowSignBtn){
if(item.IsCheck==0){
item.IsCheck=1;
}else{
item.IsCheck=0;
}
}
},
//点击签到
saveSign(){
let signMsg = [];
this.dayObj.GuestList.forEach(x=>{
let obj={
classId:this.setingObj.ClassId,
ClassDate:this.comChecked.ClassDateStr,
ClassRoomId:this.comChecked.ClassRoomId,
School_Id:this.setingObj.School_Id,
TeacherId:this.comChecked.TeacherId,
OrderGuestId:x.Id,
CheckStatus:x.IsCheck
}
signMsg.push(obj);
})
addClassCheck(signMsg).then(res => {
console.log(res,'数据来了');
if (res.Code == 1) {
this.isShowSign=false;
}
})
}
......
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