Merge remote-tracking branch 'origin/master'

dev_forum
杨树明 5 years ago
commit 41cc5b6c67

@ -664,7 +664,7 @@ render(){
>
{getFieldDecorator('description', {
rules: [{
required: true, message: '请输入帖子内容',
required: true, message: '请输入作品内容',
}, {
max: 5000, message: '最大限制为5000个字符',
}],

@ -49,6 +49,8 @@ class CommonWorkSetting extends Component{
super(props)
this.publishModal = React.createRef();
this.endModal = React.createRef();
this.fetchMoment = moment()
this.state={
unified_setting: true,
rules: [],
@ -123,6 +125,7 @@ class CommonWorkSetting extends Component{
} else if (result.data.publish_time && moment(result.data.publish_time) < moment()) {
disable_unified_setting = true
}
this.fetchMoment = moment()
this.setState({
// starttimetype:starttype,
// endtimetype:endtype,
@ -1042,7 +1045,7 @@ class CommonWorkSetting extends Component{
{/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":publish_time_type===true?"":""}>
</Tooltip> */}
<ConditionToolTip condition={moment(this.state.init_publish_time) < moment()} title={"时间已过,不能再修改"}>
<ConditionToolTip condition={moment(this.state.init_publish_time) < this.fetchMoment} title={"时间已过,不能再修改"}>
<span>
<DatePicker
@ -1074,7 +1077,7 @@ class CommonWorkSetting extends Component{
<span>截止时间</span>
{/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":end_time_type===true?"":""}>
</Tooltip> */}
<ConditionToolTip condition={moment(this.state.init_end_time) < moment()} title={"时间已过,不能再修改"}>
<ConditionToolTip condition={moment(this.state.init_end_time) < this.fetchMoment} title={"时间已过,不能再修改"}>
<span>
<DatePicker
dropdownClassName="hideDisable"
@ -1133,7 +1136,7 @@ class CommonWorkSetting extends Component{
<RadioGroup onChange={this.allow_late_change} value={allow_late}>
<Radio style={radioStyle} value={true} disabled={noAuth}>允许补交</Radio>
<Radio style={radioStyle} value={true} disabled={noAuth || moment(init_late_time) < this.fetchMoment}>允许补交</Radio>
<div className={"h21 mb10 ml30 mt20"}>
<span>迟交扣分</span>
@ -1146,7 +1149,7 @@ class CommonWorkSetting extends Component{
<div className={" mb10 ml30"}>
<span>结束时间</span>
<ConditionToolTip condition={moment(init_late_time) < moment()} title={"时间已过,不能再修改"}>
<ConditionToolTip condition={moment(init_late_time) < this.fetchMoment} title={"时间已过,不能再修改"}>
<span>
<DatePicker
showToday={false}
@ -1175,7 +1178,7 @@ class CommonWorkSetting extends Component{
</div>
<Radio style={radioStyle} value={false} disabled={noAuth}>禁止补交</Radio>
<Radio style={radioStyle} value={false} disabled={noAuth || moment(init_late_time) < this.fetchMoment}>禁止补交</Radio>
</RadioGroup>
@ -1194,7 +1197,7 @@ class CommonWorkSetting extends Component{
<div className={"h20 mb30 ml60"}>
<span>开启时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"发布时间已过,则不能修改":""}>
<ConditionToolTip condition={moment(init_evaluation_start) < moment()} title={"时间已过,不能再修改"}>
<ConditionToolTip condition={moment(init_evaluation_start) < this.fetchMoment} title={"时间已过,不能再修改"}>
<span>
<DatePicker
dropdownClassName="hideDisable"
@ -1227,7 +1230,7 @@ class CommonWorkSetting extends Component{
{/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"":""}>
</Tooltip> */}
<ConditionToolTip condition={moment(init_evaluation_end) < moment()} title={"时间已过,不能再修改"}>
<ConditionToolTip condition={moment(init_evaluation_end) < this.fetchMoment} title={"时间已过,不能再修改"}>
<span>
<DatePicker
dropdownClassName="hideDisable"
@ -1324,7 +1327,7 @@ class CommonWorkSetting extends Component{
<span>结束时间</span>
{/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"":""}>
</Tooltip> */}
<ConditionToolTip condition={moment(init_appeal_time) < moment()} title={"时间已过,不能再修改"}>
<ConditionToolTip condition={moment(init_appeal_time) < this.fetchMoment} title={"时间已过,不能再修改"}>
<span>
<DatePicker
dropdownClassName="hideDisable"

@ -81,7 +81,7 @@ class GraduationTasksappraiseReplyChild extends Component{
></GraduationTasksappraiseMainEditor> }
</div>
<div className={"stud-class-set edu-back-white mb10"} style={{height:"100%"}}>
{!!comment_scores.length && <div className={"stud-class-set edu-back-white mb10"} style={{height:"100%"}}>
<div className="padding20 memoReplies commentsDelegateParent course-message"
style={{ paddingTop: '0px', paddingBottom: '0px' }}
@ -96,7 +96,7 @@ class GraduationTasksappraiseReplyChild extends Component{
}) }
</div>
</div>
</div>
</div> }
</React.Fragment>
)
}

@ -1336,23 +1336,19 @@ class Listofworks extends Component {
}
// 导出实习报告批量
internshipreport = ()=>{
internshipreport = (url)=>{
console.log("internshipreport");
let url = "/zip/shixun_report";
let homeworkid = this.props.match.params.homeworkid;
axios.get((url),{
params: {
homework_common_id: homeworkid,
work_status: this.state.course_groupyslstwo,
course_group: this.state.checkedValuesineinfo,
search: this.state.searchtext,
}
},{responseType: 'blob'}).then((response) => {
console.log("1342");
console.log(response);
// params: {
// homework_common_id: homeworkid,
// work_status: this.state.course_groupyslstwo,
// course_group: this.state.checkedValuesineinfo,
// search: this.state.searchtext,
// }
// let url = "/zip/shixun_report";
// let homeworkid = this.props.match.params.homeworkid;
axios.get(url).then((response) => {
if(response.status === 200){
window.open(url, '_blank');
}else{
}
}).catch((error) => {
@ -1361,21 +1357,19 @@ class Listofworks extends Component {
}
// 课堂学生成绩的导出下载
Classstudentachievement=()=>{
Classstudentachievement=(url)=>{
console.log("Classstudentachievement");
const course_id = this.props.match.params.coursesId;
let url = "/courses/"+course_id+"/export_member_scores_excel.xlsx";
axios.get((url),{
params: {
group_id: this.state.checkedValuesineinfo,
search: this.state.searchtext,
}
},{responseType: 'blob'}).then((response) => {
console.log("1306");
console.log(response);
// const course_id = this.props.match.params.coursesId;
// let url = "/courses/"+course_id+"/export_member_scores_excel.xlsx";
// ,{
// params: {
// group_id: this.state.checkedValuesineinfo,
// search: this.state.searchtext,
// }
// },{responseType: 'blob'})
axios.get(url).then((response) => {
if(response.status === 200){
window.open(url, '_blank');
}else{
}
}).catch((error) => {
@ -1531,8 +1525,8 @@ class Listofworks extends Component {
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-0px","left":"unset","height":"auto"}}>
<li><a onClick={()=>this.internshipreport()}>实训报告</a></li>
<li><a onClick={()=>this.Classstudentachievement()} >学生成绩</a></li>
<li><a onClick={()=>this.internshipreport(`/api/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)}>实训报告</a></li>
<li><a onClick={()=>this.Classstudentachievement(`/api/courses/${this.props.match.params.coursesId}/export_member_scores_excel.xlsx?group_id=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)} >学生成绩</a></li>
</ul>
</li>:""}
{this.props.isAdmin() ?

@ -402,7 +402,7 @@ class LoginRegisterComponent extends Component {
: <div style={{height: "25px"}}></div>
}
<DragValidator
height={38} successGreenColor="#b0e811"
height={38} successGreenColor="#29bd8b"
style={{height: "38px", width: "100%"}}
dragOkCallback={this.dragOkCallback}
></DragValidator>

@ -713,7 +713,7 @@ class LoginRegisterComponent extends Component {
}
<DragValidator
height={38} className="loginInput" successGreenColor="#b0e811"
height={38} className="loginInput" successGreenColor="#29bd8b"
style={{ height: '38px'}}
dragOkCallback={this.dragOkCallback}
></DragValidator>

Loading…
Cancel
Save