123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- <wxs module="filter" src="../../../wxs/exam-fun.wxs"></wxs>
- <view class="exam-page">
- <view class="view-wrap">
- <view class="exam-count-down" wx:if="{{isFinish}}">已经交卷</view>
- <view class="exam-count-down" wx:else>{{remainTimeStr}}</view>
- </view>
- <view class="view-wrap-hidden">
- </view>
- <view>
- <view class="exam-name-title">
- <h1>{{info.title}}</h1>
- </view>
- <form bindsubmit='formSubmit'>
- <i-panel title="{{titleItem.title}}"
- wx:for="{{list}}"
- wx:for-item="item"
- wx:key="answerId"
- i-class="exam-panel-title">
-
- <i-cell-group i-class="exam-cell">
- <!-- 单选题 -->
- <i-cell wx:if="{{item.type==2}}">
- <view class="single">
- <rich-text nodes="{{index+1}}.[单]{{item.title}}" />
- <radio-group class="radio-answer" bindchange="radioChange" data-index="{{index}}" >
- <label class="radio" wx:for="{{preList}}" wx:for-item="answer" wx:key="anserIndex" wx:if="{{item['answer'+(index+1)]}}">
- <view class="radio-answer">
- <radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}" disabled="{{item.select>0?true:false}}" >
- {{preList[index]}}. {{item['answer'+(index+1)]}}
- </radio>
- </view>
- </label>
- </radio-group>
- <view class="exam-clear mt20" wx:if="{{isFinish || item.select>0}}" >
- <view class="exam-extend-item" >
- 答题结果:
- <text class="question-answer-right question-answer-result"
- wx:if="{{item.select==item.result}}">正确
- </text>
- <text class="question-answer-error question-answer-result"
- wx:else>错误</text>
- </view>
- <view class="exam-extend-item">
- 正确答案:
- <text wx:if="{{item.type==2}}"> {{preList[item.result-1]}}</text>
- </view>
- </view>
- </view>
- </i-cell>
- <!-- 多选题 -->
- <i-cell wx:if="{{item.type==3}}">
- <view >
- <rich-text nodes="{{index+1}}.[多]{{item.title}}" />
- <checkbox-group class="checkbox-answer" style="margin-top:30rpx" bindchange="checkboxChange" data-index="{{index}}">
- <label class="checkbox" wx:for="{{preList}}" wx:for-item="answer" wx:if="{{item['answer'+(index+1)]}}">
- <view class="checkbox-answer">
- <checkbox color="#2d8cf0" value="{{index+1}}" disabled="{{!!item._select}}">
- {{answer}}. {{item['answer'+(index+1)]}}
- </checkbox>
- </view>
- </label>
-
- </checkbox-group>
- </view>
- <view class="exam-clear mt20" wx:if="{{isFinish || item._select}}">
- <view class="exam-extend-item" >
- 答题结果:
- <text class="question-answer-right question-answer-result"
- wx:if="{{item.select==item.result}}">正确
- </text>
- <text class="question-answer-error question-answer-result"
- wx:else>错误</text>
- </view>
- <view class="exam-extend-item">
- 正确答案:
- <text> {{filter.getMultResult(item.result)}}</text>
- </view>
- </view>
- </i-cell>
- <!-- 判断 -->
- <i-cell wx:if="{{item.type==1}}">
- <view>
- <rich-text nodes="{{index+1}}.[判]{{item.title}}" />
- <radio-group class="radio-answer" bindchange="radioChange" data-index="{{index}}" >
- <label class="radio" wx:for="{{2}}" wx:for-item="answer" >
- <view class="radio-answer">
- <radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}" disabled="{{item.select>0?true:false}}" >
- {{preList[index]}}. {{item['answer'+(index+1)]}}
- </radio>
- </view>
- </label>
- </radio-group>
- </view>
- <view class="exam-clear mt20" wx:if="{{isFinish || item.select>0}}" >
- <view class="exam-extend-item" >
- 答题结果:
- <text class="question-answer-right question-answer-result"
- wx:if="{{item.select==item.result}}">正确
- </text>
- <text class="question-answer-error question-answer-result"
- wx:else>错误</text>
- </view>
- <view class="exam-extend-item">
- 正确答案:
- <text> {{item.result==1?'正确':'错误'}}</text>
- </view>
- </view>
- </i-cell>
- </i-cell-group>
- </i-panel>
- <view>
- <button class="i-btn i-btn-primary i-btn-square" form-type='submit' disabled="{{!!isFinish}}">提交</button>
- </view>
- <i-action-sheet visible="true" visible="{{timeOutShow}}" mask-closable="{{ false }}">
- <view slot="header" style="padding: 16px">
- <view class="exam-timeout-title">考试试卷结束,请提交试卷!</view>
- <button class="i-btn i-btn-primary i-btn-square" form-type='submit'>提交</button>
- </view>
- </i-action-sheet>
- </form>
- <i-modal title="考试结果" visible="{{modalShow}}" bind:ok="returnRecord" bind:cancel="returnRecord">
- <view>我的分数:{{result.correct}} </view>
- </i-modal>
- <i-spin size="large" fix wx:if="{{ spinShow }}"></i-spin>
- <i-message id="message" />
- </view>
- </view>
|