From 1014c5ef608eb80fb5364368dbf2ecdc2bee70b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Wed, 30 Oct 2019 09:45:41 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E8=AF=81=E4=B9=A6?=
=?UTF-8?q?=E4=B8=8B=E8=BD=BDand=E5=AE=8C=E5=96=84=E4=B8=AA=E4=BA=BA?=
=?UTF-8?q?=E8=B5=84=E6=96=99start?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Competitioncommon/CompetitionCommon.js | 32 +++++++++---
.../CompetitionContents.js | 2 +-
.../CompetitionContentsChart.js | 2 +-
.../CompetitionContentsMd.js | 2 +-
.../CompetitionContentspdf.js | 50 +++++++++++++++++++
.../CompetitionContentspdfdownload.js | 35 +++++++++++++
.../CompetitionContentspdfpeopledata.js | 34 +++++++++++++
7 files changed, 148 insertions(+), 9 deletions(-)
rename public/react/src/modules/competitions/Competitioncommon/{ => CompetitionCommonChild}/CompetitionContents.js (93%)
rename public/react/src/modules/competitions/Competitioncommon/{ => CompetitionCommonChild}/CompetitionContentsChart.js (99%)
rename public/react/src/modules/competitions/Competitioncommon/{ => CompetitionCommonChild}/CompetitionContentsMd.js (98%)
create mode 100644 public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdf.js
create mode 100644 public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js
create mode 100644 public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js
index 2d1aae16f..e92dd66cc 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js
@@ -3,9 +3,10 @@ import { Breadcrumb,Layout,Table, Divider, Tag,Badge,Row, Col,Button, Menu, Icon
import { Link } from 'react-router-dom';
import axios from 'axios';
import {markdownToHTML,getImageUrl} from 'educoder';
-import CompetitionContents from './CompetitionContents';
-import CompetitionContentsChart from './CompetitionContentsChart';
-import CompetitionContentsMd from './CompetitionContentsMd';
+import CompetitionContents from './CompetitionCommonChild/CompetitionContents';
+import CompetitionContentsChart from './CompetitionCommonChild/CompetitionContentsChart';
+import CompetitionContentsMd from './CompetitionCommonChild/CompetitionContentsMd';
+import CompetitionContentspdf from './CompetitionCommonChild/CompetitionContentspdf';
import NoneData from "../../courses/shixunHomework/shixunHomework";
import './CompetitionCommon.css';
@@ -253,6 +254,13 @@ class CompetitionCommon extends Component{
}
+ isdownloadpdf=()=>{
+
+ this.setState({
+ isdownloadpdftype:true
+ })
+
+ }
render() {
let {data,thiskeys,Competitionedittype}=this.state;
@@ -365,9 +373,15 @@ class CompetitionCommon extends Component{
}
})}
+
+
-
+ {this.state.isdownloadpdftype===true?"":
{this.state.module_type==="chart"?Competitionedittype===false?:""}
-
-
+ }
+
+ {this.state.isdownloadpdftype===true?
+
+ :""}
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionContents.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContents.js
similarity index 93%
rename from public/react/src/modules/competitions/Competitioncommon/CompetitionContents.js
rename to public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContents.js
index 909479c2a..43213b457 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionContents.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContents.js
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import {Button,Layout} from 'antd';
import axios from 'axios';
import {markdownToHTML,getImageUrl,AttachmentList} from 'educoder';
-import NoneData from "../../courses/shixunHomework/shixunHomework";
+// import NoneData from "../../../courses/shixunHomework/shixunHomework";
const { Header, Footer, Sider, Content } = Layout;
class CompetitionContents extends Component{
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionContentsChart.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsChart.js
similarity index 99%
rename from public/react/src/modules/competitions/Competitioncommon/CompetitionContentsChart.js
rename to public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsChart.js
index ac09b2e6c..759508581 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionContentsChart.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsChart.js
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import {Button,Layout,Tabs,Icon, Card, Avatar, Row, Col ,Table} from 'antd';
import {markdownToHTML,getImageUrl} from 'educoder';
import axios from 'axios';
-import NoneData from "../../courses/shixunHomework/shixunHomework";
+// import NoneData from "../../../courses/shixunHomework/shixunHomework";
const { Content } = Layout;
const { TabPane } = Tabs;
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionContentsMd.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js
similarity index 98%
rename from public/react/src/modules/competitions/Competitioncommon/CompetitionContentsMd.js
rename to public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js
index aae9283c4..049f2bab1 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionContentsMd.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentsMd.js
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import {Button, Card, Row, Col ,Upload,Icon,message,Tabs} from 'antd';
import axios from 'axios';
import {getImageUrl,getUrl,appendFileSizeToUploadFileAll,appendFileSizeToUploadFile} from 'educoder';
-import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor';
+import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
const { TabPane } = Tabs;
class CompetitionContentsMd extends Component{
constructor(props) {
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdf.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdf.js
new file mode 100644
index 000000000..177356400
--- /dev/null
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdf.js
@@ -0,0 +1,50 @@
+import React, { Component } from 'react';
+import {Tabs} from 'antd';
+import axios from 'axios';
+import {markdownToHTML,getImageUrl,AttachmentList} from 'educoder';
+import CompetitionContentspdfdownload from './CompetitionContentspdfChild/CompetitionContentspdfdownload';
+import CompetitionContentspdfpeopledata from './CompetitionContentspdfChild/CompetitionContentspdfpeopledata';
+// import NoneData from "../../../courses/shixunHomework/shixunHomework";
+
+const { TabPane } = Tabs;
+class CompetitionContentspdf extends Component{
+ constructor(props) {
+ super(props)
+ this.state={
+
+ }
+ }
+
+ componentDidMount(){
+ window.document.title = '竞赛';
+
+ }
+
+ render() {
+
+
+ return (
+
+
+
+ )
+ }
+}
+export default CompetitionContentspdf;
\ No newline at end of file
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js
new file mode 100644
index 000000000..598217a15
--- /dev/null
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js
@@ -0,0 +1,35 @@
+import React, { Component } from 'react';
+import {Button,Layout} from 'antd';
+import axios from 'axios';
+import {getImageUrl} from 'educoder';
+// import NoneData from "../../../courses/shixunHomework/shixunHomework";
+
+
+class CompetitionContentspdfdownload extends Component{
+ constructor(props) {
+ super(props)
+ this.state={
+
+ }
+ }
+
+ componentDidMount(){
+ window.document.title = '竞赛';
+
+ }
+
+ render() {
+
+
+ return (
+
+
+
+ )
+ }
+}
+export default CompetitionContentspdfdownload;
\ No newline at end of file
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
new file mode 100644
index 000000000..41002d5f3
--- /dev/null
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
@@ -0,0 +1,34 @@
+import React, { Component } from 'react';
+import {Button,Layout} from 'antd';
+import axios from 'axios';
+import {getImageUrl} from 'educoder';
+// import NoneData from "../../../courses/shixunHomework/shixunHomework";
+
+class CompetitionContentspdfpeopledata extends Component{
+ constructor(props) {
+ super(props)
+ this.state={
+
+ }
+ }
+
+ componentDidMount(){
+ window.document.title = '竞赛';
+
+ }
+
+ render() {
+
+
+ return (
+
+
+
+ )
+ }
+}
+export default CompetitionContentspdfpeopledata;
\ No newline at end of file
From 2351c90862251da04cdc56a9ce4de8986c490c71 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Wed, 30 Oct 2019 09:46:50 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../CompetitionContentspdfdownload.js | 4 +---
.../CompetitionContentspdfpeopledata.js | 6 +-----
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js
index 598217a15..2fcd8d052 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js
@@ -23,10 +23,8 @@ class CompetitionContentspdfdownload extends Component{
return (
-
-
)
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
index 41002d5f3..4a139611c 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
@@ -21,13 +21,9 @@ class CompetitionContentspdfpeopledata extends Component{
return (
-
-
-
-
)
}
}
From 78a6a777cf9fc0de379583e3d296923aefa4b3ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Wed, 30 Oct 2019 09:49:07 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../CompetitionContentspdfdownload.js | 4 ++--
.../CompetitionContentspdfpeopledata.js | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js
index 2fcd8d052..fc461bcb2 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js
@@ -15,11 +15,11 @@ class CompetitionContentspdfdownload extends Component{
componentDidMount(){
window.document.title = '竞赛';
-
+ console.log(this.props.match.params.identifier)
}
render() {
-
+ console.log(this.props)
return (
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
index 4a139611c..45a5ab939 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
@@ -14,11 +14,11 @@ class CompetitionContentspdfpeopledata extends Component{
componentDidMount(){
window.document.title = '竞赛';
-
+ console.log(this.props.match.params.identifier)
}
render() {
-
+ console.log(this.props)
return (