杨树林 5 years ago
commit 46e5f6a12f

@ -6,7 +6,7 @@
"@flatten/array": "^1.1.7", "@flatten/array": "^1.1.7",
"@icedesign/base": "^0.2.5", "@icedesign/base": "^0.2.5",
"@novnc/novnc": "^1.1.0", "@novnc/novnc": "^1.1.0",
"antd": "^3.6.5", "antd": "^3.20.1",
"array-flatten": "^2.1.2", "array-flatten": "^2.1.2",
"autoprefixer": "7.1.6", "autoprefixer": "7.1.6",
"axios": "^0.18.0", "axios": "^0.18.0",
@ -63,13 +63,13 @@
"rc-select": "^8.0.12", "rc-select": "^8.0.12",
"rc-tree": "^1.7.11", "rc-tree": "^1.7.11",
"rc-upload": "^2.5.1", "rc-upload": "^2.5.1",
"react": "^16.3.0", "react": "^16.8.0",
"react-beautiful-dnd": "^10.0.4", "react-beautiful-dnd": "^10.0.4",
"react-codemirror": "^1.0.0", "react-codemirror": "^1.0.0",
"react-codemirror2": "^6.0.0", "react-codemirror2": "^6.0.0",
"react-content-loader": "^3.1.1", "react-content-loader": "^3.1.1",
"react-dev-utils": "^5.0.0", "react-dev-utils": "^5.0.0",
"react-dom": "^16.3.0-alpha.2", "react-dom": "^16.8.0",
"react-hot-loader": "^4.0.0", "react-hot-loader": "^4.0.0",
"react-infinite-scroller": "^1.2.4", "react-infinite-scroller": "^1.2.4",
"react-loadable": "^5.3.1", "react-loadable": "^5.3.1",

@ -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> : ""*/}

@ -18,7 +18,7 @@ function locationurl(list){
} }
// TODO 开发期多个身份切换 // TODO 开发期多个身份切换
const debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : const debugType =window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin' window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin'
window._debugType = debugType; window._debugType = debugType;
export function initAxiosInterceptors(props) { export function initAxiosInterceptors(props) {

@ -1,46 +1,46 @@
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import './index.css'; import './index.css';
import './indexPlus.css'; import './indexPlus.css';
import App from './App'; import App from './App';
// 加之前main.js 18.1MB // 加之前main.js 18.1MB
// import { message } from 'antd'; // import { message } from 'antd';
import message from 'antd/lib/message'; import message from 'antd/lib/message';
import 'antd/lib/message/style/css'; import 'antd/lib/message/style/css';
import { AppContainer } from 'react-hot-loader'; import { AppContainer } from 'react-hot-loader';
import registerServiceWorker from './registerServiceWorker'; import registerServiceWorker from './registerServiceWorker';
import { configureUrlQuery } from 'react-url-query'; import { configureUrlQuery } from 'react-url-query';
import history from './history'; import history from './history';
// link the history used in our app to url-query so it can update the URL with it. // link the history used in our app to url-query so it can update the URL with it.
configureUrlQuery({ history }); configureUrlQuery({ history });
// ----------------------------------------------------------------------------------- 请求配置 // ----------------------------------------------------------------------------------- 请求配置
window.__useKindEditor = false; 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')
); );
} }
// ReactDOM.render( // ReactDOM.render(
// , // ,
// document.getElementById('root')); // document.getElementById('root'));
// registerServiceWorker(); // registerServiceWorker();
render(App); render(App);
if (module.hot) { if (module.hot) {
module.hot.accept('./App', () => { render(App) }); module.hot.accept('./App', () => { render(App) });
} }

