From f103d7adc9c3035232cb46340d4aadab275e5c82 Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Mon, 26 Aug 2019 14:13:52 +0800 Subject: [PATCH 1/9] issue --- .../courses/exercise/ExerciseReviewAndAnswer.js | 2 +- public/react/src/modules/courses/poll/Poll.js | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js index cdbc7218b..3b849b2cf 100644 --- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js +++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js @@ -704,7 +704,7 @@ class ExerciseReviewAndAnswer extends Component{ { // 填空(一直都有调分),和简答题调分:老师身份 已经评分的才能出现调分按钮 - isAdmin && ((parseInt(item.answer_status) == 1 && item.question_type == 4) || item.question_type == 3) ? + isAdmin && ((parseInt(item.answer_status) != 0 && item.question_type == 4) || item.question_type == 3) ? this.showSetScore(key,item.setScore,item.q_position+"_"+item.question_type)}>调分:"" } { diff --git a/public/react/src/modules/courses/poll/Poll.js b/public/react/src/modules/courses/poll/Poll.js index 07be2196c..d879738ea 100644 --- a/public/react/src/modules/courses/poll/Poll.js +++ b/public/react/src/modules/courses/poll/Poll.js @@ -329,10 +329,8 @@ class Poll extends Component{ }) let{type,StudentList_value,page}=this.state this.InitList(type,StudentList_value,page); - - this.setState({ - checkBoxValues:[] - }) + console.log(checkValue); + console.log(value); let coursesId=this.props.match.params.coursesId; let url=`/courses/${coursesId}/polls/publish_modal.json`; axios.get(url,{ @@ -350,10 +348,6 @@ class Poll extends Component{ }) } } - this.setState({ - course_groups:list, - checkBoxValues:value - }) this.setState({ modalname:"立即发布", modaltype:response.data.un_publish > 0 ? 1 : 2, @@ -368,6 +362,8 @@ class Poll extends Component{ Savesname:"立即发布", Cancel:this.homeworkhide, Saves:this.homeworkstartend, + course_groups:list, + checkBoxValues:value }) } }).catch((error) => { @@ -424,7 +420,7 @@ class Poll extends Component{ addname:undefined, addnametype:false, addnametab:undefined, - checkBoxValues:[] + // checkBoxValues:[] }) } From 4c1d18164565c44e25107daf292437a485ed8416 Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Mon, 26 Aug 2019 16:41:05 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/attachment/AttachmentList.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/public/react/src/common/components/attachment/AttachmentList.js b/public/react/src/common/components/attachment/AttachmentList.js index aee5eb68c..32c632aa1 100644 --- a/public/react/src/common/components/attachment/AttachmentList.js +++ b/public/react/src/common/components/attachment/AttachmentList.js @@ -15,17 +15,10 @@ class AttachmentsList extends Component{

- - { - item.is_pdf && item.is_pdf == true ? - 30 }> - {item.title} - - : - 30 }> - {item.title} - - } + + 30 }> + {item.title} + {item.filesize}

) From 90d79f0d1c1bbc7b8a071807cff862bea2393928 Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Tue, 27 Aug 2019 11:33:12 +0800 Subject: [PATCH 3/9] issue --- .../src/modules/courses/busyWork/CommonWorkItem.js | 1 + .../src/modules/courses/exercise/ExerciseListItem.js | 1 + .../courses/exercise/ExerciseReviewAndAnswer.js | 11 ++++++++++- .../src/modules/courses/exercise/new/JudgeEditor.js | 4 ++-- .../modules/courses/exercise/question/fillEmpty.js | 4 ++-- public/react/src/modules/courses/poll/PollListItem.js | 1 + .../courses/shixunHomework/ShixunhomeWorkItem.js | 2 +- 7 files changed, 18 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index e5c74f5b1..122ed12d2 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -177,6 +177,7 @@ class CommonWorkItem extends Component{ } */}

