PCqiandao
杨树林 5 years ago
parent 134ade16d5
commit fe33db3d43

@ -26,24 +26,35 @@ class Teacherentry extends Component{
render(){
const isAdmin =this.props.isAdmin();
let isAdmin =this.props.isAdmin();
let item= this.props.item;
let jdt;
try {
jdt=item.normal_count/item.all_count * 100;
}catch (e) {
jdt=100;
}
console.log(jdt);
return(
<React.Fragment>
<div className="ws100s edu-back-white " >
<div className="ws100s teacherentrydiv ">
<p className="ws100s teachedivp ymaxnamewidthdivp">
2020-03-10第五次签到
</p>
{
item.name
}
</p>
<div className="ws100s sortinxdirection mt17">
<div className="teachedivps">
签到人数
</div>
<div className="progressivps">
<Progress percent={30} />
<Progress percent={jdt} showInfo={false} strokeColor="#1890ff" />
</div>
<div className="progressivpss">
已签到22 / 应签到55
已签到{item.normal_count?item.normal_count:0} / 应签到 {item.all_count?item.all_count:0}
</div>
</div>
@ -56,31 +67,45 @@ class Teacherentry extends Component{
签到发起人
</div>
<div className="teachedivpsy ymaxnamewidth60 h40s">
胡一菲
{item.author.user_name}
</div>
<div className="teachedivps ml20 h40s">
签到方式
</div>
<div className="teachedivpsy ymaxnamewidth80 h40s">
二维码签到
{item.mode?
item.mode==="QRCODE"?
"二维码签到"
:item.mode==="NUMBER"?
"数字签到"
:item.mode==="QUICK"?
"快捷签到"
:""
:""}
</div>
<div className="teachedivps ml20 h40s">
开始结束时间
</div>
<div className="teachedivpsy h40s">
2010-03-10 10:00-11:00
{item.attendance_date} {item.start_time}-{item.end_time}
</div>
</div>
<div className="ws20s sortinxdirection">
{
isAdmin===true?
this.props.defaultActiveKey==="1"?
<div className="ws100s xaxisreverseorder">
<div className="jiezhis h40s">截止</div>
<div className="shanchu h40s">删除</div>
</div>
:
<div className="ws100s xaxisreverseorder">
<div className="jiezhis h40s">编辑</div>
<div className="shanchu h40s">删除</div>
</div>
:
(
this.props.defaultActiveKey==="1"?

@ -42,7 +42,7 @@ class Teaccomponent extends Component{
mydatas.length>0?
mydatas.map((object, index) => {
return (
<Teacherentry item={object} defaultActiveKey={this.props.defaultActiveKey}{...this.props} {...this.state}></Teacherentry>
<Teacherentry item={object} key={index} index={index} defaultActiveKey={this.props.defaultActiveKey}{...this.props} {...this.state}></Teacherentry>
)
})
:

@ -196,6 +196,7 @@
.progressivps{
width:200px;
margin-left: 10px;
}
.progressivpss{
font-size:12px;

@ -153,7 +153,7 @@ class Students_signin extends Component{
}}>
<Tabs defaultActiveKey="1" onChange={this.callback}>
<TabPane tab="正在签到" key="1">
<p className="mt20 mysligtes">3个签到正在进行</p>
<p className="mt20 mysligtes">{attendances_count}个签到正在进行</p>
<Teaccomponent datas={datas} defaultActiveKey={defaultActiveKey} {...this.state} {...this.props}></Teaccomponent>
@ -166,7 +166,7 @@ class Students_signin extends Component{
</TabPane>
<TabPane tab="历史签到" key="2">
<div className="ws100s mt20 sortinxdirection">
<p className=" ws50s mysligtes sortinxdirection">共3个签到正在进行</p>
<p className=" ws50s mysligtes sortinxdirection">已完成{attendances_count}次签到</p>
{
isAdmin===false?
<div className="ws50s xaxisreverseorder">

Loading…
Cancel
Save