diff --git a/public/react/src/modules/courses/boards/BoardsListItem.js b/public/react/src/modules/courses/boards/BoardsListItem.js index c25c541e8..2a6aaae2f 100644 --- a/public/react/src/modules/courses/boards/BoardsListItem.js +++ b/public/react/src/modules/courses/boards/BoardsListItem.js @@ -1,7 +1,7 @@ import React,{ Component } from "react"; import {Tooltip} from 'antd' import moment from 'moment' -import { getUrl } from 'educoder' +import { getUrl, WordsBtn } from 'educoder' class BoardsListItem extends Component{ constructor(props){ super(props); @@ -61,34 +61,37 @@ class BoardsListItem extends Component{
-

+

- {discussMessage.author.name} + {discussMessage.author.name} - { discussMessage.total_replies_count != 0 && {discussMessage.total_replies_count} 回复 } - { discussMessage.total_praises_count != 0 && {discussMessage.total_praises_count} 点赞 } - { discussMessage.visits != 0 && {discussMessage.visits} 浏览 } + { discussMessage.total_replies_count != 0 && {discussMessage.total_replies_count} 回复 } + { discussMessage.total_praises_count != 0 && {discussMessage.total_praises_count} 点赞 } + { discussMessage.visits != 0 && {discussMessage.visits} 浏览 } - {moment(discussMessage.created_on).fromNow()} + {moment(discussMessage.created_on).fromNow()} - {/* 最后回复社区导师10个月前 */}

+
+ {(isAdmin || discussMessage.author.login == current_user.login) && + { this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} }>编辑 } + + { isAdmin && { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();}}> + { discussMessage.sticky ? '取消置顶' : '置顶' } } +
+ + - {/* 473 */} - {/*

- 82 - 1 - 4 -

*/} - { (isAdmin || discussMessage.author.login == current_user.login) && + {/* { (isAdmin || discussMessage.author.login == current_user.login) &&
- } + } */} + + ) diff --git a/public/react/src/modules/courses/boards/BoardsNew.js b/public/react/src/modules/courses/boards/BoardsNew.js index bd134c922..cf530aba5 100644 --- a/public/react/src/modules/courses/boards/BoardsNew.js +++ b/public/react/src/modules/courses/boards/BoardsNew.js @@ -280,7 +280,7 @@ class BoardsNew extends Component{ { name: this.isEdit ? '帖子编辑' : '帖子新建'} ]}> -

+

{this.isEdit ? "编辑" : "新建"}帖子 this.props.history.goBack()}> diff --git a/public/react/src/modules/courses/boards/TopicDetail.js b/public/react/src/modules/courses/boards/TopicDetail.js index 1ef880c9f..5d4a434a5 100644 --- a/public/react/src/modules/courses/boards/TopicDetail.js +++ b/public/react/src/modules/courses/boards/TopicDetail.js @@ -227,15 +227,30 @@ class TopicDetail extends Component { // filesize = bytesToSize(item.filesize) } attachments.push( -

- - - {fileName && 30 }> - {fileName} - } - {filesize? ` ${filesize.replace(' ', '')}` : ''} + //

+ // + // + // {fileName && 30 }> + // {fileName} + // } + // {filesize? ` ${filesize.replace(' ', '')}` : ''} + // + //

+ +
+ + -

