闫增涛
2024-03-29 e060ad2b2da9884e00b36796548eacc6a2b9a5d3
packageBookService/pages/bookServices/examination/questionList/index.wxml
@@ -15,7 +15,11 @@
    >
  </view>
  <!-- 题目列表 -->
  <swiper class="swiper" bind:change="changeSwiper" current="{{currentIndex}}">
  <swiper
    class="swiper"
    bindanimationfinish="changeSwiper"
    current="{{currentIndex}}"
  >
    <swiper-item wx:for="{{questionList}}" wx:key="id" style="overflow-y: auto">
      <!-- 题干 -->
      <view
@@ -46,7 +50,10 @@
          wx:elif="{{item.stemStyle == 'RichText'}} "
          class="title-RichText"
        >
          <rich-text nodes="{{item.stem.stemTxt}}"></rich-text>
          <rich-text
            nodes="{{item.stem.stemTxt}}"
            style="height: 100%"
          ></rich-text>
        </view>
        <!-- 填空题 -->
        <view wx:if="{{item.questionType == 'completion'}}">
@@ -63,7 +70,7 @@
              data-value="{{item.option}}"
              data-id="{{item.id}}"
              data-index="{{inputItem.num}}"
              class="title-input"
              class="title-input {{isNight ? 'input-night-color' : ''}}"
              style="border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx;background-color:{{isNight ? '#000' : '#fff'}}; "
              placeholder-style="{{placeholderstyle}}"
              wx:if="{{inputItem.data == 'input'}}"
@@ -103,7 +110,7 @@
            >
              <view
                style="font-size: {{sliderValue || 32}}rpx;"
                class="radio-item {{(answerType == 'option' || answerType == 'mock' ) && !submitStatus && item.userAnswer == contentItem.value ? 'radio-active' : isNight ? 'night' :''}} {{ (item.answer == contentItem.value && item.answer == item.userAnswer &&  submitStatus) ? 'radio-correct' :  (item.userAnswer == contentItem.value && item.userAnswer != item.answer && submitStatus) ?'radio-error' :'' }}"
                class="radio-item {{(answerType == 'option' || answerType == 'mock' ) && !submitStatus && item.userAnswer == contentItem.value ? 'radio-active' : isNight ? 'night' :''}} {{item.userAnswer == contentItem.value && submitStatus ?  item.isRight ? 'radio-correct' : 'radio-error' :''}}"
              >
                <!-- 仅文字 -->
                <text wx:if="{{item.optionStyle == 'Txt'}}"
@@ -124,9 +131,15 @@
                  <t-image src="{{contentItem.img}}" />
                </view>
                <!-- 富文本 -->
                <view wx:if="{{item.optionStyle == 'RichText'}}">
                <view
                  wx:if="{{item.optionStyle == 'RichText'}}"
                  class="judge-rich-box"
                >
                  <text>{{contentItem.value}}、</text>
                  <rich-text nodes="{{contentItem.txt}}"></rich-text>
                  <rich-text
                    nodes="{{  contentItem.txt}}"
                    style="display: flex; align-items: center; width: 100%"
                  ></rich-text>
                </view>
                <text
                  wx:if="{{submitStatus && (item.answer == contentItem.value && item.answer == item.userAnswer)}}"
@@ -161,17 +174,18 @@
            <t-checkbox
              block="{{false}}"
              value="{{contentItem.value}}"
              style="background-color:{{isNight ? '#000' :'#fff'}}; "
              style="background-color:{{isNight ? '#222' :'#fff'}}; "
            >
              <!-- 仅文字 -->
              <text
                wx:if="{{item.optionStyle == 'Txt'}}"
                style="color:{{ isNight  ? '#fff' : '#000'}}"
                style="color:{{ isNight  ? '#fff' : '#000'}};font-size:{{sliderValue || 32}}rpx;"
                >{{contentItem.value}}、{{contentItem.txt}}</text
              >
              <!-- 仅图片 -->
              <view wx:if="{{item.optionStyle == 'Image'}}" class="fl-center">
                <text style="color:{{ isNight  ? '#fff' : '#000'}}"
                <text
                  style="color:{{ isNight  ? '#fff' : '#000'}};font-size:{{sliderValue || 32}}rpx;"
                  >{{contentItem.value}}、</text
                >
                <t-image src="{{contentItem.img}}" />
@@ -181,10 +195,12 @@
                wx:if="{{item.optionStyle == 'TxtAndImage'}}"
                class="fl-center"
              >
                <text style="color:{{ isNight  ? '#fff' : '#000'}}"
                <text
                  style="color:{{ isNight  ? '#fff' : '#000'}};font-size:{{sliderValue || 32}}rpx;"
                  >{{contentItem.value}}、</text
                >
                <text style="color:{{ isNight  ? '#fff' : '#000'}}"
                <text
                  style="color:{{ isNight  ? '#fff' : '#000'}};font-size:{{sliderValue || 32}}rpx;"
                  >{{contentItem.txt}}</text
                >
                <t-image src="{{contentItem.img}}" />
@@ -192,7 +208,10 @@
              <!-- 富文本 -->
              <view wx:if="{{item.optionStyle == 'RichText'}}">
                <text>{{contentItem.value}}、</text>
                <rich-text nodes="{{contentItem.txt}}"></rich-text>
                <rich-text
                  nodes="{{contentItem.txt}}"
                  class="multipleChoice"
                ></rich-text>
              </view>
            </t-checkbox>
          </view>
@@ -204,7 +223,7 @@
          bind:change="onChangeRadio"
          data-value="{{item.option}}"
          data-id="{{item.id}}"
          class="option-textarea"
          class="option-textarea {{isNight ? 'textarea-night-color' :''}}"
          wx:elif="{{item.questionType == 'shortAnswer'}}"
          t-class="external-class"
          placeholder="请输入文字"
@@ -321,8 +340,15 @@
        </view>
      </view>
    </swiper-item>
    <swiper-item wx:if="{{answerType !== 'collectQuestion'}}">
    <swiper-item
      wx:if="{{answerType !== 'collectQuestion' && questionList.length}}"
    >
      <text>没有更多了。。。</text>
    </swiper-item>
    <swiper-item wx:if="{{!questionList.length}}">
      <view class="noData">
        <t-empty icon="folder-open" description="暂无数据" />
      </view>
    </swiper-item>
  </swiper>
</view>