dev_cs
杨树明 5 years ago
parent 7c7b88b32e
commit b01ed8348a

@ -378,7 +378,6 @@ DEPENDENCIES
kaminari (~> 1.1, >= 1.1.1)
listen (>= 3.0.5, < 3.2)
mysql2 (>= 0.4.4, < 0.6.0)
newrelic_rpm
oauth2
pdfkit
puma (~> 3.11)

@ -692,7 +692,7 @@ class PollsController < ApplicationController
else
unified_setting = @poll.unified_setting
end
show_result = params[:show_result] ? 1 : 0
show_result = params[:show_result].to_i
un_anonymous = params[:un_anonymous] ? true : false
# 统一设置或者分班为0则更新问卷并删除问卷分组
if unified_setting || (course_group_ids.size == 0)

@ -134,6 +134,11 @@ class HomeworkCommon < ApplicationRecord
self.homework_type == 'practice' && self.publish_time.present? && self.publish_time < Time.now && self.homework_group_reviews.count == 0
end
# 作业查看最新成绩
def update_score identity
identity < Course::NORMAL && publish_time.present? && publish_time < Time.now && !course.is_end
end
# 作业能否立即发布
def publish_immediately user
homework_detail_manual.try(:comment_status) == 0 || homework_group_settings.where(course_group_id: course.charge_group_ids(user)).

@ -104,7 +104,7 @@ class Poll < ApplicationRecord
status = 4
else
if user.present? && user.student_of_course?(course)
ex_time = get_poll_times(user_id,false)
ex_time = get_poll_times(user.id,false)
pb_time = ex_time[:publish_time]
ed_time = ex_time[:end_time]
if pb_time.present? && ed_time.present? && pb_time <= Time.now && ed_time > Time.now

