|
|
|
@ -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 && <PollTabFirst {...this.props} {...this.state}></PollTabFirst>
|
|
|
|
|
parseInt(tab[0])==0 && <PollTabFirst
|
|
|
|
|
{...this.props}
|
|
|
|
|
{...this.state}
|
|
|
|
|
getpollssubcomRef={(ref) => this.getpollssubcomRef(ref)}
|
|
|
|
|
></PollTabFirst>
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
// 统计结果
|
|
|
|
|