courseware
杨树林 5 years ago
parent f9098b9154
commit ce1552f344

@ -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>
}
{
// 统计结果

@ -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) {
}
}
// 翻页

Loading…
Cancel
Save