|
|
|
@ -2061,8 +2061,8 @@ class PollNew extends Component {
|
|
|
|
|
// console.log(this.state.adddom);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//提交题目//没有就创建新的题库,新建问题和保存题目不一样不能同时保存 这里只是新建 和编辑 标题和须知
|
|
|
|
|
submitQuestionnaire = () => {
|
|
|
|
|
//提交题目//没有就创建新的题库,新建问newz题和保存题目不一样不能同时保存 这里只是新建 和编辑 标题和须知
|
|
|
|
|
submitQuestionnaire = (mews) => {
|
|
|
|
|
console.log("调用了submitQuestionnaire")
|
|
|
|
|
if (this.state.Newedit === true) {
|
|
|
|
|
|
|
|
|
@ -2084,6 +2084,12 @@ class PollNew extends Component {
|
|
|
|
|
pollid = this.state.pollid;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(mews ==="new"){
|
|
|
|
|
if(this.state.poll_questions&&this.state.poll_questions.length===0){
|
|
|
|
|
this.props.showNotification("至少创建1个题目");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var url = `/polls/${pollid}.json`;
|
|
|
|
|
axios.put(url, {
|
|
|
|
@ -2804,9 +2810,9 @@ class PollNew extends Component {
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<li className="clearfix mt30 mb50">
|
|
|
|
|
<a type="primary" className="defalutSubmitbtn fl mr20"
|
|
|
|
|
onClick={() => this.submitQuestionnaire()}>提交</a>
|
|
|
|
|
<a className="defalutCancelbtn fl" onClick={() => this.props.history.goBack()}>取消</ a>
|
|
|
|
|
<a className="defalutCancelbtn fl mr20" onClick={() => this.props.history.goBack()}>取消</a>
|
|
|
|
|
<a type="primary" className="defalutSubmitbtn fl"
|
|
|
|
|
onClick={() => this.submitQuestionnaire(this.props.match.params.news)}>提交</a>
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2823,9 +2829,9 @@ class PollNew extends Component {
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<li className="clearfix mt30 mb50">
|
|
|
|
|
<a className="defalutSubmitbtn fl mr20"onClick={() => this.props.history.goBack()}>取消</a>
|
|
|
|
|
<a type="primary" className="defalutCancelbtn fl"
|
|
|
|
|
onClick={() => this.submitQuestionnaire()}>提交</a>
|
|
|
|
|
<a className="defalutCancelbtn fl mr20"onClick={() => this.props.history.goBack()}>取消</a>
|
|
|
|
|
<a type="primary" className=" defalutSubmitbtn fl"
|
|
|
|
|
onClick={() => this.submitQuestionnaire(this.props.match.params.news)}>提交</a>
|
|
|
|
|
</li>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|