diff --git a/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js b/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js index 051fbd32a..d8b0da921 100644 --- a/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js +++ b/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js @@ -308,6 +308,7 @@ class ShixunWorkModal extends Component{ }
{onChangetype===true?"清除":"全选"} + 有效作品都为0
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 2fc6e1c3c..7e40b9edd 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -806,11 +806,11 @@ submittojoinclass=(value)=>{ <%= link_to '注册', user_join_path, :className => "ml5" %> */} { user===undefined? - + this.educoderlogin()} className="mr5 color-white">登录 注册 - :user.login===""? + :user.login===""? this.educoderlogin()} className="mr5 color-white">登录 注册 diff --git a/public/react/src/modules/tpm/challengesnew/TPMchallengesnew.js b/public/react/src/modules/tpm/challengesnew/TPMchallengesnew.js index 1dd042605..cc3d335bb 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMchallengesnew.js +++ b/public/react/src/modules/tpm/challengesnew/TPMchallengesnew.js @@ -250,7 +250,7 @@ export default class TPMchallengesnew extends Component { // }) } - this.props.showSnackbar(response.data.messages); + // this.props.showSnackbar(response.data.messages); }).catch((error) => { console.log(error) }); diff --git a/public/react/src/modules/tpm/challengesnew/TPMevaluation.js b/public/react/src/modules/tpm/challengesnew/TPMevaluation.js index 16c7cfedf..3c7bbaced 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMevaluation.js +++ b/public/react/src/modules/tpm/challengesnew/TPMevaluation.js @@ -124,7 +124,8 @@ export default class TPMevaluation extends Component { handpathopt:false, scorevalue:false, markvalue:true, - scoretype:undefined + scoretype:undefined, + web_route:null } } @@ -215,6 +216,7 @@ export default class TPMevaluation extends Component { position: response.data.position, //int 关卡位置,导航栏中的第几关 scorevalue:response.data.test_set_score, markvalue:response.data.test_set_average, + web_route:response.data.web_route }) this.evaluationoninputvalueonload(); if(response.data.power===false){ @@ -579,7 +581,7 @@ export default class TPMevaluation extends Component { $('textarea[autoHeight]').autoHeight(); } submitarbitrationevaluation=()=>{ - let{evaluationlist,shixunfilepath,shixunfilepathplay,shixunfileexpectpicturepath,shixunfilestandardpicturepath,shixunfilepicturepath,pathoptionvalue,scorevalue,markvalue}=this.state; + let{evaluationlist,shixunfilepath,shixunfilepathplay,shixunfileexpectpicturepath,shixunfilestandardpicturepath,shixunfilepicturepath,pathoptionvalue,scorevalue,markvalue,web_route}=this.state; let newscorevalue; @@ -647,7 +649,8 @@ export default class TPMevaluation extends Component { expect_picture_path:shixunfilestandardpicturepath, picture_path:shixunfilepicturepath, test_set_score:newscorevalue, - test_set_average:markvalue + test_set_average:markvalue, + web_route:web_route===null?undefined:web_route }, test_set:evaluationlist } @@ -741,6 +744,12 @@ export default class TPMevaluation extends Component { }); } + + updatewebroute=(e)=>{ + this.setState({ + web_route:e.target.value + }) + } render() { let { @@ -768,7 +777,7 @@ export default class TPMevaluation extends Component { next_challenge, StudentTaskPapers, StudentTaskDocs, - handpathopt, + web_route, scorevalue, markvalue, scoretype @@ -978,6 +987,20 @@ export default class TPMevaluation extends Component {
+ {pathoptionvalue===4&&web_route!=null?
+
+

Web路由

+
+
+ this.updatewebroute(e)} + placeholder="网站类型实训,请填写Web路由地址。例:java/mypage"/> +
+
+
+
:""} {pathoptionvalue===1||pathoptionvalue===5||pathoptionvalue===6?
diff --git a/public/react/src/modules/tpm/shixuns/ShixunCardList.js b/public/react/src/modules/tpm/shixuns/ShixunCardList.js index 2125eecea..078016057 100644 --- a/public/react/src/modules/tpm/shixuns/ShixunCardList.js +++ b/public/react/src/modules/tpm/shixuns/ShixunCardList.js @@ -1,251 +1,253 @@ -import React, { Component } from 'react'; -import { Redirect } from 'react-router'; - -import { BrowserRouter as Router, Route} from "react-router-dom"; - -import { Switch ,Input,Tooltip,Icon} from 'antd'; - -import PropTypes from 'prop-types'; - -import classNames from 'classnames' - -import 'antd/lib/switch/style/index.css' - -import './shixunCss/ShixunCardList.css'; - -import { on, off } from 'educoder' - -const $ = window.$; - -const Search = Input.Search; - -class ShixunCardList extends Component { - - constructor(props) { - super(props); - this.state={ - allevent:"desc", - mine:0, - InputValue: props.keyword || "", - typemy:0, - hots:0, - news:0, - shixunid:"", - upcircle:false, - typekeyid:undefined, - } - } - - componentDidUpdate = (prevProps, prevState) => { - if (this.props.keyword != prevProps.keyword) { - this.setState({ - InputValue: this.props.keyword - }) - } - } - componentDidMount = () => { - on('searchKeywordChange', (event, data) => { - // console.log(data) - this.Input_search(data) - }) - } - componentWillUnmount = () => { - off('searchKeywordChange') - } - - - latestHot=(e,key)=>{ - - let{upcircle,typekeyid}=this.state; - - let id = e.target.id; - $("#"+id).siblings().removeClass("active"); - $("#"+id).addClass("active"); - - let type; - - if(id==="all"){ - type="publish_time"; - } - if(id==="hot"){ - type="hot"; - }else if(id==="new"){ - type="new"; - - } - if(typekeyid===key){ - if(upcircle===true){ - this.setState({ - upcircle:false, - }) - this.props.Shixunsupcircles("desc") - }else if(upcircle===false){ - this.setState({ - upcircle:true, - }) - this.props.Shixunsupcircles("asc") - } - }else{ - this.setState({ - typekeyid:key - }) - } - - //allevent - this.props.ShixunsState(false,type); - } - - - onSwitchChange=(e,key)=>{ - let id=e.target.id - $("#"+id).siblings().removeClass("active"); - $("#"+id).addClass("active"); - let {typemy,upcircle,typekeyid}=this.state; - - if(typekeyid===key){ - if(upcircle===true){ - this.setState({ - upcircle:false, - }) - this.props.Shixunsupcircles("desc") - }else if(upcircle===false){ - this.setState({ - upcircle:true - }) - this.props.Shixunsupcircles("asc") - } - }else{ - this.setState({ - typekeyid:key - }) - } - - - if(typemy===0){ - this.setState({ - typemy:1 - }) - }else{ - this.setState({ - typemy:0 - }) - } - // allevent - this.props.ShixunsSwitch(); - } - //输入框搜索 - Input_search = (value) => { - this.setState({ - InputValue: value - }) - this.props.OnSearchInput(value,true); - } - - Input_searchs = (e) => { - this.setState({ - InputValue: e.target.value - }) - this.props.OnSearchInput(e.target.value,false); - } - upcircles=(val)=>{ - if(val==="asc"){ - this.setState({ - upcircle:false, - }) - this.props.Shixunsupcircles("desc") - }else if(val==="desc"){ - this.setState({ - upcircle:true - }) - this.props.Shixunsupcircles("asc") - } - } - render(){ - let {mine,InputValue,upcircle}=this.state; - return ( -
-
- -
this.latestHot(e,1)}>全部 -
-
this.onSwitchChange(e,2)}>我的 -
- -
this.latestHot(e,3)}>最热 -
-
this.latestHot(e,4)}>最新 -
- -
this.upcircles("asc")} - > - - - {/**/} - -
-
this.upcircles("desc")} - style={{display:upcircle===true?"none":"block"}} - > - - - {/**/} - -
- -
- {/* this.Input_search(value)}*/} - {/*enterButton*/} - {/*/>*/} - - {/* this.Input_search(value)} - autoComplete="off" - > */} -
-
- { - this.props.search_tags === null ? "" : this.props.search_tags - } - {/*
*/} - {/*/!*
*/} - {/* *!/*/} - {/**/} - {/*
*/} - {/*隐藏我的*/} - -
- -
-
- ); - } -} - -export default ShixunCardList; +import React, { Component } from 'react'; +import { Redirect } from 'react-router'; + +import { BrowserRouter as Router, Route} from "react-router-dom"; + +import { Switch ,Input,Tooltip,Icon} from 'antd'; + +import PropTypes from 'prop-types'; + +import classNames from 'classnames' + +import 'antd/lib/switch/style/index.css' + +import './shixunCss/ShixunCardList.css'; + +import { on, off } from 'educoder' + +const $ = window.$; + +const Search = Input.Search; + +class ShixunCardList extends Component { + + constructor(props) { + super(props); + this.state={ + allevent:"desc", + mine:0, + InputValue: props.keyword || "", + typemy:0, + hots:0, + news:0, + shixunid:"", + upcircle:false, + typekeyid:undefined, + } + } + + componentDidUpdate = (prevProps, prevState) => { + if (this.props.keyword != prevProps.keyword) { + this.setState({ + InputValue: this.props.keyword + }) + } + } + componentDidMount = () => { + on('searchKeywordChange', (event, data) => { + // console.log(data) + this.Input_search(data) + }) + } + componentWillUnmount = () => { + off('searchKeywordChange') + } + + + latestHot=(e,key)=>{ + + let{upcircle,typekeyid}=this.state; + + let id = e.target.id; + $("#"+id).siblings().removeClass("active"); + $("#"+id).addClass("active"); + + let type; + + if(id==="all"){ + type="publish_time"; + } + if(id==="hot"){ + type="hot"; + }else if(id==="new"){ + type="new"; + + } + if(typekeyid===key){ + if(upcircle===true){ + this.setState({ + upcircle:false, + }) + this.props.Shixunsupcircles("desc") + }else if(upcircle===false){ + this.setState({ + upcircle:true, + }) + this.props.Shixunsupcircles("asc") + } + }else{ + this.setState({ + typekeyid:key + }) + } + + //allevent + this.props.ShixunsState(false,type); + } + + + onSwitchChange=(e,key)=>{ + let id=e.target.id + $("#"+id).siblings().removeClass("active"); + $("#"+id).addClass("active"); + let {typemy,upcircle,typekeyid}=this.state; + + if(typekeyid===key){ + if(upcircle===true){ + this.setState({ + upcircle:false, + }) + this.props.Shixunsupcircles("desc") + }else if(upcircle===false){ + this.setState({ + upcircle:true + }) + this.props.Shixunsupcircles("asc") + } + }else{ + this.setState({ + typekeyid:key + }) + } + + + if(typemy===0){ + this.setState({ + typemy:1 + }) + }else{ + this.setState({ + typemy:0 + }) + } + // allevent + this.props.ShixunsSwitch(); + } + //输入框搜索 + Input_search = (value) => { + this.setState({ + InputValue: value + }) + this.props.OnSearchInput(value,true); + } + + Input_searchs = (e) => { + this.setState({ + InputValue: e.target.value + }) + this.props.OnSearchInput(e.target.value,false); + } + upcircles=(val)=>{ + if(val==="asc"){ + this.setState({ + upcircle:false, + }) + this.props.Shixunsupcircles("desc") + }else if(val==="desc"){ + this.setState({ + upcircle:true + }) + this.props.Shixunsupcircles("asc") + } + } + render(){ + let {mine,InputValue,upcircle}=this.state; + return ( +
+
+ +
this.latestHot(e,1)}>全部 +
+
this.onSwitchChange(e,2)}>我的 +
+ +
this.latestHot(e,4)}>最新 +
+ +
this.latestHot(e,3)}>最热 +
+ + +
this.upcircles("asc")} + > + + + {/**/} + +
+
this.upcircles("desc")} + style={{display:upcircle===true?"none":"block"}} + > + + + {/**/} + +
+ +
+ {/* this.Input_search(value)}*/} + {/*enterButton*/} + {/*/>*/} + + {/* this.Input_search(value)} + autoComplete="off" + > */} +
+
+ { + this.props.search_tags === null ? "" : this.props.search_tags + } + {/*
*/} + {/*/!*
*/} + {/* *!/*/} + {/**/} + {/*
*/} + {/*隐藏我的*/} + +
+ +
+
+ ); + } +} + +export default ShixunCardList;