diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index f22e6b9a7..601263fe6 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -825,7 +825,7 @@ class Coursesleftnav extends Component{ { is_teacher===true? course_modules===undefined?"":course_modules.map((item,key)=>{ return( -
+
  • this.showsandians(e,key,item.category_url,1)} className={this.props.mainurl===item.category_url&&key===this.props.indexs?"liactive":"clearfix active"} onMouseLeave={(e)=>this.hidesandian(e,key)} onMouseEnter={(e)=>this.showsandian(e,key)}> this.showsandians(e,key,item.category_url,1)} className={ item.second_category===undefined?"fl ml20 pd0":item.second_category.length===0?"fl ml20 pd0":this.state.sandiantypes===key?"fl ml20 pd0 ebebeb":"fl ml20 pd0"}> @@ -844,7 +844,6 @@ class Coursesleftnav extends Component{ {/*||this.props.location.pathname===this.state.url&&key===this.state.indexs*/} this.selectnavid(e,key,item.id,item.type,item.category_url)} >{item.name} @@ -901,6 +900,7 @@ class Coursesleftnav extends Component{ ref={provided.innerRef} {...provided.draggableProps} {...provided.dragHandleProps} + title={iem.category_name.length<6?"":iem.category_name} > @@ -940,6 +940,7 @@ class Coursesleftnav extends Component{
  • this.setnavid(e,key,item.id,item.type,item.category_url)} onMouseEnter={(e)=>this.showsandian(e,key)} + title={item.name.length<6?"":item.name} > { @@ -977,7 +978,7 @@ class Coursesleftnav extends Component{ } return( -
  • +
  • this.selectnavids(e,key,iem.category_id,item.type+"child",iem.second_category_url,key)} > {/*{iem.category_name}*/} diff --git a/public/react/src/modules/home/home.css b/public/react/src/modules/home/home.css index fc3fbac87..0739376de 100644 --- a/public/react/src/modules/home/home.css +++ b/public/react/src/modules/home/home.css @@ -1,75 +1,75 @@ -.slider-img-wrapper img { - width: 100%; - border-radius: 15px; - height: 350px; -} -.next-slick-list{ - width: 100%; - position: relative; - overflow: hidden; - border-radius: 10px; -} - -.user_navlist{ - margin-left: 40px; -} -.next-slick-list{ - margin-left: 12px; -} - -.black_nav_span{ - display: block; - margin: 0px 20px; - border-bottom: 1px solid #4B4B4B; - padding-left: 8px; - color: #FAFAFA; -} - -.user_navlist_white{ - z-index: 100 !important; -} - -.next-slick.next-slick-horizontal.next-slick-outer{ - height: 350px; -} - -.black_nav_list li span a{ - color:#fff; -} -.black_nav_list li span a:hover{ - color:#000; -} -.black_nav_list li:hover span a{ - color:#000; -} -.little-titles{ - height: 22px !important; -} - -.user_navlist_white a{ - color: #989898 !important; -} -.user_navlist_white .navlistpanel-line .little-titles a{ - color: #000 !important; -} - -.newnext-loading{ - display:block; -} - -.educontentSlider{ - width: 1282px !important; -} -.user_navlist_white{ - max-height:350px !important; - overflow-y: auto; -} - -.iconfontzhangjie{ - font-size: 10px !important; - line-height: 23px; -} -.iconfontshixundaibeijing{ - font-size: 18px !important; - line-height: 24px; +.slider-img-wrapper img { + width: 100%; + /*border-radius: 15px;*/ + height: 350px; +} +.next-slick-list{ + width: 100%; + position: relative; + overflow: hidden; + border-radius: 10px; +} + +.user_navlist{ + margin-left: 40px; +} +.next-slick-list{ + margin-left: 12px; +} + +.black_nav_span{ + display: block; + margin: 0px 20px; + border-bottom: 1px solid #4B4B4B; + padding-left: 8px; + color: #FAFAFA; +} + +.user_navlist_white{ + z-index: 100 !important; +} + +.next-slick.next-slick-horizontal.next-slick-outer{ + height: 350px; +} + +.black_nav_list li span a{ + color:#fff; +} +.black_nav_list li span a:hover{ + color:#000; +} +.black_nav_list li:hover span a{ + color:#000; +} +.little-titles{ + height: 22px !important; +} + +.user_navlist_white a{ + color: #989898 !important; +} +.user_navlist_white .navlistpanel-line .little-titles a{ + color: #000 !important; +} + +.newnext-loading{ + display:block; +} + +.educontentSlider{ + width: 1282px !important; +} +.user_navlist_white{ + max-height:350px !important; + overflow-y: auto; +} + +.iconfontzhangjie{ + font-size: 10px !important; + line-height: 23px; +} +.iconfontshixundaibeijing{ + font-size: 18px !important; + line-height: 24px; } \ No newline at end of file diff --git a/public/react/src/modules/tpm/TPMIndex.js b/public/react/src/modules/tpm/TPMIndex.js index 5b7290ecb..98783f552 100644 --- a/public/react/src/modules/tpm/TPMIndex.js +++ b/public/react/src/modules/tpm/TPMIndex.js @@ -1,382 +1,382 @@ -import React, { Component } from 'react'; - -import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; - -import Loading from '../../Loading'; - -import Loadable from 'react-loadable'; - -import { TPMIndexHOC } from './TPMIndexHOC'; - -import { SnackbarHOC } from 'educoder'; - -import TPMBanner from './TPMBanner'; - -import axios from 'axios'; - -import TPMShixunDiscussContainer from './TPMShixunDiscussContainer'; - -import TPMRepositoryComponent from './TPMRepositoryComponent'; - -import TPMRepositoryCommits from './shixunchild/Repository/TPMRepositoryCommits'; - -import TPMsettings from './TPMsettings/TPMsettings'; - -import TPMChallengeComponent from './TPMChallengeContainer' -import TPMPropaedeuticsComponent from './TPMPropaedeuticsComponent' -import TPMRanking_listComponent from './TPMRanking_listContainer' -import TPMCollaboratorsComponent from './TPMCollaboratorsContainer' - -import '../page/tpiPage.css' -//任务 -// const TPMChallengeComponent = Loadable({ -// loader: () => import('./TPMChallengeContainer'), -// loading: Loading, -// }) - -//背景知识 -// const TPMPropaedeuticsComponent = Loadable({ -// loader: () => import('./TPMPropaedeuticsComponent'), -// loading: Loading, -// }) - -//版本库 -// const TPMRepositoryComponent = Loadable({ -// loader: () => import('./TPMRepositoryComponent'), -// loading: Loading, -// }) - -// const TPMRepositoryComponent = Loadable({ -// loader: () => import('./TPMRepositoryComponent'), -// loading: Loading, -// }) - -//合作 -// const TPMCollaboratorsComponent = Loadable({ -// loader: () => import('./TPMCollaboratorsContainer'), -// loading: Loading, -// }) - - -//评论 -// const TPMShixunDiscussComponent = Loadable({ -// loader: () => import('./TPMShixunDiscussContainer'), -// loading: Loading, -// }) - -//排行版 -// const TPMRanking_listComponent = Loadable({ -// loader: () => import('./TPMRanking_listContainer'), -// loading: Loading, -// }) - -// //编辑实训 -// const TPMModifysettings = Loadable({ -// loader: () =>import('./modules/tpm/TPMsettings/TPMsettings'), -// loading: Loading, -// }) - -//新建实训 -const TPMchallengesnew = Loadable({ - loader: () => import('./challengesnew/TPMchallengesnew'), - loading: Loading, -}) - -//新建tab2 -const TPMevaluation = Loadable({ - loader: () => import('./challengesnew/TPMevaluation'), - loading: Loading, -}) - -//新建tab3答案 -// const TPManswer = Loadable({ -// loader: () => import('./challengesnew/TPManswer'), -// loading: Loading, -// }) -const TPManswer = Loadable({ - loader: () => import('./challengesnew/TPManswer2'), - loading: Loading, -}) - -//选择题 -const TPMquestion = Loadable({ - loader: () => import('./challengesnew/TPMquestion'), - loading: Loading, -}) - -//fork列表 -const TPMFork_listComponent = Loadable({ - loader: () => import('./TPMFork/TPMForklist'), - loading: Loading, -}) -//背景知识修改 -const TPMUpdatepropaede = Loadable({ - loader: () => import('./TPMUpdatepropaede/TPMUpdatepropaede'), - loading: Loading, -}) - - -const interceptorUrlArray = ['repository.json', 'commits.json', 'propaedeutics.json' - , 'challenges.json', 'discusses.json', 'ranking_list.json', 'collaborators.json'] -const cacheInterceptorUrlMap = {} -class TPMIndex extends Component { - constructor(props) { - super(props) - this.state = { - loadingContent: false, - power: false, - shixunsDetails: {}, - shixunId: undefined, - star_info: [0, 0, 0, 0, 0, 0], - star_infos: [0, 0, 0, 0, 0, 0], - identity:undefined, - TPMRightSectionData:undefined, - PropaedeuticsList: undefined, - } - } - - componentDidMount = () => { - - let id = this.props.match.params.shixunId; - - // let collaborators = `/shixuns/` + id + `/propaedeutics.json`; - // - // axios.get(collaborators).then((response) => { - // if (response.status === 200) { - // if (response.data.status === 403||response.data.status === 401||response.data.status === 500) { - // - // }else{ - // this.setState({ - // PropaedeuticsList: response.data, - // shixunId: id - // }); - // } - // - // } - // }).catch((error) => { - // console.log(error) - // }); - - let Url = `/shixuns/` + id + `.json`; - axios.get(Url).then((response) => { - if (response.status === 200) { - document.title=response.data.name; - let newstar_info = []; - // let start1= - for (var i = 0; i < response.data.score_info.length; i++) { - - if (i === 0) { - newstar_info.push(response.data.score_info[i]) - } else { - newstar_info.push((response.data.score_info[i] / 100) * 5) - } - } - let newstar_infos = response.data.score_info; - this.setState({ - shixunsDetails: response.data, - shixunId: id, - star_info: newstar_info, - star_infos: newstar_infos, - power: response.data.power, - identity: response.data.identity, - propaedeutics:response.data.propaedeutics, - status: response.data.status, - }); - } - }).catch((error) => { - this.setState({ - shixunsDetails: undefined, - shixunId: undefined, - star_info: undefined, - star_infos: undefined, - power: undefined, - identity: undefined, - status: undefined, - propaedeutics:undefined - }); - }); - - this.tpmContentRequestInterceptor = axios.interceptors.request.use((config) => { - let url = config.url; - // console.log('tpmContentRequestInterceptor:', url) - for ( let i = 0; i < interceptorUrlArray.length; i++ ) { - if (url.indexOf(interceptorUrlArray[i]) != -1) { - url = url.split('?')[0] - console.log('loadingContent, url:', url) - - this.setState({ loadingContent: true }) - - cacheInterceptorUrlMap[url] = true - } - } - return config; - }, function (error) { - return Promise.reject(error); - }); - - // Add a response interceptor - this.tpmContentResponseInterceptor = axios.interceptors.response.use((response) => { - // console.log('loadingContent finished, url:', response.config.url) - // TODO 依赖了api这个前缀 - let url = response.config.url.split('api')[1]; - url = url.split('?')[0] - if (cacheInterceptorUrlMap[url]) { - - this.setState({ loadingContent: false }) - delete cacheInterceptorUrlMap[response.url] - } - return response; - }, function (error) { - // Do something with response error - return Promise.reject(error); - }); - - - //右侧数据 - let shixunsDetailsURL=`/shixuns/`+id+`/show_right.json`; - axios.get(shixunsDetailsURL).then((response)=> { - this.setState({ - TPMRightSectionData: response.data - }); - }) - - } - componentWillUnmount = () => { - axios.interceptors.request.eject(this.tpmContentRequestInterceptor); - this.tpmContentRequestInterceptor = null; - axios.interceptors.request.eject(this.tpmContentResponseInterceptor); - this.tpmContentResponseInterceptor = null; - } - - - setLoadingContent = (isLoadingContent) => { - this.setState({ loadingContent: isLoadingContent }) - } - - // TpmTPMBannertype(type){ - // - // } - - render() { - - return ( -
    - - - - - - () - }> - - () - }> - - () - }> - {/* */} - - () - }> - - - () - }> - - - {/* */} - - - (this.initForumState(data)} - setSearchValue={this.setSearchValue} - setHotLabelIndex={this.setHotLabelIndex} - />) - }> - - - () - }> - - - () - }> - - () - }> - - () - }> - - {/*评测设置*/} - () - }> - - - {/*参考答案*/} - () - }> - - {/*新建关卡*/} - () - }> - - {/*编辑关卡*/} - () - }> - - {/*新建选择题*/} - () - }> - - {/*修改选择题*/} - () - }> - - {/*修改选择题*/} - () - }> - - () - }> - - - {/**/} - - -
    - ); - } -} - -export default SnackbarHOC() (TPMIndexHOC ( TPMIndex )); +import React, { Component } from 'react'; + +import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; + +import Loading from '../../Loading'; + +import Loadable from 'react-loadable'; + +import { TPMIndexHOC } from './TPMIndexHOC'; + +import { SnackbarHOC } from 'educoder'; + +import TPMBanner from './TPMBanner'; + +import axios from 'axios'; + +import TPMShixunDiscussContainer from './TPMShixunDiscussContainer'; + +import TPMRepositoryComponent from './TPMRepositoryComponent'; + +import TPMRepositoryCommits from './shixunchild/Repository/TPMRepositoryCommits'; + +import TPMsettings from './TPMsettings/TPMsettings'; + +import TPMChallengeComponent from './TPMChallengeContainer' +import TPMPropaedeuticsComponent from './TPMPropaedeuticsComponent' +import TPMRanking_listComponent from './TPMRanking_listContainer' +import TPMCollaboratorsComponent from './TPMCollaboratorsContainer' + +import '../page/tpiPage.css' +//任务 +// const TPMChallengeComponent = Loadable({ +// loader: () => import('./TPMChallengeContainer'), +// loading: Loading, +// }) + +//背景知识 +// const TPMPropaedeuticsComponent = Loadable({ +// loader: () => import('./TPMPropaedeuticsComponent'), +// loading: Loading, +// }) + +//版本库 +// const TPMRepositoryComponent = Loadable({ +// loader: () => import('./TPMRepositoryComponent'), +// loading: Loading, +// }) + +// const TPMRepositoryComponent = Loadable({ +// loader: () => import('./TPMRepositoryComponent'), +// loading: Loading, +// }) + +//合作 +// const TPMCollaboratorsComponent = Loadable({ +// loader: () => import('./TPMCollaboratorsContainer'), +// loading: Loading, +// }) + + +//评论 +// const TPMShixunDiscussComponent = Loadable({ +// loader: () => import('./TPMShixunDiscussContainer'), +// loading: Loading, +// }) + +//排行版 +// const TPMRanking_listComponent = Loadable({ +// loader: () => import('./TPMRanking_listContainer'), +// loading: Loading, +// }) + +// //编辑实训 +// const TPMModifysettings = Loadable({ +// loader: () =>import('./modules/tpm/TPMsettings/TPMsettings'), +// loading: Loading, +// }) + +//新建实训 +const TPMchallengesnew = Loadable({ + loader: () => import('./challengesnew/TPMchallengesnew'), + loading: Loading, +}) + +//新建tab2 +const TPMevaluation = Loadable({ + loader: () => import('./challengesnew/TPMevaluation'), + loading: Loading, +}) + +//新建tab3答案 +// const TPManswer = Loadable({ +// loader: () => import('./challengesnew/TPManswer'), +// loading: Loading, +// }) +const TPManswer = Loadable({ + loader: () => import('./challengesnew/TPManswer2'), + loading: Loading, +}) + +//选择题 +const TPMquestion = Loadable({ + loader: () => import('./challengesnew/TPMquestion'), + loading: Loading, +}) + +//fork列表 +const TPMFork_listComponent = Loadable({ + loader: () => import('./TPMFork/TPMForklist'), + loading: Loading, +}) +//背景知识修改 +const TPMUpdatepropaede = Loadable({ + loader: () => import('./TPMUpdatepropaede/TPMUpdatepropaede'), + loading: Loading, +}) + + +const interceptorUrlArray = ['repository.json', 'commits.json', 'propaedeutics.json' + , 'challenges.json', 'discusses.json', 'ranking_list.json', 'collaborators.json'] +const cacheInterceptorUrlMap = {} +class TPMIndex extends Component { + constructor(props) { + super(props) + this.state = { + loadingContent: false, + power: false, + shixunsDetails: {}, + shixunId: undefined, + star_info: [0, 0, 0, 0, 0, 0], + star_infos: [0, 0, 0, 0, 0, 0], + identity:undefined, + TPMRightSectionData:undefined, + PropaedeuticsList: undefined, + } + } + + componentDidMount = () => { + + let id = this.props.match.params.shixunId; + + // let collaborators = `/shixuns/` + id + `/propaedeutics.json`; + // + // axios.get(collaborators).then((response) => { + // if (response.status === 200) { + // if (response.data.status === 403||response.data.status === 401||response.data.status === 500) { + // + // }else{ + // this.setState({ + // PropaedeuticsList: response.data, + // shixunId: id + // }); + // } + // + // } + // }).catch((error) => { + // console.log(error) + // }); + + let Url = `/shixuns/` + id + `.json`; + axios.get(Url).then((response) => { + if (response.status === 200) { + document.title=response.data.name; + let newstar_info = []; + // let start1= + for (var i = 0; i < response.data.score_info.length; i++) { + + if (i === 0) { + newstar_info.push(response.data.score_info[i]) + } else { + newstar_info.push((response.data.score_info[i] / 100) * 5) + } + } + let newstar_infos = response.data.score_info; + this.setState({ + shixunsDetails: response.data, + shixunId: id, + star_info: newstar_info, + star_infos: newstar_infos, + power: response.data.power, + identity: response.data.identity, + propaedeutics:response.data.propaedeutics, + status: response.data.status, + }); + } + }).catch((error) => { + this.setState({ + shixunsDetails: undefined, + shixunId: undefined, + star_info: undefined, + star_infos: undefined, + power: undefined, + identity: undefined, + status: undefined, + propaedeutics:undefined + }); + }); + + this.tpmContentRequestInterceptor = axios.interceptors.request.use((config) => { + let url = config.url; + // console.log('tpmContentRequestInterceptor:', url) + for ( let i = 0; i < interceptorUrlArray.length; i++ ) { + if (url.indexOf(interceptorUrlArray[i]) != -1) { + url = url.split('?')[0] + console.log('loadingContent, url:', url) + + this.setState({ loadingContent: true }) + + cacheInterceptorUrlMap[url] = true + } + } + return config; + }, function (error) { + return Promise.reject(error); + }); + + // Add a response interceptor + this.tpmContentResponseInterceptor = axios.interceptors.response.use((response) => { + // console.log('loadingContent finished, url:', response.config.url) + // TODO 依赖了api这个前缀 + let url = response.config.url.split('api')[1]; + url = url.split('?')[0] + if (cacheInterceptorUrlMap[url]) { + + this.setState({ loadingContent: false }) + delete cacheInterceptorUrlMap[response.url] + } + return response; + }, function (error) { + // Do something with response error + return Promise.reject(error); + }); + + + //右侧数据 + let shixunsDetailsURL=`/shixuns/`+id+`/show_right.json`; + axios.get(shixunsDetailsURL).then((response)=> { + this.setState({ + TPMRightSectionData: response.data + }); + }) + + } + componentWillUnmount = () => { + axios.interceptors.request.eject(this.tpmContentRequestInterceptor); + this.tpmContentRequestInterceptor = null; + axios.interceptors.request.eject(this.tpmContentResponseInterceptor); + this.tpmContentResponseInterceptor = null; + } + + + setLoadingContent = (isLoadingContent) => { + this.setState({ loadingContent: isLoadingContent }) + } + + // TpmTPMBannertype(type){ + // + // } + + render() { + + return ( +
    + + + + + + () + }> + + () + }> + + () + }> + {/* */} + + () + }> + + + () + }> + + + {/* */} + + + (this.initForumState(data)} + setSearchValue={this.setSearchValue} + setHotLabelIndex={this.setHotLabelIndex} + />) + }> + + + () + }> + + + () + }> + + () + }> + + () + }> + + {/*评测设置*/} + () + }> + + + {/*参考答案*/} + () + }> + + {/*新建关卡*/} + () + }> + + {/*编辑关卡*/} + () + }> + + {/*新建选择题*/} + () + }> + + {/*修改选择题*/} + () + }> + + {/*修改选择题*/} + () + }> + + () + }> + + + {/**/} + + +
    + ); + } +} + +export default SnackbarHOC() (TPMIndexHOC ( TPMIndex )); diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js index 78010d11a..938f1b81a 100644 --- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js +++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js @@ -652,15 +652,15 @@ export default class TPMsettings extends Component { return } } - if (exec_time === "") { - this.setState({ - exec_timetype: true - }) - $('html').animate({ - scrollTop: 1500 - }, 1000); - return - } + // if (exec_time === "") { + // this.setState({ + // exec_timetype: true + // }) + // $('html').animate({ + // scrollTop: 1500 + // }, 1000); + // return + // } // if (!pod_exist_time) { // this.setState({ @@ -1468,21 +1468,21 @@ export default class TPMsettings extends Component {
  • -
    - * + {/*
    */} + {/***/} -

    程序最大执行时间

    + {/*

    程序最大执行时间

    */} - + {/* 秒*/} -
    - 必填项 -
    -
    + {/*
    */} + {/*必填项*/} + {/*
    */} + {/*
    */} {/*
    * diff --git a/public/react/src/modules/tpm/shixuns/ShixunsIndex.js b/public/react/src/modules/tpm/shixuns/ShixunsIndex.js index 3f1f7e9e8..2eab88053 100644 --- a/public/react/src/modules/tpm/shixuns/ShixunsIndex.js +++ b/public/react/src/modules/tpm/shixuns/ShixunsIndex.js @@ -360,9 +360,7 @@ class ShixunsIndex extends Component { return (
    - - {/*懒加载*/} - + {/**/} - - + {/**/}
    ); }