From 124b36fc72af9cc89f13ae83a8d0d09cd6be5b70 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Wed, 4 Sep 2019 15:50:44 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E9=A2=98=E5=BA=93=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../completetaskdetails/Completetaskpage.js | 1 +
.../comtopicdetails/CompletetopicdePage.js | 1 +
.../courses/groupjobbank/GroupjobbankPage.js | 1 +
.../questionbank/Generaljobbankdetails.js | 1 +
.../usersInfo/banks/ExerciseBanksDetail.js | 2 +-
.../user/usersInfo/banks/PollBanksContent.js | 2 +-
.../modules/user/usersInfo/banks/banksMenu.js | 24 +++++++++++++++----
7 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js b/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js
index fe2602b80..e2b1e29e1 100644
--- a/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js
+++ b/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js
@@ -81,6 +81,7 @@ class Completetaskpage extends Component {
tos:`/banks/gtask/${workids}/edit/${this.props.match.params.type}`,
id:workids,
is_public:response && response.data && response.data.is_public,
+ type:this.props.match.params.type,
}
this.setState({
banksMenu:menuData
diff --git a/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js b/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js
index 6ca17505e..2235c5a1e 100644
--- a/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js
+++ b/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js
@@ -76,6 +76,7 @@ class CompletetopicdePage extends Component {
tos:`/banks/gtopic/${workids}/edit/${this.props.match.params.type}`,
id:workids,
is_public:response && response.data && response.data.is_public,
+ type:this.props.match.params.type,
}
this.setState({
banksMenu:menuData
diff --git a/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js b/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js
index 17503be3e..394477a7d 100644
--- a/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js
+++ b/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js
@@ -86,6 +86,7 @@ class GroupjobbankPage extends Component {
tos:`/banks/group/${workids}/edit/${this.props.match.params.type}`,
id:workids,
is_public:response && response.data && response.data.is_public,
+ type:this.props.match.params.type,
}
this.setState({
banksMenu:menuData
diff --git a/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js b/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js
index e8fe85077..85222c5e7 100644
--- a/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js
+++ b/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js
@@ -86,6 +86,7 @@ class Generaljobbankdetails extends Component {
tos:`/banks/normal/${workids}/edit/${this.props.match.params.type}`,
id:workids,
is_public:response && response.data && response.data.is_public,
+ type:this.props.match.params.type,
}
this.setState({
banksMenu:menuData
diff --git a/public/react/src/modules/user/usersInfo/banks/ExerciseBanksDetail.js b/public/react/src/modules/user/usersInfo/banks/ExerciseBanksDetail.js
index 6bce6afa3..08988d824 100644
--- a/public/react/src/modules/user/usersInfo/banks/ExerciseBanksDetail.js
+++ b/public/react/src/modules/user/usersInfo/banks/ExerciseBanksDetail.js
@@ -33,7 +33,7 @@ class ExerciseBanksDetail extends Component{
tos: `/banks/exercise/${Id}/edit/${this.props.match.params.type}`,
id: Id,
is_public: result.data.exercise && result.data.exercise.is_public,
-
+ type:this.props.match.params.type,
}
this.props.initPublic(crumbData,menuData);
}
diff --git a/public/react/src/modules/user/usersInfo/banks/PollBanksContent.js b/public/react/src/modules/user/usersInfo/banks/PollBanksContent.js
index 211cbf492..0fa27c4d7 100644
--- a/public/react/src/modules/user/usersInfo/banks/PollBanksContent.js
+++ b/public/react/src/modules/user/usersInfo/banks/PollBanksContent.js
@@ -42,7 +42,7 @@ class PollBanksContent extends Component{
tos:`/banks/poll/${bankId}/edit/${this.props.match.params.type}`,
id:bankId,
is_public:result.data.poll && result.data.poll.is_public,
-
+ type:this.props.match.params.type,
}
this.props.initPublic(crumbData,menuData);
this.setState({
diff --git a/public/react/src/modules/user/usersInfo/banks/banksMenu.js b/public/react/src/modules/user/usersInfo/banks/banksMenu.js
index 4bec758eb..5188453d9 100644
--- a/public/react/src/modules/user/usersInfo/banks/banksMenu.js
+++ b/public/react/src/modules/user/usersInfo/banks/banksMenu.js
@@ -151,11 +151,25 @@ class BanksMenu extends Component{
this.sendTopics()} style="blue" className="ml20 font-16">发送
:
-
- this.deletecheckBoxValues(banksMenu&&banksMenu.id,banksMenu&&banksMenu.category)}style="blue" className="ml20 font-16">删除
- 编辑
- this.sendTopics()} style="blue" className="ml20 font-16">发送
-
+ (banksMenu&&banksMenu.type==="publicly"?
+ (
+ banksMenu.is_public===true?
+
+ this.sendTopics()} style="blue" className="ml20 font-16">发送
+
+ :
+
+ this.deletecheckBoxValues(banksMenu&&banksMenu.id,banksMenu&&banksMenu.category)}style="blue" className="ml20 font-16">删除
+ 编辑
+
+ )
+ :
+
+ this.deletecheckBoxValues(banksMenu&&banksMenu.id,banksMenu&&banksMenu.category)}style="blue" className="ml20 font-16">删除
+ 编辑
+ this.sendTopics()} style="blue" className="ml20 font-16">发送
+
+ )
}
From e5ddf5e189856811c4057f7ea82ca5b0e271b7e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Wed, 4 Sep 2019 15:51:38 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E9=A2=98=E5=BA=93=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../react/src/modules/user/usersInfo/banks/banksMenu.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/public/react/src/modules/user/usersInfo/banks/banksMenu.js b/public/react/src/modules/user/usersInfo/banks/banksMenu.js
index 5188453d9..8f59f07de 100644
--- a/public/react/src/modules/user/usersInfo/banks/banksMenu.js
+++ b/public/react/src/modules/user/usersInfo/banks/banksMenu.js
@@ -153,7 +153,13 @@ class BanksMenu extends Component{
:
(banksMenu&&banksMenu.type==="publicly"?
(
- banksMenu.is_public===true?
+ banksMenu===undefined?
+
+ this.deletecheckBoxValues(banksMenu&&banksMenu.id,banksMenu&&banksMenu.category)}style="blue" className="ml20 font-16">删除
+ 编辑
+ this.sendTopics()} style="blue" className="ml20 font-16">发送
+
+ :banksMenu.is_public===true?
this.sendTopics()} style="blue" className="ml20 font-16">发送