diff --git a/public/react/config/webpack.config.dev.js b/public/react/config/webpack.config.dev.js index 1adf3aef9..6dce2253c 100644 --- a/public/react/config/webpack.config.dev.js +++ b/public/react/config/webpack.config.dev.js @@ -32,7 +32,7 @@ module.exports = { // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s // devtool: "cheap-module-eval-source-map", // 开启调试 - // devtool: "source-map", // 开启调试 + devtool: "source-map", // 开启调试 // These are the "entry points" to our application. // This means they will be the "root" imports that are included in JS bundle. // The first two entry points enable "hot" CSS and auto-refreshes for JS. diff --git a/public/react/src/modules/courses/completetaskdetails/Completetaskdetails.js b/public/react/src/modules/courses/completetaskdetails/Completetaskdetails.js index 850ed2b89..05bb600e9 100644 --- a/public/react/src/modules/courses/completetaskdetails/Completetaskdetails.js +++ b/public/react/src/modules/courses/completetaskdetails/Completetaskdetails.js @@ -57,20 +57,22 @@ class Groupjobbandetails extends Component { render() { - + let{datas}=this.props; return (
-
+
+ + {datas.attachments === undefined ? "" : datas.attachments.map((item, key) => { + return ( + + ) + })} + + - -
diff --git a/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js b/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js index d7cd7a62c..c09e8cf66 100644 --- a/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js +++ b/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js @@ -18,17 +18,20 @@ class Completetaskpage extends Component { constructor(props) { super(props); // this.answerMdRef = React.createRef(); - this.setState({ + this.state={ workid:1, isSpin:false, datas:[], - }) + } } componentDidMount() { // console.log("父组件加载框"); + this.getonedata(); + } + getonedata(){ if( this.props.match.params.workid){ this.setState({ workid: this.props.match.params.workid, @@ -47,13 +50,13 @@ class Completetaskpage extends Component { this.setState({ isSpin:true, }) - let url = `/homework_banks/${workids}.json`; + let url = `/task_banks/${workids}.json`; // axios.get(url).then((response) => { if(response){ if(response.data){ this.setState({ - datas:response.data.informs, + datas:response.data, }) }else { this.setState({ @@ -86,6 +89,7 @@ class Completetaskpage extends Component { ///////////////教师截止 render() { + let{datas}=this.state; const isAdmin = this.props.isAdmin(); // console.log(119) @@ -108,10 +112,10 @@ class Completetaskpage extends Component {

- MySQL数据库编程开发实训(基础篇) + {datas&&datas.name}

@@ -126,7 +130,7 @@ class Completetaskpage extends Component {
- + diff --git a/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js b/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js index cde4f5f5e..d952b82aa 100644 --- a/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js +++ b/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js @@ -19,11 +19,11 @@ class CompletetopicdePage extends Component { constructor(props) { super(props); // this.answerMdRef = React.createRef(); - this.setState({ + this.state={ workid:1, isSpin:false, datas:[], - }) + } } @@ -48,13 +48,13 @@ class CompletetopicdePage extends Component { this.setState({ isSpin:true, }) - let url = `/homework_banks/${workids}.json`; + let url = `/gtopic_banks/${workids}.json`; // axios.get(url).then((response) => { if(response){ if(response.data){ this.setState({ - datas:response.data.informs, + datas:response.data, }) }else { this.setState({ @@ -88,7 +88,7 @@ class CompletetopicdePage extends Component { ///////////////教师截止 render() { - + let{datas}=this.state; const isAdmin = this.props.isAdmin(); // console.log(119) @@ -110,10 +110,10 @@ class CompletetopicdePage extends Component {

- MySQL数据库编程开发实训(基础篇) + {datas&&datas.name}

@@ -128,7 +128,7 @@ class CompletetopicdePage extends Component { - + {/*{parseInt(tab) === 1 ? :""}*/} diff --git a/public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js b/public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js index 15b4c24cf..5b15bc7f6 100644 --- a/public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js +++ b/public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js @@ -56,52 +56,52 @@ class Completetopicdetails extends Component { render() { - + let{datas}=this.props; return (
-
+
- + {datas.attachment_list === undefined ? "" : datas.attachment_list.map((item, key) => { + return ( + + ) + })}

课题类型: - 设计 + {datas&&datas.topic_type===1?"设计":datas&&datas.topic_type===2?"论文":datas&&datas.topic_type===3?"创作":"设计"}

课题来源: - 生产/社会实践 + {datas&&datas.topic_source===1?"生产/社会实际":datas&&datas.topic_source===2?"结合科研":datas&&datas.topic_source===3?"其它":"生产/社会实际"}

课题性质1: - 设计 + {datas&&datas.topic_property_first===1?"真题":datas&&datas.topic_property_first===2?"模拟题":"真题"}

课题性质2: - 设计 + {datas&&datas.topic_property_second===1?"纵向课题":datas&&datas.topic_property_second===2?"横向课题":datas&&datas.topic_property_second===3?"自选":"纵向课题"}

课题重复情况: - 新需求 + {datas&&datas.topic_repeat===1?"新题":datas&&datas.topic_repeat===2?"往届题,有新要求":datas&&datas.topic_repeat===3?"往届题,无新要求":"新题"}

调研或实习地点: - 长沙 + {datas&&datas.province}{datas&&datas.city}

课题单位来源: - 湖南省据C++创始人Stroustrup有限公司 + {datas&&datas.source_unit}

diff --git a/public/react/src/modules/courses/groupjobbank/GroupPackage2.js b/public/react/src/modules/courses/groupjobbank/GroupPackage2.js index 1a1400858..349c2b97e 100644 --- a/public/react/src/modules/courses/groupjobbank/GroupPackage2.js +++ b/public/react/src/modules/courses/groupjobbank/GroupPackage2.js @@ -54,19 +54,42 @@ class GroupPackage extends Component { render() { - let{datas}=this.props; + let{datas,bool}=this.props; return ( + bool===true? +
-

- 分组要求: - {datas&&datas.min_num}~ {datas&&datas.max_num}(学生提交作品时需要关联同组成员,组内成员作品共享) -

+ { + datas===undefined?"":datas.min_num===undefined||datas.max_num===undefined?"":datas.min_num===null||datas.max_num===null?"": +

+ 分组要求: + {datas&&datas.min_num}~ {datas&&datas.max_num}(学生提交作品时需要关联同组成员,组内成员作品共享) +

+ }

基于项目实施 (学生必须在本平台创建项目,项目管理员可以提交作品)

+ :
+ { + datas===undefined?"":datas.group_info===undefined?"":datas.group_info.min_number===undefined||datas.group_info.max_number===undefined?"": + datas.group_info.min_number===null||datas.group_info.max_number===null?"": +

+ 分组要求: + {datas&&datas.group_info&&datas.group_info.min_number}~ {datas&&datas.group_info&&datas.group_info.max_number}(学生提交作品时需要关联同组成员,组内成员作品共享) +

+ } + { + datas&&datas.group_info&&datas.group_info.base_on_project? +

+ 基于项目实施 + (学生必须在本平台创建项目,项目管理员可以提交作品) +

+ :"" + } +
) } } diff --git a/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js b/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js index 09df21be9..6b3e817c1 100644 --- a/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js +++ b/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js @@ -71,7 +71,7 @@ class Groupjobbandetails extends Component { ) })} - +
diff --git a/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js b/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js index 4130511c3..60255ad7b 100644 --- a/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js +++ b/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js @@ -44,7 +44,7 @@ class GroupjobbankPage extends Component { console.log(e); console.log("44"); } - + this.getonedata(); } @@ -65,6 +65,9 @@ class GroupjobbankPage extends Component { this.setState({ shixuntypes: types[3] }) + this.getonedata(); + } + getonedata=()=>{ if( this.props.match.params.workid){ this.setState({ workid: this.props.match.params.workid, diff --git a/public/react/src/modules/courses/groupjobbank/Groupjobquesanswer.js b/public/react/src/modules/courses/groupjobbank/Groupjobquesanswer.js index d1345da45..f0b2be9cd 100644 --- a/public/react/src/modules/courses/groupjobbank/Groupjobquesanswer.js +++ b/public/react/src/modules/courses/groupjobbank/Groupjobquesanswer.js @@ -69,7 +69,7 @@ class Groupjobquesanswer extends Component { ) })} - +
diff --git a/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js b/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js index 9b1de7223..04fde589d 100644 --- a/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js +++ b/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js @@ -43,7 +43,7 @@ class Generaljobbankdetails extends Component { console.log(e); console.log("44"); } - + this.getonedata(); } @@ -58,17 +58,19 @@ class Generaljobbankdetails extends Component { this.setState({ tab: type[1], }); - - console.log("Generaljobbankdetails"); console.log(this.props); + this.getonedata(); + } + + getonedata=()=>{ if( this.props.match.params.workid){ this.setState({ workid: this.props.match.params.workid, }) } this.getdata(this.props.match.params.workid); - } + }; //获取数据的地方 getdata=(workid)=>{ var workids= workid;