Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

courseware
cxt 5 years ago
commit 6d394bf72e

@ -19,11 +19,13 @@ import '../css/members.css'
import '../css/busyWork.css' import '../css/busyWork.css'
import axios from 'axios' import axios from 'axios'
import Itembankstop from "../../question/component/Itembankstop";
const map={1:"未发布",2:"提交中",3:"已截止",4:"已结束"} const map={1:"未发布",2:"提交中",3:"已截止",4:"已结束"}
class PollDetailIndex extends Component{ class PollDetailIndex extends Component{
constructor(props){ constructor(props){
super(props); super(props);
this.pollssubcomRef = React.createRef();
this.state={ this.state={
tab:["0"], tab:["0"],
pollDetail:undefined, pollDetail:undefined,
@ -33,7 +35,9 @@ class PollDetailIndex extends Component{
polls_status:3, polls_status:3,
} }
} }
getpollssubcomRef = (Ref) => {
this.pollssubcomRef = Ref;
}
getPollInfo=()=>{ getPollInfo=()=>{
// console.log(this.props); // console.log(this.props);
let pollId=this.props.match.params.pollId; let pollId=this.props.match.params.pollId;
@ -67,7 +71,17 @@ class PollDetailIndex extends Component{
}catch (e) { }catch (e) {
} }
this.gettables();
} }
gettables=()=>{
try {
this.pollssubcomRef.searchInfo();
}catch (e) {
}
}
newgetPollInfo=()=>{ newgetPollInfo=()=>{
// console.log(this.props); // console.log(this.props);
let pollId=this.props.match.params.pollId; 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(){ componentDidMount(){
let {order, search, commit_status, poll_group_id, page, order_type} = this.state; 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); this.getTableList(order, search, commit_status, poll_group_id, page, order_type);
try {
this.props.getpollssubcomRef(this);
} catch (e) {
}
} }
// 翻页 // 翻页

@ -3007,9 +3007,9 @@ class PollNew extends Component {
{/*自动生成修改好的获取到的*/} {/*自动生成修改好的获取到的*/}
{/**************************************************************************/} {/**************************************************************************/}
{this.state.poll_questions === undefined ? "" : this.state.poll_questions.map((item, index) => { {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.poll_questions); // console.log(this.state.poll_questions);
console.log(this.state.adddom); // console.log(this.state.adddom);
let resultDom; let resultDom;
resultDom = <div > resultDom = <div >
<p className="clearfix font-16"> <p className="clearfix font-16">
@ -3061,7 +3061,7 @@ class PollNew extends Component {
{item.question.answers === undefined ? "" : item.question.answers.map((items, i) => { {item.question.answers === undefined ? "" : item.question.answers.map((items, i) => {
return ( return (
<div className="h20 pt20" style={{"clear": "both"}}> <div className="h20 pt20" style={{"clear": "both"}}>
<Radio value={i} className={"fl"} style={{textAlign: "left",marginTop:"3px"}}></Radio> <Radio value={i} className={"fl"} style={{textAlign: "left"}}></Radio>
<span className={" flex1 "} style={{textAlign: "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1116px"}} >{items.answer_text}</span> <span className={" flex1 "} style={{textAlign: "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1116px"}} >{items.answer_text}</span>
</div> </div>

@ -35,7 +35,8 @@ class Immediatelypublish extends Component{
modalsType:false, modalsType:false,
modalsTopval:"", modalsTopval:"",
loadtype:false, loadtype:false,
chooseId:undefined chooseId:undefined,
immediatelyopen:false
} }
} }
//立即发布 //立即发布
@ -73,6 +74,7 @@ class Immediatelypublish extends Component{
Saves:this.homeworkstartend, Saves:this.homeworkstartend,
course_groups:response.data.course_groups, 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, 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, Saves:this.homeworkstartend,
course_groups:response.data.course_groups, 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, 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) => { }).catch((error) => {
@ -386,6 +389,7 @@ class Immediatelypublish extends Component{
starttimes={this.state.starttimes} starttimes={this.state.starttimes}
starttimesend={this.state.starttimesend} starttimesend={this.state.starttimesend}
typs={this.state.typs} typs={this.state.typs}
immediatelyopen={this.state.immediatelyopen}
/>:""} />:""}
{/* 公用的提示弹框 */} {/* 公用的提示弹框 */}

Loading…
Cancel
Save