hjm 5 years ago
commit 2f1f80f7b4

@ -258,7 +258,7 @@ class App extends Component {
<MuiThemeProvider theme={theme}> <MuiThemeProvider theme={theme}>
<LoginDialog></LoginDialog> <LoginDialog {...this.props} {...this.state}></LoginDialog>
{/*{*/} {/*{*/}
{/* isRender === true?*/} {/* isRender === true?*/}
{/* <LoginDialog></LoginDialog> : ""*/} {/* <LoginDialog></LoginDialog> : ""*/}

@ -27,8 +27,8 @@ window.__useKindEditor = false;
const render = (Component) => { const render = (Component) => {
ReactDOM.render( ReactDOM.render(
<AppContainer> <AppContainer {...this.props} {...this.state}>
<Component /> <Component {...this.props} {...this.state}/>
</AppContainer>, </AppContainer>,
document.getElementById('root') document.getElementById('root')
); );

@ -825,6 +825,7 @@ a.white-btn.use_scope-btn:hover{
.summaryname{ .summaryname{
/*height: 23px;*/ /*height: 23px;*/
font-size: 22px; font-size: 22px;
height: 25px;
font-family: MicrosoftYaHei; font-family: MicrosoftYaHei;
font-weight: 400; font-weight: 400;
color: rgba(51,51,51,1); color: rgba(51,51,51,1);

@ -130,7 +130,7 @@ class Testpapersettinghomepage extends Component{
}) })
} }
}else { }else {
window.open(url, '_blank'); window.open("/api"+url, '_blank');
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -290,9 +290,9 @@ class Testpapersettinghomepage extends Component{
{isAdmin === true? <li className="li_line drop_down fr color-blue font-15" style={{"paddingLeft":"0px"}}> {isAdmin === true? <li className="li_line drop_down fr color-blue font-15" style={{"paddingLeft":"0px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a onClick={()=>this.experiment(`/api/exercises/${this.props.match.params.Id}/exercise_lists.xlsx`)}>学生成绩</a></li> <li><a onClick={()=>this.experiment(`/exercises/${this.props.match.params.Id}/exercise_lists.xlsx`)}>学生成绩</a></li>
<li><a onClick={()=>this.experiment(`/api/exercises/${this.props.match.params.Id}/export_exercise`)} >空白试卷</a></li> <li><a onClick={()=>this.experiment(`/exercises/${this.props.match.params.Id}/export_exercise`)} >空白试卷</a></li>
<li><a onClick={()=>this.experiment(`/api/zip/export_exercises?exercise_id=${this.props.match.params.Id}${this.state.groupyslsval}`)}>学生答题试卷</a></li> <li><a onClick={()=>this.experiment(`/zip/export_exercises?exercise_id=${this.props.match.params.Id}${this.state.groupyslsval}`)}>学生答题试卷</a></li>
</ul> </ul>
</li>:""} </li>:""}
</div> </div>

@ -633,6 +633,7 @@ class Listofworks extends Component {
// 获取作品列表 // 获取作品列表
Getalistofworks = (homeworkid) => { Getalistofworks = (homeworkid) => {
// console.log("获取作品列表");7009 // console.log("获取作品列表");7009
let urll = `/homework_commons/${homeworkid}/works_list.json`; let urll = `/homework_commons/${homeworkid}/works_list.json`;
// console.log(homeworkid); // console.log(homeworkid);
@ -651,6 +652,8 @@ class Listofworks extends Component {
limit:20, limit:20,
} }
axios.post(urll, data).then((result) => { axios.post(urll, data).then((result) => {
if(this.props.isNotMember()===false){
if (result !== undefined) { if (result !== undefined) {
// console.log(url) // console.log(url)
// console.log("作品列表6789077") // console.log("作品列表6789077")
@ -669,7 +672,7 @@ class Listofworks extends Component {
challenges_count:result.data.challenges_count, challenges_count:result.data.challenges_count,
}) })
this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1); this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1);
} } }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
this.setState({ this.setState({
@ -712,6 +715,7 @@ class Listofworks extends Component {
// console.log(url) // console.log(url)
// console.log("作品列表______________________") // console.log("作品列表______________________")
// console.log(JSON.stringify(result)) // console.log(JSON.stringify(result))
if(this.props.isNotMember()===false){
if (result !== undefined) { if (result !== undefined) {
this.setState({ this.setState({
teacherdata: result.data, teacherdata: result.data,
@ -728,7 +732,7 @@ class Listofworks extends Component {
}) })
this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page); this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page);
} }
}
// } // }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -738,6 +742,7 @@ class Listofworks extends Component {
}) })
} }
TablePagination = (e) => { TablePagination = (e) => {
@ -1359,7 +1364,7 @@ class Listofworks extends Component {
}) })
} }
}else { }else {
window.open(url, '_blank'); window.open("/api"+url, '_blank');
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -1455,7 +1460,7 @@ class Listofworks extends Component {
typs={this.state.typs} typs={this.state.typs}
/> />
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<div className="educontent mb30"> <div className="educontent mb20">
<p className="clearfix mb20 mt10"> <p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue " <ActionBtn className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn> to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
@ -1467,7 +1472,7 @@ class Listofworks extends Component {
<WordsBtn className="fl">作业详情</WordsBtn> <WordsBtn className="fl">作业详情</WordsBtn>
</p> </p>
</div> </div>
<div className="educontent mb30"> <div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth:"33px"}}> <p className=" fl color-black summaryname" style={{heigth:"33px"}}>
{teacherdata === undefined ? "" : teacherdata.homework_name} {teacherdata === undefined ? "" : teacherdata.homework_name}
</p> </p>

@ -294,7 +294,9 @@ class Listofworksstudentone extends Component {
course_group: "", course_group: "",
} }
axios.post(urll, data).then((result) => { axios.post(urll, data).then((result) => {
if (result.status === 200) { if (result.status === 200) {
if(this.props.isNotMember()===false) {
this.setState({ this.setState({
teacherdata: result.data, teacherdata: result.data,
task_status: result.data.task_status, task_status: result.data.task_status,
@ -316,6 +318,8 @@ class Listofworksstudentone extends Component {
} }
} }
}
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}) })
@ -703,6 +707,7 @@ class Listofworksstudentone extends Component {
if (result !== undefined) { if (result !== undefined) {
// console.log("学生公开的作品列表") // console.log("学生公开的作品列表")
// console.log(JSON.stringify(result)) // console.log(JSON.stringify(result))
if(this.props.isNotMember()===false) {
this.setState({ this.setState({
teacherdata: result.data, teacherdata: result.data,
task_status: result.data.task_status, task_status: result.data.task_status,
@ -719,6 +724,7 @@ class Listofworksstudentone extends Component {
}) })
this.seacthdata(result.data); this.seacthdata(result.data);
} }
}
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
this.setState({ this.setState({

@ -479,7 +479,7 @@ class ShixunStudentWork extends Component {
}) })
} }
}else { }else {
window.open(url, '_blank'); window.open("/api"+url, '_blank');
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -609,8 +609,8 @@ class ShixunStudentWork extends Component {
typs={this.state.typs} typs={this.state.typs}
/> />
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<div className="educontent mb25"> <div className="educontent mb20">
<p className="clearfix mb25 mt5"> <p className="clearfix mb20 mt5">
<ActionBtn className=" btn colorgrey fl hovercolorblue mt5" <ActionBtn className=" btn colorgrey fl hovercolorblue mt5"
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn> to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
{/*<ActionBtn className="btn colorgrey fl hovercolorblue" href={"/courses/"+data.course_id+"/students"}>{data.course_name}</ActionBtn>*/} {/*<ActionBtn className="btn colorgrey fl hovercolorblue" href={"/courses/"+data.course_id+"/students"}>{data.course_name}</ActionBtn>*/}
@ -624,7 +624,7 @@ class ShixunStudentWork extends Component {
<ActionBtn className="fl">作业详情</ActionBtn> <ActionBtn className="fl">作业详情</ActionBtn>
</p> </p>
</div> </div>
<div className="educontent mb30"> <div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth:"33px"}}> <p className=" fl color-black summaryname" style={{heigth:"33px"}}>
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name} {jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
</p> </p>

@ -52,7 +52,7 @@ class ShixunWorkReport extends Component {
}) })
} }
}else { }else {
window.open(url, '_blank'); window.open("/api"+url, '_blank');
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)

