diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index fb68f23bf..50e349bab 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -1085,11 +1085,15 @@ class CoursesController < ApplicationController # 导出课堂信息 def export_couser_info - set_export_cookies - course_info_to_xlsx @course - filename_ = "#{current_user.real_name}_#{@course.name}_课堂信息_#{Time.now.strftime('%Y%m%d_%H%M%S')}" - render xlsx: "#{format_sheet_name filename_.strip}",template: "courses/export_course_info.xlsx.axlsx", - locals: {course_info: @course_info} + if params[:export].present? && params[:export] + normal_status(0,"正在下载中") + else + set_export_cookies + course_info_to_xlsx @course + filename_ = "#{current_user.real_name}_#{@course.name}_课堂信息_#{Time.now.strftime('%Y%m%d_%H%M%S')}" + render xlsx: "#{format_sheet_name filename_.strip}",template: "courses/export_course_info.xlsx.axlsx", + locals: {course_info: @course_info} + end end # 导出活跃度 diff --git a/app/controllers/exercise_questions_controller.rb b/app/controllers/exercise_questions_controller.rb index 8c3a04f61..57116a9e5 100644 --- a/app/controllers/exercise_questions_controller.rb +++ b/app/controllers/exercise_questions_controller.rb @@ -280,11 +280,12 @@ class ExerciseQuestionsController < ApplicationController if null_choice_text_count >= ex_answer_pre_count new_add_choice = null_choice_text_count_array - ex_answer_pre_count_array ex_answer_pre_count_array.each do |n| - standard_option = { - :exercise_question_id => @exercise_question.id, - :exercise_choice_id => null_choice_id, - :answer_text => null_choice_text[n-1] + @hash_symbol_null_ = { + :exercise_question_id => @exercise_question.id, + :exercise_choice_id => null_choice_id, + :answer_text => null_choice_text[n - 1] } + standard_option = @hash_symbol_null_ ex_answer_pre[n-1].update(standard_option) end if new_add_choice.count > 0 #表示有新增的 diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index 1565f5abb..0e2cd7a86 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -493,7 +493,8 @@ class Fileslists extends Component{ let selectpagetype=selectpage===page?true:false this.setState({ page:page, - checkAllValue:selectpagetype + checkAllValue:selectpagetype, + checkBoxValues:[] }) let{pagesize,tagname,searchValue,sort,sorttype,coursesecondcategoryid}=this.state; @@ -801,7 +802,7 @@ class Fileslists extends Component{ {this.props.isAdmin()? files===undefined?'' :files.length===0? "":
- {this.props.isAdmin()? 已选 {checkBoxValues.length} 个:""} + {this.props.isAdmin()? 已选 {checkBoxValues.length} 个 (不支持跨页勾选):""}
{this.props.isAdmin()?
  • 删除
  • :""} {this.props.isAdmin()?
  • 发送
  • :""} @@ -837,7 +838,7 @@ class Fileslists extends Component{ {course_modules&&course_modules.course_modules.map((item,key)=>{ return( - filesId&&filesId===item.id?"":
  • this.moveTos(0)}>{item.module_name}
  • + filesId&&filesId===item.id?"":
  • this.moveTos(0)} title={item.module_name}>{item.module_name}
  • ) })} @@ -847,7 +848,7 @@ class Fileslists extends Component{ return (!this.state.dirSearchValue || item.name.indexOf(this.state.dirSearchValue) != -1) }).map((itm,k)=>{ return( - filesId&&filesId===itm.id?"":
  • this.moveTos(itm.id )}>{itm.name}
  • + filesId&&filesId===itm.id?"":
  • this.moveTos(itm.id )} title={itm.name}>{itm.name}
  • ) }) })} diff --git a/public/react/src/modules/courses/boards/index.js b/public/react/src/modules/courses/boards/index.js index 60d327799..572c8dd63 100644 --- a/public/react/src/modules/courses/boards/index.js +++ b/public/react/src/modules/courses/boards/index.js @@ -283,6 +283,9 @@ class Boards extends Component{ console.log('checked = ', checkedValues); } onPageChange = (pageNumber) => { + this.setState({ + checkBoxValues:[] + }) this.fetchAll(null, pageNumber) } @@ -365,7 +368,7 @@ class Boards extends Component{ {messages&&messages.length == 0?"": isAdmin &&
    - {isAdmin&&已选 {checkBoxValues.length} 个} + {isAdmin&&已选 {checkBoxValues.length} 个 (不支持跨页勾选)}
    { !!isAdmin && @@ -384,7 +387,7 @@ class Boards extends Component{ boards && boards.filter((item)=> { return item.id != bid && (!this.state.dirSearchValue || item.name.indexOf(this.state.dirSearchValue) != -1) }).map( (item) => { - return
  • this.moveTo(item)}>{item.name}
  • + return
  • this.moveTo(item)} title={item.name}>{item.name}
  • }) } { isAdmin && diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js index d5ac0be68..9f98b9294 100644 --- a/public/react/src/modules/courses/busyWork/commonWork.js +++ b/public/react/src/modules/courses/busyWork/commonWork.js @@ -153,7 +153,8 @@ class commonWork extends Component{ onPageChange=(pageNumber)=>{ this.setState({ - page:pageNumber + page:pageNumber, + checkBoxValues:[] }) let {search,order}=this.state; this.getList(pageNumber,search,order); @@ -430,7 +431,7 @@ class commonWork extends Component{ mainList && mainList.course_identity < 5 && mainList.homeworks.length>0 &&
    - 已选 {checkBoxValues.length} 个 + 已选 {checkBoxValues.length} 个 (不支持跨页勾选)
  • { - + this.setState({ + antIcon:true + }) axios.delete(url).then((result)=>{ if(result.data.status===0){ @@ -809,6 +812,7 @@ class Coursesleftnav extends Component{ modalSave={ModalSave} modalCancel={this.cannerNavmoda} loadtype={loadtype} + antIcon={this.state.antIcon} > diff --git a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js index 4075eff03..9b374a443 100644 --- a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js +++ b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js @@ -150,8 +150,7 @@ class Startshixuntask extends Component{ keyboard={false} >
    -

    本实训的开启时间:{shixunsmessage}
    开启时间之前不能挑战 -

    +

    目前该实训项目尚在内测中,将于{shixunsmessage}之后开放,谢谢!

    {/*取消*/} diff --git a/public/react/src/modules/courses/coursesPublic/sendResource.js b/public/react/src/modules/courses/coursesPublic/sendResource.js index 64e8093d1..715e4acf9 100644 --- a/public/react/src/modules/courses/coursesPublic/sendResource.js +++ b/public/react/src/modules/courses/coursesPublic/sendResource.js @@ -132,7 +132,7 @@ class Sendresource extends Component{ onAttachmentRemove = (file) => { - +debugger const url = `/attachments/${file.response ? file.response.id : file.uid}.json` axios.delete(url, { }) diff --git a/public/react/src/modules/courses/elearning/Elearning.js b/public/react/src/modules/courses/elearning/Elearning.js index e4ae3fe94..21d430a2f 100644 --- a/public/react/src/modules/courses/elearning/Elearning.js +++ b/public/react/src/modules/courses/elearning/Elearning.js @@ -293,7 +293,7 @@ class Elearning extends Component{ footer={null} >
    -

    本实训的开启时间:{this.state.shixunsmessages}
    开启时间之前不能挑战

    +

    目前该实训项目尚在内测中,将于{this.state.shixunsmessages}之后开放,谢谢!

    {/*取消*/} diff --git a/public/react/src/modules/courses/elearning/YslDetailCards.js b/public/react/src/modules/courses/elearning/YslDetailCards.js index a1ad44e67..eef44346e 100644 --- a/public/react/src/modules/courses/elearning/YslDetailCards.js +++ b/public/react/src/modules/courses/elearning/YslDetailCards.js @@ -141,7 +141,7 @@ class YslDetailCards extends Component{ footer={null} >
    -

    本实训的开启时间:{this.state.shixunsmessage}
    开启时间之前不能挑战

    +

    目前该实训项目尚在内测中,将于{this.state.shixunsmessage}之后开放,谢谢!

    {/*取消*/} diff --git a/public/react/src/modules/courses/exercise/Exercise.js b/public/react/src/modules/courses/exercise/Exercise.js index 83227fb5a..2bc646fb3 100644 --- a/public/react/src/modules/courses/exercise/Exercise.js +++ b/public/react/src/modules/courses/exercise/Exercise.js @@ -130,7 +130,8 @@ class Exercise extends Component{ //切换分页 changePage=(pageNumber)=>{ this.setState({ - page:pageNumber + page:pageNumber, + checkBoxValues:[] }) let{type,StudentList_value,limit}=this.state this.InitList(type,StudentList_value,pageNumber,limit); @@ -522,7 +523,7 @@ class Exercise extends Component{ {this.props.isAdmin()?exercises && exercises.length ===0?"":
    - 已选 {checkBoxValues.length} 个 + 已选 {checkBoxValues.length} 个 (不支持跨页勾选)
  • this.ActionPoll("delete")}>删除
  • diff --git a/public/react/src/modules/courses/exercise/Exercisesetting.js b/public/react/src/modules/courses/exercise/Exercisesetting.js index a93aa9942..96cc17ca8 100644 --- a/public/react/src/modules/courses/exercise/Exercisesetting.js +++ b/public/react/src/modules/courses/exercise/Exercisesetting.js @@ -4,14 +4,14 @@ import {Form,Checkbox,DatePicker,Button,Input,Select,Tooltip} from "antd"; import { handleDateString } from 'educoder'; import PollDetailTabForthRules from '../poll/PollDetailTabForthRules'; -import '../css/members.css' -import '../css/busyWork.css' -import '../poll/pollStyle.css' +import '../css/members.css'; +import '../css/busyWork.css'; +import '../poll/pollStyle.css'; -import moment from 'moment' +import moment from 'moment'; import locale from 'antd/lib/date-picker/locale/zh_CN'; -import axios from 'axios' -import Modals from '../../modals/Modals' +import axios from 'axios'; +import Modals from '../../modals/Modals'; const Search=Input.Search; const Option=Select.Option; @@ -549,6 +549,7 @@ class Exercisesetting extends Component{ } //取消编辑 cancelEdit=()=>{ + this.getSettingInfo(); this.setState({ flagPageEdit:false }) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index 7e5707695..e0b327016 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -778,6 +778,7 @@ class GraduationTaskssettingapp extends Component{ } isgoback=()=>{ + this.getsettings(); this.setState({ flagPageEdit: false, }) diff --git a/public/react/src/modules/courses/graduation/tasks/index.js b/public/react/src/modules/courses/graduation/tasks/index.js index 18e6f3deb..804533b0c 100644 --- a/public/react/src/modules/courses/graduation/tasks/index.js +++ b/public/react/src/modules/courses/graduation/tasks/index.js @@ -360,7 +360,8 @@ class GraduationTasks extends Component{ let selectpagetype=selectpage===page?true:false this.setState({ page:page, - checkAllValue:selectpagetype + checkAllValue:selectpagetype, + checkBoxValues:[] }) this.fetchAll(search,page,order); @@ -700,7 +701,7 @@ class GraduationTasks extends Component{ {this.props.isAdmin()?all_count===undefined?'' :all_count===0?"":
    - 已选 {checkBoxValues.length} 个 + 已选 {checkBoxValues.length} 个 (不支持跨页勾选)
  • 删除
  • diff --git a/public/react/src/modules/courses/graduation/topics/index.js b/public/react/src/modules/courses/graduation/topics/index.js index 61a9bea67..b5be57564 100644 --- a/public/react/src/modules/courses/graduation/topics/index.js +++ b/public/react/src/modules/courses/graduation/topics/index.js @@ -153,7 +153,8 @@ class Boards extends Component{ // 分页 onChangePage=(pageNum)=>{ this.setState({ - page:pageNum + page:pageNum, + checkBoxValues:[] }) let {status,searchValue}=this.state; this.fetchAll(searchValue,pageNum,status); @@ -430,7 +431,7 @@ onBoardsNew=()=>{ // 超级管理员、教师、助教 isAdmin ?
    - 已选 {checkBoxValues.length} 个 + 已选 {checkBoxValues.length} 个 (不支持跨页勾选)
  • this.onDelete(1)}>删除
  • { diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index 2782010b6..8071e2680 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -128,7 +128,8 @@ class studentsList extends Component{ } /// 确认是否下载 confirmysl(url){ - axios.get(url).then((response) => { + // this.props.showGlobalLoading('正在生成文件,请稍后...') + axios.get(url + 'export=true').then((response) => { if(response === undefined){ return } @@ -659,7 +660,7 @@ class studentsList extends Component{ return item.id != course_group_id && (!this.state.groupSearchValue || item.name.indexOf(this.state.groupSearchValue) != -1) }).map( item => { return ( -
  • this.moveToGroup(item)}>{item.name}
  • +
  • this.moveToGroup(item)} title={item.name}>{item.name}
  • ) }) } { isAdmin && diff --git a/public/react/src/modules/courses/poll/Poll.js b/public/react/src/modules/courses/poll/Poll.js index aae09b41c..b395b2bd2 100644 --- a/public/react/src/modules/courses/poll/Poll.js +++ b/public/react/src/modules/courses/poll/Poll.js @@ -151,7 +151,8 @@ class Poll extends Component{ changePage=(pageNumber)=>{ this.setState({ - page:pageNumber + page:pageNumber, + checkBoxValues:[] }) let{type,StudentList_value}=this.state this.InitList(type,StudentList_value,pageNumber); @@ -543,7 +544,7 @@ class Poll extends Component{ pollsList && pollsList.length > 0 && isAdmin &&
    - 已选 {checkBoxValues.length} 个 + 已选 {checkBoxValues.length} 个 (不支持跨页勾选)
  • this.ActionPoll("delete")}>删除
  • diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index 9a9f9bd29..c3170bf3a 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -218,8 +218,7 @@ class ShixunhomeWorkItem extends Component{ footer={null} >
    -

    本实训的开启时间:{shixunsmessage}
    开启时间之前不能挑战 -

    +

    目前该实训项目尚在内测中,将于{shixunsmessage}之后开放,谢谢!

    {/*取消*/} diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index 88dffa232..dd5a93534 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -54,7 +54,8 @@ class ShixunHomework extends Component{ course_groupslist:[], checkedtype:false, checkBoxValues:[], - isSpin:false + isSpin:false, + antIcon:false } } updateNavSuccess=()=>{ @@ -559,7 +560,8 @@ class ShixunHomework extends Component{ let {Coursename,order}=this.state; this.setState({ - page:pageNumber + page:pageNumber, + checkBoxValues:[] }) this.homeworkupdatalist(Coursename,pageNumber,order); @@ -659,10 +661,11 @@ class ShixunHomework extends Component{ savedelete=()=>{ + this.setState({ + antIcon:true + }) let {Coursename,page,order,checkBoxValues,datas}=this.state; let category_id=this.props.match.params.category_id; - - const cid = this.props.match.params.coursesId const url = `/courses/`+cid+`/homework_commons/multi_destroy.json`; axios.post(url, { @@ -690,11 +693,17 @@ class ShixunHomework extends Component{ Loadtype:false, checkBoxValues:[], checkedtype:false, + antIcon:false }) this.props.showNotification(response.data.message) this.homeworkupdatalist(Coursename,page,order); this.props.updataleftNavfun() - } + }else{ + this.setState({ + antIcon:false + }) + this.props.showNotification(response.data.message) + } }) .catch(function (error) { console.log(error); @@ -922,6 +931,7 @@ class ShixunHomework extends Component{ course_modules, shixunpath, order, + antIcon, }=this.state; let main_id=this.props.match.params.main_id; @@ -937,6 +947,7 @@ class ShixunHomework extends Component{ modalSave={this.state.ModalSave} modalsBottomval={this.state.ModalsBottomval} loadtype={this.state.Loadtype} + antIcon={this.state.antIcon} />:""} {/*立即发布*/} {visible===true?
    - 已选 {checkBoxValues&&checkBoxValues.length} 个 + 已选 {checkBoxValues&&checkBoxValues.length} 个 (不支持跨页勾选)
  • 删除
  • 立即发布
  • @@ -1089,7 +1100,7 @@ class ShixunHomework extends Component{ {course_modules&&course_modules.main_category.map((item,key)=>{ return( - datas&&datas.category_id===null?"":
  • this.moveTos(item.main_category_id)}>{item.main_category_name}
  • + datas&&datas.category_id===null?"":
  • this.moveTos(item.main_category_id)} title={item.main_category_name}>{item.main_category_name}
  • ) })} @@ -1098,10 +1109,10 @@ class ShixunHomework extends Component{ return (!this.state.dirSearchValue || item.category_name.indexOf(this.state.dirSearchValue) != -1) }).map( (item,key) => { if(datas&&datas.category_id!=null&&datas&&datas.category_id===item.category_id===false){ - return
  • this.moveTos(item.category_id )}>{item.category_name}
  • + return
  • this.moveTos(item.category_id )} title={item.category_name}>{item.category_name}
  • } if(datas&&datas.category_id===null){ - return
  • this.moveTos(item.category_id )}>{item.category_name}
  • + return
  • this.moveTos(item.category_id )} title={item.category_name}>{item.category_name}
  • } })} diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js index 780ed4071..eec340249 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCards.js +++ b/public/react/src/modules/paths/PathDetail/DetailCards.js @@ -361,7 +361,7 @@ class DetailCards extends Component{ footer={null} >
    -

    本实训的开启时间:{this.state.shixunsmessage}
    开启时间之前不能挑战

    +

    目前该实训项目尚在内测中,将于{this.state.shixunsmessage}之后开放,谢谢!

    {/*取消*/} diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index 948c42c50..fc9c53be1 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -731,8 +731,7 @@ class TPMBanner extends Component { footer={null} >
    -

    本实训的开启时间:{shixunsmessage}
    开启时间之前不能挑战 -

    +

    目前该实训项目尚在内测中,将于{shixunsmessage}之后开放,谢谢!

    {/*取消*/} diff --git a/public/react/src/modules/tpm/TPMUpdatepropaede/TPMUpdatepropaede.js b/public/react/src/modules/tpm/TPMUpdatepropaede/TPMUpdatepropaede.js index 835debddb..a847c4125 100644 --- a/public/react/src/modules/tpm/TPMUpdatepropaede/TPMUpdatepropaede.js +++ b/public/react/src/modules/tpm/TPMUpdatepropaede/TPMUpdatepropaede.js @@ -4,139 +4,43 @@ import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal} from 'antd'; import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; -// import "antd/dist/antd.css"; - import axios from 'axios'; +import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor'; + import {getUrl} from 'educoder'; -let origin = getUrl(); - -let path = getUrl("/editormd/lib/") - -const $ = window.$; - -let timeout; - -let currentValue; - -const Option = Select.Option; - -const RadioGroup = Radio.Group; - -function create_editorMD(id, width, high, placeholder, imageUrl, callback) { - var editorName = window.editormd(id, { - width: width, - height: high, - path: path, // "/editormd/lib/" - - syncScrolling: "single", - tex: true, - tocm: true, - emoji: true, - taskList: true, - codeFold: true, - searchReplace: true, - htmlDecode: "style,script,iframe", - sequenceDiagram: true, - autoFocus: false, - toolbarIcons: function () { - // Or return editormd.toolbarModes[name]; // full, simple, mini - // Using "||" set icons align right. - return ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "|", "testIcon", "testIcon1", '|', "image", "table", '|', "watch", "clear"] - }, - toolbarCustomIcons: { - testIcon: "
    ", - testIcon1: "
    " - }, - //这个配置在simple.html中并没有,但是为了能够提交表单,使用这个配置可以让构造出来的HTML代码直接在第二个隐藏的textarea域中,方便post提交表单。 - saveHTMLToTextarea: true, - // 用于增加自定义工具栏的功能,可以直接插入HTML标签,不使用默认的元素创建图标 - dialogMaskOpacity: 0.6, - placeholder: placeholder, - imageUpload: true, - imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"], - imageUploadURL: imageUrl,//url - onload: function () { - // this.previewing(); - $("#" + id + " [type=\"latex\"]").bind("click", function () { - editorName.cm.replaceSelection("```latex"); - editorName.cm.replaceSelection("\n"); - editorName.cm.replaceSelection("\n"); - editorName.cm.replaceSelection("```"); - var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line - 1, 0); - }); - - $("#" + id + " [type=\"inline\"]").bind("click", function () { - editorName.cm.replaceSelection("$$$$"); - var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2); - editorName.cm.focus(); - }); - $("[type=\"inline\"]").attr("title", "行内公式"); - $("[type=\"latex\"]").attr("title", "多行公式"); - - window.md_elocalStorage(editorName, `UpdatepropaedeMDs_${id}`, "UpdatepropaedeMDs"); - - callback && callback() - } - }); - return editorName; -} export default class TPMUpdatepropaede extends Component { constructor(props) { super(props) + this.neweditanswerRef=React.createRef(); this.state = { - shixunId:undefined + shixunId:undefined, } } - updatepropaedeMD(initValue, id) { - - this.contentChanged = false; - const placeholder = ""; - // amp; - // 编辑时要传memoId - const imageUrl = `/api/attachments.json`; - // 创建editorMd - - const Updatepropaede_editormd = create_editorMD(id, '100%', 400, placeholder, imageUrl, () => { - setTimeout(() => { - Updatepropaede_editormd.resize() - Updatepropaede_editormd.cm && Updatepropaede_editormd.cm.refresh() - }, 500) - - if (initValue != undefined) { - Updatepropaede_editormd.setValue(initValue) - } - Updatepropaede_editormd.cm.on("change", (_cm, changeObj) => { - console.log('....contentChanged') - this.contentChanged = true; - }) - }); - this.Updatepropaede_editormd = Updatepropaede_editormd; - window.Updatepropaede_editormd = Updatepropaede_editormd; - } - componentDidMount() { let id = this.props.match.params.shixunId; let url="/shixuns/"+id+"/propaedeutics.json"; axios.get(url).then((response) => { - console.log(response) if (response.data.status === 403||response.data.status === 401||response.data.status === 500) { }else{ this.setState({ - shixunId:id + shixunId:id, }) - if(response.data.content[0]!=null){ - this.updatepropaedeMD(response.data.content, "UpdatepropaedeMD"); + this.setState({ + editanswersRefval:response.data.content, + }) + this.neweditanswerRef.current.setValue(response.data.content) }else{ - this.updatepropaedeMD("", "UpdatepropaedeMD"); + this.setState({ + editanswersRefval:"", + }) + this.neweditanswerRef.current.setValue('') } } }).catch((error) => { @@ -148,7 +52,7 @@ export default class TPMUpdatepropaede extends Component { updatepropaedeuticsvalue=()=>{ let id = this.props.match.params.shixunId; let url="/shixuns/"+id+"/update_propaedeutics.json"; - const update_propaedeuticsvalue = this.Updatepropaede_editormd.getValue(); + const update_propaedeuticsvalue = this.editanswersRef.current.getValue().trim(); axios.post(url,{ content:update_propaedeuticsvalue } @@ -163,10 +67,7 @@ export default class TPMUpdatepropaede extends Component { }); } render() { - let {shixunId} = this.state; - - return (
    @@ -178,11 +79,8 @@ export default class TPMUpdatepropaede extends Component {
    -
    - -
    -
    -
    +
    diff --git a/public/react/src/modules/tpm/component/TPMright.css b/public/react/src/modules/tpm/component/TPMright.css index 41b87c0d0..c664d75c4 100644 --- a/public/react/src/modules/tpm/component/TPMright.css +++ b/public/react/src/modules/tpm/component/TPMright.css @@ -44,7 +44,7 @@ position:relative; } .newedboxheight{ - max-height:204px; + max-height: 177px; overflow-y: hidden; } .newminheight{ diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js index 66054142a..ef94f7fa4 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js @@ -587,7 +587,7 @@ class Challenges extends Component { footer={null} >
    -

    本实训的开启时间:{shixunsmessage}
    开启时间之前不能挑战

    +

    目前该实训项目尚在内测中,将于{shixunsmessage}之后开放,谢谢!

    {/*取消*/}