@ -4,6 +4,7 @@ json.partial! "homework_btn_check", locals: {identity: @user_course_identity, ho
json.partial! "student_btn_check", locals: {identity: @user_course_identity, homework: @homework, work: @work}
json.update_score @homework.update_score(@user_course_identity) if @homework.homework_type == "practice"
json.work_count @work_count
json.all_member_count @all_member_count
json.course_group_count @course.course_groups_count

@ -479,7 +479,7 @@ class NewWorkForm extends Component{
<InputNumber className="winput-240-40" placeholder="请填写每组最大人数" value={max_num} max={10}
onChange={this.max_num_change} style={{width:'180px'}} />
</ConditionToolTip>
<label className="color-grey-9 ml20 font-14">项目管理员角色的成员都可以提交作品提交作品时需要关联同组成员组内成员作品共享</label>
<label className="color-grey-9 ml20 font-14">学生提交作品时需要关联同组成员组内成员作品共享</label>
</p>
<p className="mt20">
<ConditionToolTip condition={has_commit || has_project} title={'已有关联项目或作品,不能修改'}>
@ -488,7 +488,7 @@ class NewWorkForm extends Component{
>基于项目实施</Checkbox>
</ConditionToolTip>
<label className="color-grey-9 ml12 font-14">勾选后各小组必须在educoder平台创建项目教师可随时观察平台对各小组最新进展的实时统计</label>
<label className="color-grey-9 ml12 font-14">选中则必须在本平台创建项目项目管理员可以提交作品不选中无需在平台创建项目任意小组成员均可以提交作品</label>
</p>
</div>
)}

@ -285,7 +285,7 @@ class GraduationTasksSubmitedit extends Component{
let{ search,page,limit,workslist}=this.state;
let newpage=page+2
let newpage=page+1
this.searchList(search,newpage,limit,workslist.task_id,1)

@ -271,20 +271,27 @@ class GraduationTasksSubmitnew extends Component{
contentViewScroll=(e)=>{
//滑动到底判断
//滑动到底判断
const {memberslist} = this.state;
let newscrollTop=parseInt(e.currentTarget.scrollTop);
let allclientHeight=e.currentTarget.clientHeight+newscrollTop;
if(e.currentTarget.scrollHeight-allclientHeight===0||e.currentTarget.scrollHeight-allclientHeight===1||e.currentTarget.scrollHeight-allclientHeight===-1){
// console.log("到达底部");
let{ search,page,limit }=this.state;
if(memberslist.length===0){
return;
}else{
let{ search,page,limit }=this.state;
let newpage=page+2
let newpage=page+1
this.searchList(search,newpage,limit,1)
}
}
this.searchList(search,newpage,limit,1)
}
}

@ -79,7 +79,9 @@ class GraduationTaskssettingapp extends Component{
visible:false,
starttime:undefined,
DownloadType:false,
DownloadMessageval:undefined
DownloadMessageval:undefined,
commentstatustype:undefined,
commenttimeone:undefined
}
}
@ -102,10 +104,10 @@ class GraduationTaskssettingapp extends Component{
}
let starttype=false;
let endtype=false;
if(moment(result.data.publish_time)<moment()){
if(moment(result.data.publish_time)<=moment()){
starttype=true
}
if(moment(result.data.end_time)<moment()){
if(moment(result.data.end_time)<=moment()){
endtype=true
}
@ -130,6 +132,7 @@ class GraduationTaskssettingapp extends Component{
taskname: result.data.task_name,
coursename: result.data.course_name,
commentstatus: result.data.comment_status,
commentstatustype:result.data.status,
commentnum: result.data.comment_num,
operworks: result.data.open_work,
opergrade: result.data.open_score,
@ -166,7 +169,7 @@ class GraduationTaskssettingapp extends Component{
}
}
baseprojectfun=(e)=>{
this.setState({
baseonproject:e.target.checked
@ -343,28 +346,33 @@ class GraduationTaskssettingapp extends Component{
let {endtimetype}=this.state;
if(types===1){
this.setState({
latetime:newlatetime,
// latetime:newlatetime,
crosscomment:true,
commenttime:newcommenttime
commenttime:newlatetime,
commenttimeone:newlatetime,
})
}else{
if(endtimetype===true){
this.setState({
crosscomment:true,
commenttime:newcommenttime
commenttime:newlatetime,
commenttimeone:newlatetime,
})
}else{
this.setState({
end_time:newlatetime,
// end_time:newlatetime,
crosscomment:true,
commenttime:newcommenttime
commenttime:newlatetime,
commenttimeone:newlatetime,
})
}
}
}
funcrosscomment=(e)=>{
let {latetime,end_time,allowlate}=this.state;
let {latetime,end_time,allowlate,commenttime,commenttimeone}=this.state;
let commenttimetype=commenttime===null||commenttime==="";
let newlatetimea=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttimea=moment(new Date()).format("YYYY-MM-DD HH:mm");
@ -377,26 +385,33 @@ class GraduationTaskssettingapp extends Component{
let newend_timed=moment(end_time).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttimed=moment(end_time).add(8, 'days').format("YYYY-MM-DD HH:mm");
let newtime;
if(e.target.checked===true){
if(allowlate===1||allowlate===true){
if(latetime===null||latetime===""){
this.updatesfuncrosscomment(1,newlatetimea,newcommenttimea)
}else{
this.updatesfuncrosscomment(1,newlatetimes,newcommenttimes)
}
}else{
if(end_time===null||end_time===""){
this.updatesfuncrosscomment(2,newend_timeb,newcommenttimeb)
if(commenttimetype===true){
if(allowlate===1||allowlate===true){
if(latetime===null||latetime===""){
this.updatesfuncrosscomment(1,newlatetimea,newcommenttimea)
}else{
this.updatesfuncrosscomment(1,newlatetimes,newcommenttimes)
}
}else{
if(end_time===null||end_time===""){
this.updatesfuncrosscomment(2,newend_timeb,newcommenttimeb)
}else{
this.updatesfuncrosscomment(2,newend_timed,newcommenttimed)
}
}
}else{
this.updatesfuncrosscomment(2,newend_timed,newcommenttimed)
}
}
this.setState({
crosscomment:e.target.checked,
commenttime:commenttimeone,
})
}
}else{
this.setState({
crosscomment:e.target.checked,
commenttime:undefined
commenttime:undefined
})
}
}
@ -519,10 +534,10 @@ class GraduationTaskssettingapp extends Component{
}
if(moment(end_time)<moment(publish_time)){
if(moment(end_time)<=moment(publish_time)){
this.setState({
endTimetypes:true,
endTimetypesval:"截止时间不能早于发布时间"
endTimetypesval:"截止时间必须晚于发布时间"
})
return
}else{
@ -531,16 +546,16 @@ class GraduationTaskssettingapp extends Component{
})
}
if(moment(latetime)<moment(publish_time)){
if(moment(latetime)<=moment(publish_time)){
this.setState({
latetimetype:true,
latetimetypeval:"结束时间不能早于发布时间"
latetimetypeval:"结束时间必须晚于发布时间"
})
return
}else if(moment(latetime)<moment(end_time)){
}else if(moment(latetime)<=moment(end_time)){
this.setState({
latetimetype:true,
latetimetypeval:"结束时间不能早于截止时间"
latetimetypeval:"结束时间必须晚于截止时间"
})
return
}else{
@ -562,7 +577,7 @@ class GraduationTaskssettingapp extends Component{
commenttimetype:false
})
}
if(moment(this.state.commenttime)<moment(publish_time)){
if(moment(this.state.commenttime)<=moment(publish_time)){
this.setState({
commenttimetype:true,
commenttimevalue:"开始时间不能小于发布时间",
@ -574,7 +589,7 @@ class GraduationTaskssettingapp extends Component{
})
}
if(moment(this.state.commenttime)<moment(end_time)){
if(moment(this.state.commenttime)<=moment(end_time)){
this.setState({
commenttimetype:true,
commenttimevalue:"开始时间不能小于截止时间",
@ -920,7 +935,8 @@ class GraduationTaskssettingapp extends Component{
endtimetype,
commenttimetype,
commenttimevalue,
flagPageEdit
flagPageEdit,
commentstatustype
} =this.state;
let courseId=this.props.match.params.coursesId;
@ -994,7 +1010,7 @@ class GraduationTaskssettingapp extends Component{
}
{/*内容*/}
{task_type===2?<div className="stud-class-set bor-bottom-greyE pd20 edu-back-white pl30" >
<div className={"xingrequired font-16 color-dark h20 mb20"}>分组设置 <span className={"font-14 color-grey-c"}>提交作品时需要关联同组成员组内成员作品共享</span></div>
<div className={"xingrequired font-16 color-dark h20 mb20"}>分组设置 <span className={"font-14 color-grey-c"}></span></div>
<div className={"mb30 h20 ml40"}>
<Input className={numtype===true?"noticeTip mr20":"mr20"} style={{ width:"100px" }} value={minnum} onInput={this.setminnum} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true}/>
<span className="mr20">~</span>
@ -1156,7 +1172,7 @@ class GraduationTaskssettingapp extends Component{
<div className={" font-16 color-dark h20 mb20"}>评分设置 </div>
<div className={"font-16 h20 mb20"}>最终成绩组成 <span className={"font-14 color-grey-c"}>取各教师最终评分的平均分</span></div>
<Checkbox className="ml40 font-16" checked={crosscomment} onChange={this.funcrosscomment}
disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true} >启用交叉评阅 <span className={"font-14 color-grey-c"}>给老师分配其他指导老师的学生作品</span>
disabled={this.props.isAdmin()===true?flagPageEdit===true?commentstatustype===3?true:false:true:true} >启用交叉评阅 <span className={"font-14 color-grey-c"}>给老师分配其他指导老师的学生作品</span>
</Checkbox>
{crosscomment===true?<div>
<div className={"h20 mb30 ml30 mt20 ml87"}>

@ -850,47 +850,47 @@ class GraduationTaskssettinglist extends Component{
</span>
),
}, {
title: '操作',
key: 'operation',
width:'100px',
dataIndex: 'operation',
className:'edu-txt-center',
render: operation => (
<div>
{this.props.isAdmin()?operation.map((tag,key) => {
return(
<React.Fragment>
{
tag.name &&
<Tooltip key={key} placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?<a style={{color:'#4CACFF',padding:"0px 5px"}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.name}
</a>
:
<a style={{color:tag.name==="调分"?"#000":'#4CACFF',padding:"0px 5px"}}
onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}>
{tag.name}
</a>
}
</Tooltip>
}
</React.Fragment>
)
}):""}
{
this.props.isStudent()?
operation.map((tag,key) => {
return(
<div key={key}>
{tag.view_work===false?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >查看</a>}
</div>
)}
):""
}
</div>
title: '操作',
key: 'operation',
width:'100px',
dataIndex: 'operation',
className:'edu-txt-center',
render: operation => (
<div>
{this.props.isAdmin()?operation.map((tag,key) => {
return(
<React.Fragment>
{
tag.name &&
<Tooltip key={key} placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?<a style={{color:'#4CACFF',padding:"0px 5px"}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.name}
</a>
:
<a style={{color:tag.name==="调分"?"#000":'#4CACFF',padding:"0px 5px"}}
onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}>
{tag.name}
</a>
}
</Tooltip>
}
</React.Fragment>
)
}):""}
{
this.props.isStudent()?
operation.map((tag,key) => {
return(
<div key={key}>
{tag.view_work===false?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >查看</a>}
</div>
)}
):""
}
</div>
),
}];
),
}];
let courseId=this.props.match.params.coursesId;
let position=this.props.match.params.position;
@ -972,7 +972,7 @@ class GraduationTaskssettinglist extends Component{
text-overflow: ellipsis;
white-space: nowrap;
}
.ant-table-tbody>tr>td, .ant-table-thead>tr>th{
.ant-table-tbody>tr>td, .ant-table-thead>tr>th{
padding: 16px 10px
}

@ -88,7 +88,7 @@ class GraduationTasks extends Component{
savedelete=()=>{
this.setState({
Modalstype:false,
Modalstype:false,
})
let {checkAllValue,checkBoxValues,search,page,order} = this.state;
// let all_check;
@ -107,9 +107,10 @@ class GraduationTasks extends Component{
if (response.data.status == 0) {
// {"status":1,"message":"删除成功"}
this.fetchAll(search,page,order)
this.props.showNotification(response.data.message);
this.setState({
Modalstype:true,
Modalstopval:response.data.message,
// Modalstype:true,
// Modalstopval:response.data.message,
ModalsBottomval:"",
ModalSave:this.cancelmodel,
Loadtype:true,

@ -382,7 +382,7 @@ class GraduateTopicPostWorksNew extends Component{
)}
</Form.Item>
<span className="tag color-grey9 ">(项目管理员角色的成员都可以提交作品提交作品时需要关联同组成员组内成员作品共享)</span>
<span className="tag color-grey9 ">(学生提交作品时需要关联同组成员组内成员作品共享)</span>
<Form.Item
label=""
className=" "
@ -394,7 +394,7 @@ class GraduateTopicPostWorksNew extends Component{
<Checkbox >基于项目实施</Checkbox>
)}
</Form.Item>
<span className="tag color-grey9 ">(勾选后各小组必须在educoder平台创建项目教师可随时观察平台对各小组最小进展的实时统计)</span>
<span className="tag color-grey9 ">(选中则必须在本平台创建项目项目管理员可以提交作品不选中无需在平台创建项目任意小组成员均可以提交作品)</span>
</div>
<div className="formBlock">

@ -2863,7 +2863,7 @@ class PollNew extends Component {
}
</style>
<Input placeholder="请输入问卷标题最大限制60个字符" maxLength="60"
style={{"margin-top": "15px", "text-align": "left"}}
style={{"margin-top": "15px", textAlign: "left"}}
onInput={this.changeTopicName}
readOnly={readOnlys}
autoComplete="off"
@ -2887,7 +2887,7 @@ class PollNew extends Component {
<div style={{"color": "#212121", "font-size": "16px"}}>问卷须知</div>
<TextArea placeholder="请输入本次问卷答题的相关说明最大限制100个字符"
style={{"height": "120px", "margin-top": "15px", "text-align": "left"}}
style={{"height": "120px", "margin-top": "15px", textAlign: "left"}}
maxLength="100"
readOnly={readOnlys}
onInput={this.changeTopicNametwo}
@ -3012,8 +3012,8 @@ class PollNew extends Component {
{item.question.answers === undefined ? "" : item.question.answers.map((items, i) => {
return (
<div className="h20 pt20" style={{"clear": "both"}}>
<Radio value={i} className={"fl"} style={{"text-align": "left",marginTop:"3px"}}></Radio>
<span className={" flex1 "} style={{"text-align": "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1116px"}} >{items.answer_text}</span>
<Radio value={i} className={"fl"} style={{textAlign: "left",marginTop:"3px"}}></Radio>
<span className={" flex1 "} style={{textAlign: "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1116px"}} >{items.answer_text}</span>
</div>
)
@ -3029,8 +3029,8 @@ class PollNew extends Component {
{item.question.answers === undefined ? "" : item.question.answers.map((items, i) => {
return (
<div className="mt10 pt20 " style={{"clear": "both"}}>
<Checkbox value={i} key={i} className={"fl"} style={{"text-align": "left"}}></Checkbox>
<span className={" flex1"} style={{"text-align": "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1120px"}}>{items.answer_text}</span>
<Checkbox value={i} key={i} className={"fl"} style={{textAlign: "left",marginRight:"8px"}}></Checkbox>
<span className={" flex1"} style={{textAlign: "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1116px"}}>{items.answer_text}</span>
</div>
)
})}
@ -3086,7 +3086,7 @@ class PollNew extends Component {
<p className="df mb20">
<span
className="color-grey-6 mr3 w60 font-16 lineh-40"
style={{"text-align": "center"}}>其它</span>
style={{textAlign: "center"}}>其它</span>
<input
className="mr20 input-flex-40 TextAreainput" disabled
@ -3100,7 +3100,7 @@ class PollNew extends Component {
: ""}
</p>) : (<p className="df mb20">
<span className="color-grey-6 mr10 w60 font-16 lineh-40"
style={{"text-align": "center"}}>选项</span>
style={{textAlign: "center"}}>选项</span>
<TextArea
autosize={{minRows: 1, maxRows: 5}}
@ -3172,7 +3172,7 @@ class PollNew extends Component {
"height": "80%";
"margin-top": "5px";
"margin-left": "5px";
"text-align": "center";
textAlign: "center";
"display": "block";
"opacity": "1";
}
@ -3328,7 +3328,7 @@ class PollNew extends Component {
<p className="df mb20">
<span
className="color-grey-6 mr3 w60 font-16 lineh-40"
style={{"text-align": "center"}}>其它</span>
style={{textAlign: "center"}}>其它</span>
<input
className="mr20 input-flex-40 TextAreainput" disabled
@ -3342,7 +3342,7 @@ class PollNew extends Component {
: ""}
</p>) : (<p className="df mb20">
<span className="color-grey-6 mr10 w60 font-16 lineh-40"
style={{"text-align": "center"}}>选项</span>
style={{textAlign: "center"}}>选项</span>
<TextArea
autosize={{minRows: 1, maxRows: 5}}
@ -3414,7 +3414,7 @@ class PollNew extends Component {
"height": "80%";
"margin-top": "5px";
"margin-left": "5px";
"text-align": "center";
textAlign: "center";
"display": "block";
"opacity": "1";
}
@ -3579,7 +3579,7 @@ class PollNew extends Component {
<p className="df mb20">
<span
className="color-grey-6 mr3 w60 font-16 lineh-40"
style={{"text-align": "center"}}>其它</span>
style={{textAlign: "center"}}>其它</span>
<input
className="mr20 input-flex-40 TextAreainput" disabled
@ -3593,7 +3593,7 @@ class PollNew extends Component {
: ""}
</p>) : (<p className="df mb20">
<span className="color-grey-6 mr10 w60 font-16 lineh-40"
style={{"text-align": "center"}}>选项</span>
style={{textAlign: "center"}}>选项</span>
<TextArea
autosize={{minRows: 1, maxRows: 5}}
@ -3665,7 +3665,7 @@ class PollNew extends Component {
"height": "80%";
"margin-top": "5px";
"margin-left": "5px";
"text-align": "center";
textAlign: "center";
"display": "block";
"opacity": "1";
}

@ -3231,7 +3231,7 @@ class Listofworksstudentone extends Component {
<div className="fr mr5 search-newysl" style={{marginBottom: '1px'}}>
{course_is_end===true?"":<span>
{teacherdata&&teacherdata.publish_immediately===false&&computeTimetype===true?
{teacherdata&&teacherdata.update_score===true&&computeTimetype===true?
(this.props.isNotMember()===false?<div className={"computeTime font-16"} onClick={this.setComputeTimet}>
查看最新成绩
</div>:""):
@ -3555,9 +3555,13 @@ class Listofworksstudentone extends Component {
{ course_is_end===true?"":teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{computeTimetype===true?
(this.props.isNotMember()===false?
<div className={"computeTime font-16"} onClick={this.setComputeTime}>
查看最新成绩
</div>
(
teacherdata&&teacherdata.update_score===true?
<div className={"computeTime font-16"} onClick={this.setComputeTime}>
查看最新成绩
</div>
:""
)
:"")
:
(teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
@ -3783,9 +3787,15 @@ class Listofworksstudentone extends Component {
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
{ course_is_end===true?"":teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{computeTimetype===true?
(this.props.isNotMember()===false?<div className={"computeTime font-16"} onClick={this.setComputeTime}>
查看最新成绩
</div>:""):
(this.props.isNotMember()===false?
(
teacherdata&&teacherdata.update_score===true?
<div className={"computeTime font-16"} onClick={this.setComputeTime}>
查看最新成绩
</div>:""
)
:""):
teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
(this.props.isNotMember()===false?<div className={"computeTimes font-16"}>
查看最新成绩

@ -1699,16 +1699,79 @@ class Trainingjobsetting extends Component {
if(this.state.allowreplenishment === false){
whethertopays=false;
}
this.setState({
flagPageEditsbox:true,
flagPageEdit: true,
whethertopay:whethertopays,
flagPageEditstwo:releasetime,
flagPageEditsthrees:deadline,
flagPageEditsfor:endtime,
completionefficiencyscore:true,
unifiedsetting:this.state.unifiedsetting,
})
if(this.state.jobsettingsdata!==undefined){
}
try {
if(this.state.jobsettingsdata&& this.state.jobsettingsdata.data.homework_status[0]==="未发布"){
this.setState({
flagPageEditsbox:true,
flagPageEdit: true,
whethertopay:whethertopays,
flagPageEditstwo:releasetime,
flagPageEditsthrees:deadline,
flagPageEditsfor:endtime,
completionefficiencyscore:true,
work_efficiencys:true,
unifiedsetting:this.state.unifiedsetting,
latedeductiontwo:20,
});
//均分比例
try {
if(this.state.proportion==="均分比例"){
this.Equalproportion(20);
}else if(this.state.proportion==="经验值比例"){
this.Empiricalvalueratio(20);
}
}catch (e) {
}
}else {
this.setState({
flagPageEditsbox:true,
flagPageEdit: true,
whethertopay:whethertopays,
flagPageEditstwo:releasetime,
flagPageEditsthrees:deadline,
flagPageEditsfor:endtime,
unifiedsetting:this.state.unifiedsetting,
});
if(this.state.work_efficiencys===true){
this.setState({
completionefficiencyscore:true,
})
}else{
this.setState({
completionefficiencyscore:false,
})
}
}
}catch (e) {
this.setState({
flagPageEditsbox:true,
flagPageEdit: true,
whethertopay:whethertopays,
flagPageEditstwo:releasetime,
flagPageEditsthrees:deadline,
flagPageEditsfor:endtime,
unifiedsetting:this.state.unifiedsetting,
});
if(this.state.work_efficiencys===true){
this.setState({
completionefficiencyscore:true,
})
}else{
this.setState({
completionefficiencyscore:false,
})
}
}
if(this.state.proportion === "自定义分值"){
this.setState({
boolUnitetwoname:"自定义分值",

@ -17,7 +17,7 @@
box-sizing: border-box;
}
.userNavs{
line-height: 96px;
line-height: 75px;
background: #fff;
height:96px;
background:rgba(255,255,255,1);
@ -79,3 +79,10 @@
margin-top: 43px;
}
.mb120{
margin-bottom: 120px !important;
}
.mb80{
margin-bottom: 80px !important;
}

@ -5,10 +5,12 @@ import SendPanel from "./sendPanel.js";
import { getImageUrl } from 'educoder';
import axios from 'axios';
import Modals from '../../modals/Modals';
import AccountProfile from"../../user/AccountProfile";
import OpenCourse from './OpenCourse';
import Jointheclass from '../../modals/Jointheclass'
import Jointheclass from '../../modals/Jointheclass';
import './DetailTop.css';
const Search = Input.Search;
const RadioGroup = Radio.Group;
class DetailTop extends Component{
@ -262,6 +264,18 @@ class DetailTop extends Component{
}
putappointment=()=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({
AccountProfiletype:true
})
return
}
this.setState({
Modalstype:true,
Modalstopval:"是否确认立即预约?",
@ -321,9 +335,15 @@ class DetailTop extends Component{
this.cardsModalcancel()
})
}
hideAccountProfile=()=>{
this.setState({
AccountProfiletype:false
})
}
render(){
let{detailInfoList}=this.props;
let{Modalstype,Modalstopval,cardsModalcancel,putappointmenttype,Modalsbottomval,cardsModalsavetype,loadtype,getappointmenttype}=this.state;
let{Modalstype,Modalstopval,cardsModalcancel,putappointmenttype,Modalsbottomval,cardsModalsavetype,loadtype,getappointmenttype,AccountProfiletype}=this.state;
const radioStyle = {
display: 'block',
height: '30px',
@ -352,7 +372,13 @@ class DetailTop extends Component{
return(
<div className={this.props.courses===undefined||this.props.courses.length===0?"subhead":applypath===false?"subhead mb70":this.state.MenuItemskey===this.props.courses.length?"subhead mb100":"subhead mb70"}>
<div className={this.props.courses===undefined?"subhead":this.props.courses.length===0?applypath===true?"subhead mb100":"subhead":applypath===false?detailInfoList.name.length>40?"subhead mb100":"subhead mb70":this.state.MenuItemskey===this.props.courses.length?"subhead mb120":detailInfoList.name.length>40?"subhead mb100":"subhead mb80"}>
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.props}
{...this.state}
/>:""}
<Modals
modalsType={Modalstype}
modalsTopval={Modalstopval}
@ -364,10 +390,24 @@ class DetailTop extends Component{
</Modals>
{this.state.yslJointhe===true?<Jointheclass {...this.props} {...this.state} ysljoinmodalCancel={()=>this.ysljoinmodalCancel()} ysljoinmodalCanceltwo={()=>this.ysljoinmodalCanceltwo(this.state.MenuItemskey)}></Jointheclass>:""}
{this.state.OpenCourseTypes===true?<OpenCourse {...this.props} {...this.state} OpenCourseCancel={()=>this.OpenCourseCancel()}/>:""}
<style>
{
`
.subhead_content{
position: relative;
}
.userNavs{
position: absolute;
width: 1200px;
}
`
}
</style>
{
detailInfoList &&
<div className={this.props.courses===undefined?"subhead_content":this.props.courses.length===0?"subhead_content pt40":"subhead_content pt100"}>
<div className={this.props.courses===undefined?"subhead_content":this.props.courses.length===0?"subhead_content pt40":"subhead_content "}>
<div className="font-28 color-white clearfix">
{/*<Tooltip placement="bottom" title={detailInfoList.name.length>27?detailInfoList.name:""}>*/}
@ -486,7 +526,7 @@ class DetailTop extends Component{
</div>
{this.props.courses===undefined||isadminallow_statistics===true?"":<div className="userNavs mt20" style={applypath===false?{}:this.state.MenuItemskey===this.props.courses.length?{height:'158px'}:{}}>
{this.props.courses===undefined||isadminallow_statistics===true?"":<div className="userNavs mt20" style={applypath===false?{}:this.state.MenuItemskey===this.props.courses.length?{height:'135px'}:{}}>
<style>
{
`
@ -509,7 +549,7 @@ class DetailTop extends Component{
`
}
</style>
{this.props.courses===undefined||this.props.courses.length===0?"":<li className={"fl pd4020"}>
{this.props.courses===undefined||this.props.courses.length===0?"":<li className={"fl pd4020 mt10"}>
{this.state.courseslist.map((item,key)=>{
if(item.course_identity<4){
@ -651,7 +691,10 @@ class DetailTop extends Component{
.mt26{
margin-top:26px;
}
.mt10block{
margin-top: 10px;
display: inline-block;
}
`
}
</style>
@ -671,8 +714,8 @@ class DetailTop extends Component{
<span className={coursestypes===true?"fr user_default_btn background191 font-18 pathbtensbox mt5":"fr user_default_btn background191 font-18 pathbtensbox mt26"}>预约报名成功</span>:""}
{/*{item.course_status.status===0?<div className="mr51 shixun_detail pointer fl user-colorgrey-green pathdefault">即将开课</div>:""}*/}
{item.course_status.status===1?<div className="mr51 shixun_detail pointer fl color-orange pathdefault">{item.course_status.time}</div>:""}
{item.course_status.status===2&&item.course_identity<6?<div className="mr20 shixun_detail pointer fl user-colorgrey-9b pathdefault">已结束</div>:""}
{item.course_status.status===1?<div className="mr51 shixun_detail pointer fl color-orange pathdefault mt10">{item.course_status.time}</div>:""}
{item.course_status.status===2&&item.course_identity<6?<div className="mr20 shixun_detail pointer fl user-colorgrey-9b pathdefault mt10">已结束</div>:""}
{/*<div className="fr user_default_btn background191 font-18 mt28 pathbtens pathdefault">已结束</div>*/}
{item.course_status.status===0?
item.course_identity<5?<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens courseslistsa mr20" href={item.first_category_url} target="_blank">
@ -690,7 +733,7 @@ class DetailTop extends Component{
{item.course_status.status===2?
item.course_identity<6?<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens courseslistsa mr20" href={item.first_category_url} target="_blank">
进入课堂
</a>:<div className="mr20 shixun_detail pointer fl user-colorgrey-9b pathdefault"></div>:""}
</a>:<div className="mr20 shixun_detail pointer fl user-colorgrey-9b pathdefault mt10"></div>:""}
</div>
)})}
@ -712,8 +755,8 @@ class DetailTop extends Component{
:""}
{applypath===true&&this.props.courses.length===0?this.state.MenuItemskey===this.props.courses.length||coursestypes===true?<span className={coursestypes===true?"fl ml20 lineHeight0 relativewidth":"fl ml20 lineHeight0 relativewidth"}>
<span>当前预约报名人数<span className={"color-red mr5"}>{getappointmenttype===true?this.props.detailInfoList&&this.props.detailInfoList.participant_count+1:this.props.detailInfoList&&this.props.detailInfoList.participant_count}</span></span>
<span className={"font153"}>当预约报名人数达到 {this.props.detailInfoList&&this.props.detailInfoList.student_count} 人时即将开课</span>
<span className={"mt10block"}>当前预约报名人数<span className={"color-red mr5"}>{getappointmenttype===true?this.props.detailInfoList&&this.props.detailInfoList.participant_count+1:this.props.detailInfoList&&this.props.detailInfoList.participant_count}</span></span>
<span className={"font153 mt10block"}>当预约报名人数达到 {this.props.detailInfoList&&this.props.detailInfoList.student_count} 人时即将开课</span>
{this.props.detailInfoList&&this.props.detailInfoList.has_participate===false?
getappointmenttype===true?<span className={coursestypes===true?"fr user_default_btn background191 font-18 pathbtensbox absolutewidth mt5":"fr user_default_btn background191 font-18 pathbtensbox absolutewidth"}>预约报名成功</span>:<a className={coursestypes===true?"fr user_default_btn task-btn-28BE6C font-18 pathbtensbox absolutewidth mt5":"fr user_default_btn task-btn-28BE6C font-18 pathbtensbox absolutewidth"} onClick={()=>this.putappointment()}></a>:
<span className={coursestypes===true?"fr user_default_btn background191 font-18 pathbtensbox absolutewidth mt5":"fr user_default_btn background191 font-18 pathbtensbox absolutewidth"}>预约报名成功</span>}

@ -621,7 +621,10 @@ class PathDetailIndex extends Component{
{/*}*/}
</p>
<div className="clearfix">
<p className="color-grey-9 font-12 fl"><span className="mr10">{item.school}</span><span>{item.identity}</span></p>
<p className="color-grey-9 font-12 fl">
<span className="mr10">{item.school}</span>
{/*<span>{item.identity}</span>*/}
</p>
</div>
</div>
</div>
@ -645,7 +648,9 @@ class PathDetailIndex extends Component{
}
</p>
<div className="clearfix">
<p className="color-grey-9 font-12 fl"><span className="mr10">{item.school}</span><span>{item.identity}</span></p>
<p className="color-grey-9 font-12 fl"><span className="mr10">{item.school}</span>
{/*<span>{item.identity}</span>*/}
</p>
</div>
{
detailInfoList===undefined?"":detailInfoList.allow_add_member===true? <div>
@ -674,7 +679,9 @@ class PathDetailIndex extends Component{
{/*}*/}
</p>
<div className="clearfix">
<p className="color-grey-9 font-12 fl"><span className="mr10">{item.school}</span><span>{item.identity}</span></p>
<p className="color-grey-9 font-12 fl"><span className="mr10">{item.school}</span>
{/*<span>{item.identity}</span>*/}
</p>
</div>
</div>
</div>

@ -39,21 +39,21 @@ class InfosBanner extends Component{
<div className="bannerPanel mb60">
<div className="educontent">
<div className="clearfix color-white mb25">
<p className="myPhoto mr20 fl"><img alt="头像" src={data && `${getImageUrl('images/'+data.avatar_url)}`}/></p>
<p className="myPhoto mr20 fl"><img alt="头像" src={data && `${getImageUrl('images/'+data.avatar_url)}?t=${new Date().getTime()}`}/></p>
<div className="fl">
<p className="clearfix mt20">
<span className="username task-hide" style={{"maxWidth":'370px'}}>{data && data.name}</span>
{
data && is_current == false && data.identity =="学生" ? "" :
<span className="userpost"><label>{data && data.identity}</label></span>
}
{/*{*/}
{/*data && is_current == false && data.identity =="学生" ? "" : */}
{/*<span className="userpost"><label>{data && data.identity}</label></span>*/}
{/*}*/}
</p>
<p className="mt15">
<Tooltip placement='bottom' title={ data && data.professional_certification ?"已职业认证":"未职业认证"}>
<i className={ data && data.professional_certification ? "iconfont icon-shenfenzhenghaomaguizheng font-18 user-colorgrey-green mr20 ml2":"iconfont icon-shenfenzhenghaomaguizheng font-18 user-colorgrey-B8 mr20 ml2"}></i>
<i className={ data && data.professional_certification ? "iconfont icon-shenfenzhenghaomaguizheng font-18 user-colorgrey-blue mr20 ml2":"iconfont icon-shenfenzhenghaomaguizheng font-18 user-colorgrey-B8 mr20 ml2"}></i>
</Tooltip>
<Tooltip placement='bottom' title={ data && data.authentication ?"已实名认证":"未实名认证"}>
<i className={ data && data.authentication ? "iconfont icon-renzhengshangjia font-18 user-colorgrey-green":"iconfont icon-renzhengshangjia font-18 user-colorgrey-B8"}></i>
<i className={ data && data.authentication ? "iconfont icon-renzhengshangjia font-18 user-colorgrey-blue":"iconfont icon-renzhengshangjia font-18 user-colorgrey-B8"}></i>
</Tooltip>
</p>
</div>

@ -168,6 +168,7 @@
}
.user-colorgrey-B8{color:#B8B8B8}
.user-colorgrey-green{color:#7ED321}
.user-colorgrey-blue{color:#98EBFF}
.user_yellow_btn {
color: #fff!important;
background-color: #FF8E02;

Loading…
Cancel
Save