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

dev_home
cxt 5 years ago
commit acdefd2930

@ -30,15 +30,15 @@
# 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.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.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
end
end

@ -25,6 +25,8 @@ namespace :competition do
users = User.joins(:user_extension).where(id: user_ids).where(user_extensions: {identity: 0})
competition.competition_teams.destroy_all
users.each do |user|
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)
@ -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 = 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.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)
forked_map = get_valid_course_count(forked_shixun_map.keys, end_time)

@ -409,4 +409,13 @@
overflow:hidden;
text-overflow:ellipsis;
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',
key: 'userimg',
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}`)}/>
</span>),
</a>),
},
{
title: 'username',
dataIndex: 'username',
key: 'username',
render: text => <span title={text}>{text}</span>,
render: text => <span title={text} title={text}>{text}</span>,
},
{
title: 'school',
dataIndex: 'school',
key: 'school',
render: text => <span title={text}>{text}</span>,
render: text => <span title={text} title={text}>{text}</span>,
},
{
title: 'spendtime',
@ -200,7 +200,7 @@ class CompetitionContents extends Component{
<li className="pr Competitioncenter">
<img src={getImageUrl("images/educoder/huangguan-two.png")}/>
<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}`)} />
<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>
@ -236,7 +236,7 @@ class CompetitionContents extends Component{
<li className="pr Competitioncenter">
<img src={getImageUrl("images/educoder/huangguan.png")}/>
<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}`)} />
<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>
@ -272,7 +272,7 @@ class CompetitionContents extends Component{
<li className=" pr Competitioncenter ">
<img src={getImageUrl("images/educoder/huangguan-three.png")}/>
<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}`)} />
<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>
@ -315,10 +315,21 @@ class CompetitionContents extends Component{
.col24{
width: 24%;
text-align: left;
padding-left: 16px;
padding-left: 33px;
}
.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}>
{/*{item.team_name}*/}
</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:""}
</Col>
<Col className="textright" span={3} order={5} className={"col15"}>
</Col>:<Col span={3} order={4} className={"col10"}>
{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>
</Col>
</Col>:<Col className="textright" span={3} order={5} className={"col12"}>
<span className={"ranknameslast"}>{item.score<50?"< 50 分":item.score}</span>
</Col>}
</Row>
)
})}
@ -352,23 +367,20 @@ class CompetitionContents extends Component{
{
`
.ant-table-tbody > tr > td:nth-last-child(4){
// line-height: 63px;
// width: 300px;
// height: 96px;
// // display: inline-flex;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
width: 150px;
overflow: hidden;
max-width: 100px;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
white-space: nowrap;
cursor: default;
}
.ant-table-tbody > tr > td:nth-last-child(3){
// line-height: 63px;
// width: 290px;
// height: 96px;
// display: inline-block;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
overflow: hidden;
max-width: 200px;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
white-space: nowrap;
cursor: default;
}
.ant-table-tbody>tr>td, .ant-table-thead>tr>th {
padding: 5px;

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

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

@ -37,10 +37,10 @@ class Mailboxvalidation extends Component {
onEmailSubmit = () => {
this.props.form.validateFieldsAndScroll((err, values) => {
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]+$/;
if (reg.test(values.email)) {
let url = `/users/accounts/${login}/email_bind.json`
let url = `/users/accounts/${id}/email_bind.json`
axios.post((url), {
email: values.email,
code: values.emailValidateCode
@ -48,7 +48,7 @@ class Mailboxvalidation extends Component {
if (result) {
this.props.showNotification("邮箱地址绑定成功!");
this.hideUpdating(2);
this.props.getdata();
this.props.getdata(id);
}
}).catch((error) => {
console.log(error);

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

@ -61,7 +61,7 @@ class PublishRightnow extends Component{
OneSelftype:showdatatype?true:false,
Topval:showdatatypes ? "学生将立即收到作业" : "学生将不能再提交作品",
// Botvalleft: isPublish ? "暂不发布" : "暂不截止",
Botval: this.props.fromListPage ? (showdatatypes ? "本操作只对“未发布”的分班有效" : "本操作只对“提交中”的分班有效") : '',
Botval: this.props.fromListPage ? (showdatatypes ? "本操作只对“未发布”的作业有效" : "本操作只对“提交中”的作业有效") : '',
starttime: showdatatypes? `发布时间:${startMoment.format(dateFormat)}` : '',
starttimes:showdatatypes? `${startMoment.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,
Topval:"学生将立即收到试卷",
// Botvalleft:"暂不发布",
Botval:`本操作只对"未发布"的分班有效`,
Botval:`本操作只对"未发布"的试卷有效`,
starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:this.props.getNowFormatDates(1),
endtime:"截止时间:"+this.props.getNowFormatDates(2),

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

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

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

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

@ -210,12 +210,11 @@ function CourseGroupList(props) {
onPressEnter={onPressEnter}
></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 style={{color: '#999999'}}>{none_group_member_count}个学生</span>
<WordsBtn style="blue" className="fr "
onClick={() => {props.history.push(`/courses/${courseId}/course_groups/0`)}}>查看</WordsBtn>
<WordsBtn style="blue" className="fr">查看</WordsBtn>
</div>}
<Spin size="large" spinning={isSpin}>

@ -1,4 +1,8 @@
.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 {
padding: 14px 6px;
}
.E9F8FF{
background-color: #E9F8FF;
}

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

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

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

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

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

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

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

@ -266,7 +266,14 @@ class RealNameCertificationModal extends Component{
let { certification } = this.props;
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),{
name:this.state.realName || basicInfo.name,
gender:parseInt(values.sex),
@ -281,7 +288,7 @@ class RealNameCertificationModal extends Component{
} catch (e) {
}
try {
this.props.Getdata();
this.props.Getdata(this.props.userdata.id);
} catch (e) {
}
@ -293,7 +300,13 @@ class RealNameCertificationModal extends Component{
}else{
// 职业认证
// 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),{
school_id:this.state.school_id,
department_id:this.state.department_id,
@ -309,7 +322,7 @@ class RealNameCertificationModal extends Component{
}
try {
this.props.Getdata();
this.props.Getdata(this.props.userdata.id);
} catch (e) {
}
@ -331,7 +344,7 @@ class RealNameCertificationModal extends Component{
const { course_lists, checkBoxValues } = this.state
this.onSendOk()
}
handleChange2 = (info) => {
if (info.file.status === 'uploading') {
this.setState({ loading: true });
@ -693,7 +706,7 @@ class RealNameCertificationModal extends Component{
</div>
:
<AccountBasicEditItem
identity={identity}
identity={identity}
getFieldDecorator={getFieldDecorator}
professionalFlag={professionalFlag}
basicInfo={basicInfo}

Loading…
Cancel
Save