dev_home
cxt 5 years ago
commit c67b608a36

@ -7,8 +7,8 @@ class Competitions::PrizesController < Competitions::BaseController
self_prizes = current_competition.competition_prize_users.where(user_id: current_prize_user.id).includes(:competition_team).order(:competition_prize_id) self_prizes = current_competition.competition_prize_users.where(user_id: current_prize_user.id).includes(:competition_team).order(:competition_prize_id)
@leader = self_prizes.any?{ |prize_user| prize_user.leader? && prize_user.competition_prize.category == 'bonus' } # 是否为队长并且有奖金奖励 @leader = self_prizes.any?{ |prize_user| prize_user.leader? && prize_user.competition_prize.category == 'bonus' } # 是否为队长并且有奖金奖励
if @leader if @leader || current_user.admin_or_business?
@bank_account = self_prizes.find(&:leader?).extra @bank_account = self_prizes.find(&:leader?)&.extra
@bank_account_editable = self_prizes.select(&:leader?).all?(&:pending?) @bank_account_editable = self_prizes.select(&:leader?).all?(&:pending?)
end end

@ -1,6 +1,6 @@
json.leader @leader json.leader @leader
if @leader if @leader || User.current.admin_or_business?
json.bank_account @bank_account json.bank_account @bank_account
json.bank_account_editable @bank_account_editable json.bank_account_editable @bank_account_editable
end end

@ -17,7 +17,7 @@ json.top do
json.crowdsourcing_url "/crowdsourcing" json.crowdsourcing_url "/crowdsourcing"
# 客户管理 # 客户管理
json.customer_management_url current_user.partner_managers.exists? ? "#{@old_domain}/cooperates/#{current_user.partner_managers.first.partner_id}/partner_list" : nil json.customer_management_url current_user.partner_managers.exists? ? "/partners/#{current_user.partner_managers.first.partner_id}/customers" : nil
json.career_url do json.career_url do
json.array! @career.to_a do |c| json.array! @career.to_a do |c|

@ -468,7 +468,17 @@ class CompetitionCommon extends Component{
</Col> </Col>
</Row> </Row>
</div> </div>
<style>
{
`
.CompetitionMenu .ant-menu-item a{
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap
}
`
}
</style>
<Layout className={'teamsLayout mt40'}> <Layout className={'teamsLayout mt40'}>
<Sider> <Sider>
<Menu mode="inline" className="CompetitionMenu" selectedKeys={[`${this.state.thiskeys}`]} <Menu mode="inline" className="CompetitionMenu" selectedKeys={[`${this.state.thiskeys}`]}
@ -484,7 +494,7 @@ class CompetitionCommon extends Component{
{/*href={item.module_url}*/} {/*href={item.module_url}*/}
{/*// onClick={()=>this.getrightdata(item.id,item.module_type)}*/} {/*// onClick={()=>this.getrightdata(item.id,item.module_type)}*/}
{/*>{item.name}</a>}*/} {/*>{item.name}</a>}*/}
<a>{item.name}</a> <a title={item.name}>{item.name}</a>
</Menu.Item> </Menu.Item>
) )
} }

