diff --git a/public/react/config/webpack.config.dev.js b/public/react/config/webpack.config.dev.js index 093f1d4d8..12d5e437f 100644 --- a/public/react/config/webpack.config.dev.js +++ b/public/react/config/webpack.config.dev.js @@ -29,7 +29,7 @@ const env = getClientEnvironment(publicUrl); module.exports = { // You may want 'eval' instead if you prefer to see the compiled output in DevTools. // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s - devtool: "source-map", // 开启调试 + devtool: "eval", // 开启调试 // These are the "entry points" to our application. // This means they will be the "root" imports that are included in JS bundle. // The first two entry points enable "hot" CSS and auto-refreshes for JS. diff --git a/public/react/src/App.css b/public/react/src/App.css index a9d02d4f0..c41e039c4 100644 --- a/public/react/src/App.css +++ b/public/react/src/App.css @@ -35,6 +35,10 @@ .editormd .CodeMirror-linenumbers { padding: 0; } +.editormd-html-preview hr, .editormd-preview-container hr { + /* 颜色加深 */ + border-top: 1px solid #ccc; +} /* 重置掉antd的一些样式 */ html, body { diff --git a/public/react/src/App.js b/public/react/src/App.js index c86498851..b7658450a 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -110,6 +110,11 @@ const CoursesIndex = Loadable({ loader: () => import('./modules/courses/Index'), loading: Loading, }) +const SearchPage = Loadable({ + loader: () => import('./search/SearchPage'), + loading: Loading, +}) + // 课堂讨论 // const BoardIndex = Loadable({ // loader: () => import('./modules/courses/boards/BoardIndex'), @@ -329,8 +334,15 @@ class App extends Component { {/*实训课程(原实训路径)*/} + () + } + > + {/*课堂*/} + {/* 课堂讨论 */} {/* */} @@ -340,6 +352,7 @@ class App extends Component { {/* */} {/* 兴趣页面*/} {/**/} + diff --git a/public/react/src/common/components/form/City.js b/public/react/src/common/components/form/City.js index dea65877b..b397c8b59 100644 --- a/public/react/src/common/components/form/City.js +++ b/public/react/src/common/components/form/City.js @@ -1719,6 +1719,10 @@ const options = [{ label: '其他' }], }]; + +function filter(inputValue, path) { + return path.some(option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1); +} class City extends Component{ constructor(props){ super(props); @@ -1739,11 +1743,16 @@ class City extends Component{ } } render(){ - const { defaultValue } = this.props + const { defaultValue, matchInputWidth, className, popupClassName } = this.props const { value } = this.state + // 这里用请选择所在省市的话,会触发chrome的地址选择 return( - ) } diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js index 263e08808..749d2a1e5 100644 --- a/public/react/src/common/educoder.js +++ b/public/react/src/common/educoder.js @@ -50,3 +50,4 @@ export { default as DMDEditor } from './components/markdown/DMDEditor' +export { default as ImageLayerHook } from './hooks/ImageLayerHook' \ No newline at end of file diff --git a/public/react/src/common/hooks/ImageLayerHook.js b/public/react/src/common/hooks/ImageLayerHook.js new file mode 100644 index 000000000..f41cfb0d2 --- /dev/null +++ b/public/react/src/common/hooks/ImageLayerHook.js @@ -0,0 +1,48 @@ +import React, { useState, useEffect, memo } from 'react'; +import ImageLayer from '../../modules/page/layers/ImageLayer'; +import { isImageExtension } from 'educoder'; +const $ = window.$; +function ImageLayerHook(props) { + const [showImage, setShowImage] = useState(false) + const [imageSrc, setImageSrc] = useState('') + + const { parentSel, childSel, watchPropsArray } = props + + const onImageLayerClose = () => { + setShowImage(false) + setImageSrc('') + } + const onDelegateClick = (event) => { + const imageSrc = event.target.src || event.target.getAttribute('src') || event.target.getAttribute('href') + // 判断imageSrc是否是图片 + const fileName = event.target.innerHTML.trim() + if (isImageExtension(imageSrc.trim()) || isImageExtension(fileName) || event.target.tagName == 'IMG' || imageSrc.indexOf('base64,') != -1) { + // 非回复里的头像图片; 非emoticons + if (imageSrc.indexOf('/images/avatars/User') === -1 && + imageSrc.indexOf('kindeditor/plugins/emoticons') === -1 ) { + setShowImage(true) + setImageSrc(imageSrc) + } + event.stopPropagation() + event.preventDefault && event.preventDefault() + event.originalEvent.preventDefault() + // event.originalEvent.stopPropagation() + // event.originalEvent.cancelBubble = true + return false; + } + } + useEffect(() => { + $(parentSel) + .delegate(childSel, "click", onDelegateClick); + + return () => { + $(parentSel).undelegate(childSel, "click", onDelegateClick ) + } + }) + + return ( + + ) +} + +export default memo(ImageLayerHook) \ No newline at end of file diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js index 10e9c07e2..449f79a7a 100644 --- a/public/react/src/context/TPIContextProvider.js +++ b/public/react/src/context/TPIContextProvider.js @@ -424,7 +424,7 @@ pop_box_new(htmlvalue, 480, 182); */ let user = resData.user; user.username = resData.user.name; - user.user_url = `/user/${resData.user.login}`; + user.user_url = `/users/${resData.user.login}`; // user.image_url = resData.image_url; user.is_teacher = resData.is_teacher; resData.user = user; diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index 6501716b7..c755efabd 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -905,7 +905,7 @@ class Fileslists extends Component{ isAdmin={this.props.isAdmin()} isStudent={this.props.isStudent()} isNotMember={this.props.isNotMember()} - checkBox={this.props.isAdmin()?:""} + checkBox={this.props.isAdmin()?:""} Settingtypes={(id)=>this.Settingtypes(id)} coursesId={this.props.match.params.coursesId} updatafiledfun={()=>this.updatafiled()} diff --git a/public/react/src/modules/courses/boards/index.js b/public/react/src/modules/courses/boards/index.js index 5bf5cadc7..94c8c4c00 100644 --- a/public/react/src/modules/courses/boards/index.js +++ b/public/react/src/modules/courses/boards/index.js @@ -428,7 +428,7 @@ class Boards extends Component{ : ''} + checkBox={ isAdmin ? : ''} onItemClick={this.onItemClick} onSticky={this.onSticky} > diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 6521d2add..2610a7782 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -135,14 +135,13 @@ class CommonWorkItem extends Component{
{ mainList && isAdmin && - + }
this.props.onItemClick(Object.assign({}, item, {id: item.homework_id})) }>