@ -959,6 +959,14 @@ class Trainingjobsetting extends Component {
this.setState({ this.setState({
latedeductiontwo: value, latedeductiontwo: value,
}) })
//均分比例
if(this.state.proportion==="均分比例"){
this.Equalproportion();
}else if(this.state.proportion==="经验值比例"){
this.Empiricalvalueratio();
}
} }
@ -1630,7 +1638,7 @@ class Trainingjobsetting extends Component {
}) })
} }
}else { }else {
window.open(url, '_blank'); window.open("/api"+url, '_blank');
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -1711,7 +1719,7 @@ class Trainingjobsetting extends Component {
modalSave={modalSave} modalSave={modalSave}
></Modals> ></Modals>
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<div className="educontent mb30"> <div className="educontent mb20">
<p className="clearfix mb20 mt10"> <p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue " <ActionBtn className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn> to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
@ -1724,7 +1732,7 @@ class Trainingjobsetting extends Component {
</p> </p>
</div> </div>
<div className="educontent mb30"> <div className="educontent mb20">
<p className=" fl color-black summaryname mt5" style={{heigth:"33px"}}> <p className=" fl color-black summaryname mt5" style={{heigth:"33px"}}>
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name} {jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}

@ -333,7 +333,7 @@ class Workquestionandanswer extends Component {
}) })
} }
}else { }else {
window.open(url, '_blank'); window.open("/api"+url, '_blank');
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -400,7 +400,7 @@ class Workquestionandanswer extends Component {
typs={this.state.typs} typs={this.state.typs}
/> />
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<div className="educontent mb30"> <div className="educontent mb20">
<p className="clearfix mb20 mt10"> <p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue " <ActionBtn className=" btn colorgrey fl hovercolorblue "
to={"/courses/" + this.props.match.params.coursesId + "/students"}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn> to={"/courses/" + this.props.match.params.coursesId + "/students"}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
@ -412,7 +412,7 @@ class Workquestionandanswer extends Component {
<WordsBtn className="fl">作业详情</WordsBtn> <WordsBtn className="fl">作业详情</WordsBtn>
</p> </p>
</div> </div>
<div className="educontent mb30"> <div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth:"33px"}}> <p className=" fl color-black summaryname" style={{heigth:"33px"}}>
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name} {jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
</p> </p>

@ -116,9 +116,9 @@ class EducoderLogin extends Component {
}) })
} else if(e===2) { } else if(e===2) {
this.setState({ this.setState({
showbool: 2,
namezh:name, namezh:name,
passmm:pass, passmm:pass,
showbool: 2,
}) })
}else if(e===3){ }else if(e===3){
this.setState({ this.setState({

@ -317,7 +317,9 @@ class LoginDialog extends Component {
}); });
} }
handleDialogClose = () => { handleDialogClose = () => {
if(this.props.match.path==="/"){ if(this.props.match===undefined){
window.location.href="/";
}else if(this.props.match.path==="/"){
this.setState({ this.setState({
isRender: false isRender: false
}) })

@ -25,7 +25,7 @@ class ShixunSearchBar extends Component {
super(props) super(props)
this.state = { this.state = {
status: undefined, status: undefined,
diff: undefined, diff: 0,
InputValue: undefined, InputValue: undefined,
shixunhoverData: [], shixunhoverData: [],
shixunchildValues:'', shixunchildValues:'',
@ -238,6 +238,7 @@ render() {
<li className={shixunsearchAllvalue==="a"?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} value= "a" onClick={this.shixunsearchall}>全部</li> <li className={shixunsearchAllvalue==="a"?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} value= "a" onClick={this.shixunsearchall}>全部</li>
{ {
shixunhoverData.map((item,key)=>{ shixunhoverData.map((item,key)=>{
return( return(
<li key={key} className={parseInt(shixunsearchAllvalue)===item.id?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} value={item.id} onClick={this.shixunsearchAll}> <li key={key} className={parseInt(shixunsearchAllvalue)===item.id?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} value={item.id} onClick={this.shixunsearchAll}>
{item.name} {item.name}
@ -269,21 +270,48 @@ render() {
</div> </div>
<div className="clearfix"> <div className="clearfix">
<span className="shaiTitle fl mt6">筛选</span> <span className="shaiTitle fl mt6">筛选</span>
<div className="fl" onMouseLeave={this.openStatusOptions} id={"area"}> {
{/*<Select className="statusSelect" defaultValue="0" style={{ width: 120 }} onChange={this.status_search} onMouseEnter={this.openStatusOption} open={openStatus}>*/} <style>
{/*<Option value="0" type="status">全部状态</Option>*/} {`
{/*<Option value="1" type="status">已发布</Option>*/} .shaiItems{
{/*<Option value="2" type="status">未发布</Option>*/} padding: 3px 15px;
{/*<Option value="3" type="status">已关闭</Option>*/} float: left;
{/*</Select>*/} border-radius: 4px;
<Select defaultValue="0" style={{ width: 120 }} onChange={this.diff_search} onMouseEnter={this.openLevelOption} open={openLevel} getPopupContainer={() => document.getElementById("area")}> color: #4C4C4C;
<Option value="0">全部难度</Option> cursor: pointer;
<Option value="1">初级学员</Option> margin-right: 15px;
<Option value="2">中级学员</Option> display: block;
<Option value="3">高级学员</Option> float:left;
<Option value="4">顶级学员</Option> }
</Select> .shaiItems.active {
background-color: #4CACFF!important;
color: #fff!important;
}
`}
</style>
}
<div className="fl pr shaiAllItem mt1">
<li className={this.state.diff===0?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.diff_search(0)}>全部难度</li>
<li className={this.state.diff===1?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.diff_search(1)}>初级学员</li>
<li className={this.state.diff===2?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.diff_search(2)}>中级学员</li>
<li className={this.state.diff===3?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.diff_search(3)}>高级学员</li>
<li className={this.state.diff===4?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.diff_search(4)}>顶级学员</li>
</div> </div>
{/*<div className="fl" onMouseLeave={this.openStatusOptions} id={"area"}>*/}
{/*/!*<Select className="statusSelect" defaultValue="0" style={{ width: 120 }} onChange={this.status_search} onMouseEnter={this.openStatusOption} open={openStatus}>*!/*/}
{/*/!*<Option value="0" type="status">全部状态</Option>*!/*/}
{/*/!*<Option value="1" type="status">已发布</Option>*!/*/}
{/*/!*<Option value="2" type="status">未发布</Option>*!/*/}
{/*/!*<Option value="3" type="status">已关闭</Option>*!/*/}
{/*/!*</Select>*!/*/}
{/*<Select defaultValue="0" style={{ width: 120 }} onChange={this.diff_search} onMouseEnter={this.openLevelOption} open={openLevel} getPopupContainer={() => document.getElementById("area")}>*/}
{/*<Option value="0">全部难度</Option>*/}
{/*<Option value="1">初级学员</Option>*/}
{/*<Option value="2">中级学员</Option>*/}
{/*<Option value="3">高级学员</Option>*/}
{/*<Option value="4">顶级学员</Option>*/}
{/*</Select>*/}
{/*</div>*/}
{/*<div className="fr mt3">*/} {/*<div className="fr mt3">*/}
{/*<Search*/} {/*<Search*/}
{/*style={{ width: 300 }}*/} {/*style={{ width: 300 }}*/}

@ -122,7 +122,8 @@ class InterestpageComponent extends Component {
interest_ids: ints, interest_ids: ints,
}).then((response) => { }).then((response) => {
if (response !== undefined) { if (response !== undefined) {
this.Jumptotheinterestpage(); // this.Jumptotheinterestpage();
window.location.href = "/"
} }

Loading…
Cancel
Save