@ -137,7 +137,7 @@ class CompetitionContents extends Component{
username:personal===undefined||personal===null?item.record_user_name:personal===true?item.record_user_name:item.team_name, username:personal===undefined||personal===null?item.record_user_name:personal===true?item.record_user_name:item.team_name,
school:item.school_name, school:item.school_name,
spendtime:item.spend_time, spendtime:item.spend_time,
score:item.score, score:item.score<50?"< 50 分":item.score,
user_login:item.user_login user_login:item.user_login
} }
datas.push(list) datas.push(list)
@ -148,6 +148,16 @@ class CompetitionContents extends Component{
return ( return (
<div> <div>
<style>
{
`
.ant-tabs-nav .ant-tabs-tab{
font-size: 20px;
margin: 0 10px 0 0;
}
`
}
</style>
{chart_rules === undefined ? "" : {chart_rules === undefined ? "" :
<Tabs onChange={(e) => this.props.Competitioncallback(e)} activeKey={this.props.tabkey} <Tabs onChange={(e) => this.props.Competitioncallback(e)} activeKey={this.props.tabkey}
tabBarExtraContent={data && data.permission.editable === true ? this.props.Competitionedittype === false ? this.props.has_url === false ? operations : "" : "" : ""}> tabBarExtraContent={data && data.permission.editable === true ? this.props.Competitionedittype === false ? this.props.has_url === false ? operations : "" : "" : ""}>
@ -205,7 +215,7 @@ class CompetitionContents extends Component{
{this.props&&this.props.mode===1?<div className={"rankfontmid"}>{item.spend_time}</div>:""} {this.props&&this.props.mode===1?<div className={"rankfontmid"}>{item.spend_time}</div>:""}
</div>} </div>}
description={ description={
<div className={"rankfontbottom"}>{item.score}</div> <div className={"rankfontbottom"}>{item.score<50?"< 50 分":item.score}</div>
} }
/> />
</Card> </Card>
@ -241,7 +251,7 @@ class CompetitionContents extends Component{
{this.props&&this.props.mode===1?<div className={"rankfontmid"}>{item.spend_time}</div>:""} {this.props&&this.props.mode===1?<div className={"rankfontmid"}>{item.spend_time}</div>:""}
</div>} </div>}
description={ description={
<div className={"rankfontbottoms"}>{item.score}</div> <div className={"rankfontbottoms"}>{item.score<50?"< 50 分":item.score}</div>
} }
/> />
@ -277,7 +287,7 @@ class CompetitionContents extends Component{
{this.props&&this.props.mode===1?<div className={"rankfontmid"}>{item.spend_time}</div>:""} {this.props&&this.props.mode===1?<div className={"rankfontmid"}>{item.spend_time}</div>:""}
</div>} </div>}
description={ description={
<div className={"rankfontbottom"}>{item.score}</div> <div className={"rankfontbottom"}>{item.score<50?"< 50 分":item.score}</div>
} }
/> />
@ -298,6 +308,18 @@ class CompetitionContents extends Component{
.ant-col-9 { .ant-col-9 {
width: 35.5%; width: 35.5%;
} }
.col13{
width:13%;
text-align:left;
}
.col24{
width: 24%;
text-align: left;
padding-left: 16px;
}
.col15{
width: 15%;
}
` `
} }
@ -306,10 +328,10 @@ class CompetitionContents extends Component{
return( return(
<Row type="flex" key={key}> <Row type="flex" key={key}>
<Col span={4} order={1}> <Col span={4} order={1} className={"col13"}>
<span className={"ranknames"}>您当前排名:{item.rank}</span> <span className={"ranknames"}>您当前排名:{item.rank}</span>
</Col> </Col>
<Col className="userranksclass" span={3} order={2}> <Col className="userranksclass" span={3} order={2} className={"col24"}>
{personal===undefined||personal===null?item.record_user_name:personal===true?item.user_name:item.team_name} {personal===undefined||personal===null?item.record_user_name:personal===true?item.user_name:item.team_name}
</Col> </Col>
<Col className="textleft" span={9} order={3}> <Col className="textleft" span={9} order={3}>
@ -318,8 +340,8 @@ class CompetitionContents extends Component{
<Col span={3} order={4}> <Col span={3} order={4}>
{this.props&&this.props.mode===1?item.cost_time:""} {this.props&&this.props.mode===1?item.cost_time:""}
</Col> </Col>
<Col className="textright" span={3} order={5}> <Col className="textright" span={3} order={5} className={"col15"}>
<span className={"ranknameslast"}>{item.score}</span> <span className={"ranknameslast"}>{item.score<50?"< 50 分":item.score}</span>
</Col> </Col>
</Row> </Row>
) )

@ -17,7 +17,14 @@ class CompetitionContentspdf extends Component{
componentDidMount(){ componentDidMount(){
window.document.title = '竞赛'; window.document.title = '竞赛';
let query=this.props.location&&this.props.location.search;
const types = query.split('user_id=')
if(types[1]===undefined){
}else{
this.setState({
Tabskey:"2"
})
}
} }
Competitioncallback=(key)=>{ Competitioncallback=(key)=>{

@ -340,6 +340,10 @@ class CompetitionContentspdfpeopledata extends Component {
render() { render() {
const admins=this.props.user.admin;
if(admins===undefined||admins===null) {
admins === false;
}
const {updating, seconds, secondsFlag, basicInfo, phonebool, emailbool, certification, formationdata, bank_account_editable, leader, bank_account} = this.state const {updating, seconds, secondsFlag, basicInfo, phonebool, emailbool, certification, formationdata, bank_account_editable, leader, bank_account} = this.state
return ( return (
<div className="flexdidirectionss mt17"> <div className="flexdidirectionss mt17">
@ -528,8 +532,20 @@ class CompetitionContentspdfpeopledata extends Component {
} }
</div> </div>
:
<div>
{
admins===true?
<Bankcardnumberverifications {...this.props} {...this.state} basicInfo={this.state.basicInfo}
hideUpdating={(i) => this.hideUpdating(i)}
getdata={() => this.getdata()}
GetawardinformationAPI={() => this.GetawardinformationAPI()}
bank_account={this.state.bank_account}
></Bankcardnumberverifications>
:"" :""
} }
</div>
}
</div> </div>

@ -720,23 +720,23 @@ class LoginDialog extends Component {
<a onClick={()=>this.openweixinlogin()}> <a onClick={()=>this.openweixinlogin()}>
<img src={require('./WeChat.png')} alt="微信登录"/> <img src={require('./WeChat.png')} alt="微信登录"/>
</a> </a>
{/*<a onClick={()=>this.openqqlogin()} className={"ml10"}>*/} <a onClick={()=>this.openqqlogin()} className={"ml10"}>
{/*<img src={require('./qq.png')} alt="qq登录"/>*/} <img src={require('./qq.png')} alt="qq登录"/>
{/*</a>*/} </a>
</div> </div>
</p>:""} </p>:<p className="clearfix mt20">
{/*<p className="clearfix mt20">*/}
<span className={"startlogin"}> 快速登录 </span>
{/*<span className={"startlogin"}>———————— 快速登录 ————————</span>*/} <div className={"mt10"}>
{/*<div className={"mt10"}>*/} {/*<a onClick={()=>this.openweixinlogin()}>*/}
{/*/!*<a onClick={()=>this.openweixinlogin()}>*!/*/} {/*<img src={require('./WeChat.png')} alt="微信登录"/>*/}
{/*/!*<img src={require('./WeChat.png')} alt="微信登录"/>*!/*/}
{/*/!*</a>*!/*/}
{/*<a onClick={()=>this.openphoneqqlogin()} className={"ml10"}>*/}
{/*<img src={require('./qq.png')} alt="qq登录"/>*/}
{/*</a>*/} {/*</a>*/}
{/*</div>*/} <a onClick={()=>this.openphoneqqlogin()} className={"ml10"}>
{/*</p>*/} <img src={require('./qq.png')} alt="qq登录"/>
</a>
</div>
</p>}
</form>} </form>}

@ -1085,24 +1085,24 @@ class LoginRegisterComponent extends Component {
<a onClick={()=>this.openweixinlogin()}> <a onClick={()=>this.openweixinlogin()}>
<img src={require('./img/WeChat.png')} alt="微信登录"/> <img src={require('./img/WeChat.png')} alt="微信登录"/>
</a> </a>
{/*<a onClick={()=>this.openqqlogin()} className={"ml10"}>*/} <a onClick={()=>this.openqqlogin()} className={"ml10"}>
{/*<img src={require('./img/qq.png')} alt="qq登录"/>*/} <img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div>
</p>:<p className="clearfix mb10 textcenter">
<span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
{/*<a onClick={()=>this.openweixinlogin()}>*/}
{/*<img src={require('./WeChat.png')} alt="微信登录"/>*/}
{/*</a>*/} {/*</a>*/}
<a onClick={()=>this.openphoneqqlogin()}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div> </div>
</p>: ""} </p>}
</div> </div>
} }
{/*<p className="clearfix mb10 textcenter">*/}
{/*<span className={"startlogin"}>———————— 快速登录 ————————</span>*/}
{/*<div className={"mt10"}>*/}
{/*/!*<a onClick={()=>this.openweixinlogin()}>*!/*/}
{/*/!*<img src={require('./WeChat.png')} alt="微信登录"/>*!/*/}
{/*/!*</a>*!/*/}
{/*<a onClick={()=>this.openphoneqqlogin()}>*/}
{/*<img src={require('./img/qq.png')} alt="qq登录"/>*/}
{/*</a>*/}
{/*</div>*/}
{/*</p>*/}
{ {
@ -1260,27 +1260,27 @@ class LoginRegisterComponent extends Component {
<a onClick={()=>this.openweixinlogin()}> <a onClick={()=>this.openweixinlogin()}>
<img src={require('./img/WeChat.png')} alt="微信登录"/> <img src={require('./img/WeChat.png')} alt="微信登录"/>
</a> </a>
{/*<a onClick={()=>this.openqqlogin()} className={"ml10"}>*/} <a onClick={()=>this.openqqlogin()} className={"ml10"}>
{/*<img src={require('./img/qq.png')} alt="qq登录"/>*/} <img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div>
</p>:<p className="clearfix mb10 textcenter">
<span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
{/*<a onClick={()=>this.openweixinlogin()}>*/}
{/*<img src={require('./WeChat.png')} alt="微信登录"/>*/}
{/*</a>*/} {/*</a>*/}
<a onClick={()=>this.openphoneqqlogin()}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div> </div>
</p>: "" </p>
} }
</div> </div>
} }
{/*<p className="clearfix mb10 textcenter">*/}
{/*<span className={"startlogin"}>———————— 快速登录 ————————</span>*/}
{/*<div className={"mt10"}>*/}
{/*/!*<a onClick={()=>this.openweixinlogin()}>*!/*/}
{/*/!*<img src={require('./WeChat.png')} alt="微信登录"/>*!/*/}
{/*/!*</a>*!/*/}
{/*<a onClick={()=>this.openphoneqqlogin()}>*/}
{/*<img src={require('./img/qq.png')} alt="qq登录"/>*/}
{/*</a>*/}
{/*</div>*/}
{/*</p>*/}
{weixinlogin===true?<iframe {weixinlogin===true?<iframe
className={"weixinheight390 mt20"} className={"weixinheight390 mt20"}

@ -242,7 +242,6 @@ class AccountSecure extends Component {
<Form> <Form>
{list.map((item,key)=>{ {list.map((item,key)=>{
if(item.en_type!="qq"){
return( return(
<div className="flexTable" key={key}> <div className="flexTable" key={key}>
<div className="flexTable"> <div className="flexTable">
@ -271,7 +270,6 @@ class AccountSecure extends Component {
</div> </div>
</div> </div>
) )
}
}) })
} }

Loading…
Cancel
Save