杨树林 5 years ago
commit 46e5f6a12f

@ -6,7 +6,7 @@
"@flatten/array": "^1.1.7",
"@icedesign/base": "^0.2.5",
"@novnc/novnc": "^1.1.0",
"antd": "^3.6.5",
"antd": "^3.20.1",
"array-flatten": "^2.1.2",
"autoprefixer": "7.1.6",
"axios": "^0.18.0",
@ -63,13 +63,13 @@
"rc-select": "^8.0.12",
"rc-tree": "^1.7.11",
"rc-upload": "^2.5.1",
"react": "^16.3.0",
"react": "^16.8.0",
"react-beautiful-dnd": "^10.0.4",
"react-codemirror": "^1.0.0",
"react-codemirror2": "^6.0.0",
"react-content-loader": "^3.1.1",
"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-infinite-scroller": "^1.2.4",
"react-loadable": "^5.3.1",

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

@ -18,7 +18,7 @@ function locationurl(list){
}
// 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._debugType = debugType;
export function initAxiosInterceptors(props) {

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

@ -13,6 +13,9 @@ import CheckCodeModal from '../coursesPublic/modal/CheckCodeModal'
import '../css/Courses.css'
import WorkDetailPageHeader from './common/WorkDetailPageHeader'
import CommonWorkAppraiseReply from './reply/CommonWorkAppraiseReply'
import Example from './TestHooks'
import CommonWorkAppraiseReviseAttachments from './CommonWorkAppraiseReviseAttachments'
const { Option} = Select;
const CheckboxGroup = Checkbox.Group;
const confirm = Modal.confirm;
@ -174,12 +177,12 @@ class CommonWorkAppraise extends Component{
modalSave={ModalSave}
loadtype={loadtype}
/>
{/* 内容区 */}
{/* <div className="padding40 memoContent new_li">
</div> */}
<div className={"appraise imageLayerParent "} style={{}}>
<style>{`
.workAppraise>div:last-child {
border-bottom: none !important;
@ -234,42 +237,7 @@ class CommonWorkAppraise extends Component{
</div> }
{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>
<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>}
<CommonWorkAppraiseReviseAttachments {...this.state}></CommonWorkAppraiseReviseAttachments>
{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"}>

@ -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>
</div>
<Form labelCol={{ span: 5 }} wrapperCol={{ span: 12 }} >
{/* */}
<Form >
<div className="stud-class-set pd20 coursenavbox edu-back-white">
<style>{`
.uploadBtn.ant-btn {

@ -1009,7 +1009,7 @@ class CommonWorkSetting extends Component{
}
`}</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">
{/* 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{
/*height: 23px;*/
font-size: 22px;
height: 25px;
font-family: MicrosoftYaHei;
font-weight: 400;
color: rgba(51,51,51,1);

@ -68,7 +68,7 @@ class Ecercisemount extends Component{
</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">

@ -556,7 +556,7 @@ class GraduationTasksSubmitedit extends Component{
{description&&description?
<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">
<style>{`
.uploadBtn.ant-btn {

@ -554,7 +554,7 @@ render(){
<a className="color-grey-6 fr font-16 ml30 mt10 mr20" onClick={this.goback}>返回</a>
</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">
<style>{`

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

@ -322,7 +322,7 @@ class GraduationTasksnew extends Component {
</div>
{/*<Form labelCol={{span: 5}} wrapperCol={{span: 12}}*/}
{/*<Form*/}
{/* onSubmit={GraduationTasksnewtype === true ? this.handleSubmit : ""}>*/}
<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 ?
<a className="fr mt20 mr40" onClick={this.editSetting}><Tooltip title="编辑"><i

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

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

@ -633,6 +633,7 @@ class Listofworks extends Component {
// 获取作品列表
Getalistofworks = (homeworkid) => {
// console.log("获取作品列表");7009
let urll = `/homework_commons/${homeworkid}/works_list.json`;
// console.log(homeworkid);
@ -651,6 +652,8 @@ class Listofworks extends Component {
limit:20,
}
axios.post(urll, data).then((result) => {
if(this.props.isNotMember()===false){
if (result !== undefined) {
// console.log(url)
// console.log("作品列表6789077")
@ -669,7 +672,7 @@ class Listofworks extends Component {
challenges_count:result.data.challenges_count,
})
this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1);
}
} }
}).catch((error) => {
console.log(error)
this.setState({
@ -712,6 +715,7 @@ class Listofworks extends Component {
// console.log(url)
// console.log("作品列表______________________")
// console.log(JSON.stringify(result))
if(this.props.isNotMember()===false){
if (result !== undefined) {
this.setState({
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);
}
}
// }
}).catch((error) => {
console.log(error)
@ -738,6 +742,7 @@ class Listofworks extends Component {
})
}
TablePagination = (e) => {
@ -1455,7 +1460,7 @@ class Listofworks extends Component {
typs={this.state.typs}
/>
<div className={"educontent mb20"}>
<div className="educontent mb30">
<div className="educontent mb20">
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
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>
</p>
</div>
<div className="educontent mb30">
<div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth:"33px"}}>
{teacherdata === undefined ? "" : teacherdata.homework_name}
</p>

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

@ -609,8 +609,8 @@ class ShixunStudentWork extends Component {
typs={this.state.typs}
/>
<div className={"educontent mb20"}>
<div className="educontent mb25">
<p className="clearfix mb25 mt5">
<div className="educontent mb20">
<p className="clearfix mb20 mt5">
<ActionBtn className=" btn colorgrey fl hovercolorblue mt5"
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>*/}
@ -624,7 +624,7 @@ class ShixunStudentWork extends Component {
<ActionBtn className="fl">作业详情</ActionBtn>
</p>
</div>
<div className="educontent mb30">
<div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth:"33px"}}>
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
</p>

@ -1760,7 +1760,7 @@ class Trainingjobsetting extends Component {
modalSave={modalSave}
></Modals>
<div className={"educontent mb20"}>
<div className="educontent mb30">
<div className="educontent mb20">
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
@ -1773,7 +1773,7 @@ class Trainingjobsetting extends Component {
</p>
</div>
<div className="educontent mb30">
<div className="educontent mb20">
<p className=" fl color-black summaryname mt5" style={{heigth:"33px"}}>
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}

@ -400,7 +400,7 @@ class Workquestionandanswer extends Component {
typs={this.state.typs}
/>
<div className={"educontent mb20"}>
<div className="educontent mb30">
<div className="educontent mb20">
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
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>
</p>
</div>
<div className="educontent mb30">
<div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth:"33px"}}>
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
</p>

@ -67,7 +67,7 @@ class StudentHomework extends Component{
</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">

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

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

@ -14,12 +14,7 @@ export function ImageLayerOfCommentHOC(options = {}) {
imageSrc: ''
}
}
componentDidMount() {
// commentsDelegateParent #game_left_contents #tab_con_4
setTimeout(() => {
$(options.parentSelector || ".commentsDelegateParent")
.delegate(options.imgSelector || ".J_Comment_Reply .comment_content img, .J_Comment_Reply .childrenCommentsView img","click", (event) => {
onDelegateClick = (event) => {
const imageSrc = event.target.src || event.target.getAttribute('src') || event.target.getAttribute('href')
// 判断imageSrc是否是图片
const fileName = event.target.innerHTML.trim()
@ -39,11 +34,19 @@ export function ImageLayerOfCommentHOC(options = {}) {
// event.originalEvent.cancelBubble = true
return false;
}
});
}, 3000)
}
// jQuery._data( $('.newMain')[0], "events" )
componentDidMount() {
// commentsDelegateParent #game_left_contents #tab_con_4
setTimeout(() => {
$(options.parentSelector || ".commentsDelegateParent")
.delegate(options.imgSelector || ".J_Comment_Reply .comment_content img, .J_Comment_Reply .childrenCommentsView img","click", this.onDelegateClick);
}, 1200)
}
componentWillUnmount() {
$(options.parentSelector || ".commentsDelegateParent", 'click', this.onDelegateClick)
}
onImageLayerClose = () => {
this.setState({
showImage: false,

Loading…
Cancel
Save