闫增涛
2024-12-16 1fa2461678d7f93b88f5666c4898e5b6c72080f3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!--packageCourse/components/questionDom/index.wxml-->
<view class="questionDom">
  <view class="list-item" wx:for="{{questionList}}" wx:for-item="pitem" wx:key="pindex">
    <view class="list-item-title">
      {{ pitem.name }}
      <text wx:if="isPreview">(共{{ pitem.data.length }}题<text wx:if="{{pitem.totalScore>0}}">,总分:{{ pitem.totalScore }} 分</text>)</text>
    </view>
    <view class="list-item-box" wx:for="{{pitem.data}}" wx:for-item="item" wx:key="index">
      <view class="list-item-box-title-box">
        <t-checkbox wx:if="{{noCheckbox}}" block="{{false}}" value="{{item.isCheck}}">
          <view Slot='label'>
            <rich-text nodes="{{item.questionStem.stemTxt}}"></rich-text>
          </view>
        </t-checkbox>
        <view class="list-item-box-title" wx:else>
          <p class="questionT">
            <text>{{index+1}}、</text>
            <rich-text nodes="{{item.questionStem.stemTxt}}"></rich-text>
          </p>
        </view>
      </view>
      <view class="questionData">
        <view class="shortAnswer" wx:if="{{item.questionType == 'shortAnswer'}}">
          <t-textarea disabled placeholder="{{item.userAnswer}}" />
        </view>
        <view class="discuss" wx:if="{{item.questionType == 'discuss'}}">
          <t-textarea disabled placeholder="{{item.userAnswer}}" />
        </view>
        <view class="discuss" wx:if="{{item.questionType == 'completion'}}">
          <t-textarea disabled placeholder="{{item.userAnswer}}" />
        </view>
        <view class="judge" wx:if="{{item.questionType == 'judge'}}">
          <t-radio-group>
            <t-radio block="{{false}}" wx:for="{{item.questionOption}}" wx:for-item="{{ritem}}" wx:index="{{ritem.index}}" label="{{ritem.value}}" value="{{ritem.value}}" />
          </t-radio-group>
        </view>
        <view class="singleChoice" wx:if="{{item.questionType == 'singleChoice'}}">
          <t-radio-group>
            <t-radio block="{{false}}" wx:for="{{item.questionOption}}" wx:for-item="{{ritem}}" wx:index="{{ritem.index}}" label="{{ritem.value}}" value="{{ritem.value}}">
              <text>{{ritem.value}}</text>. <text>{{ritem.txt}}</text>
            </t-radio>
          </t-radio-group>
        </view>
        <view class="multipleChoice" wx:if="{{item.questionType == 'multipleChoice'}}">
          <t-checkbox-group>
            <t-checkbox block="{{false}}" wx:for="{{item.questionOption}}" wx:for-item="{{mitem}}" wx:index="{{mitem.index}}" label="{{mitem.value}}" value="{{mitem.value}}">
              <text>{{mitem.value}}</text>. <text>{{mitem.txt}}</text>
            </t-checkbox>
          </t-checkbox-group>
        </view>
      </view>
    </view>
  </view>
</view>