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

dev_home
cxt 6 years ago
commit acdefd2930

@ -30,15 +30,15 @@
# end # end
# end # end
json.array! @sub_reps_map.keys do |rep| json.array! @sub_reps_map.keys.sort_by(&:updated_at).reverse do |rep|
json.extract! rep, :id, :name json.extract! rep, :id, :name
json.sub_repertoires do json.sub_repertoires do
json.array! @sub_reps_map[rep] do |sub_rep| json.array! @sub_reps_map[rep].sort_by(&:updated_at).reverse do |sub_rep|
json.extract! sub_rep, :id, :name json.extract! sub_rep, :id, :name
json.tags do json.tags do
json.array! @tags_map[sub_rep] do |tag| json.array! @tags_map[sub_rep].sort_by(&:updated_at).reverse do |tag|
json.extract! tag, :id, :name json.extract! tag, :id, :name
end end
end end

@ -25,6 +25,8 @@ namespace :competition do
users = User.joins(:user_extension).where(id: user_ids).where(user_extensions: {identity: 0}) users = User.joins(:user_extension).where(id: user_ids).where(user_extensions: {identity: 0})
competition.competition_teams.destroy_all
users.each do |user| users.each do |user|
team = CompetitionTeam.create!(competition_id: competition.id, user_id: user.id, name: user.real_name) team = CompetitionTeam.create!(competition_id: competition.id, user_id: user.id, name: user.real_name)
TeamMember.create!(competition_team_id: team.id, user_id: user.id, role: 1, competition_id: competition.id) TeamMember.create!(competition_team_id: team.id, user_id: user.id, role: 1, competition_id: competition.id)
@ -56,7 +58,7 @@ namespace :competition do
forked_shixun_map = Shixun.where(status: 2, fork_from: shixun_ids).select('id, fork_from') forked_shixun_map = Shixun.where(status: 2, fork_from: shixun_ids).select('id, fork_from')
forked_shixun_map = forked_shixun_map.each_with_object({}) { |sx, obj| obj[sx.id] = sx.fork_from } forked_shixun_map = forked_shixun_map.each_with_object({}) { |sx, obj| obj[sx.id] = sx.fork_from }
forked_myshixun_count_map = get_valid_myshixun_count(forked_shixun_map.keys) forked_myshixun_count_map = get_valid_myshixun_count(forked_shixun_map.keys)
forked_myshixun_count_map.each { |k, v| myshixun_count_map[forked_shixun_map[k]] += v } forked_myshixun_count_map.each { |k, v| myshixun_count_map[forked_shixun_map[k]] = myshixun_count_map[forked_shixun_map[k]].to_i + v.to_i }
course_count_map = get_valid_course_count(shixun_ids, end_time) course_count_map = get_valid_course_count(shixun_ids, end_time)
forked_map = get_valid_course_count(forked_shixun_map.keys, end_time) forked_map = get_valid_course_count(forked_shixun_map.keys, end_time)

@ -409,4 +409,13 @@
overflow:hidden; overflow:hidden;
text-overflow:ellipsis; text-overflow:ellipsis;
white-space:nowrap white-space:nowrap
}
.usernamebox{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: default;
max-width: 100px;
display: inherit;
} }