@ -13,6 +13,9 @@ import CheckCodeModal from '../coursesPublic/modal/CheckCodeModal'
import '../css/Courses.css' import '../css/Courses.css'
import WorkDetailPageHeader from './common/WorkDetailPageHeader' import WorkDetailPageHeader from './common/WorkDetailPageHeader'
import CommonWorkAppraiseReply from './reply/CommonWorkAppraiseReply' import CommonWorkAppraiseReply from './reply/CommonWorkAppraiseReply'
import Example from './TestHooks'
import CommonWorkAppraiseReviseAttachments from './CommonWorkAppraiseReviseAttachments'
const { Option} = Select; const { Option} = Select;
const CheckboxGroup = Checkbox.Group; const CheckboxGroup = Checkbox.Group;
const confirm = Modal.confirm; const confirm = Modal.confirm;
@ -174,12 +177,12 @@ class CommonWorkAppraise extends Component{
modalSave={ModalSave} modalSave={ModalSave}
loadtype={loadtype} loadtype={loadtype}
/> />
{/* 内容区 */} {/* 内容区 */}
{/* <div className="padding40 memoContent new_li"> {/* <div className="padding40 memoContent new_li">
</div> */} </div> */}
<div className={"appraise imageLayerParent "} style={{}}> <div className={"appraise imageLayerParent "} style={{}}>
<style>{` <style>{`
.workAppraise>div:last-child { .workAppraise>div:last-child {
border-bottom: none !important; border-bottom: none !important;
@ -234,42 +237,7 @@ class CommonWorkAppraise extends Component{
</div> } </div> }
{revise_attachments.length===0?"":<div className={"stud-class-set bor-top-greyE padding20-30 edu-back-white"}> <CommonWorkAppraiseReviseAttachments {...this.state}></CommonWorkAppraiseReviseAttachments>
<style>{`
.color-grey:hover i {
display: inline !important;
}
`}</style>
<div className={"color-grey-6 mb10 font-16"}>
补交附件
</div>
<div className={"ml20"}>
{revise_reason}
</div>
{revise_attachments.map((item,key)=>{
return(
<div className="color-grey" key={key}>
<a className="color-grey ml20">
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>
</a>
<a href={item.url}
className="mr12 color9B9B imageTarget" length="58">
{item.title}
</a>
<span className="color656565 mt2 color-grey-6 font-12 mr8">{item.filesize}</span>
{item.delete===true?<i className="font-14 iconfont icon-guanbi " style={{display: 'none'}} id={item.id} aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.id)}></i>:""}
</div>
)
})}
<div className={"color-grey-6 clearfix lineh-25 ml20"}>
<span className={"color9B9B fr"}>更新</span>
<span className={"fr font-13 mr10 ml10"}>{atta_update_user}</span>
<span className={"color9B9B fr"}>
{moment(atta_update_time).format('YYYY-MM-DD HH:mm')==="Invalid date"?"":moment(atta_update_time).format('YYYY-MM-DD HH:mm')}
</span>
</div>
</div>}
{is_evaluation != true && project_info && project_info.name && <div className={"stud-class-set bor-top-greyE edu-back-white padding20-30"}> {is_evaluation != true && project_info && project_info.name && <div className={"stud-class-set bor-top-greyE edu-back-white padding20-30"}>
<div className={"color-grey-6 mb10"}> <div className={"color-grey-6 mb10"}>

@ -0,0 +1,52 @@
import React, { useState } from 'react'
import moment from 'moment'
// import Example from './TestHooks'
function CommonWorkAppraiseReviseAttachments(props) {
const { revise_attachments, revise_reason, atta_update_time, atta_update_user} = props
if (!revise_attachments) return ''
return (
<React.Fragment>
{/* {Example()} */}
{revise_attachments.length===0?"":<div className={"stud-class-set bor-top-greyE padding20-30 edu-back-white"}>
<style>{`
.color-grey:hover i {
display: inline !important;
}
`}</style>
<div className={"color-grey-6 mb10 font-16"}>
补交附件
</div>
{/* {age} */}
<div className={"ml20"}>
{revise_reason}
</div>
{revise_attachments.map((item,key)=>{
return(
<div className="color-grey" key={key}>
<a className="color-grey ml20">
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>
</a>
<a href={item.url}
className="mr12 color9B9B imageTarget" length="58">
{item.title}
</a>
<span className="color656565 mt2 color-grey-6 font-12 mr8">{item.filesize}</span>
{item.delete===true?<i className="font-14 iconfont icon-guanbi " style={{display: 'none'}} id={item.id} aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.id)}></i>:""}
</div>
)
})}
<div className={"color-grey-6 clearfix lineh-25 ml20"}>
<span className={"color9B9B fr"}>更新</span>
<span className={"fr font-13 mr10 ml10"}>{atta_update_user}</span>
<span className={"color9B9B fr"}>
{moment(atta_update_time).format('YYYY-MM-DD HH:mm')==="Invalid date"?"":moment(atta_update_time).format('YYYY-MM-DD HH:mm')}
</span>
</div>
</div>}
</React.Fragment>
)
}
export default CommonWorkAppraiseReviseAttachments;