+ { item.author && {item.author} } {item.commit_count===undefined?"":{item.commit_count} 已交} {item.uncommit_count===undefined?"":{item.uncommit_count} 未交} { diff --git a/public/react/src/modules/courses/exercise/ExerciseListItem.js b/public/react/src/modules/courses/exercise/ExerciseListItem.js index 5248f4c1a..f61a7852b 100644 --- a/public/react/src/modules/courses/exercise/ExerciseListItem.js +++ b/public/react/src/modules/courses/exercise/ExerciseListItem.js @@ -134,6 +134,7 @@ class ExerciseListItem extends Component{ {/**/}

+ { item.author && {item.author} } {item.exercise_status===1?"":{item.exercise_answer} 已答} {item.exercise_status===1?"":{item.exercise_unanswer} 未答} {item.unreview_count===null||item.exercise_status===1?"":{item.unreview_count} 未评数 } diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js index 9f40d3064..1fc1905d1 100644 --- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js +++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js @@ -553,6 +553,9 @@ class ExerciseReviewAndAnswer extends Component{ height:16px; margin-top:2px; } + .standardAnswer.editormd-html-preview,.answerStyle.editormd-html-preview{ + width:100%!important + } `} {/*

*/} 未批
:"" } + { + // 客观题:老师||学生(试卷已截止且答案公开)显示正确答案 + item.question_type < 3 && item.standard_answer_show ? + + 正确答案:{ item.standard_answer_show } + :"" + } { //(老师身份且除实训题外) || (学生身份且试卷已经截止)就显示用户当前题目所得分数 ( isAdmin || (isStudent && exercise.exercise_status == 3)) && item.question_type != 5 && item.user_score ? - {item.user_score} : "" } diff --git a/public/react/src/modules/courses/exercise/new/JudgeEditor.js b/public/react/src/modules/courses/exercise/new/JudgeEditor.js index 41bc5bac4..6e6e89793 100644 --- a/public/react/src/modules/courses/exercise/new/JudgeEditor.js +++ b/public/react/src/modules/courses/exercise/new/JudgeEditor.js @@ -195,8 +195,8 @@ class SingleEditor extends Component{
{/* disabled={exerciseIsPublish} */} - - + 正确 + 错误 {/* not work */} {/* this.onOptionClick(0)} disabled={exerciseIsPublish}>对 diff --git a/public/react/src/modules/courses/exercise/question/fillEmpty.js b/public/react/src/modules/courses/exercise/question/fillEmpty.js index 5179432a2..24ff7b641 100644 --- a/public/react/src/modules/courses/exercise/question/fillEmpty.js +++ b/public/react/src/modules/courses/exercise/question/fillEmpty.js @@ -108,7 +108,7 @@ class fillEmpty extends Component{ array.map((item,key)=>{ return(
  • - 答案(填空{key+1}) + 答案(填空{key+1}):
    { user_exercise_status == 1 ? @@ -135,7 +135,7 @@ class fillEmpty extends Component{ { questionType.standard_answer && questionType.standard_answer.map((item,k)=>{ return(
      - 填空{k+1}: + 答案(填空{k+1}):
    • { item.answer_text && item.answer_text.map((i,index)=>{ diff --git a/public/react/src/modules/courses/poll/PollListItem.js b/public/react/src/modules/courses/poll/PollListItem.js index 6f081b952..eda994a9a 100644 --- a/public/react/src/modules/courses/poll/PollListItem.js +++ b/public/react/src/modules/courses/poll/PollListItem.js @@ -54,6 +54,7 @@ class PollListItem extends Component{ }

      + { item.author && {item.author} } { item.polls_status !=1 && diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index 942c06800..9a9f9bd29 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -333,7 +333,7 @@ class ShixunhomeWorkItem extends Component{

      {/* {discussMessage.author.name} */} - + { discussMessage.author && {discussMessage.author} } {discussMessage.commit_count===undefined?"":{discussMessage.commit_count} 已交} {discussMessage.uncommit_count===undefined?"":{discussMessage.uncommit_count} 未交} {/*{discussMessage.replies_count} 3 未评*/} From 17e1f44146ce7521f467d7eecba35cb435f34aa8 Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Tue, 27 Aug 2019 14:13:30 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E9=97=AE=E5=8D=B7-=E9=A2=98=E5=BA=93?= =?UTF-8?q?=E9=80=89=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/poll/Poll.js | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/public/react/src/modules/courses/poll/Poll.js b/public/react/src/modules/courses/poll/Poll.js index 16a488fce..aae09b41c 100644 --- a/public/react/src/modules/courses/poll/Poll.js +++ b/public/react/src/modules/courses/poll/Poll.js @@ -103,11 +103,11 @@ class Poll extends Component{ this.InitList(e.key,StudentList_value,page); } // 获取列表数据 - InitList=(type,search,page)=>{ + InitList=(type,search,page,bank_checkValue)=>{ this.setState({ isSpin:true }) - let {pageSize}=this.state + let { pageSize,checkBoxValues }=this.state let coursesId=this.props.match.params.coursesId; let url='/courses/'+coursesId+'/polls.json?limit='+pageSize+'&page='+page if(type!="0"){ @@ -123,7 +123,7 @@ class Poll extends Component{ course_types:result.data.course_types, polls_counts:result.data.polls_counts, isSpin:false, - checkBoxValues:[] + checkBoxValues: bank_checkValue ? bank_checkValue : [] }) } }).catch((error)=>{ @@ -209,12 +209,6 @@ class Poll extends Component{ //判断是否有选中数据 if(this.state.checkBoxValues.length==0){ this.props.showNotification("请先在列表中选择数据"); - // this.setState({ - // modalsType:true, - // modalsTopval:"请先在列表中选择数据", - // modalsBottomval:'', - // loadtype:true - // }) }else{ if(value != "bank"){ this.setState({ @@ -325,13 +319,13 @@ class Poll extends Component{ } // 题库选用成功后,立即发布,刷新页面 useBankSuccess=(checkValue,value)=>{ + debugger; this.setState({ isSpin:true }) let{type,StudentList_value,page}=this.state - this.InitList(type,StudentList_value,page); - console.log(checkValue); - console.log(value); + this.InitList(type,StudentList_value,page,value); + let coursesId=this.props.match.params.coursesId; let url=`/courses/${coursesId}/polls/publish_modal.json`; axios.get(url,{ From 447ee0b8dc91f04b10e4fc4019dae447c26ad465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 27 Aug 2019 14:27:25 +0800 Subject: [PATCH 5/9] b --- public/react/src/modules/courses/new/Goldsubject.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/new/Goldsubject.js b/public/react/src/modules/courses/new/Goldsubject.js index 5149d3e5a..c9b8b324b 100644 --- a/public/react/src/modules/courses/new/Goldsubject.js +++ b/public/react/src/modules/courses/new/Goldsubject.js @@ -626,6 +626,7 @@ class Goldsubject extends Component { } console.log(addonAfteronelenone); console.log(addonAfteronelentwo); + console.log(options); return ( @@ -764,8 +765,8 @@ class Goldsubject extends Component { onChange={this.handleChange} className={"fl construction "} placeholder="例如:数据结构" + dataSource={options} > - {options} )} {/**/} From 16307a59382ac1e1a1ed5b7ca5a45acf38a824b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 27 Aug 2019 16:41:44 +0800 Subject: [PATCH 6/9] Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_Ysl # Conflicts: # public/react/src/modules/courses/new/CoursesNew.js # public/react/src/modules/courses/new/Goldsubject.js --- .../react/src/modules/courses/css/Courses.css | 2 +- .../src/modules/courses/new/CoursesNew.js | 121 +++++++++++--- .../src/modules/courses/new/Goldsubject.js | 153 ++++++++++-------- 3 files changed, 187 insertions(+), 89 deletions(-) diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css index dbdd42398..78b6783a0 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -1061,7 +1061,7 @@ samp { .newcoursestitle{ font-size: 12px; color: #989898; - margin-left: 10px; + margin-left: 40px; } .coursenavbox .ant-form-item-label{ diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index cbcb33fc2..71092ebdb 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -47,6 +47,7 @@ class CoursesNew extends Component { checkboxgroup:undefined, addonAfteronelenone:0, addonAfteronelentwo:0, + classroomyslstiring:"", checkbofrup:[{module_type:"shixun_homework",module_name:"实训作业"},{module_type:"common_homework",module_name:"普通作业"},{module_type:"group_homework",module_name:"分组作业"} ,{module_type:"exercise",module_name:"试卷"},{module_type:"poll",module_name:"问卷"},{module_type:"graduation",module_name:"毕业设计"} ,{module_type:"board",module_name:"讨论"},{module_type:"attachment",module_name:"资源"},{module_type:"course_group",module_name:"分班"}], @@ -364,14 +365,16 @@ class CoursesNew extends Component { search:value }).then((result)=>{ // console.log(result.data) - if (result.data.message===undefined) { + if(result){ + if (result.data.message===undefined) { - this.setState({ - searchlist: result.data.course_lists, - // course:value, + this.setState({ + searchlist: result.data.course_lists, + // course:value, - }) - } + }) + } + } // this.props.form.setFieldsValue({ // course:value // }) @@ -393,11 +396,16 @@ class CoursesNew extends Component { }; handleChange=(value)=>{ + if(value){ + this.props.form.setFieldsValue({ + course:value+"", + classroom:value+"", + }); + this.setState({ + classroomyslstiring:value + }) + } - this.props.form.setFieldsValue({ - // course:value, - classroom:value - }) }; handleSearchschool=(value)=>{ @@ -489,6 +497,16 @@ class CoursesNew extends Component { if(addonAftertwo){ addonAfteronelens=String(addonAftertwo).length; } + var addonAfterthree=this.props.form&&this.props.form.getFieldValue('course'); + var addonAfteronelens3=0; + if(addonAfterthree){ + addonAfteronelens3=String(addonAfterthree).length; + } + var addonAfterfour=this.props.form&&this.props.form.getFieldValue('classroom'); + var addonAfteronelens4=0; + if(addonAfterfour){ + addonAfteronelens4=String(addonAfterfour).length; + } return ( @@ -550,20 +568,16 @@ class CoursesNew extends Component { .ant-select-dropdown{ // top: 221px !important; // left: 115px !important; - width: 280px !important; height: 160px; } .ant-select-dropdown-menu{ - width: 280px !important; height: 160px; } .construction .ant-input{ - width: 280px !important; margin-left: 0px !important; } .construction { - width: 280px; - margin-left: 10px; + margin-left: 11px; } .construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder { @@ -575,21 +589,51 @@ class CoursesNew extends Component {

      + {getFieldDecorator('course', { - rules: [{required: true, message: "不能为空"}], + rules: [{required: true, message: "不能为空"}, + { + max:60, + message: '不能超过60个字符', + }], })( - - {options} - + + + )} - + {/*(错误示例:数据结构2017本部;数据结构2017秋季;数据结构2017电子商务1班)*/}

      @@ -616,11 +660,38 @@ class CoursesNew extends Component { }

      + + {getFieldDecorator('classroom', { - rules: [{required: true, message: "不能为空"}], - })()} + rules: [{required: true, message: "不能为空"}, + { + max:60, + message: '不能超过60个字符', + }], + })()} {/*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*/}

      @@ -698,7 +769,7 @@ class CoursesNew extends Component { } ]} )( - + )} { - this.props.form.setFieldsValue({ - // course:value, - classroom:value - }) + if(value){ + setTimeout(()=>{ + this.props.form.setFieldsValue({ + course:value+"", + classroom:value+"", + }); + },100) + + } }; handleSearchschool=(value)=>{ @@ -624,6 +629,12 @@ class Goldsubject extends Component { if(addonAftertwo){ addonAfteronelens=String(addonAftertwo).length; } + + var addonAfterfour=this.props.form&&this.props.form.getFieldValue('classroom'); + var addonAfteronelens4=0; + if(addonAfterfour){ + addonAfteronelens4=String(addonAfterfour).length; + } console.log(addonAfteronelenone); console.log(addonAfteronelentwo); console.log(options); @@ -688,20 +699,16 @@ class Goldsubject extends Component { .ant-select-dropdown{ // top: 221px !important; // left: 115px !important; - width: 280px !important; height: 160px; } .ant-select-dropdown-menu{ - width: 280px !important; height: 160px; } .construction .ant-input{ - width: 280px !important; margin-left: 0px !important; } .construction { - width: 280px; - margin-left: 10px; + margin-left: 11px; } .construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder { @@ -711,38 +718,7 @@ class Goldsubject extends Component { `} - {/*

      */} - {/*
      */} - {/* */} - {/* {getFieldDecorator('course', {*/} - {/* rules: [{required: true, message: "不能为空"}],*/} - {/* })(*/} - - {/* */} - {/* {options}*/} - {/* */} - {/* )}*/} - {/* */} - {/* /!*(错误示例:数据结构2017本部;数据结构2017秋季;数据结构2017电子商务1班)*!/*/} - {/*

      */} - {/* */} - {/* 正确示例:数据结构*/} - {/*

      */} - {/*

      */} - {/* */} - {/* 错误示例:数据结构2019春*/} - {/*

      */} - {/*
      */} - {/*
      */} - {/*
      */} - {/*
      */} - {/*
      */} +
      - - {getFieldDecorator('classroom', { - rules: [{required: true, message: "不能为空"}], - })( - - - - )} - {/**/} - {/* /!*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*!/*/} + {/* */} + + {/* {getFieldDecorator('classroom', {*/} + {/* rules: [{required: true, message: "不能为空"},*/} + {/* {*/} + {/* max:60,*/} + {/* message: '不能超过60个字符',*/} + {/* }],*/} + {/* })(*/} + {/* */} + {/* */} + {/* */} + {/* )}*/} + + {/**/} + + + {getFieldDecorator('classroom', { + rules: [{required: true, message: "不能为空"}, + { + max:60, + message: '不能超过60个字符', + }], + })( + + + + + + )} + {/**/} + {/* /!*(错误示例:数据结构2017本部;数据结构2017秋季;数据结构2017电子商务1班)*!/*/} {/*

      */} - {/* */} - {/* 正确示例:数据结构2019春季班级*/} + {/* */} + {/* 正确示例:数据结构*/} {/*

      */} {/*

      */} - {/* */} - {/* 错误示例:2019春季班级数据结构*/} + {/* */} + {/* 错误示例:数据结构2019春*/} {/*

      */} {/*
      */} -
      +
      - -
      From 72e0b60796b2cf4c1cf7a687b270a0b2f063a98d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 27 Aug 2019 22:20:16 +0800 Subject: [PATCH 7/9] Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_Ysl # Conflicts: # public/react/src/modules/courses/new/CoursesNew.js # public/react/src/modules/courses/new/Goldsubject.js --- public/react/src/modules/courses/Index.js | 14 +- .../src/modules/courses/new/Goldsubject.js | 91 +++-------- .../questionbank/Generaljobbankdetails.js | 143 ++++++++++++++++++ 3 files changed, 176 insertions(+), 72 deletions(-) create mode 100644 public/react/src/modules/courses/questionbank/Generaljobbankdetails.js diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index 01117b4f8..3c6c0b717 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -7,7 +7,6 @@ import axios from 'axios'; import { TPMIndexHOC } from '../tpm/TPMIndexHOC'; import { CNotificationHOC } from './common/CNotificationHOC' import {ImageLayerOfCommentHOC} from '../page/layers/ImageLayerOfCommentHOC' - import "./css/Courses.css" //引入对应跳转的组件 @@ -265,7 +264,10 @@ const GraduationTasksSubmiteditApp=Loadable({ loading: Loading, }) - +const Generaljobbankdetails =Loadable({ + loader: () => import('../../modules/courses/questionbank/Generaljobbankdetails'), + loading: Loading, +}) class CoursesIndex extends Component{ constructor(props) { @@ -445,7 +447,13 @@ class CoursesIndex extends Component{ // console.log(commons) return ( - + {/*Generaljobbankdetails*/} + {/* 普通作业题库详情*/} + () + } + > {/* 资源列表页 */} @@ -729,88 +727,43 @@ class Goldsubject extends Component { ` } - -
      - - {/* */} - - {/* {getFieldDecorator('classroom', {*/} - {/* rules: [{required: true, message: "不能为空"},*/} - {/* {*/} - {/* max:60,*/} - {/* message: '不能超过60个字符',*/} - {/* }],*/} - {/* })(*/} - {/* */} - {/* */} - {/* */} - {/* )}*/} - - {/**/} - - + } + {getFieldDecorator('classroom', { rules: [{required: true, message: "不能为空"}, { max:60, message: '不能超过60个字符', }], - })( - - - - - - )} - {/**/} - {/* /!*(错误示例:数据结构2017本部;数据结构2017秋季;数据结构2017电子商务1班)*!/*/} - {/*

      */} - {/* */} - {/* 正确示例:数据结构*/} - {/*

      */} - {/*

      */} - {/* */} - {/* 错误示例:数据结构2019春*/} - {/*

      */} - {/*
      */} -
      + })()} +
      +
      diff --git a/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js b/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js new file mode 100644 index 000000000..9eda477f8 --- /dev/null +++ b/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js @@ -0,0 +1,143 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn} from 'educoder'; +import axios from 'axios'; +import { + notification +} from "antd"; +import CoursesListType from '../coursesPublic/CoursesListType'; + +import '../css/members.css'; +import "../common/formCommon.css"; +import '../css/Courses.css'; +import '../css/busyWork.css'; +import '../poll/pollStyle.css'; + +class Generaljobbankdetails extends Component { + constructor(props) { + super(props); + // this.answerMdRef = React.createRef(); + this.state = { + tab: ["0"], + } + + } + + //切换tab + ChangeTab = (e) => { + // console.log(e); + this.setState({ + tab: e + }) + try { + var currenturl = window.location.href; + var newUrl = (currenturl.split("?"))[0]; + window.history.pushState('','',newUrl+'?tab='+e); + }catch (e) { + console.log(e); + console.log("44"); + } + + } + + + componentDidMount() { + // console.log("父组件加载框"); + const query = this.props.location.search; + const type = query.split('?tab='); + // let sum = [] + // sum.push(type[1]) + // console.log("componentDidMountcomponentDidMount"); + // console.log(type); + this.setState({ + tab: type[1], + }) + let querys = this.props.location.pathname; + const types = querys.split('/'); + // console.log(types); + this.setState({ + shixuntypes: types[3] + }) + } + + + confirmysl(child,i) { + if(i===1){ + child.daochushixunbaogao(); + } + if(i===2){ + child.daochuzuoye(); + } + } + + homeworkendss(child){ + // child.homeworkends(); + } + + homeworkstarts(child){ + // child.homeworkstart(); + + } + workshowmodels(child){ + // child.workshowmodel(); + } + /// 确认是否下载 + + + bindRef = ref => { this.child = ref } +///////////////教师截止 + + render() { + let {tab, teacherdatapage, jobsettingsdatapage} = this.state; + + const isAdmin = this.props.isAdmin(); + // console.log(119) + console.log(jobsettingsdatapage); + + + return ( +
      + + +
      + +
      +

      + 题库 + > + 详情 + > + 作业详情 +

      +
      +
      +

      + MySQL数据库编程开发实训(基础篇) +

      + +
      + + + +
      +
      + ) + } +} + +export default Generaljobbankdetails; + From 7d615a20b3da1f299037775825696a8f7c1e8fa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 27 Aug 2019 22:57:55 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/new/Goldsubject.js | 46 ++++++++++++++----- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/public/react/src/modules/courses/new/Goldsubject.js b/public/react/src/modules/courses/new/Goldsubject.js index 998050409..9695f60ff 100644 --- a/public/react/src/modules/courses/new/Goldsubject.js +++ b/public/react/src/modules/courses/new/Goldsubject.js @@ -54,6 +54,7 @@ class Goldsubject extends Component { addonAfteronelenone:"", addonAfteronelentwo:"", Whethertocreateanewclassroom:true, + bordebool:false, checkbofrup:[ {module_type:"announcement",module_name:"公告栏"},{module_type:"online_learning",module_name:"在线学习"} ,{module_type:"shixun_homework",module_name:"实训作业"},{module_type:"common_homework",module_name:"普通作业"} @@ -528,17 +529,26 @@ class Goldsubject extends Component { }; handleChange=(value)=>{ - if(value){ - setTimeout(()=>{ - this.props.form.setFieldsValue({ - course:value+"", - classroom:value+"", - }); - },100) + if(value.length>60){ + this.setState({ + bordebool:true, + }) + }else if(value.length===0){ + this.setState({ + bordebool:true, + }) + }else{ + this.setState({ + bordebool:false, + }) + } + }else{ + this.setState({ + bordebool:true + }) - } - }; + } }; handleSearchschool=(value)=>{ @@ -607,7 +617,7 @@ class Goldsubject extends Component { this.applyForAddOrgForm.setVisible(true) } render() { - let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom,addonAfteronelenone,addonAfteronelentwo} = this.state; + let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom,bordebool,addonAfteronelenone,addonAfteronelentwo} = this.state; const {getFieldDecorator} = this.props.form; const propsWithoutForm = Object.assign({}, this.props) delete propsWithoutForm.form @@ -753,6 +763,20 @@ class Goldsubject extends Component { } ` } + {getFieldDecorator('classroom', { rules: [{required: true, message: "不能为空"}, @@ -760,7 +784,7 @@ class Goldsubject extends Component { max:60, message: '不能超过60个字符', }], - })()} + })()}
      From 5a0d629642257dfae25984677e276f94c4a8538a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 28 Aug 2019 09:54:19 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/new/CoursesNew.js | 107 +++---------- .../src/modules/courses/new/Goldsubject.js | 146 +++++++++--------- 2 files changed, 91 insertions(+), 162 deletions(-) diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index 71092ebdb..6073eee97 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -47,7 +47,6 @@ class CoursesNew extends Component { checkboxgroup:undefined, addonAfteronelenone:0, addonAfteronelentwo:0, - classroomyslstiring:"", checkbofrup:[{module_type:"shixun_homework",module_name:"实训作业"},{module_type:"common_homework",module_name:"普通作业"},{module_type:"group_homework",module_name:"分组作业"} ,{module_type:"exercise",module_name:"试卷"},{module_type:"poll",module_name:"问卷"},{module_type:"graduation",module_name:"毕业设计"} ,{module_type:"board",module_name:"讨论"},{module_type:"attachment",module_name:"资源"},{module_type:"course_group",module_name:"分班"}], @@ -396,16 +395,11 @@ class CoursesNew extends Component { }; handleChange=(value)=>{ - if(value){ - this.props.form.setFieldsValue({ - course:value+"", - classroom:value+"", - }); - this.setState({ - classroomyslstiring:value - }) - } + this.props.form.setFieldsValue({ + // course:value, + classroom:value + }) }; handleSearchschool=(value)=>{ @@ -497,16 +491,7 @@ class CoursesNew extends Component { if(addonAftertwo){ addonAfteronelens=String(addonAftertwo).length; } - var addonAfterthree=this.props.form&&this.props.form.getFieldValue('course'); - var addonAfteronelens3=0; - if(addonAfterthree){ - addonAfteronelens3=String(addonAfterthree).length; - } - var addonAfterfour=this.props.form&&this.props.form.getFieldValue('classroom'); - var addonAfteronelens4=0; - if(addonAfterfour){ - addonAfteronelens4=String(addonAfterfour).length; - } + console.log(options); return ( @@ -568,16 +553,20 @@ class CoursesNew extends Component { .ant-select-dropdown{ // top: 221px !important; // left: 115px !important; + width: 280px !important; height: 160px; } .ant-select-dropdown-menu{ + width: 280px !important; height: 160px; } .construction .ant-input{ + width: 280px !important; margin-left: 0px !important; } .construction { - margin-left: 11px; + width: 280px; + margin-left: 10px; } .construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder { @@ -589,51 +578,22 @@ class CoursesNew extends Component {
      - {getFieldDecorator('course', { - rules: [{required: true, message: "不能为空"}, - { - max:60, - message: '不能超过60个字符', - }], + rules: [{required: true, message: "不能为空"}], })( - - - - + + )} - + {/*(错误示例:数据结构2017本部;数据结构2017秋季;数据结构2017电子商务1班)*/}

      @@ -660,38 +620,11 @@ class CoursesNew extends Component { }

      - - + {getFieldDecorator('classroom', { - rules: [{required: true, message: "不能为空"}, - { - max:60, - message: '不能超过60个字符', - }], - })()} + rules: [{required: true, message: "不能为空"}], + })()} {/*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*/}

      diff --git a/public/react/src/modules/courses/new/Goldsubject.js b/public/react/src/modules/courses/new/Goldsubject.js index 9695f60ff..696a81969 100644 --- a/public/react/src/modules/courses/new/Goldsubject.js +++ b/public/react/src/modules/courses/new/Goldsubject.js @@ -54,7 +54,6 @@ class Goldsubject extends Component { addonAfteronelenone:"", addonAfteronelentwo:"", Whethertocreateanewclassroom:true, - bordebool:false, checkbofrup:[ {module_type:"announcement",module_name:"公告栏"},{module_type:"online_learning",module_name:"在线学习"} ,{module_type:"shixun_homework",module_name:"实训作业"},{module_type:"common_homework",module_name:"普通作业"} @@ -529,26 +528,12 @@ class Goldsubject extends Component { }; handleChange=(value)=>{ - if(value){ - if(value.length>60){ - this.setState({ - bordebool:true, - }) - }else if(value.length===0){ - this.setState({ - bordebool:true, - }) - }else{ - this.setState({ - bordebool:false, - }) - } - }else{ - this.setState({ - bordebool:true - }) - } }; + this.props.form.setFieldsValue({ + // course:value, + classroom:value + }) + }; handleSearchschool=(value)=>{ @@ -617,7 +602,7 @@ class Goldsubject extends Component { this.applyForAddOrgForm.setVisible(true) } render() { - let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom,bordebool,addonAfteronelenone,addonAfteronelentwo} = this.state; + let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom,addonAfteronelenone,addonAfteronelentwo} = this.state; const {getFieldDecorator} = this.props.form; const propsWithoutForm = Object.assign({}, this.props) delete propsWithoutForm.form @@ -639,13 +624,9 @@ class Goldsubject extends Component { if(addonAftertwo){ addonAfteronelens=String(addonAftertwo).length; } - - var addonAfterfour=this.props.form&&this.props.form.getFieldValue('classroom'); - var addonAfteronelens4=0; - if(addonAfterfour){ - addonAfteronelens4=String(addonAfterfour).length; - } - + console.log(addonAfteronelenone); + console.log(addonAfteronelentwo); + console.log(options); return ( @@ -707,16 +688,20 @@ class Goldsubject extends Component { .ant-select-dropdown{ // top: 221px !important; // left: 115px !important; + width: 280px !important; height: 160px; } .ant-select-dropdown-menu{ + width: 280px !important; height: 160px; } .construction .ant-input{ + width: 280px !important; margin-left: 0px !important; } .construction { - margin-left: 11px; + width: 280px; + margin-left: 10px; } .construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder { @@ -726,7 +711,38 @@ class Goldsubject extends Component { `} + {/*

      */} + {/*
      */} + {/* */} + {/* {getFieldDecorator('course', {*/} + {/* rules: [{required: true, message: "不能为空"}],*/} + {/* })(*/} + + {/* */} + {/* {options}*/} + {/* */} + {/* )}*/} + {/* */} + {/* /!*(错误示例:数据结构2017本部;数据结构2017秋季;数据结构2017电子商务1班)*!/*/} + {/*

      */} + {/* */} + {/* 正确示例:数据结构*/} + {/*

      */} + {/*

      */} + {/* */} + {/* 错误示例:数据结构2019春*/} + {/*

      */} + {/*
      */} + {/*
      */} + {/*
      */} + {/*
      */} + {/*
      */} -
      - - - - {getFieldDecorator('classroom', { - rules: [{required: true, message: "不能为空"}, - { - max:60, - message: '不能超过60个字符', - }], - })()} + + {getFieldDecorator('classroom', { + rules: [{required: true, message: "不能为空"}], + })( + + + {options} + + )} + {/**/} + {/* /!*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*!/*/} + {/*

      */} + {/* */} + {/* 正确示例:数据结构2019春季班级*/} + {/*

      */} + {/*

      */} + {/* */} + {/* 错误示例:2019春季班级数据结构*/} + {/*

      */} + {/*
      */}
      +