diff --git a/app/controllers/competitions/prizes_controller.rb b/app/controllers/competitions/prizes_controller.rb index c87026042..e63cac076 100644 --- a/app/controllers/competitions/prizes_controller.rb +++ b/app/controllers/competitions/prizes_controller.rb @@ -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 diff --git a/app/views/competitions/prizes/show.json.jbuilder b/app/views/competitions/prizes/show.json.jbuilder index 18113a7ed..0fbec23f8 100644 --- a/app/views/competitions/prizes/show.json.jbuilder +++ b/app/views/competitions/prizes/show.json.jbuilder @@ -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 diff --git a/app/views/users/get_navigation_info.json.jbuilder b/app/views/users/get_navigation_info.json.jbuilder index fe5bccb15..c507f7ef8 100644 --- a/app/views/users/get_navigation_info.json.jbuilder +++ b/app/views/users/get_navigation_info.json.jbuilder @@ -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| diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js index 4ccd8fb6f..b2ac34fe1 100755 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js @@ -468,7 +468,17 @@ class CompetitionCommon extends Component{ - + this.getrightdata(item.id,item.module_type)}*/} {/*>{item.name}}*/} - {item.name} + {item.name} ) } diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsChart.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsChart.js index 4a0696877..143a9c80a 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsChart.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsChart.js @@ -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 (
+ {chart_rules === undefined ? "" : 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?
{item.spend_time}
:""}
} description={ -
{item.score}分
+
{item.score<50?"< 50 分":item.score}分
} /> @@ -241,7 +251,7 @@ class CompetitionContents extends Component{ {this.props&&this.props.mode===1?
{item.spend_time}
:""} } description={ -
{item.score}分
+
{item.score<50?"< 50 分":item.score}分
} /> @@ -277,7 +287,7 @@ class CompetitionContents extends Component{ {this.props&&this.props.mode===1?
{item.spend_time}
:""} } description={ -
{item.score}分
+
{item.score<50?"< 50 分":item.score}分
} /> @@ -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( - + 您当前排名:{item.rank} - + {personal===undefined||personal===null?item.record_user_name:personal===true?item.user_name:item.team_name} @@ -318,8 +340,8 @@ class CompetitionContents extends Component{ {this.props&&this.props.mode===1?item.cost_time:""} - - {item.score} + + {item.score<50?"< 50 分":item.score} ) diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdf.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdf.js index a379f2607..218e8497f 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdf.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdf.js @@ -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; \ No newline at end of file +export default CompetitionContentspdf; diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js index aa550c0c5..8640b115c 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js @@ -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 (
{this.state.certification === 1 ? @@ -528,7 +532,19 @@ class CompetitionContentspdfpeopledata extends Component { }
- : "" + : +
+ { + admins===true? + this.hideUpdating(i)} + getdata={() => this.getdata()} + GetawardinformationAPI={() => this.GetawardinformationAPI()} + bank_account={this.state.bank_account} + > + :"" + } +
} diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index 73e2e8afe..9a347a279 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -720,23 +720,23 @@ class LoginDialog extends Component { this.openweixinlogin()}> 微信登录 - {/*this.openqqlogin()} className={"ml10"}>*/} - {/*qq登录*/} - {/**/} + this.openqqlogin()} className={"ml10"}> + qq登录 + -

:""} - {/*

*/} - - {/*———————— 快速登录 ————————*/} - {/*

*/} - {/*/!*this.openweixinlogin()}>*!/*/} - {/*/!*微信登录*!/*/} - {/*/!**!/*/} - {/*this.openphoneqqlogin()} className={"ml10"}>*/} - {/*qq登录*/} +

:

+ + ———————— 快速登录 ———————— +

+ {/*this.openweixinlogin()}>*/} + {/*微信登录*/} {/**/} - {/*
*/} - {/*

*/} + this.openphoneqqlogin()} className={"ml10"}> + qq登录 + +
+

} + } diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index c48e29618..01188bdd1 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -1085,24 +1085,24 @@ class LoginRegisterComponent extends Component { this.openweixinlogin()}> 微信登录 - {/*this.openqqlogin()} className={"ml10"}>*/} - {/*qq登录*/} + this.openqqlogin()} className={"ml10"}> + qq登录 + + +

:

+ ———————— 快速登录 ———————— +

+ {/*this.openweixinlogin()}>*/} + {/*微信登录*/} {/**/} + this.openphoneqqlogin()}> + qq登录 +
-

: ""} +

} } - {/*

*/} - {/*———————— 快速登录 ————————*/} - {/*

*/} - {/*/!*this.openweixinlogin()}>*!/*/} - {/*/!*微信登录*!/*/} - {/*/!**!/*/} - {/*this.openphoneqqlogin()}>*/} - {/*qq登录*/} - {/**/} - {/*
*/} - {/*

*/} + { @@ -1260,27 +1260,27 @@ class LoginRegisterComponent extends Component { this.openweixinlogin()}> 微信登录 - {/*this.openqqlogin()} className={"ml10"}>*/} - {/*qq登录*/} + this.openqqlogin()} className={"ml10"}> + qq登录 + + +

:

+ ———————— 快速登录 ———————— +

+ {/*this.openweixinlogin()}>*/} + {/*微信登录*/} {/**/} + this.openphoneqqlogin()}> + qq登录 +
-

: "" +

} } - {/*

*/} - {/*———————— 快速登录 ————————*/} - {/*

*/} - {/*/!*this.openweixinlogin()}>*!/*/} - {/*/!*微信登录*!/*/} - {/*/!**!/*/} - {/*this.openphoneqqlogin()}>*/} - {/*qq登录*/} - {/**/} - {/*
*/} - {/*

*/} + {weixinlogin===true?