|
|
|
@ -135,7 +135,7 @@ class PollInfo extends Component{
|
|
|
|
|
|
|
|
|
|
postAnswer=(q_id,a_id,text,key)=>{
|
|
|
|
|
let url=`/poll_questions/${q_id}/poll_votes.json`;
|
|
|
|
|
|
|
|
|
|
console.log(text);
|
|
|
|
|
axios.post(url,{
|
|
|
|
|
poll_answer_id:a_id,
|
|
|
|
|
vote_text:text
|
|
|
|
@ -207,8 +207,9 @@ class PollInfo extends Component{
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
if(text!=undefined){
|
|
|
|
|
url+="vote_text="+text;
|
|
|
|
|
axios.post(url).then((result)=>{
|
|
|
|
|
axios.post((url),{
|
|
|
|
|
vote_text:text
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
if(result.status==200){
|
|
|
|
|
const answer=Object.assign({}, this.state.question_answered[key]);
|
|
|
|
|
answer.ques_status=result.data.poll_vote.question_status;
|
|
|
|
@ -400,8 +401,9 @@ class PollInfo extends Component{
|
|
|
|
|
{
|
|
|
|
|
item.question.answers && item.question.answers.map((i,k)=>{
|
|
|
|
|
return(
|
|
|
|
|
<li className={i.answer_text=="其他"?"df":""}>
|
|
|
|
|
<Radio name={[item.question.id,key]} className="break-word" value={i.answer_id} >{i.answer_text}</Radio>
|
|
|
|
|
<li className={i.answer_text=="其他"?"df clearfix":"clearfix"}>
|
|
|
|
|
<Radio name={[item.question.id,key]} className="fl" value={i.answer_id} ></Radio>
|
|
|
|
|
<span className="break-word fl" style={{maxWidth:"1116px"}}>{i.answer_text}</span>
|
|
|
|
|
{
|
|
|
|
|
i.answer_text=="其他" ?
|
|
|
|
|
<React.Fragment>
|
|
|
|
@ -442,8 +444,9 @@ class PollInfo extends Component{
|
|
|
|
|
{
|
|
|
|
|
item.question.answers && item.question.answers.map((i,k)=>{
|
|
|
|
|
return(
|
|
|
|
|
<li className={i.answer_text=="其他"?"df":""}>
|
|
|
|
|
<Checkbox className="break-word" value={i.answer_id}>{i.answer_text}</Checkbox>
|
|
|
|
|
<li className={i.answer_text=="其他"?"df clearfix":"clearfix"}>
|
|
|
|
|
<Checkbox className="fl mr8" value={i.answer_id}></Checkbox>
|
|
|
|
|
<span className="break-word fl" style={{maxWidth:"1116px"}}>{i.answer_text}</span>
|
|
|
|
|
{
|
|
|
|
|
i.answer_text=="其他"?
|
|
|
|
|
<React.Fragment>
|
|
|
|
|