fix -- 投票bug

This commit is contained in:
yuping
2023-02-23 00:59:03 +08:00
parent d90627b84d
commit 3fd341b5ae

View File

@@ -104,7 +104,7 @@
:src="value.optionPictureAddress"
/> -->
<div class="radio">
<label @click="choiceQuestion(key,value.optionId,state.dataInfo,index)">
<label @click="choiceQuestion(key,value.id,state.dataInfo,index)">
<!-- <input type="radio" name="one" value="right"/> -->
<div v-if="value.isAnswer" style="width:10px;height:10px;background:#4a9cf8;position:relative;left:15px;border-radius:10px;"></div>
<div v-else style="width:10px;height:10px;background:#fff;position:relative;left:15px;border-radius:10px;"></div>
@@ -253,11 +253,10 @@ const choiceQuestion = (order, id, dates, torder) => {
return
}
console.log('当前选择题目的id及序号', order, id, dates,torder)
for(let i=0;i<dates.ballotVo.voteStemVoList[torder].optionDetailList.length;i++){
dates.ballotVo.voteStemVoList[torder].optionDetailList[i].isAnswer = false;
for(let i=0;i<state.dataInfo.voteStemDtoList[i].optionDetailList.length;i++){
state.dataInfo.voteStemDtoList[torder].optionDetailList[i].isAnswer = false;
}
dates.ballotVo.voteStemVoList[torder].optionDetailList[order].isAnswer = true;
console.log(state.dataInfo)
state.dataInfo.voteStemDtoList[torder].optionDetailList[order].isAnswer = true;
}
// 提交投票