- {/* 放开点击进入,进入后弹框,canNotLink ? () => {} : */} this.onItemClick(item)} + className="fl font-16 font-bd mt2 comnonwidth580" style={{cursor: canNotLink ? 'default' : 'poninter'}} + onClick={ canNotLink ? () => {} : () => this.onItemClick(item)} >{item.name} {/* 只有非课堂成员且作业是私有的情况下才会为true */} diff --git a/public/react/src/modules/courses/coursesHome/coursesHomeCard.js b/public/react/src/modules/courses/coursesHome/coursesHomeCard.js index 6869b6b71..788ce8ac8 100644 --- a/public/react/src/modules/courses/coursesHome/coursesHomeCard.js +++ b/public/react/src/modules/courses/coursesHome/coursesHomeCard.js @@ -40,8 +40,8 @@ class coursesHomeCard extends Component{ className="mt80 mb25"/>

非成员不能访问

- {/**/} - + + {/**/} {/*target="_blank"*/} { item.is_public===1&&item.id===1309? diff --git a/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js b/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js index 9019fe7a1..6808ded8a 100644 --- a/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js +++ b/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js @@ -119,7 +119,7 @@ class AccessoryModal2 extends Component{ } } Saves=()=>{ - debugger + // debugger let {fileList,description} =this.state; let newfileList=[]; for(var list of fileList){ diff --git a/public/react/src/modules/courses/coursesPublic/Associationmodel.js b/public/react/src/modules/courses/coursesPublic/Associationmodel.js index f792fc63b..a1f5a9e70 100644 --- a/public/react/src/modules/courses/coursesPublic/Associationmodel.js +++ b/public/react/src/modules/courses/coursesPublic/Associationmodel.js @@ -59,7 +59,7 @@ class Associationmodel extends Component{ goback=()=>{ - debugger + // debugger this.setState({ Modalstype:false, }) @@ -70,7 +70,7 @@ class Associationmodel extends Component{ setSaves=()=>{ - debugger + // debugger let {projectvalue}=this.state; let taskid=this.props.taskid; let url="/graduation_tasks/"+taskid+"/graduation_works/relate_project.json"; diff --git a/public/react/src/modules/courses/coursesPublic/PathModal.js b/public/react/src/modules/courses/coursesPublic/PathModal.js index fc6747e08..824c50c78 100644 --- a/public/react/src/modules/courses/coursesPublic/PathModal.js +++ b/public/react/src/modules/courses/coursesPublic/PathModal.js @@ -11,7 +11,10 @@ class PathModal extends Component{ Searchvalue:undefined, type:'all', page:1, - patheditarry:undefined + patheditarry:undefined, + newshixunmodallist:undefined, + hometypepvisible: false, + shixunmodallist:undefined, } } @@ -19,14 +22,78 @@ class PathModal extends Component{ this.props.hidecouseShixunModal() } + componentDidMount(){ + this.setState({ + hometypepvisible: true, + patheditarry: [], + checkBoxValues: [], + + }) + + let coursesId = this.props.match.params.coursesId; + let url = "/courses/" + coursesId + "/homework_commons/subjects.json"; + + axios.get(url).then((result) => { + if (result.status === 200) { + this.setState({ + shixunpath: true, + shixunmodallist: result.data, + hometypepvisible: false, + newshixunmodallist: result.data.subject_list, + }) + } + }).catch((error) => { + console.log(error); + }) + } + funshixunpathlist=(search,type,loading,page)=>{ + let{newshixunmodallist}=this.state; + let newshixunmodallists=[] + if(page>1){ + newshixunmodallists=newshixunmodallist; + } + this.setState({ + hometypepvisible:loading + }) + let coursesId=this.props.match.params.coursesId; + let url ="/courses/"+coursesId+"/homework_commons/subjects.json"; + + axios.get(url, { + params: { + search: search, + type:type, + page:page + } + }).then((result)=>{ + if(result.status===200){ + + let shixun_list=result.data.subject_list; + + for(var i=0; i{ + console.log(error); + }) + } + //tag changeTag=(types)=>{ let {Searchvalue}=this.state; this.setState({ type:types, page:1, + newshixunmodallist:undefined }) - this.props.funshixunpathlist(Searchvalue,types,true,1) + this.funshixunpathlist(Searchvalue,types,true,1) } //搜索 @@ -40,7 +107,7 @@ class PathModal extends Component{ this.setState({ page:1, }) - this.props.funshixunpathlist(value,type,true,1) + this.funshixunpathlist(value,type,true,1) } @@ -59,7 +126,7 @@ class PathModal extends Component{ let {Searchvalue,type,page,shixunpathlist}=this.state; let newpage=page+1 - this.props.funshixunpathlist(Searchvalue,type,true,newpage) + this.funshixunpathlist(Searchvalue,type,true,newpage) this.setState({ page:newpage }) @@ -69,19 +136,24 @@ class PathModal extends Component{ } //提交 savecouseShixunModal=()=>{ + this.setState({ + hometypepvisible:true + }) let {patheditarry}=this.state; - let {coursesId,Coursename,page,order,category_id,datas}=this.props; + let {coursesId}=this.props; let url="/courses/"+coursesId+"/homework_commons/create_subject_homework.json"; if(patheditarry===undefined){ this.setState({ patheditarrytype:true, - patheditarryvalue:"请先选择实践课程" + patheditarryvalue:"请先选择实践课程", + hometypepvisible:false }) return }else if(patheditarry.length===0){ this.setState({ patheditarrytype:true, - patheditarryvalue:"请先选择实践课程" + patheditarryvalue:"请先选择实践课程", + hometypepvisible:false }) return } @@ -114,14 +186,16 @@ class PathModal extends Component{ // this.props.courseshomeworkstart(response.data.category_id,response.data.homework_ids) // } - + this.setState({ + hometypepvisible:false + }) }).catch((error) => { console.log(error) }) } render(){ - let {Searchvalue,type,Modalstype}=this.state; - let {visible,shixunmodallist,hometypepvisible,newshixunmodallist}=this.props; + let {Searchvalue,type,Modalstype,newshixunmodallist,hometypepvisible,shixunmodallist}=this.state; + let {visible}=this.props; const antIcon = ; return( @@ -164,7 +238,7 @@ class PathModal extends Component{ {shixunmodallist === undefined ? "":shixunmodallist.subjects_count} - 个实训 + 个实践课程
{ + newshixunmodallist&&newshixunmodallist.map((item,key)=>{ return(
@@ -236,4 +311,4 @@ class PathModal extends Component{ ) } } -export default PathModal; \ No newline at end of file +export default PathModal; diff --git a/public/react/src/modules/courses/coursesPublic/ShixunModal.js b/public/react/src/modules/courses/coursesPublic/ShixunModal.js index 2d43439c4..f0caef87b 100644 --- a/public/react/src/modules/courses/coursesPublic/ShixunModal.js +++ b/public/react/src/modules/courses/coursesPublic/ShixunModal.js @@ -6,6 +6,7 @@ import axios from'axios'; const Option = Select.Option; const Search = Input.Search; + class ShixunModal extends Component{ constructor(props){ super(props); @@ -13,13 +14,69 @@ class ShixunModal extends Component{ Searchvalue:undefined, type:'all', category_id:0, - page:1 + page:1, + shixunmodallist:undefined, + hometypepvisible:false, + newshixunmodallist:undefined, } } componentDidMount() { - - + this.setState({ + hometypepvisible:true, + }) + let coursesId=this.props.match.params.coursesId; + let url ="/courses/"+coursesId+"/homework_commons/shixuns.json"; + + axios.get(url).then((result)=>{ + if(result.status===200){ + this.setState({ + shixunmodallist:result.data, + hometypepvisible:false, + newshixunmodallist:result.data.shixun_list, + }) + } + }).catch((error)=>{ + console.log(error); + }) } + setupdatalist=(search,type,loading,page)=>{ + let{newshixunmodallist}=this.state; + let newshixunmodallists=[] + if(page>1){ + newshixunmodallists=newshixunmodallist; + } + this.setState({ + hometypepvisible:loading + }) + let coursesId=this.props.match.params.coursesId; + let url ="/courses/"+coursesId+"/homework_commons/shixuns.json"; + + axios.get(url, { + params: { + search: search, + type:type, + page:page + } + }).then((result)=>{ + if(result.status===200){ + + let shixun_list=result.data.shixun_list; + for(var i=0; i{ + console.log(error); + }) + } //勾选实训 shixunhomeworkedit=(list)=>{ @@ -43,16 +100,13 @@ class ShixunModal extends Component{ contentViewScrolledit=(e)=>{ //滑动到底判断 - if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ - - let {Searchvalue,type,page}=this.state; - let newpage=page+1 - this.props.funshixunmodallist(Searchvalue,type,true,newpage) - this.setState({ - page:newpage - }) - + let {Searchvalue,type,page}=this.state; + let newpage=page+1 + this.setupdatalist(Searchvalue,type,true,newpage) + this.setState({ + page:newpage + }) } } @@ -69,7 +123,7 @@ class ShixunModal extends Component{ page:1, }) - this.props.funshixunmodallist(value,type,true,1) + this.setupdatalist(value,type,true,1) this.props.funpatheditarry([]) } @@ -79,9 +133,10 @@ class ShixunModal extends Component{ this.setState({ type:types, page:1, + newshixunmodallist:undefined }) - this.props.funshixunmodallist(Searchvalue,types,true,1) + this.setupdatalist(Searchvalue,types,true,1) this.props.funpatheditarry([]) } @@ -91,17 +146,24 @@ class ShixunModal extends Component{ } savecouseShixunModal=()=>{ + this.setState({ + hometypepvisible:true + }) let {coursesId,patheditarry,datas}=this.props; let{category_id}=this.state; if (this.props.chooseShixun) { this.props.chooseShixun(patheditarry) + this.setState({ + hometypepvisible:false + }) return; } if(patheditarry.length===0){ this.setState({ shixunmodelchke:true, - chekicmessage:"请先选择实训" + chekicmessage:"请先选择实训", + hometypepvisible:false }) return @@ -119,7 +181,9 @@ class ShixunModal extends Component{ this.props.courseshomeworkstart(response.data.category_id,response.data.homework_ids) this.props.hidecouseShixunModal() } - + this.setState({ + hometypepvisible:false + }) // category_id: 3 // homework_ids: (5) [9171, 9172, 9173, 9174, 9175] }).catch((error) => { @@ -133,8 +197,8 @@ class ShixunModal extends Component{ }) } render(){ - let {Searchvalue,type,category_id}=this.state; - let {visible,shixunmodallist,hometypepvisible,newshixunmodallist,patheditarry}=this.props; + let {Searchvalue,type,hometypepvisible,shixunmodallist,newshixunmodallist,}=this.state; + let {visible,patheditarry}=this.props; const antIcon = ; // console.log(patheditarry) return( @@ -205,7 +269,7 @@ class ShixunModal extends Component{ ` } -
+
  • this.changeTag("all")} className={ type==="all" ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>全部 @@ -277,6 +341,9 @@ class ShixunModal extends Component{ width: 11%; box-sizing: border-box; } + .pl12{ + padding-left: 12px; + } ` } @@ -298,7 +365,7 @@ class ShixunModal extends Component{
  • {item.school}
  • {item.myshixuns_count}
  • -
  • {item.level}
  • +
  • {item.level}
  • 详情
  • @@ -311,7 +378,7 @@ class ShixunModal extends Component{
    - {this.state.shixunmodelchke===true?{this.state.chekicmessage}:""} + {this.state.chekicmessage}
    取消 确定 diff --git a/public/react/src/modules/courses/exercise/Exercise.js b/public/react/src/modules/courses/exercise/Exercise.js index 5058b5719..4331bdc6f 100644 --- a/public/react/src/modules/courses/exercise/Exercise.js +++ b/public/react/src/modules/courses/exercise/Exercise.js @@ -560,7 +560,7 @@ class Exercise extends Component{ {...this.state} item={item} key={key} - checkBox={ this.onItemClick(item)} >} > diff --git a/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js index 6fa082f59..b5e7ab820 100644 --- a/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js +++ b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js @@ -86,7 +86,7 @@ class Exercisestatisticalresult extends Component { page:pageNumber }) - debugger + // debugger $('html').animate({ scrollTop: 10 }, 1000); diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js index 60fc8e21b..044d0a3ae 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js @@ -122,6 +122,11 @@ class GraduationTasksSubmitedit extends Component{ let fileList = info.fileList; this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) }); } + + if (info.file.status === 'done') { + let fileList = info.fileList; + this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) }); + } } //onAttachmentRemove = (file) => { @@ -393,7 +398,7 @@ class GraduationTasksSubmitedit extends Component{ // console.log(fileList); if(values.description===undefined||values.description===""){ this.scrollToAnchor("valuestypes"); - debugger + // debugger return } if(workslist.task_type===2){ diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index d0cedb487..ee0e98f16 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -117,10 +117,17 @@ class GraduationTasksSubmitnew extends Component{ } // 附件相关 START handleChange = (info) => { + debugger if (info.file.status === 'uploading') { let fileList = info.fileList; this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) }); } + + if (info.file.status === 'done') { + let fileList = info.fileList; + this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) }); + } + } onAttachmentRemove = (file) => { @@ -358,7 +365,7 @@ class GraduationTasksSubmitnew extends Component{ //公用数据 Commoninterface = (fileList,selectmemberslist,workslist)=>{ - debugger + // debugger let userids=[]; for(var list of selectmemberslist){ @@ -384,7 +391,7 @@ class GraduationTasksSubmitnew extends Component{ // console.log(fileList); if(values.description===undefined||values.description===""){ this.scrollToAnchor("valuestypes"); - debugger + // debugger return } if(workslist&&workslist.task_type===2){ @@ -460,7 +467,7 @@ class GraduationTasksSubmitnew extends Component{ //确认 hidestartshixunsreplace=()=>{ - debugger + // debugger let {fileList,selectmemberslist,workslist}=this.state; this.Commoninterface(fileList,selectmemberslist,workslist); diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js index 637a4f3c6..2e9efba0c 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js @@ -145,7 +145,7 @@ class GraduationTasksedit extends Component{ } onAttachmentRemove = (file) => { - debugger + // debugger this.cancelAttachment(); const url = `/attachments/${file.response ? file.response.id : file.uid}.json` // const url = `/attachments/${file}.json` diff --git a/public/react/src/modules/courses/graduation/tasks/index.js b/public/react/src/modules/courses/graduation/tasks/index.js index 0a4bd47b4..493fc1916 100644 --- a/public/react/src/modules/courses/graduation/tasks/index.js +++ b/public/react/src/modules/courses/graduation/tasks/index.js @@ -37,7 +37,7 @@ class GraduationTasks extends Component{ } } fetchAll = (search,page,order,count) => { -debugger +// debugger const cid = this.props.match.params.coursesId @@ -554,7 +554,7 @@ debugger } // 题库选用成功后刷新页面 useBankSuccess=(checkBoxValues,object_ids)=>{ - debugger + // debugger let {search,page,order,all_count} = this.state; this.fetchAll(search,page,order,all_count) } @@ -730,7 +730,7 @@ debugger isAdmin={this.props.isAdmin()} isStudent={this.props.isStudent()} isNotMember={this.props.isNotMember()} - checkBox={this.props.isAdmin()?:""} + checkBox={this.props.isAdmin()?:""} // onItemClick={this.onItemClick} // onSticky={this.onSticky} funlist={()=>this.fetchAll(search,page,order)} diff --git a/public/react/src/modules/courses/graduation/topics/index.js b/public/react/src/modules/courses/graduation/topics/index.js index 8ed3118b9..6dab02f07 100644 --- a/public/react/src/modules/courses/graduation/topics/index.js +++ b/public/react/src/modules/courses/graduation/topics/index.js @@ -411,7 +411,7 @@ onBoardsNew=()=>{ {...this.props} discussMessage={item} data={data} - checkBox={ this.onItemClick(item)} className="mr15">} + checkBox={ this.onItemClick(item)} className="mr15">} onItemClick={this.onItemClick} index={index} chooseTopic={this.chooseTopic} diff --git a/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js b/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js index dc3044cc0..3f4f1a0ca 100644 --- a/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js +++ b/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js @@ -1,4 +1,4 @@ -import React, { useState, useEffect, useRef, memo } from 'react' +import React, { useState, useEffect, useRef, useMemo } from 'react' import { trigger } from 'educoder' import { Input, Checkbox } from "antd"; import CourseGroupChooser from '../CourseGroupChooser' @@ -105,4 +105,4 @@ function CourseGroupChooserModal({ course_groups = [], isAdminOrCreator, item, i ) } -export default memo(CourseGroupChooserModal) \ No newline at end of file +export default useMemo(CourseGroupChooserModal) \ No newline at end of file diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index c073abf4f..acffd8ef4 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -17,19 +17,6 @@ import DownloadMessageysl from "../../modals/DownloadMessageysl"; import CreateGroupByImportModal from './modal/CreateGroupByImportModal' const Search =Input.Search; -const dataSource = [{ - check:, - id: 1, - name: 胡莎莎, - StuNo: 32, - classes: 西湖区湖底公园1号 -}, { - check:, - id: 2, - name: 胡莎莎, - StuNo: 32, - classes: 西湖区湖底公园2号 -}]; const buildColumns = (that) => { const { course_groups } = that.state @@ -100,7 +87,7 @@ const buildColumns = (that) => { dataIndex: 'check', key: 'check', render: (text, item) => { - return + return }, width:"5%" }) @@ -280,6 +267,7 @@ class studentsList extends Component{ } componentDidUpdate(prevProps) { if (prevProps.match.params.course_group_id != this.props.match.params.course_group_id) { + this.setState({checkBoxValues: []}) this.fetchAll(1) } // 加载了2次 diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index 5b2615d8b..92b0e0d4b 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -667,7 +667,7 @@ class studentsList extends Component{ `}
    - { course_groups && course_groups.length && { if(dateString===""){ this.setState({ diff --git a/public/react/src/modules/courses/poll/PollDetailTabForthRules.js b/public/react/src/modules/courses/poll/PollDetailTabForthRules.js index ac0417f39..292830fb8 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabForthRules.js +++ b/public/react/src/modules/courses/poll/PollDetailTabForthRules.js @@ -115,7 +115,7 @@ class PollDetailTabForthRules extends Component{ } //修改发布规则里面的发布时间 changeRulePublishTime=(e,date,index)=>{ - debugger + // debugger let arr=Object.assign({}, this.state.rules[parseInt(index)]); arr.publish_time=date=== ""?"":moment(handleDateString(date)).format("YYYY-MM-DD HH:mm"); if(!arr.end_time){ diff --git a/public/react/src/modules/courses/poll/PollDetailTabThird.js b/public/react/src/modules/courses/poll/PollDetailTabThird.js index d322c9544..56455ffdb 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabThird.js +++ b/public/react/src/modules/courses/poll/PollDetailTabThird.js @@ -71,13 +71,13 @@ class PollDetailTabThird extends Component{

    {item.question.question_number}、{map[item.question.question_type]} { item.question.is_necessary==1 ? 必答:选答 } - { 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_type == 2 && item.question.min_choices && item.question.max_choice ? + + { + 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/PollInfo.js b/public/react/src/modules/courses/poll/PollInfo.js index 8256e3710..fc1d55385 100644 --- a/public/react/src/modules/courses/poll/PollInfo.js +++ b/public/react/src/modules/courses/poll/PollInfo.js @@ -382,7 +382,7 @@ class PollInfo extends Component{
    {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_choice ? { item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" : diff --git a/public/react/src/modules/courses/poll/PollListItem.js b/public/react/src/modules/courses/poll/PollListItem.js index e456e2ed9..50c471e76 100644 --- a/public/react/src/modules/courses/poll/PollListItem.js +++ b/public/react/src/modules/courses/poll/PollListItem.js @@ -22,8 +22,10 @@ class PollListItem extends Component{ const IsAdmin =this.props.isAdmin(); const isStudent = this.props.isStudent(); const isNotMember = this.props.isNotMember(); + const isAdminOrStudent = this.props.isAdminOrStudent(); let t= item.end_time ? moment(item.end_time) - moment() : 0; + let canNotLink = !isAdminOrStudent && item.lock_status == 0 return(
    @@ -35,7 +37,9 @@ class PollListItem extends Component{ }

    - {item.polls_name} + { canNotLink ? {item.polls_name} : + {item.polls_name} + } { item.lock_status === 0 ? diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 1ba8c85b7..f31cb954d 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -1411,7 +1411,7 @@ class Listofworksstudentone extends Component { // } this.setState({ page: e.current, - teacherlists: teacherlists + // teacherlists: teacherlists }) } diff --git a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js index 8cc79af8f..58a12eff1 100644 --- a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js +++ b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js @@ -27,7 +27,7 @@ import '../css/members.css' import "../common/formCommon.css" import '../css/Courses.css' import './style.css' -import ShixunModal from "../coursesPublic/ShixunModal"; + class TraineetraininginformationModal extends Component { constructor(props) { diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index 42f5fbf6a..1913b0d2d 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -454,20 +454,6 @@ class ShixunHomework extends Component{ checkBoxValues:[] }) - let coursesId=this.props.match.params.coursesId; - let url ="/courses/"+coursesId+"/homework_commons/shixuns.json"; - - axios.get(url).then((result)=>{ - if(result.status===200){ - this.setState({ - shixunmodallist:result.data, - hometypepvisible:false, - newshixunmodallist:result.data.shixun_list, - }) - } - }).catch((error)=>{ - console.log(error); - }) } @@ -477,24 +463,10 @@ class ShixunHomework extends Component{ this.setState({ hometypepvisible:true, patheditarry:[], - checkBoxValues:[] + checkBoxValues:[], + shixunpath: true, }) - let coursesId=this.props.match.params.coursesId; - let url ="/courses/"+coursesId+"/homework_commons/subjects.json"; - - axios.get(url).then((result)=>{ - if(result.status===200){ - this.setState({ - shixunpath:true, - shixunpathlist:result.data, - hometypepvisible:false, - newshixunpathlist:result.data.subject_list, - }) - } - }).catch((error)=>{ - console.log(error); - }) } @@ -508,116 +480,80 @@ class ShixunHomework extends Component{ }) } - funshixunmodallist=(search,type,loading,page)=>{ - let{newshixunmodallist}=this.state; - let newshixunmodallists=[] - if(page>1){ - newshixunmodallists=newshixunmodallist; - } - this.setState({ - hometypepvisible:loading - }) - let coursesId=this.props.match.params.coursesId; - let url ="/courses/"+coursesId+"/homework_commons/shixuns.json"; - - axios.get(url, { - params: { - search: search, - type:type, - page:page - } - }).then((result)=>{ - if(result.status===200){ - - let shixun_list=result.data.shixun_list; - for(var i=0; i{ - console.log(error); - }) - } - - funshixunpathlist=(search,type,loading,page)=>{ - let{newshixunpathlist}=this.state; - let newshixunmodallists=[] - if(page>1){ - newshixunmodallists=newshixunpathlist; - } - this.setState({ - hometypepvisible:loading - }) - let coursesId=this.props.match.params.coursesId; - let url ="/courses/"+coursesId+"/homework_commons/subjects.json"; - - axios.get(url, { - params: { - search: search, - type:type, - page:page - } - }).then((result)=>{ - if(result.status===200){ - - let shixun_list=result.data.subject_list; - for(var i=0; i{ - console.log(error); - }) - } - - funshixunpathlist=(search,type,loading,page)=>{ - let{newshixunpathlist}=this.state; - let newshixunmodallists=[] - if(page>1){ - newshixunmodallists=newshixunpathlist; - } - this.setState({ - hometypepvisible:loading - }) - let coursesId=this.props.match.params.coursesId; - let url ="/courses/"+coursesId+"/homework_commons/subjects.json"; + // funshixunmodallist=(search,type,loading,page)=>{ + // let{newshixunmodallist}=this.state; + // let newshixunmodallists=[] + // if(page>1){ + // newshixunmodallists=newshixunmodallist; + // } + // this.setState({ + // hometypepvisible:loading + // }) + // let coursesId=this.props.match.params.coursesId; + // let url ="/courses/"+coursesId+"/homework_commons/shixuns.json"; + // + // axios.get(url, { + // params: { + // search: search, + // type:type, + // page:page + // } + // }).then((result)=>{ + // if(result.status===200){ + // + // let shixun_list=result.data.shixun_list; + // for(var i=0; i{ + // console.log(error); + // }) + // } - axios.get(url, { - params: { - search: search, - type:type, - page:page - } - }).then((result)=>{ - if(result.status===200){ - let shixun_list=result.data.subject_list; - for(var i=0; i{ - console.log(error); - }) - } + // funshixunpathlist=(search,type,loading,page)=>{ + // let{newshixunpathlist}=this.state; + // let newshixunmodallists=[] + // if(page>1){ + // newshixunmodallists=newshixunpathlist; + // } + // this.setState({ + // hometypepvisible:loading + // }) + // let coursesId=this.props.match.params.coursesId; + // let url ="/courses/"+coursesId+"/homework_commons/subjects.json"; + // + // axios.get(url, { + // params: { + // search: search, + // type:type, + // page:page + // } + // }).then((result)=>{ + // if(result.status===200){ + // + // let shixun_list=result.data.subject_list; + // for(var i=0; i{ + // console.log(error); + // }) + // } PaginationCourse=(pageNumber)=>{ let {Coursename,order}=this.state; @@ -1012,13 +948,16 @@ class ShixunHomework extends Component{ course_groups={course_groups} getcourse_groupslist={(id)=>this.getcourse_groupslist(id)} />:""} + {/*选择实训*/} {shixunmodal===true?this.funshixunmodallist(search,type,loading,page)} + // funshixunmodallist={(search,type,loading,page)=>this.funshixunmodallist(search,type,loading,page)} hometypepvisible={hometypepvisible} hidecouseShixunModal={this.hidecouseShixunModal} newshixunmodallist={newshixunmodallist} @@ -1027,6 +966,7 @@ class ShixunHomework extends Component{ funpatheditarry={(patheditarry)=>this.funpatheditarry(patheditarry)} patheditarry={patheditarry} />:""} + {shixunmodal===true||shixunpath===true?:""} {/*选择实训路径*/} {shixunpath===true? this.funshixunpathlist(search,type,loading,page)} + // funshixunpathlist={(search,type,loading,page)=>this.funshixunpathlist(search,type,loading,page)} hometypepvisible={hometypepvisible} hidecouseShixunModal={this.hidecouseShixunModal} coursesId={this.props.match.params.coursesId} diff --git a/public/react/src/modules/home/shixunsHome.js b/public/react/src/modules/home/shixunsHome.js index 9093ec22d..780691e6c 100644 --- a/public/react/src/modules/home/shixunsHome.js +++ b/public/react/src/modules/home/shixunsHome.js @@ -232,7 +232,7 @@ class ShixunsHome extends Component {

    - {item.stages_count} + {item.stages_count} diff --git a/public/react/src/modules/login/EducoderLogin.js b/public/react/src/modules/login/EducoderLogin.js index 783e23b29..f31fcca88 100644 --- a/public/react/src/modules/login/EducoderLogin.js +++ b/public/react/src/modules/login/EducoderLogin.js @@ -72,7 +72,8 @@ class EducoderLogin extends Component { showbool: 3, logini:3, namezh:"", - passmm:"" + passmm:"", + loginstatus:true, } }else { if(props.match.url === "/login"){ @@ -98,8 +99,8 @@ class EducoderLogin extends Component { showbool: 1, logini:1, namezh:"", - passmm:"" - + passmm:"", + loginstatus:true, } } @@ -162,7 +163,7 @@ class EducoderLogin extends Component {

    this.Setshowbool(e,name,pass)} > + Setshowbool={(e)=>this.Setshowbool(e)} >
    diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index a5f0529e0..7e072e2bf 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -7,7 +7,7 @@ import Dialog, { DialogContentText, DialogTitle, } from 'material-ui/Dialog'; - +import {notification } from 'antd'; import axios from 'axios'; @@ -346,10 +346,19 @@ class LoginDialog extends Component { if(response===undefined){ return } + if(response.data.identity === null || response.data.identity === undefined){ + this.props.history.push("/interesse"); + return; + } if(response.status===200){ if (response.data.status === 402) { window.location.href = response.data.url; - }else{ + }else if (response.data.status === -2) { + notification.open({ + message: '提示', + description:response.data.message, + }); + }else{ broadcastChannelPostMessage('refreshPage') this.setState({ isRender:false diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index 7900a68bb..02116ce7d 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -33,6 +33,8 @@ class Trialapplication extends Component { user_phone_binded: props.user_phone_binded, showTrial: false, user: undefined, + borredss:"bor-reds", + borredssz:"bor-reds fl mr5", } //user_phone_binded 判断是否手机号验证 // console.log("Trialapplication"); @@ -371,7 +373,7 @@ class Trialapplication extends Component { //执行view render() { - let {login, codes, reason, isRenders, user_phone_binded, Phonenumberisnotco, getverificationcodes, Phonenumberisnotcocodes, Phonenumberisnotcoreason, seconds} = this.state; + let {login, codes, reason, isRenders, user_phone_binded,borredss,borredssz, Phonenumberisnotco, getverificationcodes, Phonenumberisnotcocodes, Phonenumberisnotcoreason, seconds} = this.state; // console.log("Trialapplication22222222"); // console.log(this.props); @@ -600,12 +602,13 @@ class Trialapplication extends Component { onChange={this.loginInputonChange} onBlur={(e) => this.inputOnBlur(e)} style={{"height": "38px",}} + className={Phonenumberisnotco && Phonenumberisnotco !== ""?borredss:""} name="myiphone" > { Phonenumberisnotco && Phonenumberisnotco != "" ? -

    - {Phonenumberisnotco} +

    + {Phonenumberisnotco}

    :
    } @@ -617,7 +620,9 @@ class Trialapplication extends Component { user_phone_binded === true ? "" :
    - this.getverificationcode()} - size={"large"}>验证码 + size={"large"}>获取验证码 : diff --git a/public/react/src/modules/page/main/CodeEvaluateView.css b/public/react/src/modules/page/main/CodeEvaluateView.css index 99b08a496..137174d95 100644 --- a/public/react/src/modules/page/main/CodeEvaluateView.css +++ b/public/react/src/modules/page/main/CodeEvaluateView.css @@ -112,4 +112,19 @@ } #evaluating_contents .-text-danger{ padding-bottom: 6px; - } \ No newline at end of file + } + + +.-task-ces-top .description { + color: #616B77; + padding: 0 8px; + font-size: 12px; +} +.-task-ces-top .split { + border-right: 1px solid #616B77; + width: 1px; + display: inline-block; + height: 10px; + margin: 5px 0; + float: right; +} \ No newline at end of file diff --git a/public/react/src/modules/page/main/CodeEvaluateView.js b/public/react/src/modules/page/main/CodeEvaluateView.js index a738d03fb..8be0b8765 100644 --- a/public/react/src/modules/page/main/CodeEvaluateView.js +++ b/public/react/src/modules/page/main/CodeEvaluateView.js @@ -172,7 +172,7 @@ class CodeEvaluateView extends Component { } else if (item.result == false) { headIconClass = 'fa-exclamation-circle -text-danger' } - + testSetsComponentArray.push(
    @@ -180,8 +180,13 @@ class CodeEvaluateView extends Component { 测试集 {index + 1} + { headIconClass && } { _headLockIconClass && } + + { item.ts_mem && 消耗内存{item.ts_mem}MB } + { item.ts_mem && item.ts_time && } + { item.ts_time && 代码执行时长:{item.ts_time}秒 }

    diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js index 0cac533d1..115f7066c 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCards.js +++ b/public/react/src/modules/paths/PathDetail/DetailCards.js @@ -228,7 +228,7 @@ class DetailCards extends Component{ isSpin:true, }) axios.get(url).then((response) => { - debugger + // debugger if(response.status===200){ // let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; // this.props.history.push(path); diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 859c150c0..f53159c7c 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -118,22 +118,23 @@ function loadHeader(){ function header_search(reactHeaderComponnet){ console.log(old_url) var keyword = $("input[name='search_keyword']").val(); // 搜索关键字 - if (!reactHeaderComponnet) { - reactHeaderComponnet = window._header_componentHandler - } - if (!reactHeaderComponnet) { - var index = $("#search_type").val(); // 搜索课程/项目 - keyword = encodeURIComponent(keyword); - // $.get('/users/search_shixuns_or_course', - // { search: keyword, - // index: index}); - window.location.href = old_url+"/users/search_shixuns_or_courses" + "?search=" + keyword + "&index=" + index; + window.location.href ="/search"+"?value="+keyword; + // if (!reactHeaderComponnet) { + // reactHeaderComponnet = window._header_componentHandler + // } + // if (!reactHeaderComponnet) { + // var index = $("#search_type").val(); // 搜索课程/项目 + // keyword = encodeURIComponent(keyword); + // // $.get('/users/search_shixuns_or_course', + // // { search: keyword, + // // index: index}); + // window.location.href = old_url+"/users/search_shixuns_or_courses" + "?search=" + keyword + "&index=" + index; //e.stopPropagation();//阻止冒泡 - } else { - window.__headSearchKeyword = keyword - reactHeaderComponnet.props.history.push(`/shixuns`) - trigger('searchKeywordChange', keyword) - } + // } else { + // window.__headSearchKeyword = keyword + // reactHeaderComponnet.props.history.push(`/shixuns`) + // trigger('searchKeywordChange', keyword) + // } } //头部导航条的隐藏 function closeSearch(){ @@ -169,8 +170,8 @@ class NewHeader extends Component { RadioGroupvalue:undefined, submitapplications:false, isRender:false, - isRenders:false, - showTrial:false, + // isRenders:false, + // showTrial:false, } // console.log("176") // console.log(props); @@ -382,12 +383,14 @@ class NewHeader extends Component { header_search(this) } onKeywordSearchKeyDown = (e) => { - let code = e.keyCode; + + window.location.href ="/search?value="+e.target.value; + // let code = e.keyCode; - if(code == 13) { - header_search(this); - return false; - } + // if(code == 13) { + // header_search(this); + // return false; + // } } hideAddcoursestypes=()=>{ @@ -547,13 +550,13 @@ submittojoinclass=(value)=>{ } } - trialapplications =()=>{ - console.log("点击了") - this.setState({ - isRenders: true, - showTrial:true, - }) - } + // trialapplications =()=>{ + // console.log("点击了") + // this.setState({ + // isRenders: true, + // showTrial:true, + // }) + // } // 关闭 cancelModulationModels = () => { @@ -618,20 +621,21 @@ submittojoinclass=(value)=>{ {/* :""*/} {/*}*/} - isRenders&&isRenders===true? - this.cancelModulationModels()} - /> - :"" - } + {/*{*/} + {/* isRenders&&isRenders===true?*/} + {/* this.cancelModulationModels()}*/} + {/* />*/} + {/* :""*/} + {/*}*/} this.cancelModulationModels()} >
    {/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/} 高校智能化教学与实训平台 -
    +
      {/*
    • 首页
    • */} @@ -703,10 +707,11 @@ submittojoinclass=(value)=>{ style={{display: 'none'}} > console.log(value)} + onPressEnter={this.onKeywordSearchKeyDown} - style={{ width: 258 }} + style={{ width: 295 }} />
    @@ -756,7 +761,7 @@ submittojoinclass=(value)=>{
  • 我的项目
  • 账号管理
  • {/*
  • this.educoderlogin()} >登入测试接口
  • */} -
  • this.trialapplications()} >试用申请
  • + {/*
  • this.trialapplications()} >试用申请
  • */} {/*
  • 兴趣页
  • */}
  • @@ -787,7 +792,7 @@ submittojoinclass=(value)=>{
      -
    • 新建课堂
    • + {this.props.current_user&&this.props.current_user.user_identity==="学生"?"":
    • 新建课堂
    • }
    • 新建实训
    • 新建实践课程
    • 新建项目
    • diff --git a/public/react/src/modules/tpm/TPMIndex.css b/public/react/src/modules/tpm/TPMIndex.css index d55369370..655f58637 100644 --- a/public/react/src/modules/tpm/TPMIndex.css +++ b/public/react/src/modules/tpm/TPMIndex.css @@ -188,3 +188,7 @@ body>.-task-title { .HeaderSearch .ant-input-search .ant-input{ color: #fff; } + +.HeaderSearch .ant-input-search .ant-input-suffix{ + background: transparent !important; +} \ No newline at end of file diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js index abeb18c9f..72bbbe3d0 100644 --- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js +++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js @@ -161,7 +161,20 @@ function updatamakedown(id){ }, 200) } - +function range(start, end) { + const result = []; + for (let i = start; i < end; i++) { + result.push(i); + } + return result; +} +function disabledDateTime() { + return { + // disabledHours: () => range(0, 24).splice(4, 20), + disabledMinutes: () => range(1, 30).concat(range(31, 60)), + // disabledSeconds: () => [0, 60], + }; +} export default class TPMsettings extends Component { constructor(props) { super(props) @@ -1307,7 +1320,7 @@ export default class TPMsettings extends Component {
      - {/*
      */}
      -
    • +
    • -
    • +
      {this.state.languagewritetype===true?"请填写该镜像语言":""}
      +
    • - -
    • +
      {this.state.systemenvironmenttype===true?"请填写该镜像语言系统环境":""}
      +
    • - -
    • +
      {this.state.testcoderunmodetype===true?"请填写该镜像测试代码运行方式":""}
      +
    • - + 上传附件 (单个文件50M以内) : - + 上传附件 (单个文件50M以内) @@ -992,15 +1022,15 @@ class Newshixuns extends Component {
    • +
      + {this.state.attachmentidstype===true?"请上传附件":""} +
    • - - - this.sendhideModaly()} >取消 - + className="task-btn task-btn-orange">确定
    • @@ -1203,10 +1233,12 @@ class Newshixuns extends Component { showToday={false} showTime locale={locale} + showTime={{ format: 'HH:mm' }} style={{"width": "184px"}} - format="YYYY-MM-DD HH:mm:ss" + format="YYYY-MM-DD HH:mm" placeholder="请选择开启时间" onChange={this.onChangeTimePicker} + disabledTime={disabledDateTime} />