paper.wxml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <wxs module="filter" src="../../../wxs/exam-fun.wxs"></wxs>
  2. <view class="exam-page mt0">
  3. <view >
  4. <i-button bindtap="emptyAnswer" type="primary" size="default">清空重做</i-button>
  5. </view>
  6. <form bindsubmit='formSubmit'>
  7. <i-panel
  8. wx:for="{{list}}"
  9. wx:for-item="item"
  10. wx:key="answerId"
  11. i-class="exam-panel-title">
  12. <i-cell-group i-class="exam-cell">
  13. <!-- 单选题 -->
  14. <i-cell wx:if="{{item.type ==2}}">
  15. <view class="single">
  16. <rich-text nodes="{{index+1}}.[单]{{item.title}}" />
  17. <radio-group class="radio-answer" bindchange="radioChange" data-index="{{index}}" >
  18. <label class="radio" wx:for="{{preList}}" wx:for-item="answer" wx:key="anserIndex" wx:if="{{item['answer'+(index+1)]}}">
  19. <view class="radio-answer">
  20. <radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}" disabled="{{item.select>0?true:false}}" >
  21. {{preList[index]}}. {{item['answer'+(index+1)]}}
  22. </radio>
  23. </view>
  24. </label>
  25. </radio-group>
  26. <view class="exam-clear mt20" wx:if="{{item.select>0}}" >
  27. <view class="exam-extend-item" >
  28. 答题结果:
  29. <text class="question-answer-right question-answer-result"
  30. wx:if="{{item.select==item.result}}">正确
  31. </text>
  32. <text class="question-answer-error question-answer-result"
  33. wx:else>错误</text>
  34. </view>
  35. <view class="exam-extend-item">
  36. 正确答案:
  37. <text wx:if="{{item.type==2}}"> {{preList[item.result-1]}}</text>
  38. </view>
  39. </view>
  40. </view>
  41. </i-cell>
  42. <!-- 多选题 -->
  43. <i-cell wx:if="{{item.type==3}}">
  44. <view >
  45. <rich-text nodes="{{index+1}}.[多]{{item.title}}" />
  46. <checkbox-group class="checkbox-answer" style="margin-top:30rpx" bindchange="checkboxChange" data-index="{{index}}">
  47. <label class="checkbox" wx:for="{{preList}}" wx:for-item="answer" wx:key="" wx:if="{{item['answer'+(index+1)]}}">
  48. <view class="checkbox-answer">
  49. <checkbox color="#2d8cf0" value="{{index+1}}" disabled="{{!!item._select}}" checked="{{filter.isSelect(index+1,item.select)}}">
  50. {{answer}}. {{item['answer'+(index+1)]}}
  51. </checkbox>
  52. </view>
  53. </label>
  54. </checkbox-group>
  55. </view>
  56. <view class="exam-clear mt20" wx:if="{{isFinish || item._select}}">
  57. <view class="exam-extend-item" >
  58. 答题结果:
  59. <text class="question-answer-right question-answer-result"
  60. wx:if="{{item.select==item.result}}">正确
  61. </text>
  62. <text class="question-answer-error question-answer-result"
  63. wx:else>错误</text>
  64. </view>
  65. <view class="exam-extend-item">
  66. 正确答案:
  67. <text> {{filter.getMultResult(item.result)}}</text>
  68. </view>
  69. </view>
  70. </i-cell>
  71. <!-- 判断 -->
  72. <i-cell wx:if="{{item.type==1}}">
  73. <view>
  74. <rich-text nodes="{{index+1}}.[判]{{item.title}}" />
  75. <radio-group class="radio-answer" bindchange="radioChange" data-index="{{index}}" >
  76. <label class="radio" wx:for="{{2}}" wx:for-item="answer" >
  77. <view class="radio-answer">
  78. <radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}" disabled="{{item.select>0?true:false}}" >
  79. {{preList[index]}}. {{item['answer'+(index+1)]}}
  80. </radio>
  81. </view>
  82. </label>
  83. </radio-group>
  84. </view>
  85. <view class="exam-clear mt20" wx:if="{{ item.select>0}}" >
  86. <view class="exam-extend-item" >
  87. 答题结果:
  88. <text class="question-answer-right question-answer-result"
  89. wx:if="{{item.select==item.result}}">正确
  90. </text>
  91. <text class="question-answer-error question-answer-result"
  92. wx:else>错误</text>
  93. </view>
  94. <view class="exam-extend-item">
  95. 正确答案:
  96. <text> {{item.result==1?'正确':'错误'}}</text>
  97. </view>
  98. </view>
  99. </i-cell>
  100. </i-cell-group>
  101. </i-panel>
  102. </form>
  103. </view>