Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_auth
杨树林 5 years ago
commit 4e88bded2a

@ -176,7 +176,7 @@ class Competitions::CompetitionsController < Competitions::BaseController
if personal
row_cells_column << record_user.real_name
row_cells_column << record_user.school_name
row_cells_column << record_user.student_id
row_cells_column << record_user.student_id.present? ? (record_user.student_id.to_s + "\t") : "--"
else
row_cells_column << record.name
row_cells_column << record.teachers_name

@ -44,7 +44,7 @@ module ExportHelper
w_2 = w_user&.login.present? ? w_user&.login : "--"
w_3 = w_user&.real_name.present? ? w_user&.real_name : "--"
w_3_1 = w_user&.mail.present? ? w_user.mail : "--"
w_4 = w_user.student_id.present? ? w_user.student_id : "--"
w_4 = w_user.student_id.present? ? (w_user.student_id.to_s + "\t") : "--"
else
w_2 = "--"
w_3 = "--"
@ -132,7 +132,7 @@ module ExportHelper
w_2 = w_user&.login.present? ? w_user&.login : "--"
w_3 = w_user&.real_name.present? ? w_user&.real_name : "--"
w_3_1 = w_user&.mail.present? ? w_user.mail : "--"
w_4 = w_user.student_id.present? ? w_user.student_id : "--"
w_4 = w_user.student_id.present? ? (w_user.student_id.to_s + "\t") : "--"
course_name = course.students.find_by(user_id: w.user_id).try(:course_group_name)
w_5 = course_name.present? ? course_name : "--"
#0 未提交, 1 按时提交, 2 延迟提交
@ -217,7 +217,7 @@ module ExportHelper
w_2 = w_user&.login.present? ? w_user&.login : "--"
w_3 = w_user&.real_name.present? ? w_user&.real_name : "--"
w_3_1 = w_user&.mail.present? ? w_user.mail : "--"
w_4 = w_user.student_id.present? ? w_user.student_id : "--"
w_4 = w_user.student_id.present? ? (w_user.student_id.to_s + "\t") : "--"
w_5 = work.class_grouping_name
if task_type_boolean #是否分组
w_6 = work.grouping_name
@ -311,7 +311,7 @@ module ExportHelper
end
user_start_time = e_user.start_at.present? ? e_user.start_at.strftime('%Y-%m-%d %H:%M') : "--"
user_end_time = e_user.end_at.present? ? e_user.end_at.strftime('%Y-%m-%d %H:%M') : "--"
user_student_id = user_info.student_id.present? ? user_info.student_id : "--"
user_student_id = user_info.student_id.present? ? (user_info.student_id.to_s + "\t") : "--"
user_login = user_info&.login.present? ? user_info.login : "--"
user_real_name = user_info.real_name.present? ? user_info.real_name : "--"
user_mail = user_info&.mail.present? ? user_info.mail : "--"
@ -373,7 +373,7 @@ module ExportHelper
w_2 = user&.login.present? ? user&.login : "--"
w_3 = user&.real_name.present? ? user&.real_name : "--"
w_3_1 = user&.mail.present? ? user.mail : "--"
w_4 = user.student_id.present? ? user.student_id : "--"
w_4 = user.student_id.present? ? (user.student_id.to_s + "\t") : "--"
w_5 = student&.course_group_name.present? ? student.course_group_name : "--"
w_6 = topic.present? ? topic.name : "--"
w_7 = topic.present? ? topic.teacher.full_name : "--"