@ -651,7 +651,8 @@ render(){
<a className="color-grey-6 fr font-16 ml30 mt10 mr20" onClick={this.goback}>返回</a> <a className="color-grey-6 fr font-16 ml30 mt10 mr20" onClick={this.goback}>返回</a>
</div> </div>
<Form labelCol={{ span: 5 }} wrapperCol={{ span: 12 }} > {/* */}
<Form >
<div className="stud-class-set pd20 coursenavbox edu-back-white"> <div className="stud-class-set pd20 coursenavbox edu-back-white">
<style>{` <style>{`
.uploadBtn.ant-btn { .uploadBtn.ant-btn {

@ -1009,7 +1009,7 @@ class CommonWorkSetting extends Component{
} }
`}</style> `}</style>
<Form labelCol={{ span: 5 }} wrapperCol={{ span: 12 }} className={'settingForm'}> <Form className={'settingForm'}>
<div className="stud-class-set bor-bottom-greyE pd20 edu-back-white pl36"> <div className="stud-class-set bor-bottom-greyE pd20 edu-back-white pl36">
{/* TODO {/* TODO
取消统一发布设置 取消统一发布设置

@ -0,0 +1,26 @@
// import React, { useState, useEffect } from 'react'
// function Example() {
// const [state, setState] = useState({counter: 0})
// useEffect(() => {
// console.log(' cdm')
// return () => {
// console.log(' cwum')
// };
// })
// const add1ToCounter = () => {
// const newCounterValue = state.counter + 1
// setState({ counter: newCounterValue })
// }
// return (
// <div>
// <p>{state.counter}</p>
// <button onClick={add1ToCounter}>
// Click me
// </button>
// </div>
// )
// }
// export default Example

@ -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);

@ -68,7 +68,7 @@ class Ecercisemount extends Component{
</div> </div>
</div> </div>
<Form labelCol={{ span: 5 }} wrapperCol={{ span: 12 }} onSubmit={this.handleSubmit} className={"edu-back-white newcourses exercise"}> <Form onSubmit={this.handleSubmit} className={"edu-back-white newcourses exercise"}>
{/*内容*/} {/*内容*/}
<div className="stud-class-set bor-bottom-greyE pd20 exerciselist"> <div className="stud-class-set bor-bottom-greyE pd20 exerciselist">

@ -556,7 +556,7 @@ class GraduationTasksSubmitedit extends Component{
{description&&description? {description&&description?
<div> <div>
{/*<Form labelCol={{ span: 5 }} wrapperCol={{ span: 12 }} onSubmit={this.handleSubmit} >*/} {/*<Form onSubmit={this.handleSubmit} >*/}
<div className="stud-class-set pd20 coursenavbox edu-back-white"> <div className="stud-class-set pd20 coursenavbox edu-back-white">
<style>{` <style>{`
.uploadBtn.ant-btn { .uploadBtn.ant-btn {

@ -554,7 +554,7 @@ render(){
<a className="color-grey-6 fr font-16 ml30 mt10 mr20" onClick={this.goback}>返回</a> <a className="color-grey-6 fr font-16 ml30 mt10 mr20" onClick={this.goback}>返回</a>
</div> </div>
{/*<Form labelCol={{ span: 5 }} wrapperCol={{ span: 12 }} onSubmit={GraduationTasksnewtype===true?this.handleSubmit:"return false"}*/} {/*<Form onSubmit={GraduationTasksnewtype===true?this.handleSubmit:"return false"}*/}
{/*>*/} {/*>*/}
<div className="stud-class-set pd20 coursenavbox edu-back-white"> <div className="stud-class-set pd20 coursenavbox edu-back-white">
<style>{` <style>{`

@ -353,8 +353,8 @@ class GraduationTasksedit extends Component{
{description===undefined?"": {description===undefined?"":
<div> <div>
{/*<Form labelCol={{ span: 5 }} wrapperCol={{ span: 12 }} >*/} {/*<Form >*/}
{/* <Form labelCol={{ span: 5 }} wrapperCol={{ span: 12 }} >*/} {/* <Form >*/}
{/*内容*/} {/*内容*/}
<div className="stud-class-set bor-bottom-greyE pt20 pl20 pr20 pb0 edu-back-white"> <div className="stud-class-set bor-bottom-greyE pt20 pl20 pr20 pb0 edu-back-white">

@ -322,7 +322,7 @@ class GraduationTasksnew extends Component {
</div> </div>
{/*<Form labelCol={{span: 5}} wrapperCol={{span: 12}}*/} {/*<Form*/}
{/* onSubmit={GraduationTasksnewtype === true ? this.handleSubmit : ""}>*/} {/* onSubmit={GraduationTasksnewtype === true ? this.handleSubmit : ""}>*/}
<style> <style>
{ {

@ -1086,7 +1086,7 @@ class GraduationTaskssettingapp extends Component{
<Form labelCol={{ span: 5 }} wrapperCol={{ span: 12 }} id={"starttime"}> <Form id={"starttime"}>
{ {
!flagPageEdit && this.props.isAdmin() === true ? !flagPageEdit && this.props.isAdmin() === true ?
<a className="fr mt20 mr40" onClick={this.editSetting}><Tooltip title="编辑"><i <a className="fr mt20 mr40" onClick={this.editSetting}><Tooltip title="编辑"><i

@ -72,7 +72,7 @@ class CoursesNew extends Component {
console.log(error); console.log(error);
}) })
}else{ }else{
console.log(user_school); // console.log(user_school);
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
school:user_school, school:user_school,
}); });
@ -259,7 +259,7 @@ class CoursesNew extends Component {
axios.post(url,{ axios.post(url,{
search:value search:value
}).then((result)=>{ }).then((result)=>{
console.log(result.data) // console.log(result.data)
this.setState({ this.setState({
searchlist:result.data.course_lists, searchlist:result.data.course_lists,
// course:value, // course:value,
@ -357,7 +357,7 @@ class CoursesNew extends Component {
`} `}
</style> </style>
<Form labelCol={{span: 5}} wrapperCol={{span: 12}} onSubmit={this.handleSubmit} <Form onSubmit={this.handleSubmit}
className={"edu-back-white newcourses"}> className={"edu-back-white newcourses"}>
{/*内容*/} {/*内容*/}
<style> <style>

@ -115,7 +115,7 @@ class CommitSummary extends Component{
return ( return (
<div> <div>
<div className="newMain clearfix"> <div className="newMain clearfix">
{/*<Form labelCol={{span: 5}} wrapperCol={{span: 12}} onSubmit={this.handleSubmit}>*/} {/*<Form onSubmit={this.handleSubmit}>*/}
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<div style={{ <div style={{
width:'100%', width:'100%',
@ -148,7 +148,7 @@ class CommitSummary extends Component{
内容</span> 内容</span>
</div> </div>
<div className="new-wrap"> <div className="new-wrap">
<Form labelCol={{span: 5}}layout='vertical' onSubmit={this.handleSubmit} wrapperCol={{span: 12}}> <Form layout='vertical' onSubmit={this.handleSubmit} >
<Form.Item <Form.Item
> >
<div style={{ "background": "#fff","padding-bottom":"20px","padding-left":"20px","padding-right":"20px"}} <div style={{ "background": "#fff","padding-bottom":"20px","padding-left":"20px","padding-right":"20px"}}
@ -166,7 +166,7 @@ class CommitSummary extends Component{
</div> </div>
</Form.Item> </Form.Item>
<Form.Item wrapperCol={{span: 12, offset: 5}}> <Form.Item>
<div className="clearfix mt40 mb30"> <div className="clearfix mt40 mb30">
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20" > <Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20" >
提交 提交

@ -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({
@ -687,55 +690,57 @@ class Listofworks extends Component {
//debug=t 是老师的意思 //debug=t 是老师的意思
// console.log(ordervlue)7009 // console.log(ordervlue)7009
var homeworkid = this.props.match.params.homeworkid; var homeworkid = this.props.match.params.homeworkid;
let urll = `/homework_commons/${homeworkid}/works_list.json?`; let urll = `/homework_commons/${homeworkid}/works_list.json?`;
var order = "asc"; var order = "asc";
if (ordervlue === "update_time") { if (ordervlue === "update_time") {
order = "desc"; order = "desc";
} }
var checkedValuesines = checkedValuesine; var checkedValuesines = checkedValuesine;
var checkedValuesineinfos = checkedValuesineinfo; var checkedValuesineinfos = checkedValuesineinfo;
var searchtexts = searchtext var searchtexts = searchtext
var data = { var data = {
search: searchtexts, search: searchtexts,
order: ordervlue, order: ordervlue,
b_order: order, b_order: order,
work_status: checkedValuesines, work_status: checkedValuesines,
course_group: checkedValuesineinfos, course_group: checkedValuesineinfos,
page: page, page: page,
limit: limit, limit: limit,
} }
// console.log("Startsorting"); // console.log("Startsorting");
// console.log(data); // console.log(data);
axios.post(urll, data).then((result) => { axios.post(urll, data).then((result) => {
// if (result.status === 200) {/] // if (result.status === 200) {/]
// console.log(url) // console.log(url)
// console.log("作品列表______________________") // console.log("作品列表______________________")
// console.log(JSON.stringify(result)) // console.log(JSON.stringify(result))
if (result !== undefined) { if(this.props.isNotMember()===false){
if (result !== undefined) {
this.setState({
teacherdata: result.data,
task_status: result.data.task_status,
course_group_info: result.data.course_group_info,
loadingstate: false,
jobsettingsdata: result,
allow_late:result.data.allow_late,
publish_immediately: result.data.publish_immediately,
work_efficiency: result.data.work_efficiency,
end_immediately: result.data.end_immediately,
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page);
}
}
// }
}).catch((error) => {
console.log(error)
this.setState({ this.setState({
teacherdata: result.data, loadingstate: false
task_status: result.data.task_status,
course_group_info: result.data.course_group_info,
loadingstate: false,
jobsettingsdata: result,
allow_late:result.data.allow_late,
publish_immediately: result.data.publish_immediately,
work_efficiency: result.data.work_efficiency,
end_immediately: result.data.end_immediately,
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
}) })
this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page);
}
// }
}).catch((error) => {
console.log(error)
this.setState({
loadingstate: false
}) })
})
} }
@ -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,28 +294,32 @@ class Listofworksstudentone extends Component {
course_group: "", course_group: "",
} }
axios.post(urll, data).then((result) => { axios.post(urll, data).then((result) => {
if (result.status === 200) {
this.setState({
teacherdata: result.data,
task_status: result.data.task_status,
course_group_info: result.data.course_group_info,
student_works: result.data.student_works,
jobsettingsdata: result,
publish_immediately: result.data.publish_immediately,
end_immediately: result.data.end_immediately,
id: result.data.id,
work_efficiency: result.data.work_efficiency,
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
view_report:result.data.view_report,
})
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
this.seacthdata(result.data);
} else {
this.seacthdatas(result.data,result.data.student_works);
}
if (result.status === 200) {
if(this.props.isNotMember()===false) {
this.setState({
teacherdata: result.data,
task_status: result.data.task_status,
course_group_info: result.data.course_group_info,
student_works: result.data.student_works,
jobsettingsdata: result,
publish_immediately: result.data.publish_immediately,
end_immediately: result.data.end_immediately,
id: result.data.id,
work_efficiency: result.data.work_efficiency,
code_review: result.data.code_review,
challenges_count: result.data.challenges_count,
view_report: result.data.view_report,
})
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
this.seacthdata(result.data);
} else {
this.seacthdatas(result.data, result.data.student_works);
}
}
} }
}).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({

@ -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>

@ -1760,7 +1760,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>
@ -1773,7 +1773,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}

@ -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>

@ -67,7 +67,7 @@ class StudentHomework extends Component{
</div> </div>
</div> </div>
<Form labelCol={{ span: 5 }} wrapperCol={{ span: 12 }} onSubmit={this.handleSubmit} className={"edu-back-white newcourses exercise"}> <Form onSubmit={this.handleSubmit} className={"edu-back-white newcourses exercise"}>
{/*内容*/} {/*内容*/}
<div className="stud-class-set bor-bottom-greyE pd20 exerciselist"> <div className="stud-class-set bor-bottom-greyE pd20 exerciselist">

@ -5,7 +5,8 @@
height: 420px; height: 420px;
} }
#DialogID{ #DialogID{
z-index: 20000; /* 影响notification */
/* z-index: 20000; */
} }
#DialogID .dialogBox { #DialogID .dialogBox {
width: 402px; width: 402px;

@ -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
}) })

@ -14,36 +14,39 @@ export function ImageLayerOfCommentHOC(options = {}) {
imageSrc: '' imageSrc: ''
} }
} }
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)) {
// 非回复里的头像图片; 非emoticons
if (imageSrc.indexOf('/images/avatars/User') === -1 &&
imageSrc.indexOf('kindeditor/plugins/emoticons') === -1 ) {
this.setState({
showImage: true,
imageSrc,
})
}
event.stopPropagation()
event.preventDefault && event.preventDefault()
event.originalEvent.preventDefault()
// event.originalEvent.stopPropagation()
// event.originalEvent.cancelBubble = true
return false;
}
}
// jQuery._data( $('.newMain')[0], "events" )
componentDidMount() { componentDidMount() {
// commentsDelegateParent #game_left_contents #tab_con_4 // commentsDelegateParent #game_left_contents #tab_con_4
setTimeout(() => { setTimeout(() => {
$(options.parentSelector || ".commentsDelegateParent") $(options.parentSelector || ".commentsDelegateParent")
.delegate(options.imgSelector || ".J_Comment_Reply .comment_content img, .J_Comment_Reply .childrenCommentsView img","click", (event) => { .delegate(options.imgSelector || ".J_Comment_Reply .comment_content img, .J_Comment_Reply .childrenCommentsView img","click", this.onDelegateClick);
}, 1200)
const imageSrc = event.target.src || event.target.getAttribute('src') || event.target.getAttribute('href') }
// 判断imageSrc是否是图片 componentWillUnmount() {
const fileName = event.target.innerHTML.trim() $(options.parentSelector || ".commentsDelegateParent", 'click', this.onDelegateClick)
if (isImageExtension(imageSrc.trim()) || isImageExtension(fileName)) {
// 非回复里的头像图片; 非emoticons
if (imageSrc.indexOf('/images/avatars/User') === -1 &&
imageSrc.indexOf('kindeditor/plugins/emoticons') === -1 ) {
this.setState({
showImage: true,
imageSrc,
})
}
event.stopPropagation()
event.preventDefault && event.preventDefault()
event.originalEvent.preventDefault()
// event.originalEvent.stopPropagation()
// event.originalEvent.cancelBubble = true
return false;
}
});
}, 3000)
} }
onImageLayerClose = () => { onImageLayerClose = () => {
this.setState({ this.setState({
showImage: false, showImage: false,

Loading…
Cancel
Save