diff --git a/public/react/src/App.js b/public/react/src/App.js index 293d1baca..b7658450a 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -333,7 +333,13 @@ class App extends Component { {/*实训课程(原实训路径)*/} - + + () + } + > + {/*课堂*/} diff --git a/public/react/src/common/hooks/ImageLayerHook.js b/public/react/src/common/hooks/ImageLayerHook.js index c9f0a14a4..f41cfb0d2 100644 --- a/public/react/src/common/hooks/ImageLayerHook.js +++ b/public/react/src/common/hooks/ImageLayerHook.js @@ -1,6 +1,7 @@ -import React, { useState, useEffect, memo } from 'react' -import ImageLayer from '../../modules/page/layers/ImageLayer' -import { isImageExtension } from 'educoder' +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('') 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/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 7bf9b690b..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) } diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index f3442b8b7..e126027ec 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -40,6 +40,8 @@ class CoursesNew extends Component { } componentDidMount() { + + let coursesId = this.props.match.params.coursesId; let user_school=this.props.current_user&&this.props.current_user.user_school; @@ -85,7 +87,13 @@ class CoursesNew extends Component { this.Searchvalue("") } - + componentDidUpdate(prevProps){ + if(prevProps.current_user!=this.props.current_user){ + if(this.props.current_user.user_identity==="学生"){ + window.location.href ="/403" + } + } + } onChangeTimepublishs = (date, dateString) => { 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/login/EducoderInteresse.js b/public/react/src/modules/login/EducoderInteresse.js index 343c6a004..b7109d279 100644 --- a/public/react/src/modules/login/EducoderInteresse.js +++ b/public/react/src/modules/login/EducoderInteresse.js @@ -69,11 +69,8 @@ class EducoderInteresse extends Component { display: "flex", justifyContent: "center", width: "100%", - bottom:"0", - position: "fixed" - }}> -
    © 2019 EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
    +
    © 2019 EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
    diff --git a/public/react/src/modules/login/EducoderLogin.js b/public/react/src/modules/login/EducoderLogin.js index 8e8bfd112..14d80181a 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, } } @@ -156,13 +157,12 @@ class EducoderLogin extends Component { display: "flex", justifyContent: "center", width: "100%", - height: "550px", - marginTop: "44px", + marginTop: "25px", }}>
    this.Setshowbool(e,name,pass)} > + Setshowbool={(e)=>this.Setshowbool(e)} >
    @@ -172,8 +172,7 @@ class EducoderLogin extends Component { display: "flex", justifyContent: "center", width: "100%", - height: "550px", - marginTop: "44px", + marginTop: "25px", }}>
    -
    © 2019 EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
    +
    © 2019 EduCoder湘ICP备17009477号Trustie   &   IntelliDE inside.
    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/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 15360f6ec..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(){ @@ -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=()=>{ @@ -632,7 +635,7 @@ submittojoinclass=(value)=>{ 高校智能化教学与实训平台 -
    +
    @@ -788,7 +792,7 @@ submittojoinclass=(value)=>{