diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index bd3bb68fa..9ebc54de8 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -30,6 +30,7 @@ export function initAxiosInterceptors(props) { // proxy = "http://testbdweb.trustie.net" // proxy = "http://testbdweb.educoder.net" proxy = "https://testeduplus2.educoder.net" + proxy = "http://47.96.87.25:48080" // 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求; diff --git a/public/react/src/common/UrlTool.js b/public/react/src/common/UrlTool.js index 2c307d13e..c0402b325 100644 --- a/public/react/src/common/UrlTool.js +++ b/public/react/src/common/UrlTool.js @@ -10,6 +10,17 @@ export function getImageUrl(path) { return `/${path}`; } +export function setImagesUrl(path){ + const local = 'http://47.96.87.25:48080' + let firstStr=path.substr(0,1); + console.log(firstStr); + if(firstStr=="/"){ + return isDev?`${local}${path}`:`${path}`; + }else{ + return isDev?`${local}/${path}`:`/${path}`; + } +} + export function getUrl(path, goTest) { // https://www.educoder.net // https://testbdweb.trustie.net diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js index 285c9eac2..c77d42908 100644 --- a/public/react/src/common/educoder.js +++ b/public/react/src/common/educoder.js @@ -2,7 +2,7 @@ import { from } from '_array-flatten@2.1.2@array-flatten'; // export { default as OrderStateUtil } from '../routes/Order/components/OrderStateUtil'; -export { getImageUrl as getImageUrl, getUrl as getUrl, getUploadActionUrl as getUploadActionUrl } from './UrlTool'; +export { getImageUrl as getImageUrl, getUrl as getUrl,setImagesUrl as setImagesUrl, getUploadActionUrl as getUploadActionUrl } from './UrlTool'; export { default as queryString } from './UrlTool2'; export { SnackbarHOC as SnackbarHOC } from './SnackbarHOC'; diff --git a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js index f085687ff..818c882e7 100644 --- a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js +++ b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js @@ -278,7 +278,8 @@ class Testpapersettinghomepage extends Component{ className={"btn fr color-blue font-16 mt20 mr20"} checkBoxValues={[parseInt(this.props.match.params.Id)]} Exercisetype={"exercise"} - action={this.Commonheadofthetestpaper} + action={this.Commonheadofthetestpaper} + single={true} >:"":""} {isAdmin === true?Commonheadofthetestpaper!==undefined&&Commonheadofthetestpaper.user_permission.exercise_unpublish_count>0? :"":""} {isAdmin === true? 编辑试卷:""} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js index 47f38746c..d2ca3855c 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js @@ -163,13 +163,13 @@ class GraduationTasksappraise extends Component{

- {datalist&&datalist.course_name} + {datalist&&datalist.course_name} > - {datalist&&datalist.graduation_name} + {datalist&&datalist.graduation_name} > - 任务详情 + 任务详情 > - {datalist&&datalist.author_name} + {datalist&&datalist.author_name}

@@ -195,16 +195,16 @@ class GraduationTasksappraise extends Component{
-
+
-
+
内容
-
+
{/*
*/} @@ -238,7 +238,7 @@ class GraduationTasksappraise extends Component{ {/**/} {/*{moment(datalist&&datalist.update_time).format('YYYY-MM-DD HH:mm:ss')==="Invalid date"?"":moment(datalist&&datalist.update_time).format('YYYY-MM-DD HH:mm:ss')}*/} {/**/} - 提交 + 提交 {datalist&&datalist.author_name} {moment(datalist&&datalist.commit_time).format('YYYY-MM-DD HH:mm:ss')==="Invalid date"?"":moment(datalist&&datalist.commit_time).format('YYYY-MM-DD HH:mm:ss')} @@ -248,20 +248,15 @@ class GraduationTasksappraise extends Component{
- {firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.length===0?"":
- + {firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.length===0?"": +
补交附件
-
补交原因:{firelistdata&&firelistdata.revise_reason}
- - - - {firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.map((item,key)=>{ - + {firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.map((item,key)=>{ return( ) - })} - - - -
- - 更新 - {firelistdata&&firelistdata.atta_update_user} - - {moment(firelistdata&&firelistdata.atta_update_time).format('YYYY-MM-DD HH:mm:ss')==="Invalid date"?"":moment(firelistdata&&firelistdata.atta_update_time).format('YYYY-MM-DD HH:mm:ss')} - - -
- - + })} +
+ 更新 + {firelistdata&&firelistdata.atta_update_user} + + {moment(firelistdata&&firelistdata.atta_update_time).format('YYYY-MM-DD HH:mm:ss')==="Invalid date"?"":moment(firelistdata&&firelistdata.atta_update_time).format('YYYY-MM-DD HH:mm:ss')} + +
} - - {datalist&&datalist.project_info===undefined?"":
- + {datalist&&datalist.project_info===undefined?"": +
关联项目
-
{datalist&&datalist.project_info.name}
-
} {/*{*/} - { datalist === undefined?"":datalist&&datalist.task_type===undefined?"" :datalist.task_type===1? "": -
- -
- 其他组员 -
-
- {datalist&&datalist.work_members&&datalist.work_members.map((item,key)=>{ - - return( -
- {item.user_name} -
- ) - })} -
+ { datalist === undefined?"": datalist && datalist.task_type===undefined ?"" : datalist.task_type===1? "": datalist && datalist.work_members && datalist.work_members.length == 0 ?"": +
+
+ 其他组员
- } - - +
+ {datalist.work_members.map((item,key)=>{ + return( +
+ {item.user_name} +
+ ) + })} +
+
+ }
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js index 39116c5de..7404f69d6 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js @@ -216,7 +216,7 @@ class GraduationTasksedit extends Component{ if ( response.data.status === 0) { this.setState({ - Modalstype:true, + Modalstype:false, Modalstopval:response.data.message, ModalSave:this.cancelAttachment, Loadtype:true, diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index d1ce04697..24da98576 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -1010,10 +1010,10 @@ class GraduationTaskssettingapp extends Component{

- {coursename} - > - 毕设任务 - > + {coursename} + > + 毕设任务 + > {/*{taskname===""?"":*/} {/**/} @@ -1022,18 +1022,17 @@ class GraduationTaskssettingapp extends Component{ {/**/} {/*}*/} - 任务详情 + 任务详情

-
-

+

diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 5907674b5..6574bd627 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -1363,11 +1363,11 @@ class GraduationTaskssettinglist extends Component{

- {taskslistdata.course_name} + {taskslistdata.course_name} > - {taskslistdata.graduation_name} + {taskslistdata.graduation_name} > - 任务详情 + 任务详情

diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js index 99c0d21c1..cdaf90ea4 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js @@ -243,29 +243,21 @@ class GraduationTasksquestions extends Component{

- - {questionslist.course_name} + {questionslist.course_name} > - {questionslist.graduation_name} + {questionslist.graduation_name} > - {/**/} - {/*{questionslist.task_name}*/} - {/*>*/} - {/**/} - - 任务详情 - + 任务详情

-
-

+

+

{questionslist.task_name}

- 返回 + 返回
diff --git a/public/react/src/modules/courses/members/modal/AddStudentModal.js b/public/react/src/modules/courses/members/modal/AddStudentModal.js index c9fb36134..0b747171d 100644 --- a/public/react/src/modules/courses/members/modal/AddStudentModal.js +++ b/public/react/src/modules/courses/members/modal/AddStudentModal.js @@ -19,7 +19,8 @@ class AddStudentModal extends Component{ hasMore: true, loading: false, courseGroup: '', - page: 1 + page: 1, + isSpin:false } } fetchMemberList = (arg_page) => { @@ -92,6 +93,9 @@ class AddStudentModal extends Component{ } onSendOk = () => { + this.setState({ + isSpin:true + }) if(!this.state.checkBoxValues || this.state.checkBoxValues.length == 0) { this.props.showNotification('请从列表中先选择用户。') return; @@ -111,6 +115,9 @@ class AddStudentModal extends Component{ this.setVisible(false) this.props.showNotification('添加成功') this.props.addStudentSuccess && this.props.addStudentSuccess(params) + this.setState({ + isSpin:false + }) } }) .catch(function (error) { @@ -142,7 +149,7 @@ class AddStudentModal extends Component{ } render(){ const { users, checkBoxValues, loading, hasMore, name, school_name - , courseGroup, course_groups, } = this.state + , courseGroup, course_groups,isSpin } = this.state const { moduleName } = this.props return(
- 姓名: + 姓名: {this.setState({name: e.target.value})}} - style={{ width: '200px'}} + style={{ width: '242px'}} > 单位: {/* {this.setState({school_name: e.target.value})}} @@ -202,8 +209,8 @@ class AddStudentModal extends Component{
{/* */} {course_groups && course_groups.length &&
- 分班: - { course_groups.map((item) => { return })} @@ -217,6 +224,7 @@ class AddStudentModal extends Component{

+ { users && users.length ?
{/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */}
@@ -259,6 +267,7 @@ class AddStudentModal extends Component{
: } +
) } diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index ac9d22119..0ee44c210 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -45,6 +45,10 @@ function buildColumns(that) { render: (content, item, index) => { return {(that.state.page - 1) * 20 + index + 1} } + },{ + title: '用户ID', + dataIndex: 'login', + key: 'login' }, { title: '姓名', dataIndex: 'name', diff --git a/public/react/src/modules/courses/poll/PollDetailIndex.js b/public/react/src/modules/courses/poll/PollDetailIndex.js index d3eebf62f..33f779591 100644 --- a/public/react/src/modules/courses/poll/PollDetailIndex.js +++ b/public/react/src/modules/courses/poll/PollDetailIndex.js @@ -118,6 +118,7 @@ class PollDetailIndex extends Component{ className={"font-16"} checkBoxValues={[this.props.match.params.pollId]} action={this.getPollInfo} + single={true} > :"" @@ -133,6 +134,7 @@ class PollDetailIndex extends Component{ className={"font-16"} checkBoxValues={[this.props.match.params.pollId]} action={this.getPollInfo} + single={true} > :"" diff --git a/public/react/src/modules/courses/poll/PollDetailTabSecond.js b/public/react/src/modules/courses/poll/PollDetailTabSecond.js index ad630eb0e..2523fcb5d 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabSecond.js +++ b/public/react/src/modules/courses/poll/PollDetailTabSecond.js @@ -63,16 +63,17 @@ class PollDetailTabSecond extends Component{ return(
- - 第{parseInt(page-1)*parseInt(limit)+(key+1)}题: - ({map[item.question.question_type]}) + + {parseInt(page-1)*parseInt(limit)+(key+1)}、{map[item.question.question_type]} + { item.question.is_necessary==1 ? 必答:"" } + { item.question.question_type == 2 ? - { item.question.question_type == 2 ? + { item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" : "可选"+item.question.min_choices+"-"+item.question.max_choices+"项" - :"" } - + :"" + }

{item.question.question_title}

diff --git a/public/react/src/modules/courses/poll/PollDetailTabThird.js b/public/react/src/modules/courses/poll/PollDetailTabThird.js index f06497fc9..4cecf3744 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabThird.js +++ b/public/react/src/modules/courses/poll/PollDetailTabThird.js @@ -68,15 +68,17 @@ class PollDetailTabThird extends Component{ pollDetail && pollDetail.questions.map((item,key)=>{ return(
-

- {map[item.question.question_type]}*Q{item.question.question_number} +

+ {item.question.question_number}、{map[item.question.question_type]} + { item.question.is_necessary==1 ? 必答:"" } + { item.question.question_type == 2 ? - { item.question.question_type == 2 ? + { item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" : "可选"+item.question.min_choices+"-"+item.question.max_choices+"项" - :"" } - + :"" + }

  • {item.question.question_title}
  • { diff --git a/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyEnd.js b/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyEnd.js index e74fe8204..3b7cfa2a4 100644 --- a/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyEnd.js +++ b/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyEnd.js @@ -72,7 +72,7 @@ class ImmediatelyEnd extends Component{ visible:true, Topval:"学生将不能再提交试卷", // Botvalleft:"暂不截止", - Botval:`本操作只对"提交中"的分班有效`, + Botval:this.props.single ?`本操作只对"提交中"的分班有效`:"", // starttime:"发布时间:"+getNowFormatDate(1), // endtime:"截止时间:"+getNowFormatDate(2), Cancelname:"暂不截止", @@ -114,7 +114,7 @@ class ImmediatelyEnd extends Component{ visible:true, Topval:"学生将不能再提交问卷", // Botvalleft:"暂不截止", - Botval:`本操作只对"提交中"的分班有效`, + Botval:this.props.single ?`本操作只对"提交中"的分班有效`:"", // starttime:"发布时间:"+getNowFormatDate(1), // endtime:"截止时间:"+getNowFormatDate(2), Cancelname:"暂不截止", diff --git a/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js b/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js index 8c472b417..c7585a390 100644 --- a/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js +++ b/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js @@ -80,7 +80,7 @@ class Immediatelypublish extends Component{ visible:true, Topval:"学生将立即收到试卷", // Botvalleft:"暂不发布", - Botval:`本操作只对"未发布"的分班有效`, + Botval:this.props.single ? "":`本操作只对"未发布"的分班有效`, starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttimes:this.props.getNowFormatDates(1), endtime:"截止时间:"+this.props.getNowFormatDates(2), @@ -119,7 +119,7 @@ class Immediatelypublish extends Component{ visible:true, Topval:"学生将立即收到问卷", // Botvalleft:"暂不发布", - Botval:`本操作只对"未发布"的分班有效`, + Botval:this.props.single ? "":`本操作只对"未发布"的分班有效`, starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttimes:this.props.getNowFormatDates(1), endtime:"截止时间:"+this.props.getNowFormatDates(2), diff --git a/public/react/src/modules/tpm/shixuns/ShixunCard.js b/public/react/src/modules/tpm/shixuns/ShixunCard.js index ba59418d2..7237f9e35 100644 --- a/public/react/src/modules/tpm/shixuns/ShixunCard.js +++ b/public/react/src/modules/tpm/shixuns/ShixunCard.js @@ -9,7 +9,7 @@ import classNames from 'classnames'; // import { Rating,Loading} from '@icedesign/base'; -import {getImageUrl, toPath} from 'educoder'; +import {getImageUrl,setImagesUrl, toPath} from 'educoder'; // import { Pagination,Row,Col } from 'antd'; @@ -94,7 +94,7 @@ class ShixunCard extends Component { item.tag_name === null ? "":
    {item.tag_name} - +
    }
    @@ -105,7 +105,7 @@ class ShixunCard extends Component { {/**/} - +
    diff --git a/public/react/src/modules/user/usersInfo/InfosShixun.js b/public/react/src/modules/user/usersInfo/InfosShixun.js index 2a1210faf..2ccb8744c 100644 --- a/public/react/src/modules/user/usersInfo/InfosShixun.js +++ b/public/react/src/modules/user/usersInfo/InfosShixun.js @@ -6,7 +6,7 @@ import Loadable from 'react-loadable'; import Loading from '../../../Loading'; import NoneData from '../../courses/coursesPublic/NoneData' import axios from 'axios'; -import {getImageUrl} from 'educoder'; +import {getImageUrl,setImagesUrl} from 'educoder'; import { TPMIndexHOC } from '../../tpm/TPMIndexHOC'; import { CNotificationHOC } from '../../courses/common/CNotificationHOC' import "./usersInfo.css" @@ -168,10 +168,10 @@ class InfosShixun extends Component{ return(
    this.turnToCourses(`/shixuns/${item.identifier}/challenges`)}> { - item.tag &&
    {item.tag}
    + item.tag &&
    {item.tag}
    } - Shixun6 +