From ec034c3cf8024dc44814a0cb2ff4e192e9000d58 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Thu, 19 Mar 2020 17:00:37 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=BC=A0=E6=A0=87?=
=?UTF-8?q?=E5=B0=8F=E6=89=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/courses/poll/PollNew.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js
index a3cbba89b..f6c4eba1c 100644
--- a/public/react/src/modules/courses/poll/PollNew.js
+++ b/public/react/src/modules/courses/poll/PollNew.js
@@ -3007,9 +3007,9 @@ class PollNew extends Component {
{/*自动生成修改好的获取到的*/}
{/**************************************************************************/}
{this.state.poll_questions === undefined ? "" : this.state.poll_questions.map((item, index) => {
- console.log('打印this.state.poll_questions');
- console.log(this.state.poll_questions);
- console.log(this.state.adddom);
+ // console.log('打印this.state.poll_questions');
+ // console.log(this.state.poll_questions);
+ // console.log(this.state.adddom);
let resultDom;
resultDom =
@@ -3061,7 +3061,7 @@ class PollNew extends Component {
{item.question.answers === undefined ? "" : item.question.answers.map((items, i) => {
return (
-
+
{items.answer_text}
From 481dff9e0642caad46f01b6d46667ee90a3d3e57 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Thu, 19 Mar 2020 17:34:55 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=95=E5=8D=B7?=
=?UTF-8?q?=E9=97=AE=E5=8D=B7=E5=8F=91=E5=B8=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/poll/pollPublicBtn/ImmediatelyPublish.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js b/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js
index f10474fdf..933ca1996 100644
--- a/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js
+++ b/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js
@@ -35,7 +35,8 @@ class Immediatelypublish extends Component{
modalsType:false,
modalsTopval:"",
loadtype:false,
- chooseId:undefined
+ chooseId:undefined,
+ immediatelyopen:false
}
}
//立即发布
@@ -73,6 +74,7 @@ class Immediatelypublish extends Component{
Saves:this.homeworkstartend,
course_groups:response.data.course_groups,
starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time,
+ immediatelyopen:response.data.course_groups===null||response.data.course_groups.length===0?false:true,
})
}
@@ -100,6 +102,7 @@ class Immediatelypublish extends Component{
Saves:this.homeworkstartend,
course_groups:response.data.course_groups,
starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time,
+ immediatelyopen:response.data.course_groups===null||response.data.course_groups.length===0?false:true,
})
}
}).catch((error) => {
@@ -386,6 +389,7 @@ class Immediatelypublish extends Component{
starttimes={this.state.starttimes}
starttimesend={this.state.starttimesend}
typs={this.state.typs}
+ immediatelyopen={this.state.immediatelyopen}
/>:""}
{/* 公用的提示弹框 */}
From ce1552f344f50e7d61c2d73356d7e7939bddda11 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Thu, 19 Mar 2020 17:44:17 +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
---
.../modules/courses/poll/PollDetailIndex.js | 22 +++++++++++++++++--
.../courses/poll/PollDetailTabFirst.js | 5 +++++
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/public/react/src/modules/courses/poll/PollDetailIndex.js b/public/react/src/modules/courses/poll/PollDetailIndex.js
index c0e590766..aee6ee12b 100644
--- a/public/react/src/modules/courses/poll/PollDetailIndex.js
+++ b/public/react/src/modules/courses/poll/PollDetailIndex.js
@@ -19,11 +19,13 @@ import '../css/members.css'
import '../css/busyWork.css'
import axios from 'axios'
+import Itembankstop from "../../question/component/Itembankstop";
const map={1:"未发布",2:"提交中",3:"已截止",4:"已结束"}
class PollDetailIndex extends Component{
constructor(props){
super(props);
+ this.pollssubcomRef = React.createRef();
this.state={
tab:["0"],
pollDetail:undefined,
@@ -33,7 +35,9 @@ class PollDetailIndex extends Component{
polls_status:3,
}
}
-
+ getpollssubcomRef = (Ref) => {
+ this.pollssubcomRef = Ref;
+ }
getPollInfo=()=>{
// console.log(this.props);
let pollId=this.props.match.params.pollId;
@@ -67,7 +71,17 @@ class PollDetailIndex extends Component{
}catch (e) {
}
+ this.gettables();
}
+
+ gettables=()=>{
+ try {
+ this.pollssubcomRef.searchInfo();
+ }catch (e) {
+
+ }
+ }
+
newgetPollInfo=()=>{
// console.log(this.props);
let pollId=this.props.match.params.pollId;
@@ -263,7 +277,11 @@ class PollDetailIndex extends Component{
{
// 答题列表
- parseInt(tab[0])==0 &&
+ parseInt(tab[0])==0 &&
this.getpollssubcomRef(ref)}
+ >
}
{
// 统计结果
diff --git a/public/react/src/modules/courses/poll/PollDetailTabFirst.js b/public/react/src/modules/courses/poll/PollDetailTabFirst.js
index 912894a9b..2da0924ed 100644
--- a/public/react/src/modules/courses/poll/PollDetailTabFirst.js
+++ b/public/react/src/modules/courses/poll/PollDetailTabFirst.js
@@ -132,6 +132,11 @@ class PollDetailTabFirst extends Component{
componentDidMount(){
let {order, search, commit_status, poll_group_id, page, order_type} = this.state;
this.getTableList(order, search, commit_status, poll_group_id, page, order_type);
+ try {
+ this.props.getpollssubcomRef(this);
+ } catch (e) {
+
+ }
}
// 翻页