@ -486,7 +486,7 @@ class App extends Component {
{/*/!*众包创新*!/*/}
{/*<Route path={"/crowdsourcing"} component={ProjectPackages}/>*/}
{/*竞赛*/}
<Route path={"/competitions"}
<Route path={"/newcompetitions"}
render={
(props) => {

@ -814,9 +814,9 @@ class Registration extends React.Component {
<div style={{marginBottom: '12px'}}>
<Breadcrumb separator=">">
<Breadcrumb.Item><Link to={"/competitions"}>在线竞赛</Link></Breadcrumb.Item>
<Breadcrumb.Item><Link to={"/newcompetitions"}>在线竞赛</Link></Breadcrumb.Item>
<Breadcrumb.Item><Link
to={`/competitions/${this.props.match.params.identifier}/common_header`}>{competition_name === undefined || competition_name === null || competition_name === "" ? "全国高校计算机大赛" : competition_name}</Link></Breadcrumb.Item>
to={`/newcompetitions/${this.props.match.params.identifier}/common_header`}>{competition_name === undefined || competition_name === null || competition_name === "" ? "全国高校计算机大赛" : competition_name}</Link></Breadcrumb.Item>
{/*<Breadcrumb.Item*/}
{/* href={`/competitions/${this.props.match.params.identifier}/common_header`}></Breadcrumb.Item>*/}
<Breadcrumb.Item>报名</Breadcrumb.Item>

@ -304,7 +304,7 @@ class PersonalCompetititem extends React.Component {
>
<div className="regitemimgs555">
<a
href={`/competitions/${this.props.match.params.identifier}/competition_teams/${item.id}`}
href={`/newcompetitions/${this.props.match.params.identifier}/competition_teams/${item.id}`}
style={{
color: "#459be5",
width: "100%",
@ -364,7 +364,7 @@ class PersonalCompetititem extends React.Component {
>
<div className="regitemimgs555">
<a
href={`/competitions/${this.props.match.params.identifier}/competition_teams/${item.id}`}
href={`/newcompetitions/${this.props.match.params.identifier}/competition_teams/${item.id}`}
style={{
color: "#459be5",
width: "100%",

@ -124,7 +124,7 @@ class CompetitionsIndex extends Component{
size="large"
dataSource={datas&&datas}
renderItem={(item,key) => (
<a href={item.competition_status==="ended"?`/competitions/${item.identifier}/common_header`:item.competition_status==="nearly_published"? this.props.current_user&&this.props.current_user.business===true?`/competitions/${item.identifier}/common_header`:this.props.current_user&&this.props.current_user.admin===true?`/competitions/${item.identifier}/common_header`:null:item.competition_status==="progressing"?`/competitions/${item.identifier}/common_header`:null}
<a href={item.competition_status==="ended"?`/newcompetitions/${item.identifier}/common_header`:item.competition_status==="nearly_published"? this.props.current_user&&this.props.current_user.business===true?`/newcompetitions/${item.identifier}/common_header`:this.props.current_user&&this.props.current_user.admin===true?`/newcompetitions/${item.identifier}/common_header`:null:item.competition_status==="progressing"?`/newcompetitions/${item.identifier}/common_header`:null}
className={item.competition_status==="ended"?"competitionstitlesshou":item.competition_status==="nearly_published"?
this.props.current_user&&this.props.current_user.admin===true?"competitionstitlesshou":this.props.current_user&&this.props.current_user.business===true?"competitionstitlesshou":"endedfont":"competitionstitlesshou"}
>
@ -182,7 +182,7 @@ class CompetitionsIndex extends Component{
title={<a className={item.competition_status==="ended"?"competitionstitlesshou":item.competition_status==="nearly_published"?
this.props.current_user&&this.props.current_user.admin===true?"competitionstitlesshou":this.props.current_user&&this.props.current_user.business===true?"competitionstitlesshou":"endedfont":"competitionstitlesshou"}>
<a className={"competitionstitles"}
href={item.competition_status==="ended"?`/competitions/${item.identifier}/common_header`:item.competition_status==="nearly_published"? this.props.current_user&&this.props.current_user.business===true?`/competitions/${item.identifier}/common_header`:this.props.current_user&&this.props.current_user.admin===true?`/competitions/${item.identifier}/common_header`:null:item.competition_status==="progressing"?`/competitions/${item.identifier}/common_header`:null}
href={item.competition_status==="ended"?`/newcompetitions/${item.identifier}/common_header`:item.competition_status==="nearly_published"? this.props.current_user&&this.props.current_user.business===true?`/newcompetitions/${item.identifier}/common_header`:this.props.current_user&&this.props.current_user.admin===true?`/newcompetitions/${item.identifier}/common_header`:null:item.competition_status==="progressing"?`/newcompetitions/${item.identifier}/common_header`:null}
>{item.name}{item.sub_title===null?"":`——${item.sub_title}`}</a>
{/*<span>{item.sub_title===null?"":*/}
{/*<Tag className="competitionsrelative" color="#87d068">{item.sub_title}</Tag>}*/}

@ -241,8 +241,8 @@ class Competitionteams extends Component{
<div className={"educontent clearfix mt20 "}>
<Breadcrumb separator=">">
<Breadcrumb.Item><Link to={"/competitions"}>{data&&data.name}</Link></Breadcrumb.Item>
<Breadcrumb.Item><Link to={`/competitions/${this.props.match.params.identifier}/enroll`}>报名</Link></Breadcrumb.Item>
<Breadcrumb.Item><Link to={"/newcompetitions"}>{data&&data.name}</Link></Breadcrumb.Item>
<Breadcrumb.Item><Link to={`/newcompetitions/${this.props.match.params.identifier}/enroll`}>报名</Link></Breadcrumb.Item>
<Breadcrumb.Item>战队详情</Breadcrumb.Item>
</Breadcrumb>

@ -240,7 +240,7 @@ class CompetitionCommon extends Component{
data===undefined?"":<div className={"educontent clearfix mt20 "}>
<Breadcrumb separator=">">
<Breadcrumb.Item><Link to={"/competitions"}>在线竞赛</Link></Breadcrumb.Item>
<Breadcrumb.Item><Link to={"/newcompetitions"}>在线竞赛</Link></Breadcrumb.Item>
<Breadcrumb.Item>{data&&data.name}</Breadcrumb.Item>
</Breadcrumb>
@ -284,7 +284,7 @@ class CompetitionCommon extends Component{
<div className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516">{data.competition_status==="nearly_published"?"--":data&&data.visits_count}</div>
</Col>
<Col className="gutter-row rankbeicenter" span={6}>
<div className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516" onClick={data.competition_status==="nearly_published"?"":()=>this.gotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)}>{data.competition_status==="nearly_published"?"--":data&&data.member_count}</div>
<div className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516" onClick={data.competition_status==="nearly_published"?"":()=>this.gotocourse(`/newcompetitions/${this.props.match.params.identifier}/enroll`)}>{data.competition_status==="nearly_published"?"--":data&&data.member_count}</div>
</Col>
</Row>
</Col>
@ -317,7 +317,7 @@ class CompetitionCommon extends Component{
报名截止
</Button>:
data.competition_status==="progressing"?<Button type="primary" block className={"Competitionfontsize22"}>
{data.mode===2?<a onClick={()=>this.gotocourse()}>立即报名</a>:<a onClick={()=>this.gotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)}></a>}
{data.mode===2?<a onClick={()=>this.gotocourse()}>立即报名</a>:<a onClick={()=>this.gotocourse(`/newcompetitions/${this.props.match.params.identifier}/enroll`)}></a>}
</Button>:""}
</Col>
<Col className={"mt10 Competitionfontsize16"}>{data&&data.enroll_end_time===null?"":`报名截止时间:${data&&data.enroll_end_time}`}</Col>

@ -68,7 +68,7 @@ class CompetitionContents extends Component{
const operations = <div>
<Button className={"fr"} type="primary" ghost onClick={()=>this.props.Competitionedit()}>编辑</Button>
<Button className={"fr mr20"} type="primary" ghost>
<a onClick={()=>this.derivefun(`/competitions/${this.props.match.params.identifier}/charts.xlsx`)}>导出</a>
<a onClick={()=>this.derivefun(`/newcompetitions/${this.props.match.params.identifier}/charts.xlsx`)}>导出</a>
</Button>
</div>
const columns = [
@ -317,22 +317,22 @@ class CompetitionContents extends Component{
{
`
.ant-table-tbody > tr > td:nth-last-child(4){
line-height: 63px;
width: 300px;
height: 96px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 63px;
width: 300px;
height: 96px;
display: inline-flex;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ant-table-tbody > tr > td:nth-last-child(3){
line-height: 63px;
width: 300px;
height: 96px;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 63px;
width: 313px;
height: 96px;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ant-table-tbody>tr>td, .ant-table-thead>tr>th {
padding: 15px;

@ -53,7 +53,7 @@ class Competitions extends Component {
<Switch>
{/*新版竞赛战队详情*/}
<Route path="/competitions/:identifier/competition_teams/:competition_team_id"
<Route path="/newcompetitions/:identifier/competition_teams/:competition_team_id"
render={
(props) => (<CompetitionTeams {...this.props} {...props} {...this.state} />)
}
@ -62,21 +62,21 @@ class Competitions extends Component {
{/*新版竞赛报名*/}
<Route
path="/competitions/:identifier/enroll"
path="/newcompetitions/:identifier/enroll"
render={
(props) => (<Registration {...this.props} {...props} {...this.state}/>)
}
/>
{/*新版竞赛详情页面*/}
<Route path="/competitions/:identifier/common_header"
<Route path="/newcompetitions/:identifier/common_header"
render={
(props) => (<CompetitionCommon {...this.props} {...props} {...this.state} />)
}
></Route>
{/*新版竞赛首页*/}
<Route path="/competitions"
<Route path="/newcompetitions"
render={
(props) => (<CompetitionsIndex {...this.props} {...props} {...this.state} />)
}

Loading…
Cancel
Save