@ -84,21 +84,21 @@ class CompetitionContents extends Component{
dataIndex: 'userimg', dataIndex: 'userimg',
key: 'userimg', key: 'userimg',
render: (text, record) =>( render: (text, record) =>(
<span href={`/users/${record.user_login}`} className="color-dark"> <a href={`/users/${record.user_login}`} target={"_blank"} className="color-dark">
<img className={"Competitionuserimg"} src={getImageUrl(`images/${record.userimg===null?`avatars/User/0?1442652658`:record.userimg}`)}/> <img className={"Competitionuserimg"} src={getImageUrl(`images/${record.userimg===null?`avatars/User/0?1442652658`:record.userimg}`)}/>
</span>), </a>),
}, },
{ {
title: 'username', title: 'username',
dataIndex: 'username', dataIndex: 'username',
key: 'username', key: 'username',
render: text => <span title={text}>{text}</span>, render: text => <span title={text} title={text}>{text}</span>,
}, },
{ {
title: 'school', title: 'school',
dataIndex: 'school', dataIndex: 'school',
key: 'school', key: 'school',
render: text => <span title={text}>{text}</span>, render: text => <span title={text} title={text}>{text}</span>,
}, },
{ {
title: 'spendtime', title: 'spendtime',
@ -200,7 +200,7 @@ class CompetitionContents extends Component{
<li className="pr Competitioncenter"> <li className="pr Competitioncenter">
<img src={getImageUrl("images/educoder/huangguan-two.png")}/> <img src={getImageUrl("images/educoder/huangguan-two.png")}/>
<div className={"mt10"}> <div className={"mt10"}>
<a href={`/users/${item.user_login}`} className="color-dark"> <a href={`/users/${item.user_login}`} target={"_blank"} className="color-dark">
<img className={"rankingimg"} src={getImageUrl(`images/${item.user_image===null?`avatars/User/0?1442652658`:item.user_image}`)} /> <img className={"rankingimg"} src={getImageUrl(`images/${item.user_image===null?`avatars/User/0?1442652658`:item.user_image}`)} />
<p className="task-hide rankName mt5 jinshaifont">{personal===undefined||personal===null?item.record_user_name:personal===true?item.record_user_name:item.team_name}</p> <p className="task-hide rankName mt5 jinshaifont">{personal===undefined||personal===null?item.record_user_name:personal===true?item.record_user_name:item.team_name}</p>
</a> </a>
@ -236,7 +236,7 @@ class CompetitionContents extends Component{
<li className="pr Competitioncenter"> <li className="pr Competitioncenter">
<img src={getImageUrl("images/educoder/huangguan.png")}/> <img src={getImageUrl("images/educoder/huangguan.png")}/>
<div className={"mt10"}> <div className={"mt10"}>
<a href={`/users/${item.user_login}`} className="color-dark"> <a href={`/users/${item.user_login}`} target={"_blank"} className="color-dark">
<img className={"rankingimg"} src={getImageUrl(`images/${item.user_image===null?`avatars/User/0?1442652658`:item.user_image}`)} /> <img className={"rankingimg"} src={getImageUrl(`images/${item.user_image===null?`avatars/User/0?1442652658`:item.user_image}`)} />
<p className="task-hide rankName mt5 jinshaifont">{personal===undefined||personal===null?item.record_user_name:personal===true?item.record_user_name:item.team_name}</p> <p className="task-hide rankName mt5 jinshaifont">{personal===undefined||personal===null?item.record_user_name:personal===true?item.record_user_name:item.team_name}</p>
</a> </a>
@ -272,7 +272,7 @@ class CompetitionContents extends Component{
<li className=" pr Competitioncenter "> <li className=" pr Competitioncenter ">
<img src={getImageUrl("images/educoder/huangguan-three.png")}/> <img src={getImageUrl("images/educoder/huangguan-three.png")}/>
<div className={"mt10"}> <div className={"mt10"}>
<a href={`/users/${item.user_login}`} className="color-dark"> <a href={`/users/${item.user_login}`} target={"_blank"} className="color-dark">
<img className={"rankingimg"} src={getImageUrl(`images/${item.user_image===null?`avatars/User/0?1442652658`:item.user_image}`)} /> <img className={"rankingimg"} src={getImageUrl(`images/${item.user_image===null?`avatars/User/0?1442652658`:item.user_image}`)} />
<p className="task-hide rankName mt5 jinshaifont">{personal===undefined||personal===null?item.record_user_name:personal===true?item.record_user_name:item.team_name}</p> <p className="task-hide rankName mt5 jinshaifont">{personal===undefined||personal===null?item.record_user_name:personal===true?item.record_user_name:item.team_name}</p>
</a> </a>
@ -315,10 +315,21 @@ class CompetitionContents extends Component{
.col24{ .col24{
width: 24%; width: 24%;
text-align: left; text-align: left;
padding-left: 16px; padding-left: 33px;
} }
.col15{ .col15{
width: 15%; width: 14%;
text-align: right;
}
.col12{
width: 12%;
text-align: right;
}
.col10{
width: 10%;
}
.col6{
width: 6%;
} }
` `
} }
@ -337,12 +348,16 @@ class CompetitionContents extends Component{
<Col className="textleft" span={9} order={3}> <Col className="textleft" span={9} order={3}>
{/*{item.team_name}*/} {/*{item.team_name}*/}
</Col> </Col>
<Col span={3} order={4}> {item.cost_time=== "--"?<Col span={3} order={4} className={"col6"}>
{this.props&&this.props.mode===1?item.cost_time:""} {this.props&&this.props.mode===1?item.cost_time:""}
</Col> </Col>:<Col span={3} order={4} className={"col10"}>
<Col className="textright" span={3} order={5} className={"col15"}> {this.props&&this.props.mode===1?item.cost_time:""}
</Col>}
{item.cost_time=== "--"?<Col className="textright" span={3} order={5} className={"col15"}>
<span className={"ranknameslast"}>{item.score<50?"< 50 分":item.score}</span> <span className={"ranknameslast"}>{item.score<50?"< 50 分":item.score}</span>
</Col> </Col>:<Col className="textright" span={3} order={5} className={"col12"}>
<span className={"ranknameslast"}>{item.score<50?"< 50 分":item.score}</span>
</Col>}
</Row> </Row>
) )
})} })}
@ -352,23 +367,20 @@ class CompetitionContents extends Component{
{ {
` `
.ant-table-tbody > tr > td:nth-last-child(4){ .ant-table-tbody > tr > td:nth-last-child(4){
// line-height: 63px; overflow: hidden;
// width: 300px; max-width: 100px;
// height: 96px; -o-text-overflow: ellipsis;
// // display: inline-flex; text-overflow: ellipsis;
// overflow: hidden; white-space: nowrap;
// text-overflow: ellipsis; cursor: default;
// white-space: nowrap;
width: 150px;
} }
.ant-table-tbody > tr > td:nth-last-child(3){ .ant-table-tbody > tr > td:nth-last-child(3){
// line-height: 63px; overflow: hidden;
// width: 290px; max-width: 200px;
// height: 96px; -o-text-overflow: ellipsis;
// display: inline-block; text-overflow: ellipsis;
// overflow: hidden; white-space: nowrap;
// text-overflow: ellipsis; cursor: default;
// white-space: nowrap;
} }
.ant-table-tbody>tr>td, .ant-table-thead>tr>th { .ant-table-tbody>tr>td, .ant-table-thead>tr>th {
padding: 5px; padding: 5px;

@ -55,7 +55,7 @@ class Bankcardnumberverification extends Component {
if (result.data.status == 0) { if (result.data.status == 0) {
// console.log(JSON.stringify(result)); // console.log(JSON.stringify(result));
this.props.showNotification(`提交成功,等待审核!`); this.props.showNotification(`提交成功,等待审核!`);
this.props.getdata(); this.props.getdata(this.props.userdata.id);
this.props.GetawardinformationAPI(); this.props.GetawardinformationAPI();
} }
} catch (e) { } catch (e) {

@ -25,7 +25,8 @@ class CompetitionContentspdfpeopledata extends Component {
bank_account_editable: false, bank_account_editable: false,
leader: false, leader: false,
bank_account: undefined, bank_account: undefined,
certification: 1 certification: 1,
userdata:undefined
} }
} }
@ -33,8 +34,36 @@ class CompetitionContentspdfpeopledata extends Component {
window.document.title = '竞赛'; window.document.title = '竞赛';
console.log("获取用户信息"); console.log("获取用户信息");
console.log(this.props); console.log(this.props);
this.getdata();
this.GetawardinformationAPI(); this.GetawardinformationAPI();
let query=this.props.location&&this.props.location.search;
const types = query.split('user_id=')
let userid;
if(types[1]===undefined){
userid=this.props.user&&this.props.user.user_id;
}else{
userid=types[1];
}
this.getdata(userid);
this.GetuseridApi(userid);
}
GetuseridApi=(id)=>{
//个人信息API 获取个人信息
let url = `/users/accounts/${id}.json`;
axios.get(url).then((result) => {
if (result.data) {
console.log("GetuseridApi");
console.log(result.data);
this.setState({
userdata:result.data
})
}
}).catch((error) => {
console.log(error);
})
} }
GetawardinformationAPI = () => { GetawardinformationAPI = () => {
@ -65,37 +94,20 @@ class CompetitionContentspdfpeopledata extends Component {
} }
getdata = () => { getdata = (id) => {
this.setState({ this.setState({
certification: 3 certification: 3
}) })
let url = `/users/accounts/${this.props.current_user.login}.json`; this.GetuseridApi(id);
axios.get(url).then((result) => {
if (result.data) {
if (result.data && result.data.base_info_completed == false) {
this.props.history.push(`/account/profile/edit`);
}
// "authentication": "uncertified", // "uncertified" | "applying" | "certified"
this.setState({
basicInfo: Object.assign({}, {...result.data}, {
avatar_url: `${result.data.avatar_url}`,
gender: result.data.gender == null || result.data.gender == undefined ? 0 : result.data.gender
}),
certification: 3
})
}
}).catch((error) => {
console.log(error);
})
}; };
// 绑定手机 // 绑定手机
onPhoneSubmit = () => { onPhoneSubmit = () => {
this.props.form.validateFieldsAndScroll((err, values) => { this.props.form.validateFieldsAndScroll((err, values) => {
if (!err) { if (!err) {
let {login} = this.props.current_user; let {id} =this.state.userdata;
let reg = /^1\d{10}$/; let reg = /^1\d{10}$/;
if (reg.test(values.phone)) { if (reg.test(values.phone)) {
let url = `/users/accounts/${login}/phone_bind.json` let url = `/users/accounts/${id}/phone_bind.json`
axios.post((url), { axios.post((url), {
phone: values.phone, phone: values.phone,
code: values.phoneValidateCode code: values.phoneValidateCode
@ -105,7 +117,7 @@ class CompetitionContentspdfpeopledata extends Component {
this.setState({ this.setState({
phonebool: false phonebool: false
}) })
this.getdata(); this.getdata(this.state.userdata.id);
} }
}).catch((error) => { }).catch((error) => {
console.log(error); console.log(error);
@ -120,10 +132,10 @@ class CompetitionContentspdfpeopledata extends Component {
onEmailSubmit = () => { onEmailSubmit = () => {
this.props.form.validateFieldsAndScroll((err, values) => { this.props.form.validateFieldsAndScroll((err, values) => {
if (!err) { if (!err) {
let {login} = this.props.current_user; let {id} =this.state.userdata;
let reg = /^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/; let reg = /^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/;
if (reg.test(values.email)) { if (reg.test(values.email)) {
let url = `/users/accounts/${login}/email_bind.json` let url = `/users/accounts/${id}/email_bind.json`
axios.post((url), { axios.post((url), {
email: values.email, email: values.email,
code: values.emailValidateCode code: values.emailValidateCode
@ -133,7 +145,7 @@ class CompetitionContentspdfpeopledata extends Component {
this.setState({ this.setState({
emailbool: false emailbool: false
}) })
this.getdata(); this.getdata(this.state.userdata.id);
} }
}).catch((error) => { }).catch((error) => {
console.log(error); console.log(error);
@ -241,7 +253,7 @@ class CompetitionContentspdfpeopledata extends Component {
//立即认证 //立即认证
checkBasicInfo = (index) => { checkBasicInfo = (index) => {
if (this.state.basicInfo.base_info_completed == true) { if (this.state.userdata.base_info_completed == true) {
this.showRealNameCertificationModal(index) this.showRealNameCertificationModal(index)
} else { } else {
try { try {
@ -285,7 +297,7 @@ class CompetitionContentspdfpeopledata extends Component {
if (result.data.status == 0) { if (result.data.status == 0) {
// console.log(JSON.stringify(result)); // console.log(JSON.stringify(result));
this.props.showNotification(`提交成功成功`); this.props.showNotification(`提交成功成功`);
this.getdata(); this.getdata(this.state.userdata.id);
this.GetawardinformationAPI(); this.GetawardinformationAPI();
} }
} catch (e) { } catch (e) {
@ -302,7 +314,7 @@ class CompetitionContentspdfpeopledata extends Component {
//取消认证弹框 //取消认证弹框
onCancel = () => { onCancel = () => {
this.getdata(); this.getdata(this.state.userdata.id);
} }
@ -324,7 +336,7 @@ class CompetitionContentspdfpeopledata extends Component {
} else if (index === 2) { } else if (index === 2) {
this.props.showNotification('撤销职业认证成功') this.props.showNotification('撤销职业认证成功')
} }
this.getdata(); this.getdata(this.state.userdata.id);
} }
} catch (e) { } catch (e) {
@ -344,32 +356,36 @@ class CompetitionContentspdfpeopledata extends Component {
if(admins===undefined||admins===null) { if(admins===undefined||admins===null) {
admins === false; admins === false;
} }
const {updating, seconds, secondsFlag, basicInfo, phonebool, emailbool, certification, formationdata, bank_account_editable, leader, bank_account} = this.state const {updating, seconds, secondsFlag,userdata, basicInfo, phonebool, emailbool, certification, formationdata, bank_account_editable, leader, bank_account} = this.state
return ( return (
<div className="flexdidirectionss mt17"> <div className="flexdidirectionss mt17">
{this.state.certification === 1 ? {this.state.certification === 1 &&userdata?
<RealNameCertificationModal {...this.props} {...this.state} basicInfo={this.state.basicInfo}
<RealNameCertificationModal {...this.props} {...this.state} basicInfo={userdata}
wrappedComponentRef={(form) => this.realNameCertificationModal1 = form} wrappedComponentRef={(form) => this.realNameCertificationModal1 = form}
certification={certification} certification={certification}
Getdata={() => this.getdata()} Getdata={(id) => this.getdata(id)}
onCancel={() => this.onCancel()} onCancel={() => this.onCancel()}
></RealNameCertificationModal> : ""} ></RealNameCertificationModal>
: ""}
{this.state.certification === 2 ? {this.state.certification === 2 &&userdata ?
<RealNameCertificationModal {...this.props} {...this.state} basicInfo={this.state.basicInfo} <RealNameCertificationModal {...this.props} {...this.state} basicInfo={userdata}
wrappedComponentRef={(form) => this.realNameCertificationModal2 = form} wrappedComponentRef={(form) => this.realNameCertificationModal2 = form}
certification={certification} certification={certification}
Getdata={() => this.getdata()} Getdata={(id) => this.getdata(id)}
onCancel={() => this.onCancel()} onCancel={() => this.onCancel()}
></RealNameCertificationModal> : ""} ></RealNameCertificationModal> : ""}
<div className="flexdirections "> <div className="flexdirections ">
<p className="fontcolorsyslhei font-16 w98"><span className="fontcolorsysl font-16">*</span><span></span> <p className="fontcolorsyslhei font-16 w98"><span className="fontcolorsysl font-16">*</span><span></span>
</p> </p>
{basicInfo && basicInfo.authentication == "uncertified" ? {userdata && userdata.authentication == "uncertified" ?
<p className="fontcolorsyslhui font-14 w200">通过实名认证后才能获得证书</p> : "" <p className="fontcolorsyslhui font-14 w200">通过实名认证后才能获得证书</p> : ""
} }
{basicInfo && basicInfo.authentication == "uncertified" ? {userdata && userdata.authentication == "uncertified" ?
<p className="fontcolorsysllan font-14 ml3 mycompitcursor" <p className="fontcolorsysllan font-14 ml3 mycompitcursor"
onClick={() => this.checkBasicInfo(1)}>立即认证</p> : "" onClick={() => this.checkBasicInfo(1)}>立即认证</p> : ""
} }
@ -377,11 +393,11 @@ class CompetitionContentspdfpeopledata extends Component {
</div> </div>
<div className="flexdirections ml38 mt23"> <div className="flexdirections ml38 mt23">
<p className="fontcolorsyslhui1">姓名</p> <p className="fontcolorsyslhui1">姓名</p>
<p className="fontcolorsyslhei flexdirections">{basicInfo && basicInfo.name} <p className="fontcolorsyslhei flexdirections">{userdata && userdata.name}
{ {
basicInfo && basicInfo.authentication == "uncertified" ? "" : userdata && userdata.authentication == "uncertified" ? "" :
basicInfo && basicInfo.authentication == "applying" ? userdata && userdata.authentication == "applying" ?
<p className="flexdirections"><p className="iconfont icon-tishi colorgreenorg font-14 ml20"></p><p <p className="flexdirections"><p className="iconfont icon-tishi colorgreenorg font-14 ml20"></p><p
className="colorgreenorg font-14 ml6">待审核</p><p className="colorgreenorg font-14 ml6">待审核</p><p
className="fontcolorsysllan borcolors font-12 w64 mycompitcursor" className="fontcolorsysllan borcolors font-12 w64 mycompitcursor"
@ -397,19 +413,19 @@ class CompetitionContentspdfpeopledata extends Component {
<div className="flexdirections ml38 mt19"> <div className="flexdirections ml38 mt19">
<p className="fontcolorsyslhui1">性别</p> <p className="fontcolorsyslhui1">性别</p>
<p className="fontcolorsyslhei"> {basicInfo && basicInfo.gender == 0 ? "男" : "女"}</p> <p className="fontcolorsyslhei"> {userdata && userdata.gender == 0 ? "男" : "女"}</p>
</div> </div>
<div className="flexdirections mt36 "> <div className="flexdirections mt36 ">
<p className="fontcolorsyslhei font-16 w98"><span className="fontcolorsysl font-16">*</span><span></span> <p className="fontcolorsyslhei font-16 w98"><span className="fontcolorsysl font-16">*</span><span></span>
</p> </p>
{ {
basicInfo && basicInfo.professional_certification == "uncertified" ? userdata && userdata.professional_certification == "uncertified" ?
<p className="fontcolorsyslhui font-14 w200">通过职业认证后才能获得证书</p> <p className="fontcolorsyslhui font-14 w200">通过职业认证后才能获得证书</p>
: ""} : ""}
{ {
basicInfo && basicInfo.professional_certification == "uncertified" ? userdata && userdata.professional_certification == "uncertified" ?
<p className="fontcolorsysllan font-14 ml3 mycompitcursor" onClick={() => this.checkBasicInfo(2)}>立即认证</p> <p className="fontcolorsysllan font-14 ml3 mycompitcursor" onClick={() => this.checkBasicInfo(2)}>立即认证</p>
: ""} : ""}
@ -418,11 +434,11 @@ class CompetitionContentspdfpeopledata extends Component {
<div className="flexdirections ml38 mt23"> <div className="flexdirections ml38 mt23">
<p className="fontcolorsyslhui1">职业</p> <p className="fontcolorsyslhui1">职业</p>
<p <p
className="fontcolorsyslhei flexdirections">{basicInfo && basicInfo.identity && identityMap[basicInfo.identity]} className="fontcolorsyslhei flexdirections">{userdata && userdata.identity && identityMap[userdata.identity]}
{ {
basicInfo && basicInfo.professional_certification == "uncertified" ? userdata && userdata.professional_certification == "uncertified" ?
"" : "" :
basicInfo && basicInfo.professional_certification == "applying" ? userdata && userdata.professional_certification == "applying" ?
<p className="flexdirections"> <p className="flexdirections">
<p className="iconfont icon-tishi colorgreenorg font-14 ml20"></p><p <p className="iconfont icon-tishi colorgreenorg font-14 ml20"></p><p
className="colorgreenorg font-14 ml6">待审核</p><p className="colorgreenorg font-14 ml6">待审核</p><p
@ -442,16 +458,16 @@ class CompetitionContentspdfpeopledata extends Component {
</div> </div>
<div className="flexdirections ml38 mt19"> <div className="flexdirections ml38 mt19">
<p <p
className="fontcolorsyslhui1">{basicInfo && basicInfo.technical_title ? "职称:" : ""}{basicInfo && basicInfo.student_id ? "学号:" : ""}</p> className="fontcolorsyslhui1">{userdata && userdata.technical_title ? "职称:" : ""}{userdata && userdata.student_id ? "学号:" : ""}</p>
<p className="fontcolorsyslhei">{basicInfo && (basicInfo.technical_title || basicInfo.student_id)}</p> <p className="fontcolorsyslhei">{userdata && (userdata.technical_title || userdata.student_id)}</p>
</div> </div>
<div className="flexdirections ml38 mt19"> <div className="flexdirections ml38 mt19">
<p className="fontcolorsyslhui1">学校</p> <p className="fontcolorsyslhui1">学校</p>
<p className="fontcolorsyslhei">{basicInfo && basicInfo.school_name}</p> <p className="fontcolorsyslhei">{userdata && userdata.school_name}</p>
</div> </div>
<div className="flexdirections ml38 mt19"> <div className="flexdirections ml38 mt19">
<p className="fontcolorsyslhui1">院系</p> <p className="fontcolorsyslhui1">院系</p>
<p className="fontcolorsyslhei"> {basicInfo && basicInfo.department_name}</p> <p className="fontcolorsyslhei"> {userdata && userdata.department_name}</p>
</div> </div>
<div className="flexdirections mt36 "> <div className="flexdirections mt36 ">
<p className="fontcolorsyslhei font-16 w98"><span className="fontcolorsysl font-16">*</span><span></span> <p className="fontcolorsyslhei font-16 w98"><span className="fontcolorsysl font-16">*</span><span></span>
@ -460,44 +476,48 @@ class CompetitionContentspdfpeopledata extends Component {
<div className="flexdirections ml38 mt23"> <div className="flexdirections ml38 mt23">
<p className="fontcolorsyslhui1 w60 ">手机号</p> <p className="fontcolorsyslhui1 w60 ">手机号</p>
{ {
basicInfo && basicInfo.phone ? userdata && userdata.phone ?
<p className="fontcolorsyslhei w200 ">{basicInfo && basicInfo.phone}</p> <p className="fontcolorsyslhei w200 ">{userdata && userdata.phone}</p>
: :
<p className="fontcolorsysljin w200 ">未绑定</p> <p className="fontcolorsysljin w200 ">未绑定</p>
} }
<p className="fontcolorsysllan mycompitcursor" <p className="fontcolorsysllan mycompitcursor"
onClick={() => this.phonebools()}>{basicInfo && basicInfo.phone ? (phonebool === false ? "更换" : "") : (phonebool === false ? "立即绑定" : "")}</p> onClick={() => this.phonebools()}>{userdata && userdata.phone ? (phonebool === false ? "更换" : "") : (phonebool === false ? "立即绑定" : "")}</p>
</div> </div>
{/*手机号绑定*/} {/*手机号绑定*/}
{ {
phonebool === true ? phonebool === true &&userdata ?
<Phonenumberverifications {...this.props} {...this.state} basicInfo={this.state.basicInfo} <Phonenumberverifications {...this.props} {...this.state} basicInfo={userdata}
hideUpdating={(i) => this.hideUpdating(i)} hideUpdating={(i) => this.hideUpdating(i)}
getdata={() => this.getdata()}></Phonenumberverifications> getdata={(id) => this.getdata(id)}></Phonenumberverifications>
: "" : ""
} }
<div className="flexdirections ml38 mt19"> <div className="flexdirections ml38 mt19">
<p className="fontcolorsyslhui1 w60">Email</p> <p className="fontcolorsyslhui1 w60">Email</p>
<p className="fontcolorsyslhei w200">{basicInfo && basicInfo.mail}</p> <p className="fontcolorsyslhei w200">{userdata && userdata.mail}</p>
<p className="fontcolorsysllan mycompitcursor" <p className="fontcolorsysllan mycompitcursor"
onClick={() => this.emailbools()}>{basicInfo && basicInfo.mail ? (emailbool === false ? "更换" : "") : (emailbool === false ? "立即绑定" : "")}</p> onClick={() => this.emailbools()}>{userdata && userdata.mail ? (emailbool === false ? "更换" : "") : (emailbool === false ? "立即绑定" : "")}</p>
</div> </div>
{ {
emailbool === false ? "" : emailbool === false ? "" :
<Mailboxvalidations {...this.props} {...this.state} basicInfo={this.state.basicInfo} (
hideUpdating={(i) => this.hideUpdating(i)} userdata?
getdata={() => this.getdata()}></Mailboxvalidations> <Mailboxvalidations {...this.props} {...this.state} basicInfo={userdata}
hideUpdating={(i) => this.hideUpdating(i)}
getdata={(id) => this.getdata(id)}></Mailboxvalidations>
:""
)
} }
{ {
leader === true ? leader === true ?
<div> <div>
{ {
bank_account_editable === true ? bank_account_editable === true ?
<Bankcardnumberverifications {...this.props} {...this.state} basicInfo={this.state.basicInfo} <Bankcardnumberverifications {...this.props} {...this.state} basicInfo={userdata}
hideUpdating={(i) => this.hideUpdating(i)} hideUpdating={(i) => this.hideUpdating(i)}
getdata={() => this.getdata()} getdata={(id) => this.getdata(id)}
GetawardinformationAPI={() => this.GetawardinformationAPI()} GetawardinformationAPI={() => this.GetawardinformationAPI()}
bank_account={this.state.bank_account} bank_account={this.state.bank_account}
></Bankcardnumberverifications> ></Bankcardnumberverifications>
@ -536,9 +556,9 @@ class CompetitionContentspdfpeopledata extends Component {
<div> <div>
{ {
admins===true? admins===true?
<Bankcardnumberverifications {...this.props} {...this.state} basicInfo={this.state.basicInfo} <Bankcardnumberverifications {...this.props} {...this.state} basicInfo={userdata}
hideUpdating={(i) => this.hideUpdating(i)} hideUpdating={(i) => this.hideUpdating(i)}
getdata={() => this.getdata()} getdata={(id) => this.getdata(id)}
GetawardinformationAPI={() => this.GetawardinformationAPI()} GetawardinformationAPI={() => this.GetawardinformationAPI()}
bank_account={this.state.bank_account} bank_account={this.state.bank_account}
></Bankcardnumberverifications> ></Bankcardnumberverifications>

@ -37,10 +37,10 @@ class Mailboxvalidation extends Component {
onEmailSubmit = () => { onEmailSubmit = () => {
this.props.form.validateFieldsAndScroll((err, values) => { this.props.form.validateFieldsAndScroll((err, values) => {
if (!err) { if (!err) {
let {login} = this.props.current_user; let {id} = this.props.userdata;
let reg = /^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/; let reg = /^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/;
if (reg.test(values.email)) { if (reg.test(values.email)) {
let url = `/users/accounts/${login}/email_bind.json` let url = `/users/accounts/${id}/email_bind.json`
axios.post((url), { axios.post((url), {
email: values.email, email: values.email,
code: values.emailValidateCode code: values.emailValidateCode
@ -48,7 +48,7 @@ class Mailboxvalidation extends Component {
if (result) { if (result) {
this.props.showNotification("邮箱地址绑定成功!"); this.props.showNotification("邮箱地址绑定成功!");
this.hideUpdating(2); this.hideUpdating(2);
this.props.getdata(); this.props.getdata(id);
} }
}).catch((error) => { }).catch((error) => {
console.log(error); console.log(error);

@ -37,10 +37,10 @@ class Phonenumberverification extends Component {
onPhoneSubmit = () => { onPhoneSubmit = () => {
this.props.form.validateFieldsAndScroll((err, values) => { this.props.form.validateFieldsAndScroll((err, values) => {
if (!err) { if (!err) {
let {login} = this.props.current_user; let {id} = this.props.userdata;
let reg = /^1\d{10}$/; let reg = /^1\d{10}$/;
if (reg.test(values.phone)) { if (reg.test(values.phone)) {
let url = `/users/accounts/${login}/phone_bind.json` let url = `/users/accounts/${id}/phone_bind.json`
axios.post((url), { axios.post((url), {
phone: values.phone, phone: values.phone,
code: values.phoneValidateCode code: values.phoneValidateCode
@ -48,7 +48,7 @@ class Phonenumberverification extends Component {
if (result) { if (result) {
this.props.showNotification("手机号码绑定成功!"); this.props.showNotification("手机号码绑定成功!");
this.props.hideUpdating() this.props.hideUpdating()
this.props.getdata(); this.props.getdata(id);
} }
}).catch((error) => { }).catch((error) => {
console.log(error); console.log(error);

@ -61,7 +61,7 @@ class PublishRightnow extends Component{
OneSelftype:showdatatype?true:false, OneSelftype:showdatatype?true:false,
Topval:showdatatypes ? "学生将立即收到作业" : "学生将不能再提交作品", Topval:showdatatypes ? "学生将立即收到作业" : "学生将不能再提交作品",
// Botvalleft: isPublish ? "暂不发布" : "暂不截止", // Botvalleft: isPublish ? "暂不发布" : "暂不截止",
Botval: this.props.fromListPage ? (showdatatypes ? "本操作只对“未发布”的分班有效" : "本操作只对“提交中”的分班有效") : '', Botval: this.props.fromListPage ? (showdatatypes ? "本操作只对“未发布”的作业有效" : "本操作只对“提交中”的作业有效") : '',
starttime: showdatatypes? `发布时间:${startMoment.format(dateFormat)}` : '', starttime: showdatatypes? `发布时间:${startMoment.format(dateFormat)}` : '',
starttimes:showdatatypes? `${startMoment.format(dateFormat)}` : '', starttimes:showdatatypes? `${startMoment.format(dateFormat)}` : '',
endtime:showdatatypes ? `截止时间:${startMoment.add(1, 'months').add(1, 'hours').minutes(0).format(dateFormat)}` : '', endtime:showdatatypes ? `截止时间:${startMoment.add(1, 'months').add(1, 'hours').minutes(0).format(dateFormat)}` : '',

@ -233,7 +233,7 @@ class Exercise extends Component{
visible:true, visible:true,
Topval:"学生将立即收到试卷", Topval:"学生将立即收到试卷",
// Botvalleft:"暂不发布", // Botvalleft:"暂不发布",
Botval:`本操作只对"未发布"的分班有效`, Botval:`本操作只对"未发布"的试卷有效`,
starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
endtime:"截止时间:"+this.props.getNowFormatDates(2), endtime:"截止时间:"+this.props.getNowFormatDates(2),

@ -188,7 +188,7 @@ class GraduationTaskDetail extends Component{
visible:true, visible:true,
Topval:"学生将不能再提交作品", Topval:"学生将不能再提交作品",
// Botvalleft:"暂不截止", // Botvalleft:"暂不截止",
// Botval:`本操作只对"提交中"的分班有效`, // Botval:`本操作只对"提交中"的作业有效`,
Cancelname:"暂不截止", Cancelname:"暂不截止",
Savesname:"立即截止", Savesname:"立即截止",
Cancel:this.cancelmodel, Cancel:this.cancelmodel,

@ -386,7 +386,7 @@ class GraduationTaskssettinglist extends Component{
visible:true, visible:true,
Topval:"学生将不能再提交作品", Topval:"学生将不能再提交作品",
// Botvalleft:"暂不截止", // Botvalleft:"暂不截止",
// Botval:`本操作只对"提交中"的分班有效`, // Botval:`本操作只对"提交中"的任务有效`,
Cancelname:"暂不截止", Cancelname:"暂不截止",
Savesname:"立即截止", Savesname:"立即截止",
Cancel:this.cancelmodel, Cancel:this.cancelmodel,

@ -86,7 +86,7 @@ class GraduationTasksquestions extends Component{
visible:true, visible:true,
Topval:"学生将不能再提交作品", Topval:"学生将不能再提交作品",
// Botvalleft:"暂不截止", // Botvalleft:"暂不截止",
// Botval:`本操作只对"提交中"的分班有效`, // Botval:`本操作只对"提交中"的任务有效`,
Cancelname:"暂不截止", Cancelname:"暂不截止",
Savesname:"立即截止", Savesname:"立即截止",
Cancel:this.cancelmodel, Cancel:this.cancelmodel,

@ -428,7 +428,7 @@ class GraduationTasks extends Component{
visible:true, visible:true,
Topval:"学生将立即收到毕设任务", Topval:"学生将立即收到毕设任务",
// Botvalleft:"暂不发布", // Botvalleft:"暂不发布",
Botval:`本操作只对"未发布"的分班有效`, Botval:`本操作只对"未发布"的任务有效`,
starttime:"发布时间:"+moment(new Date()).format("YYYY-MM-DD HH:mm"), starttime:"发布时间:"+moment(new Date()).format("YYYY-MM-DD HH:mm"),
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
typs:"start", typs:"start",
@ -496,7 +496,7 @@ class GraduationTasks extends Component{
visible:true, visible:true,
Topval:"学生将不能再提交作品", Topval:"学生将不能再提交作品",
// Botvalleft:"暂不截止", // Botvalleft:"暂不截止",
Botval:`本操作只对"提交中"的分班有效`, Botval:`本操作只对"提交中"的任务有效`,
Cancelname:"暂不截止", Cancelname:"暂不截止",
Savesname:"立即截止", Savesname:"立即截止",
Cancel:this.publishcanner, Cancel:this.publishcanner,

@ -210,12 +210,11 @@ function CourseGroupList(props) {
onPressEnter={onPressEnter} onPressEnter={onPressEnter}
></Titlesearchsection> ></Titlesearchsection>
{!!none_group_member_count && <div className="mt20 edu-back-white padding20-30 "> {!!none_group_member_count && <div className="mt20 E9F8FF padding20-30 pointer" onClick={() => {props.history.push(`/courses/${courseId}/course_groups/0`)}}>
<span>未分班</span> <span>未分班</span>
<span style={{color: '#999999'}}>{none_group_member_count}个学生</span> <span style={{color: '#999999'}}>{none_group_member_count}个学生</span>
<WordsBtn style="blue" className="fr " <WordsBtn style="blue" className="fr">查看</WordsBtn>
onClick={() => {props.history.push(`/courses/${courseId}/course_groups/0`)}}>查看</WordsBtn>
</div>} </div>}
<Spin size="large" spinning={isSpin}> <Spin size="large" spinning={isSpin}>

@ -1,4 +1,8 @@
.stu_table .ant-table-thead > tr > th, .stu_table .ant-table-tbody > tr > td, .stu_table .ant-table-thead > tr > th, .stu_table .ant-table-tbody > tr > td,
.courseGroupList .ant-table-thead > tr > th, .courseGroupList .ant-table-tbody > tr > td { .courseGroupList .ant-table-thead > tr > th, .courseGroupList .ant-table-tbody > tr > td {
padding: 14px 6px; padding: 14px 6px;
}
.E9F8FF{
background-color: #E9F8FF;
} }

@ -70,9 +70,9 @@ class ImmediatelyEnd extends Component{
modalname:"立即截止", modalname:"立即截止",
modaltype:response.data.on_commiting > 0 ? 1 : 2, modaltype:response.data.on_commiting > 0 ? 1 : 2,
visible:true, visible:true,
Topval:"学生将不能再提交试卷", Topval:this.props.Exercisetype==="exercise"?"学生将不能再提交试卷":"学生将不能再提交问卷",
// Botvalleft:"暂不截止", // Botvalleft:"暂不截止",
Botval:this.props.single ?`本操作只对"提交中"的分班有效`:"", Botval:this.props.single ?this.props.Exercisetype==="exercise"?`本操作只对"提交中"的试卷有效`:`本操作只对"提交中"的问卷有效`:"",
// starttime:"发布时间:"+getNowFormatDate(1), // starttime:"发布时间:"+getNowFormatDate(1),
// endtime:"截止时间:"+getNowFormatDate(2), // endtime:"截止时间:"+getNowFormatDate(2),
Cancelname:"暂不截止", Cancelname:"暂不截止",
@ -112,9 +112,9 @@ class ImmediatelyEnd extends Component{
modalname:"立即截止", modalname:"立即截止",
modaltype:response.data.on_commiting > 0 ? 1 : 2, modaltype:response.data.on_commiting > 0 ? 1 : 2,
visible:true, visible:true,
Topval:"学生将不能再提交问卷", Topval:this.props.Exercisetype==="exercise"?"学生将不能再提交试卷":"学生将不能再提交问卷",
// Botvalleft:"暂不截止", // Botvalleft:"暂不截止",
Botval:this.props.single ?`本操作只对"提交中"的分班有效`:"", Botval:this.props.single ?this.props.Exercisetype==="exercise"?`本操作只对"提交中"的试卷有效`:`本操作只对"提交中"的问卷有效`:"",
// starttime:"发布时间:"+getNowFormatDate(1), // starttime:"发布时间:"+getNowFormatDate(1),
// endtime:"截止时间:"+getNowFormatDate(2), // endtime:"截止时间:"+getNowFormatDate(2),
Cancelname:"暂不截止", Cancelname:"暂不截止",

@ -61,9 +61,9 @@ class Immediatelypublish extends Component{
modalname:"立即发布", modalname:"立即发布",
modaltype:response.data.course_groups===null||response.data.course_groups.length===0?2:1, modaltype:response.data.course_groups===null||response.data.course_groups.length===0?2:1,
OneSelftype:true, OneSelftype:true,
Topval:"学生将立即收到试卷", Topval:this.props.Exercisetype==="exercise"?"学生将立即收到试卷":"学生将立即收到问卷",
// Botvalleft:"暂不发布", // Botvalleft:"暂不发布",
Botval:this.props.single ? "":`本操作只对"未发布"的分班有效`, Botval:this.props.single ? "":this.props.Exercisetype==="exercise"?`本操作只对"未发布"的试卷有效`:`本操作只对"未发布"的问卷有效`,
starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
endtime:"截止时间:"+this.props.getNowFormatDates(2), endtime:"截止时间:"+this.props.getNowFormatDates(2),
@ -88,9 +88,9 @@ class Immediatelypublish extends Component{
modalname:"立即发布", modalname:"立即发布",
modaltype:response.data.course_groups===null||response.data.course_groups.length===0?2:1, modaltype:response.data.course_groups===null||response.data.course_groups.length===0?2:1,
OneSelftype:true, OneSelftype:true,
Topval:"学生将立即收到问卷", Topval:this.props.Exercisetype==="exercise"?"学生将立即收到试卷":"学生将立即收到问卷",
// Botvalleft:"暂不发布", // Botvalleft:"暂不发布",
Botval:this.props.single ? "":`本操作只对"未发布"的分班有效`, Botval:this.props.single ? "":this.props.Exercisetype==="exercise"?`本操作只对"未发布"的试卷有效`:`本操作只对"未发布"的问卷有效`,
starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
endtime:"截止时间:"+this.props.getNowFormatDates(2), endtime:"截止时间:"+this.props.getNowFormatDates(2),
@ -143,9 +143,9 @@ class Immediatelypublish extends Component{
modalname:"立即发布", modalname:"立即发布",
modaltype:response.data.un_publish > 0 ? 1 : 2, modaltype:response.data.un_publish > 0 ? 1 : 2,
visible:true, visible:true,
Topval:"学生将立即收到试卷", Topval:this.props.Exercisetype==="exercise"?"学生将立即收到试卷":"学生将立即收到问卷",
// Botvalleft:"暂不发布", // Botvalleft:"暂不发布",
Botval:this.props.single ? "":`本操作只对"未发布"的分班有效`, Botval:this.props.single ? "":this.props.Exercisetype==="exercise"?`本操作只对"未发布"的试卷有效`:`本操作只对"未发布"的问卷有效`,
starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
endtime:"截止时间:"+this.props.getNowFormatDates(2), endtime:"截止时间:"+this.props.getNowFormatDates(2),
@ -183,9 +183,9 @@ class Immediatelypublish extends Component{
modalname:"立即发布", modalname:"立即发布",
modaltype:response.data.un_publish > 0 ? 1 : 2, modaltype:response.data.un_publish > 0 ? 1 : 2,
visible:true, visible:true,
Topval:"学生将立即收到问卷", Topval:this.props.Exercisetype==="exercise"?"学生将立即收到试卷":"学生将立即收到问卷",
// Botvalleft:"暂不发布", // Botvalleft:"暂不发布",
Botval:this.props.single ? "":`本操作只对"未发布"的分班有效`, Botval:this.props.single ? "":this.props.Exercisetype==="exercise"?`本操作只对"未发布"的试卷有效`:`本操作只对"未发布"的问卷有效`,
starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:this.props.getNowFormatDates(1), starttimes:this.props.getNowFormatDates(1),
endtime:"截止时间:"+this.props.getNowFormatDates(2), endtime:"截止时间:"+this.props.getNowFormatDates(2),

@ -3026,7 +3026,7 @@ class Listofworksstudentone extends Component {
OneSelftype: true, OneSelftype: true,
Topval: "学生将立即收到作业", Topval: "学生将立即收到作业",
// Botvalleft:"暂不发布", // Botvalleft:"暂不发布",
Botval: `本操作只对"未发布"的分班有效`, Botval: `本操作只对"未发布"的作业有效`,
starttime: moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttime: moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime: "截止时间:" + endtime, endtime: "截止时间:" + endtime,
starttimes: starttime, starttimes: starttime,
@ -3062,7 +3062,7 @@ class Listofworksstudentone extends Component {
OneSelftype: false, OneSelftype: false,
Topval: "学生将不能再提交作业", Topval: "学生将不能再提交作业",
// Botvalleft:"暂不截止", // Botvalleft:"暂不截止",
Botval: `本操作只对"提交中"的分班有效`, Botval: `本操作只对"提交中"的作业有效`,
Cancelname: "暂不截止", Cancelname: "暂不截止",
Savesname: "立即截止", Savesname: "立即截止",
Cancel: this.homeworkhide, Cancel: this.homeworkhide,

@ -393,7 +393,7 @@ class ShixunStudentWork extends Component {
OneSelftype:true, OneSelftype:true,
Topval:"学生将立即收到作业", Topval:"学生将立即收到作业",
// Botvalleft:"暂不发布", // Botvalleft:"暂不发布",
Botval:`本操作只对"未发布"的分班有效`, Botval:`本操作只对"未发布"的作业有效`,
starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime:"截止时间:"+endtime, endtime:"截止时间:"+endtime,
Cancelname:"暂不发布", Cancelname:"暂不发布",
@ -425,7 +425,7 @@ class ShixunStudentWork extends Component {
visible:true, visible:true,
Topval:"学生将不能再提交作业", Topval:"学生将不能再提交作业",
// Botvalleft:"暂不截止", // Botvalleft:"暂不截止",
Botval:`本操作只对"提交中"的分班有效`, Botval:`本操作只对"提交中"的作业有效`,
Cancelname:"暂不截止", Cancelname:"暂不截止",
Savesname:"立即截止", Savesname:"立即截止",
Cancel:this.homeworkhide, Cancel:this.homeworkhide,

@ -1707,7 +1707,7 @@ class Trainingjobsetting extends Component {
OneSelftype: true, OneSelftype: true,
Topval: "学生将立即收到作业", Topval: "学生将立即收到作业",
// Botvalleft:"暂不发布", // Botvalleft:"暂不发布",
Botval: `本操作只对"未发布"的分班有效`, Botval: `本操作只对"未发布"的作业有效`,
starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes: starttime, starttimes: starttime,
starttimesend: response.data.end_time === undefined || response.data.end_time === null || response.data.end_time === "" ? undefined : response.data.end_time, starttimesend: response.data.end_time === undefined || response.data.end_time === null || response.data.end_time === "" ? undefined : response.data.end_time,
@ -1740,7 +1740,7 @@ class Trainingjobsetting extends Component {
visible: true, visible: true,
Topval: "学生将不能再提交作业", Topval: "学生将不能再提交作业",
// Botvalleft:"暂不截止", // Botvalleft:"暂不截止",
Botval: `本操作只对"提交中"的分班有效`, Botval: `本操作只对"提交中"的作业有效`,
Cancelname: "暂不截止", Cancelname: "暂不截止",
Savesname: "立即截止", Savesname: "立即截止",
Cancel: this.homeworkhide, Cancel: this.homeworkhide,

@ -169,7 +169,7 @@ class Workquestionandanswer extends Component {
OneSelftype: true, OneSelftype: true,
Topval: "学生将立即收到作业", Topval: "学生将立即收到作业",
// Botvalleft:"暂不发布", // Botvalleft:"暂不发布",
Botval: `本操作只对"未发布"的分班有效`, Botval: `本操作只对"未发布"的作业有效`,
starttime: moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttime: moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime: "截止时间:" + endtime, endtime: "截止时间:" + endtime,
Cancelname: "暂不发布", Cancelname: "暂不发布",
@ -201,7 +201,7 @@ class Workquestionandanswer extends Component {
visible: true, visible: true,
Topval: "学生将不能再提交作业", Topval: "学生将不能再提交作业",
// Botvalleft:"暂不截止", // Botvalleft:"暂不截止",
Botval: `本操作只对"提交中"的分班有效`, Botval: `本操作只对"提交中"的作业有效`,
Cancelname: "暂不截止", Cancelname: "暂不截止",
Savesname: "立即截止", Savesname: "立即截止",
Cancel: this.homeworkhide, Cancel: this.homeworkhide,

@ -263,7 +263,7 @@ class ShixunHomework extends Component{
typs:"start", typs:"start",
Topval:"学生将立即收到作业", Topval:"学生将立即收到作业",
// Botvalleft:"暂不发布", // Botvalleft:"暂不发布",
Botval:`本操作只对"未发布"的分班有效`, Botval:`本操作只对"未发布"的作业有效`,
starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:starttime, starttimes:starttime,
endtime:"截止时间:"+endtime, endtime:"截止时间:"+endtime,
@ -303,7 +303,7 @@ class ShixunHomework extends Component{
typs:"start", typs:"start",
Topval:"学生将立即收到作业", Topval:"学生将立即收到作业",
// Botvalleft:"暂不发布", // Botvalleft:"暂不发布",
Botval:`本操作只对"未发布"的分班有效`, Botval:`本操作只对"未发布"的作业有效`,
starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:starttime, starttimes:starttime,
endtime:"截止时间:"+endtime, endtime:"截止时间:"+endtime,
@ -402,7 +402,7 @@ class ShixunHomework extends Component{
visible:true, visible:true,
Topval:"学生将不能再提交作业", Topval:"学生将不能再提交作业",
// Botvalleft:"暂不截止", // Botvalleft:"暂不截止",
Botval:`本操作只对"提交中"的分班有效`, Botval:`本操作只对"提交中"的作业有效`,
Cancelname:"暂不截止", Cancelname:"暂不截止",
Savesname:"立即截止", Savesname:"立即截止",
Cancel:this.homeworkhide, Cancel:this.homeworkhide,
@ -501,7 +501,7 @@ class ShixunHomework extends Component{
visible:true, visible:true,
Topval:"学生将立即收到作业", Topval:"学生将立即收到作业",
// Botvalleft:"暂不发布", // Botvalleft:"暂不发布",
Botval:`本操作只对"未发布"的分班有效`, Botval:`本操作只对"未发布"的作业有效`,
starttime:"发布时间:"+ moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttime:"发布时间:"+ moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:starttime, starttimes:starttime,
typs:"start", typs:"start",

@ -266,7 +266,14 @@ class RealNameCertificationModal extends Component{
let { certification } = this.props; let { certification } = this.props;
if(certification == 1){ if(certification == 1){
// 实名认证 // 实名认证
let url = `/users/accounts/${current_user && current_user.login}/authentication_apply.json` let url="";
if( basicInfo===undefined){
url = `/users/accounts/${current_user && current_user.login}/authentication_apply.json`;
}else {
url = `/users/accounts/${basicInfo && basicInfo.id}/authentication_apply.json`;
}
axios.post((url),{ axios.post((url),{
name:this.state.realName || basicInfo.name, name:this.state.realName || basicInfo.name,
gender:parseInt(values.sex), gender:parseInt(values.sex),
@ -281,7 +288,7 @@ class RealNameCertificationModal extends Component{
} catch (e) { } catch (e) {
} }
try { try {
this.props.Getdata(); this.props.Getdata(this.props.userdata.id);
} catch (e) { } catch (e) {
} }
@ -293,7 +300,13 @@ class RealNameCertificationModal extends Component{
}else{ }else{
// 职业认证 // 职业认证
// console.log(values.job == "student" ? values.student_No : values.job == "teacher" ? values.job1 : values.job2); // console.log(values.job == "student" ? values.student_No : values.job == "teacher" ? values.job1 : values.job2);
let url = `/users/accounts/${current_user && current_user.login}/professional_auth_apply.json` let url="";
if( basicInfo===undefined){
url = `/users/accounts/${current_user && current_user.login}/professional_auth_apply.json`;
}else {
url = `/users/accounts/${basicInfo && basicInfo.id}/professional_auth_apply.json`;
}
axios.post((url),{ axios.post((url),{
school_id:this.state.school_id, school_id:this.state.school_id,
department_id:this.state.department_id, department_id:this.state.department_id,
@ -309,7 +322,7 @@ class RealNameCertificationModal extends Component{
} }
try { try {
this.props.Getdata(); this.props.Getdata(this.props.userdata.id);
} catch (e) { } catch (e) {
} }
@ -331,7 +344,7 @@ class RealNameCertificationModal extends Component{
const { course_lists, checkBoxValues } = this.state const { course_lists, checkBoxValues } = this.state
this.onSendOk() this.onSendOk()
} }
handleChange2 = (info) => { handleChange2 = (info) => {
if (info.file.status === 'uploading') { if (info.file.status === 'uploading') {
this.setState({ loading: true }); this.setState({ loading: true });
@ -693,7 +706,7 @@ class RealNameCertificationModal extends Component{
</div> </div>
: :
<AccountBasicEditItem <AccountBasicEditItem
identity={identity} identity={identity}
getFieldDecorator={getFieldDecorator} getFieldDecorator={getFieldDecorator}
professionalFlag={professionalFlag} professionalFlag={professionalFlag}
basicInfo={basicInfo} basicInfo={basicInfo}

Loading…
Cancel
Save