+ {fileName && 30 }> + + {fileName} + + } + + {item.filesize} + +
) }) return attachments; @@ -542,7 +557,7 @@ class TopicDetail extends Component { } {/* || current_user.user_id === author_info.user_id */} { current_user && (isAdmin || isCurrentUserTheAuthor) && -
+
-
+
-
+
{/* ${memo.user_praise ? '' : ''} */} diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 258a06332..ad755338c 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -156,7 +156,7 @@ class CommonWorkItem extends Component{ - { + {/* { mainList && isAdmin &&
  • @@ -170,7 +170,7 @@ class CommonWorkItem extends Component{
  • - } + } */}

    {item.commit_count===undefined?"":{item.commit_count} 已交} @@ -184,6 +184,12 @@ class CommonWorkItem extends Component{ {item.status_time} } + + {isAdmin &&

    + { this.props.toEditPage(this.props.match.params, item.homework_id) }}>编辑 + { this.props.toWorkSettingPage(this.props.match.params, item.homework_id) }}>设置 +
    } + { // isStudent && diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index 58a448a35..11d26ebf1 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -70,10 +70,10 @@ function buildColumns(that, student_works) { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' - }}> - + }} title={text}> + {/* + */} {text} -
    ), }, { diff --git a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js index 5ce5a5df3..1574d692d 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js @@ -271,8 +271,8 @@ class CommonWorkSetting extends Component{ absence_penalty = 2 } } else { - evaluation_start = '' - evaluation_end = '' + evaluation_start = null + evaluation_end = null evaluation_num = 0 absence_penalty = 0 } @@ -484,6 +484,7 @@ class CommonWorkSetting extends Component{ publish_time_type, end_time_type } = this.state; let group_settings_param = [] + let max_un_unified_setting_end_time = null if (!unified_setting) { const result = this.refs.pollDetailTabForthRules.notUnifiedSettingCheck(this.state.rules); this.setState({ @@ -494,6 +495,9 @@ class CommonWorkSetting extends Component{ return false; } group_settings_param = result.rules.map(item => { + if (!max_un_unified_setting_end_time || moment(item.end_time) > moment(max_un_unified_setting_end_time)) { + max_un_unified_setting_end_time = item.end_time; + } return { group_id: item.course_group_id, publish_time: item.publish_time, @@ -517,16 +521,22 @@ class CommonWorkSetting extends Component{ return false } - - let temp_publish_time = publish_time - let temp_end_time = end_time - if (!temp_publish_time) { - const publish_time_moment = getNextHalfHourOfMoment(moment()); - temp_publish_time = publish_time_moment.format(dateFormat); - } - if (!temp_end_time) { - temp_end_time = moment(handleDateString(temp_publish_time)).add(1, 'months').format(dateFormat) + let temp_publish_time + let temp_end_time + if (unified_setting) { + let temp_publish_time = publish_time + let temp_end_time = end_time + if (!temp_publish_time) { + const publish_time_moment = getNextHalfHourOfMoment(moment()); + temp_publish_time = publish_time_moment.format(dateFormat); + } + if (!temp_end_time) { + temp_end_time = moment(handleDateString(temp_publish_time)).add(1, 'months').format(dateFormat) + } + } else { + temp_end_time = max_un_unified_setting_end_time } + // 已发布的不检查 const isUnPublish= homework_status.indexOf(STATUS_UN_PUBLISH) != -1 const isAdmin = this.props.isAdmin() @@ -534,20 +544,22 @@ class CommonWorkSetting extends Component{ const publish_time_editable = isUnPublish; const end_time_editable = isAdmin || !end_time || moment(end_time) > current; - if (publish_time_editable && temp_publish_time && moment(temp_publish_time) < moment()) { - this.setState({ - publicTimeTip: '发布时间不能小于当前时间' - }) - scrollTo('.publicTimeTip') - return false - } - // 已截止的不检查 - if (end_time_editable && temp_end_time && moment(temp_end_time) <= moment(temp_publish_time)) { - this.setState({ - publicTimeTip: '截止时间必须晚于发布时间' - }) - scrollTo('.publicTimeTip') - return false + if (unified_setting) { + if (publish_time_editable && temp_publish_time && moment(temp_publish_time) < moment()) { + this.setState({ + publicTimeTip: '发布时间不能小于当前时间' + }) + scrollTo('.publicTimeTip') + return false + } + // 已截止的不检查 + if (end_time_editable && temp_end_time && moment(temp_end_time) <= moment(temp_publish_time)) { + this.setState({ + publicTimeTip: '截止时间必须晚于发布时间' + }) + scrollTo('.publicTimeTip') + return false + } } this.setState({ publicTimeTip: '' @@ -1006,7 +1018,7 @@ class CommonWorkSetting extends Component{ placeholder="请选择发布时间" id={"startime"} width={"210px"} - value={publish_time===null||publish_time===""?"":moment(publish_time, dateFormat)} + value={!publish_time?"":moment(publish_time, dateFormat)} onChange={this.onChangeTimepublish} // disabled={this.props.isSuperAdmin()?false:publish_time_type===true?true:false} disabled={moment(this.state.init_publish_time) < moment() || noAuth} @@ -1036,7 +1048,7 @@ class CommonWorkSetting extends Component{ placeholder="请选择截止时间" id={"endTime"} width={"210px"} - value={end_time===null||end_time===""?"":moment(end_time, dateFormat)} + value={!end_time?"":moment(end_time, dateFormat)} onChange={this.onChangeTimeend} disabled={this.props.isSuperAdmin()?false:end_time_type===true?true:false} disabled={moment(this.state.init_end_time) < moment() || noAuth} @@ -1105,7 +1117,7 @@ class CommonWorkSetting extends Component{ placeholder="请选择结束时间" id={"enTime"} width={"210px"} - value={late_time===null||late_time===""? undefined :moment(late_time, dateFormat)} + value={!late_time ? undefined :moment(late_time, dateFormat)} onChange={this.onChangeTimelatetime} disabledTime={disabledDateTime} disabled={!allow_late || noAuth || moment(init_late_time) < moment()} @@ -1153,7 +1165,7 @@ class CommonWorkSetting extends Component{ placeholder="请选择匿名开启时间" id={"startime"} width={"210px"} - value={evaluation_start===null||evaluation_start===""?"":moment(evaluation_start, dateFormat)} + value={!evaluation_start ?"":moment(evaluation_start, dateFormat)} onChange={this.onChangeEvaluationStart} disabled={ (anonymous_comment && !noAuth ? false : true) || moment(init_evaluation_start) < moment() } // disabledDate={ (evaluation_start) => @@ -1182,7 +1194,7 @@ class CommonWorkSetting extends Component{ placeholder="请选择匿名结束时间" id={"endtime"} width={"210px"} - value={evaluation_end===null||evaluation_end===""?"":moment(evaluation_end, dateFormat)} + value={!evaluation_end ?"":moment(evaluation_end, dateFormat)} onChange={this.onChangeEvaluationEnd} disabledTime={disabledDateTime} disabled={(anonymous_comment && !noAuth ? false : true) || moment(init_evaluation_end) < moment()} @@ -1201,7 +1213,7 @@ class CommonWorkSetting extends Component{
    - {anonymous_comment_time_tip &&
    {anonymous_comment_time_tip}
    } + {
    {anonymous_comment_time_tip}
    } {/* 匿评数量 */}
    @@ -1277,7 +1289,7 @@ class CommonWorkSetting extends Component{ placeholder="请选择申诉结束时间" id={"endtime"} width={"210px"} - value={appeal_time===null||appeal_time===""?"":moment(appeal_time, dateFormat)} + value={!appeal_time?"":moment(appeal_time, dateFormat)} onChange={this.appeal_time_change} disabled={ (anonymous_appeal && !noAuth ? false : true) || moment(init_appeal_time) < moment()} /> diff --git a/public/react/src/modules/courses/busyWork/IndexGroup.js b/public/react/src/modules/courses/busyWork/IndexGroup.js index 5271d7deb..0a4415f2f 100644 --- a/public/react/src/modules/courses/busyWork/IndexGroup.js +++ b/public/react/src/modules/courses/busyWork/IndexGroup.js @@ -36,6 +36,10 @@ const CommonWorkAnswer = Loadable({ loader: () => import('./CommonWorkAnswer'), loading:Loading, }) +const CommonWorkAppraise = Loadable({ + loader: () => import('./CommonWorkAppraise'), + loading:Loading, +}) const CommonWork = Loadable({ @@ -87,6 +91,12 @@ class CoursesWorkIndex extends Component{ (props) => () } > + {/* 评阅 */} + () + } + > -

    +

    {this.isEdit ?"编辑":"新建"}{ moduleName } {/* history.goBack() this.props.toListPage(this.props.match.params, category.category_id)} diff --git a/public/react/src/modules/courses/common/courseMessage.css b/public/react/src/modules/courses/common/courseMessage.css index db2381d37..e521b24f5 100644 --- a/public/react/src/modules/courses/common/courseMessage.css +++ b/public/react/src/modules/courses/common/courseMessage.css @@ -25,7 +25,7 @@ } */ #forum_list .return_btn.no_mr { - margin-right: 15px + /* margin-right: 15px */ } /* md编辑器拖拽调整 */ diff --git a/public/react/src/modules/courses/exercise/ExerciseNew.js b/public/react/src/modules/courses/exercise/ExerciseNew.js index 88e1859f9..8bc7ed6ae 100644 --- a/public/react/src/modules/courses/exercise/ExerciseNew.js +++ b/public/react/src/modules/courses/exercise/ExerciseNew.js @@ -405,10 +405,10 @@ class ExerciceNew extends Component{ { name: this.isEdit ? '编辑试卷' : '新建试卷'} ]}> -

    +

    {this.isEdit ? "编辑" : "新建"}试卷 this.props.history.goBack()}> + onClick={() => this.props.history.length == 1 ? this.props.history.push(`/courses/${courseId}/exercises/${left_banner_id}`): this.props.history.goBack()}> 返回

    diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js index 9874b26fa..39116c5de 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js @@ -79,7 +79,12 @@ class GraduationTasksedit extends Component{ let listid=[] let graduation_id=this.state.data.graduation_id; for(var list of fileList){ - listid.push(list.response.id) + if(list.response!=undefined){ + listid.push(list.response.id) + }else{ + listid.push(list.uid) + } + } // console.log(listid) @@ -125,7 +130,7 @@ class GraduationTasksedit extends Component{ GraduationTasksedittype=false; // window.location.href="/courses/"+course_id+"/graduation/"+graduationId+"/graduation_tasks/"+category_id+"/questions"; // this.goback() - window.location.href="/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting"; + this.props.history.push("/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting"); } }).catch((error) => { console.log(error) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js index f98373fe6..ccbaa8646 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js @@ -1,297 +1,327 @@ -import React,{Component} from "React"; -import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal} from "antd"; +import React, {Component} from "React"; +import {Form, Select, Input, Button, Checkbox, Upload, Icon, message, Modal} from "antd"; import {Link} from 'react-router-dom'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; -import { WordsBtn,getUrl} from 'educoder'; +import {WordsBtn, getUrl} from 'educoder'; import axios from 'axios'; import Modals from '../../../modals/Modals'; import '../../css/Courses.css'; -const { Option} = Select; + +const {Option} = Select; const CheckboxGroup = Checkbox.Group; const confirm = Modal.confirm; -let GraduationTasksnewtype=true; -class GraduationTasksnew extends Component{ - - constructor(props){ - super(props) - this.state={ - coursename:"", - coursesearch:"", - title_num:60, - title_value:"", - fileList: [], - contents: [{val:"",id:1}], - type:true - } - } - - componentDidMount(){ - // const query =this.props.location.search; - // - // const type = query.split('&'); - // let name = type[1].split("name=") - // name = String(name).split(",") - // name = decodeURI(name[1]) - // - // this.setState({ - // coursename:name, - // coursesearch:this.props.location.search - // }) - } - - scrollToAnchors=(anchorName)=>{ - this.setState({ - anchor:anchorName - }) - } - - - handleSubmit=(e) => { - let {fileList}=this.state; - let listid=[] - - for(var list of fileList){ - listid.push(list.response.id) - } - e.preventDefault(); - if( GraduationTasksnewtype===true){ - this.props.form.validateFields((err, values) => { - if (!err) { - if(values.tasktype===undefined){ - this.scrollToAnchors("tasktypes"); - return +let GraduationTasksnewtype = true; + +class GraduationTasksnew extends Component { + + constructor(props) { + super(props) + this.state = { + coursename: "", + coursesearch: "", + title_num: 60, + title_value: "", + fileList: [], + contents: [{val: "", id: 1}], + type: true + } + } + + componentDidMount() { + // const query =this.props.location.search; + // + // const type = query.split('&'); + // let name = type[1].split("name=") + // name = String(name).split(",") + // name = decodeURI(name[1]) + // + // this.setState({ + // coursename:name, + // coursesearch:this.props.location.search + // }) + } + + scrollToAnchors = (anchorName) => { + this.setState({ + anchor: anchorName + }) + } + + + handleSubmit = (e) => { + let {fileList} = this.state; + let listid = [] + + for (var list of fileList) { + listid.push(list.response.id) + } + e.preventDefault(); + if (GraduationTasksnewtype === true) { + this.props.form.validateFields((err, values) => { + if (!err) { + if (values.tasktype === undefined) { + this.scrollToAnchors("tasktypes"); + return + } + + if (values.name === undefined) { + this.scrollToAnchors("nametypes"); + return + } + + if (values.description === undefined) { + this.scrollToAnchors("descriptiontypes"); + return + } else if (values.description.length > 5000) { + this.scrollToAnchors("descriptiontypes"); + return + } + console.log('Received values of form: ', values); + console.log(fileList); + const course_id = this.props.match.params.coursesId; + + let url = "/courses/" + course_id + "/graduation_tasks.json" + axios.post(url, { + task_type: parseInt(values.tasktype), + name: values.name, + description: values.description, + attachment_ids: listid, + } + ).then((response) => { + if (response.status === 200) { + GraduationTasksnewtype = false; + // this.goback(); + this.props.history.push("/courses/" + this.props.match.params.coursesId + "/graduation_tasks/" + this.props.match.params.category_id + "/" + response.data.task_id + "/setting"); + } + }).catch((error) => { + console.log(error) + }) + } + + }); + } + + + } + + + goback = () => { + let courseId = this.props.match.params.coursesId; + let category_id = this.props.match.params.category_id; + + window.location.href = "/courses/" + courseId + "/graduation_tasks/" + category_id; + } + + + // 输入title + changeTitle = (e) => { + + this.setState({ + title_num: 60 - parseInt(e.target.value.length), + title_value: e.target.value + }) + + } + // 附件相关 START + handleChange = (info) => { + let fileList = info.fileList; + + // for(var list of fileList ){ + // console.log(list) + // } + this.setState({fileList}); + } + + onAttachmentRemove = (file) => { + // confirm({ + // title: '确定要删除这个附件吗?', + // okText: '确定', + // cancelText: '取消', + // // content: 'Some descriptions', + // onOk: () => { + // this.deleteAttachment(file) + // }, + // onCancel() { + // console.log('Cancel'); + // }, + // }); + // return false; + + this.setState({ + Modalstype: true, + Modalstopval: '确定要删除这个附件吗?', + ModalSave: () => this.deleteAttachment(file), + ModalCancel: this.cancelAttachment + }) + return false; + } + + cancelAttachment = () => { + this.setState({ + Modalstype: false, + Modalstopval: '确定要删除这个附件吗?', + ModalSave: "", + ModalCancel: "" + }) + } + + deleteAttachment = (file) => { + const url = `/attachments/${file.response ? file.response.id : file.uid}.json` + axios.delete(url, {}) + .then((response) => { + if (response.data) { + const {status} = response.data; + if (status == 0) { + console.log('--- success') + + this.setState((state) => { + const index = state.fileList.indexOf(file); + const newFileList = state.fileList.slice(); + newFileList.splice(index, 1); + return { + fileList: newFileList, + }; + }); + } + } + }) + .catch(function (error) { + console.log(error); + }); + } + + //滚动 + ifHasAnchorJustScorll() { + // let anchor = this.getURLStuff("anchor"); + + let anchor = this.state.anchor; + // console.log("anchor ", anchor); + // 对应id的话, 滚动到相应位置 + if (!!anchor) { + let anchorElement = document.getElementById(anchor); + if (anchorElement) { + window.scrollTo(0, anchorElement.offsetTop - window.innerHeight / 2); + } + } + // 没有的话,滚动到头部 + else { + document.body.scrollTop = document.documentElement.scrollTop = 0; + } + } + + render() { + const {getFieldDecorator} = this.props.form; + let { + coursename, coursesearch, title_num, title_value, pageType, fileList, contents, type, + Modalstype, Modalstopval, ModalCancel, ModalSave + } = this.state; + + let {coursedata} = this.props; + + let courseId = this.props.match.params.coursesId; + let position = this.props.match.params.position; + let category_id = this.props.match.params.category_id; + const uploadProps = { + width: 600, + fileList, + multiple: true, + // https://github.com/ant-design/ant-design/issues/15505 + // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 + // showUploadList: false, + action: `${getUrl()}/api/attachments.json`, + onChange: this.handleChange, + onRemove: this.onAttachmentRemove, + beforeUpload: (file) => { + console.log('beforeUpload', file.name); + const isLt150M = file.size / 1024 / 1024 < 150; + if (!isLt150M) { + message.error('文件大小必须小于150MB!'); + } + return isLt150M; + }, + }; + // this.ifHasAnchorJustScorll(); + // console.log(this.props.current_user.course_name) + return ( + + +
    + {/*提示*/} + +
    +
    + +

    + {this.props.current_user && this.props.current_user.course_name} + > + 毕设任务 + > + {"新建"} +

    + +
    +

    新建毕设任务

    + 返回 +
    + + +
    + + {/*内容*/} +
    + + + {getFieldDecorator('tasktype', { + rules: [{required: true, message: "请选择任务类型"}], + })()} + + (选择确认后,无法修改) + + + + {getFieldDecorator('name', { + rules: [{required: true, message: "不能为空"}], + })()} + + +
    + + +
    + - - {getFieldDecorator('description', { - rules: [{ - required: true, message: '请输入帖子内容', - }, { - max: 5000, message: '最大限制为5000个字符', - }], - })( - - )} - - - - - (单个文件150M以内) - -
    - - - -
    - - 取消 -
    -
    -
    - -
    -
    -
    - -
    - - ) - } + + {getFieldDecorator('description', { + rules: [{ + required: true, message: '请输入帖子内容', + }, { + max: 5000, message: '最大限制为5000个字符', + }], + })( + + )} + + + + + (单个文件150M以内) + +
    + + + +
    + + 取消 +
    +
    + + +
    +
    +
    + + + + ) + } } -const GraduationTasksnewApp = Form.create({ name: 'coursesNew' })(GraduationTasksnew); + +const GraduationTasksnewApp = Form.create({name: 'coursesNew'})(GraduationTasksnew); export default GraduationTasksnewApp; \ No newline at end of file diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index 9b1a2ad6e..509bf56c1 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -49,7 +49,7 @@ function buildColumns(that) { width: 160, key: 'name', render: (name, record) => { - return {name} + return {name} } }, { title: '角色', diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index d8fb83974..6c0158f21 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -314,7 +314,7 @@ class CoursesNew extends Component { } }).then((result)=>{ this.setState({ - searchlistscholl:result.data.shools_name, + searchlistscholl:result.data.school_names, scholl:value }) this.props.form.setFieldsValue({ diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index e0a631541..d98228856 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -44,18 +44,14 @@ class Trialapplication extends Component { componentWillReceiveProps(nextProps) { - // this.setState({ - // isRenders:nextProps.isRenders - // }) - // console.log("componentWillReceiveProps"); - // console.log(nextProps); + } //初始化数据 componentDidMount() { - // console.log("53"); + console.log("53"); - // console.log(this.props.isRenders); + console.log(this.props.isRenders); if (this.props.isRenders != undefined) { this.setState({ @@ -78,12 +74,13 @@ class Trialapplication extends Component { } return response; }, (error) => { - // // // TODO 这里如果样式变了会出现css不加载的情况 + //TODO 这里如果样式变了会出现css不加载的情况 + }); - // console.log("89"); + console.log("89"); try { - // console.log(this.state.props.user && this.state.props.user.user_phone_binded); if (this.state.props.user !== undefined) { + console.log(this.state.props.user && this.state.props.user.user_phone_binded); this.setState({ user_phone_binded: this.state.props.user.user_phone_binded, }) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index e2ef85907..e22b2ab17 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -173,6 +173,8 @@ class NewHeader extends Component { showTrial:false, user:undefined, } + console.log("176") + console.log(props); } componentDidMount() { @@ -570,7 +572,7 @@ submittojoinclass=(value)=>{ // join_course_url: "https://www.educoder.net/courses/join_course_multi_role" // join_project_url: "https://www.educoder.net/applied_project/applied_project_info" // rolearr:["",""], - console.log(this.props) + // console.log() return (
    @@ -581,7 +583,7 @@ submittojoinclass=(value)=>{ /> {/* :""*/} {/*}*/} - + {/*{*/} {/* isRenders&&isRenders===true?*/}