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

dev_auth
cxt 5 years ago
commit 1e86098fb8

@ -853,7 +853,7 @@ class Registration extends React.Component {
{
data && data.map((item, index) => {
return (
<Registrationitem key={index} item={item}></Registrationitem>
<Registrationitem {...this.props} {...this.state} key={index} item={item}></Registrationitem>
)
})
}
@ -864,7 +864,7 @@ class Registration extends React.Component {
: ""}
{
type === 1 ?
<RegisNodata></RegisNodata>
<RegisNodata {...this.props} {...this.state} ></RegisNodata>
:
""
}
@ -876,7 +876,9 @@ class Registration extends React.Component {
return (
<PersonalCompetititem key={index} type={type} item={item} index={index} mode={mode}
Exittheteamshow={(itemid) => this.Exittheteamshow(itemid)}
Createateamedit={(itemid) => this.Createateamedit(itemid)}></PersonalCompetititem>
Createateamedit={(itemid) => this.Createateamedit(itemid)}
{...this.props} {...this.state}
></PersonalCompetititem>
)
})
)
@ -886,14 +888,15 @@ class Registration extends React.Component {
{
type === 4 || type === 5 ?
<RegistrationSearch count={count}
<RegistrationSearch {...this.props} {...this.state}
count={count}
RegistrationSearchvalue={(value) => this.RegistrationSearchvalue(value)}></RegistrationSearch>
: ""
}
{/*<Registrationitem></Registrationitem>*/}
{
type === 4 || type === 5 ?
<RegisListview></RegisListview>
<RegisListview {...this.props} {...this.state}></RegisListview>
:
""
}
@ -904,7 +907,7 @@ class Registration extends React.Component {
{
competition_teams && competition_teams.map((item, index) => {
return (
<RegisListviewdata key={index} item={item}></RegisListviewdata>
<RegisListviewdata {...this.props} {...this.state} key={index} item={item}></RegisListviewdata>
)
})
}

@ -63,8 +63,8 @@ class PersonalCompetititem extends React.Component {
// console.log(data);
// console.log("PersonalCompetititem");
// console.log(type);
// console.log(mode);
// console.log("sdasjdhahsdas");
// console.log(this.props);
return (
<div>
{

@ -76,7 +76,7 @@ class CompetitionsIndex extends Component{
<div>
<div className="clearfix">
<div>
<div className="newMain clearfix">
<div className="clearfix">
<style>
{
`
@ -117,7 +117,7 @@ class CompetitionsIndex extends Component{
</div>
</div>
<div className={"educontent clearfix mtf10 CompetitionsIndex "}>
<div className={"educontent clearfix mtf10 CompetitionsIndex mb20"}>
{datas===undefined?"":datas.length===0?"":<List
itemLayout="vertical"
@ -199,13 +199,13 @@ class CompetitionsIndex extends Component{
}
/>}
{datas===undefined?"":datas.task_count >20 ?<div className="mb40 edu-txt-center padding20-30"
{count===undefined?"":count >15 ?<div className="mb40 edu-txt-center padding20-30"
>
<Pagination
showQuickJumper
defaultCurrent={1}
pageSize={20}
pageSize={15}
total={count===undefined?"":count}
current={page}
onChange={this.PaginationCourse}

@ -78,6 +78,7 @@
font-size:25px;
font-weight:400;
color:rgba(5,16,26,1);
line-height: 30px;
}
.CompetitionCommonbannerfont .competitionbannerdiv:nth-child(2){
@ -189,7 +190,7 @@
}
.Competitionsecondary{
width:234px;
height:277px;
height:298px;
background:rgba(250,250,250,1);
box-shadow:0px 3px 5px 0px rgba(254,190,154,1);
border-radius:5px;
@ -197,7 +198,7 @@
.Competitionthird{
width: 234px;
height: 270px;
height: 298px;
background: rgba(250,250,250,1);
box-shadow: 0px 4px 5px 0px rgba(200,200,202,1);
border-radius: 5px;
@ -215,24 +216,12 @@
position: absolute;
right: -5px;
width:93px;
top: 20px;
}
.Competitionthirdbox{
width:234px;
height:163px;
background:rgba(223,223,225,1);
top: 10px;
}
.Competitionthirdbox{
width:234px;
height:163px;
background:rgba(223,223,225,1);
}
.Competitionthirdbox{
width:234px;
height:163px;
height:167px;
background:rgba(223,223,225,1);
position: relative;
}
@ -246,7 +235,7 @@
.Competitionsecondarybox{
width:234px;
height:155px;
height:167px;
background:rgba(253,230,217,1);
position: relative;
}
@ -275,9 +264,9 @@
zoom: 1;
}
.Competitionthird .ant-card-meta-title{
margin-bottom: 0px !important;
}
/*.Competitionthird .ant-card-meta-title{*/
/*margin-bottom: 0px !important;*/
/*}*/
.Competitionfirst .ant-card-body {
padding: 12px;
@ -347,8 +336,8 @@
}
.image_urlbox{
width: 705px;
/*height: 400px;*/
width: 790px;
height: 340px;
}
.CompetitionContents{
@ -398,3 +387,16 @@
padding-left: 12px;
margin-right: 28px;
}
.Commonimgbox{
width: 800px !important;
}
.CompetitionCommonbannerfont{
width: 350px !important;
margin-left:10px;
}
.color000{
color: #000;
}

@ -50,7 +50,7 @@ class CompetitionCommon extends Component{
if(response.status===200){
this.setState({
data:response.data,
thiskeys:response.data.competition_modules[0].position
thiskeys:response.data.competition_modules[0].id
})
this.getrightdata(
response.data.competition_modules[0].id,
@ -93,7 +93,7 @@ class CompetitionCommon extends Component{
})
data&&data.competition_modules.map((item,key)=>{
if(item.module_type!="enroll") {
if (keys === item.position) {
if (keys === item.id) {
this.getrightdata(item.id, item.module_type, item.module_url, item.has_url, listkey)
return
}
@ -251,27 +251,27 @@ class CompetitionCommon extends Component{
this.props.current_user&&this.props.current_user.admin===true?"":this.props.current_user&&this.props.current_user.business===true?"":<div className={"CompetitionsListzhezhao"}>即将发布 敬请期待</div>:""}
<img className={"Commonimg"}
src={data.competition_status==="ended"?getImageUrl(`images/educoder/competitions/groups1.png`):data.competition_status==="nearly_published"?getImageUrl(`images/educoder/competitions/groups2.png`):data.competition_status==="progressing"?getImageUrl(`images/educoder/competitions/groups3.png`):""} />
<Col span={15}>
<Col span={15} className={"Commonimgbox"}>
<img className={"image_urlbox"} src={data===undefined?getImageUrl(`images/educoder/competitions/mainbanner.jpg`):data.avatar_url===null?getImageUrl(`images/educoder/competitions/mainbanner.jpg`):getImageUrl(data.avatar_url)}/>
</Col>
<Col className={"CompetitionCommonbannerfont"} span={9}>
<Col className={data&&data.name.length>15?"competitionbannerdiv":"competitionbannerdiv mt30"}>{data&&data.name}</Col>
<Col className={data&&data.name.length>15?"competitionbannerdiv mt30":"competitionbannerdiv mt30"}>{data&&data.name}</Col>
<Col className={"competitionbannerdiv"}>
<Col className={"Competitioncolor9b"}>竞赛时间</Col>
<Col>{data&&data.start_time}{data&&data.end_time}</Col>
<Col className={"competitionbannerdiv mt10"}>
<Col className={"Competitioncolor9b"}>竞赛时间<span className={"color000"}>{data&&data.start_time}{data&&data.end_time}</span></Col>
{/*<Col></Col>*/}
</Col>
<Col className={"competitionbannerdiv"}>
<Col className={"competitionbannerdiv mt10"}>
<Row gutter={16}>
<Col className="gutter-row" span={6}>
<div className="gutter-box CompetitionsIndexdadels Competitioncolor77">奖金</div>
</Col>
<Col className="gutter-row ml20" span={6}>
<Col className="gutter-row ml20 rankbeicenter" span={6}>
<div className="gutter-box CompetitionsIndexdadels Competitioncolor77">浏览数</div>
</Col>
<Col className="gutter-row" span={6}>
<Col className="gutter-row rankbeicenter" span={6}>
<div className="gutter-box CompetitionsIndexdadels Competitioncolor77">报名数</div>
</Col>
</Row>
@ -280,10 +280,10 @@ class CompetitionCommon extends Component{
<Col className="gutter-row" span={6}>
<div className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516">¥{data&&data.bonus}</div>
</Col>
<Col className="gutter-row ml20" span={6}>
<Col className="gutter-row ml20 rankbeicenter" span={6}>
<div className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516">{data.competition_status==="nearly_published"?"--":data&&data.visits_count}</div>
</Col>
<Col className="gutter-row" span={6}>
<Col className="gutter-row rankbeicenter" span={6}>
<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>
@ -309,7 +309,7 @@ class CompetitionCommon extends Component{
`
}
</style>}
<Col className={"competitionbannerdiv mt10"}>
<Col className={"competitionbannerdiv mt20"}>
{data.competition_status==="ended"?
<Button type="primary" block className={"Competitionfontsize22"} disabled={true}>
已结束
@ -327,11 +327,11 @@ class CompetitionCommon extends Component{
<Layout className={'teamsLayout mt40'}>
<Sider>
<Menu mode="inline" className="CompetitionMenu" defaultSelectedKeys={['1']} onClick={(e)=>this.getrightdatas(e)}>
<Menu mode="inline" className="CompetitionMenu" defaultSelectedKeys={[`${this.state.thiskeys}`]} onClick={(e)=>this.getrightdatas(e)}>
{data&&data.competition_modules.map((item,key)=>{
if(item.module_type!="enroll"){
return(
<Menu.Item key={item.position}>
<Menu.Item key={item.id}>
{/*{item.has_url===false?<span*/}
{/*// onClick={()=>this.getrightdata(item.id,item.module_type,item.module_url,item.has_url)}*/}
{/*>{item.name}</span>:<a*/}

@ -167,7 +167,7 @@ class CompetitionContents extends Component{
{chartdata===undefined?"":chartdata.teams.length===0?"":chartdata.teams.map((item,key)=>{
if(key===2){
if(key===1){
return(
<Col className="mt40" xs={{ span: 5, offset: 1 }} lg={{ span: 6, offset: 2 }}>
<Card
@ -239,7 +239,7 @@ class CompetitionContents extends Component{
}
})}
{chartdata===undefined?"":chartdata.teams.length===0?"":chartdata.teams.map((item,key)=>{
if(key===1){
if(key===2){
return(
<Col className="mt30" xs={{ span: 5, offset: 1 }} lg={{ span: 6, offset: 1 }}>
<Card
@ -297,10 +297,10 @@ class CompetitionContents extends Component{
<span className={"ranknames"}>您当前排名:{item.rank}</span>
</Col>
<Col className="userranksclass" span={3} order={2}>
{item.user_name}
{personal===undefined||personal===null?item.record_user_name:personal===true?item.user_name:item.team_name}
</Col>
<Col className="textleft" span={9} order={3}>
{item.team_name}
{/*{item.team_name}*/}
</Col>
<Col span={3} order={4}>
{item.cost_time}
@ -313,6 +313,16 @@ class CompetitionContents extends Component{
})}
</div>}
<Row className={"mt20 mb80"}>
<style>
{
`
.ant-table-tbody > tr > td:nth-last-child(3) a{
width: 300px;
display: inline-block;
}
`
}
</style>
{chartdata===undefined?"":chartdata.teams.length===0||chartdata.teams.length<4?"":<Table className="Competitiontransparent" columns={columns} dataSource={data} showHeader={false} pagination={false}/>}
</Row>

@ -130,10 +130,10 @@ class CompetitionContentsMd extends Component{
handleSubmit = () => {
let {contentFileList}=this.state;
const mdContnet = this.contentMdRef.current.getValue().trim();
if(mdContnet.length>10000){
this.props.showNotification("内容超过10000个字");
return
}
// if(mdContnet.length>10000){
// this.props.showNotification("内容超过10000个字");
// return
// }
let attachment_ids=undefined
if(contentFileList!=undefined){
attachment_ids= contentFileList.map(item => {
@ -210,7 +210,7 @@ class CompetitionContentsMd extends Component{
})}
</Tabs>:""}
<TPMMDEditor ref={this.contentMdRef} placeholder="请输入任务内容说明最大限制10000个字符" mdID={'courseContentMD'} refreshTimeout={1500}
<TPMMDEditor ref={this.contentMdRef} placeholder="请输入内容说明" mdID={'courseContentMD'} refreshTimeout={1500}
className="courseMessageMD" initValue={this.state.description}></TPMMDEditor>
{this.props.module_type==="chart"?"":<Upload {...uploadProps} className="upload_1 newWorkUpload">
<Button className="uploadBtn">

Loading…
Cancel
Save