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)
@leader = self_prizes.any?{ |prize_user| prize_user.leader? && prize_user.competition_prize.category == 'bonus' } # 是否为队长并且有奖金奖励
if @leader
@bank_account = self_prizes.find(&:leader?).extra
if @leader || current_user.admin_or_business?
@bank_account = self_prizes.find(&:leader?)&.extra
@bank_account_editable = self_prizes.select(&:leader?).all?(&:pending?)
end

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

@ -17,7 +17,7 @@ json.top do
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.array! @career.to_a do |c|

@ -468,7 +468,17 @@ class CompetitionCommon extends Component{
</Col>
</Row>
</div>
<style>
{
`
.CompetitionMenu .ant-menu-item a{
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap
}
`
}
</style>
<Layout className={'teamsLayout mt40'}>
<Sider>
<Menu mode="inline" className="CompetitionMenu" selectedKeys={[`${this.state.thiskeys}`]}
@ -484,7 +494,7 @@ class CompetitionCommon extends Component{
{/*href={item.module_url}*/}
{/*// onClick={()=>this.getrightdata(item.id,item.module_type)}*/}
{/*>{item.name}</a>}*/}
<a>{item.name}</a>
<a title={item.name}>{item.name}</a>
</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,
school:item.school_name,
spendtime:item.spend_time,
score:item.score,
score:item.score<50?"< 50 分":item.score,
user_login:item.user_login
}
datas.push(list)
@ -148,6 +148,16 @@ class CompetitionContents extends Component{
return (
<div>
<style>
{
`
.ant-tabs-nav .ant-tabs-tab{
font-size: 20px;
margin: 0 10px 0 0;
}
`
}
</style>
{chart_rules === undefined ? "" :
<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 : "" : "" : ""}>
@ -205,7 +215,7 @@ class CompetitionContents extends Component{
{this.props&&this.props.mode===1?<div className={"rankfontmid"}>{item.spend_time}</div>:""}
</div>}
description={
<div className={"rankfontbottom"}>{item.score}</div>
<div className={"rankfontbottom"}>{item.score<50?"< 50 分":item.score}</div>
}
/>
</Card>
@ -241,7 +251,7 @@ class CompetitionContents extends Component{
{this.props&&this.props.mode===1?<div className={"rankfontmid"}>{item.spend_time}</div>:""}
</div>}
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>:""}
</div>}
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 {
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(
<Row type="flex" key={key}>
<Col span={4} order={1}>
<Col span={4} order={1} className={"col13"}>
<span className={"ranknames"}>您当前排名:{item.rank}</span>
</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}
</Col>
<Col className="textleft" span={9} order={3}>
@ -318,8 +340,8 @@ class CompetitionContents extends Component{
<Col span={3} order={4}>
{this.props&&this.props.mode===1?item.cost_time:""}
</Col>
<Col className="textright" span={3} order={5}>
<span className={"ranknameslast"}>{item.score}</span>
<Col className="textright" span={3} order={5} className={"col15"}>
<span className={"ranknameslast"}>{item.score<50?"< 50 分":item.score}</span>
</Col>
</Row>
)

@ -17,7 +17,14 @@ class CompetitionContentspdf extends Component{
componentDidMount(){
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)=>{
@ -54,4 +61,4 @@ class CompetitionContentspdf extends Component{
)
}
}
export default CompetitionContentspdf;
export default CompetitionContentspdf;

@ -340,7 +340,11 @@ class CompetitionContentspdfpeopledata extends Component {
render() {
const {updating, seconds, secondsFlag, basicInfo, phonebool, emailbool, certification, formationdata, bank_account_editable, leader, bank_account} = this.state
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
return (
<div className="flexdidirectionss mt17">
{this.state.certification === 1 ?
@ -528,7 +532,19 @@ class CompetitionContentspdfpeopledata extends Component {
}
</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>
}

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

@ -1085,24 +1085,24 @@ class LoginRegisterComponent extends Component {
<a onClick={()=>this.openweixinlogin()}>
<img src={require('./img/WeChat.png')} alt="微信登录"/>
</a>
{/*<a onClick={()=>this.openqqlogin()} className={"ml10"}>*/}
{/*<img src={require('./img/qq.png')} alt="qq登录"/>*/}
<a onClick={()=>this.openqqlogin()} className={"ml10"}>
<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 onClick={()=>this.openphoneqqlogin()}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div>
</p>: ""}
</p>}
</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()}>
<img src={require('./img/WeChat.png')} alt="微信登录"/>
</a>
{/*<a onClick={()=>this.openqqlogin()} className={"ml10"}>*/}
{/*<img src={require('./img/qq.png')} alt="qq登录"/>*/}
<a onClick={()=>this.openqqlogin()} className={"ml10"}>
<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 onClick={()=>this.openphoneqqlogin()}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div>
</p>: ""
</p>
}
</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
className={"weixinheight390 mt20"}

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

Loading…
Cancel
Save