111
QYF-GitLab1
2024-12-23 c99f9976a5ef9d8974105feb8fc0580a10adf98c
packageBookService/pages/bookServices/examination/questionOptions/index.wxml
@@ -1,63 +1,140 @@
<!--pages/bookServices/examination/questionOptions/index.wxml-->
<view class="page-bottom" style="color: {{isNight ? '#fff' : '#000'}}; background-color:{{isNight ? '#000' : '#fff'}}">
  <view class="li-option" bind:tap="setCollect" style="color: {{isNight ? '#fff' : '#000'}};">
    <t-image src="{{ questionDataList[currentIndex].isCollect ? '/static/images/bookService/detail/collecting.png' : '/static/images/bookService/examination/collect.png'}}">
    </t-image>
<view
  class="page-bottom"
  style="color: {{isNight ? '#fff' : '#000'}}; background-color:{{isNight ? '#202020' : '#fff'}}"
>
  <view
    class="li-option"
    bind:tap="setCollect"
    style="color: {{isNight ? '#fff' : '#000'}};"
    wx:if="{{answerType !== 'interaction'}}"
  >
    <image
      src="{{ questionDataList[currentIndex].isCollect ? '/static/images/bookService/detail/collecting.png' : isNight ? '/static/images/bookService/examination/wodeshoucang-w.png' : '/static/images/bookService/examination/collect.png'}}"
    />
    收藏
  </view>
  <view class="li-option" bind:tap="handlePopup" style="color: {{isNight ? '#fff' : '#000'}};">
    <t-image src="/static/images/bookService/examination/questionCard.png"></t-image>
  <view
    class="li-option"
    bind:tap="handlePopup"
    style="color: {{isNight ? '#fff' : '#000'}};"
  >
    <image
      src="{{isNight ? '/static/images/bookService/examination/datika-w.png' : '/static/images/bookService/examination/questionCard.png'}}"
    />
    答题卡
  </view>
  <view class="li-option" bind:tap="setUpBtn" style="color: {{isNight ? '#fff' : '#000'}};">
    <t-image src="/static/images/bookService/examination/setting.png"></t-image>
  <view
    class="li-option"
    bind:tap="setUpBtn"
    style="color: {{isNight ? '#fff' : '#000'}};"
  >
    <image
      src="{{isNight ? '/static/images/bookService/examination/setting-w.png' : '/static/images/bookService/examination/setting.png'}}"
    />
    设置
  </view>
  <view class="li-option" bind:tap="resterBtn" wx:if="{{answerType == 'option' || (answerType == 'mock' && !submitStatus)}}" style="color: {{isNight ? '#fff' : '#000'}};">
    <t-image src="/static/images/bookService/examination/reset.png"></t-image>
  <view
    class="li-option"
    bind:tap="resterBtn"
    wx:if="{{answerType == 'option' || (answerType == 'mock' && !submitStatus) || (answerType == 'interaction' && !joinGroup)}}"
    style="color: {{isNight ? '#fff' : '#000'}};"
  >
    <image
      src="{{isNight ? '/static/images/bookService/examination/chongzuo-w.png' : '/static/images/bookService/examination/reset.png'}}"
    />
    重做
  </view>
  <view class="bottom-submit">
    <t-button theme="primary" size="large" style="{{btnStyle}}" bind:tap="submitBtn">{{(answerType == 'option' || answerType == 'mock') && !submitStatus ? '提交' :
      '退出'}}</t-button>
    <t-button
      theme="primary"
      size="large"
      style="{{btnStyle}}"
      bind:tap="submitBtn"
      >{{(answerType == 'option' || answerType == 'mock' || answerType ==
      'interaction') && !submitStatus ? '提交' : '退出'}}</t-button
    >
  </view>
</view>
<!-- 答题卡 -->
<t-popup visible="{{questionCardState}}" bind:visible-change="onVisibleChange" placement="bottom">
<t-popup
  visible="{{questionCardState}}"
  bind:visible-change="onVisibleChange"
  placement="bottom"
>
  <view class="popup-block">
    <view class="popup-header">
      <view class="popup-title">答题卡</view>
    </view>
    <view class="question-explain">
      <view class="explain-answered">
      <view
        class="explain-answered"
        wx:if="{{answerType == 'collectQuestion' || answerType == 'errorQuestion' || (answerType == 'option' && !submitStatus) || (answerType == 'mock' && !submitStatus)}}"
      >
        <text class="answered explain-color-box"></text>
        <text>已答</text>
      </view>
      <view class="explain-un-answered">
      <view
        class="explain-un-answered"
        wx:if="{{answerType == 'collectQuestion' || answerType == 'errorQuestion' || (answerType == 'option' && !submitStatus) || (answerType == 'mock' && !submitStatus)}}"
      >
        <text class="un-answered explain-color-box"></text>
        <text>未答</text>
      </view>
      <view
        class="error-box"
        wx:if="{{((answerType == 'option' || answerType == 'mock') && submitStatus) || answerType == 'collectQuestion' || answerType == 'errorQuestion'}}"
      >
        <text
          class="explain-color-box"
          style="background-color: #ee1818"
        ></text>
        <text>错误</text>
      </view>
      <view
        class="correct-box"
        wx:if="{{((answerType == 'option' || answerType == 'mock') && submitStatus) || answerType == 'collectQuestion' || answerType == 'errorQuestion'}}"
      >
        <text
          class="explain-color-box"
          style="background-color: #1fbc1f"
        ></text>
        <text>正确</text>
      </view>
    </view>
    <view class="question-card-list">
      <view wx:for="{{cardList}}" class="card-box">
    <scroll-view scroll-y="{{true}}" class="question-card-list">
      <view wx:for="{{cardList}}" wx:key="index" class="card-box">
        <!-- 题型 -->
        <view class="question-title">
        <view class="question-title" wx:if="{{item.infoList.length}}">
          <text class="color-box"></text>
          <text class="title-text">{{item.catalogName}}</text>
        </view>
        <view class="question-list">
          <view bind:tap="goQuestion" data-id="{{citem.id}}" wx:for="{{item.infoList}}" wx:for-item="citem" wx:for-index="cindex" class="question-box {{citem.isUserAnswer ? 'answered' : 'un-answered'}}">
          <view
            bind:tap="goQuestion"
            data-id="{{citem.id}}"
            wx:for="{{item.infoList}}"
            wx:for-item="citem"
            wx:for-index="cindex"
            wx:key="cindex"
            style="border: {{showId == citem.id ? '1px solid #ff6c00' : ''}}"
            class="question-box {{ citem.isUserAnswer ? 'answered' : 'un-answered' }} {{ ( ((answerType == 'option' || answerType == 'mock') && submitStatus || answerType == 'collectQuestion' || answerType == 'errorQuestion')  && citem.questionType !== 'shortAnswer' )  ? citem.isRight && citem.isComplete ? 'correct-box-color' : citem.isComplete && !citem.isRight ?  'error-box-color' : '' :''}} "
          >
            {{citem.number}}
          </view>
        </view>
      </view>
    </view>
    </scroll-view>
  </view>
</t-popup>
<!-- 设置 -->
<t-popup visible="{{setUpPopup}}" bind:visible-change="onSetUpChange" placement="bottom">
<t-popup
  visible="{{setUpPopup}}"
  bind:visible-change="onSetUpChange"
  placement="bottom"
>
  <view class="popup-block set-up-popup">
    <view class="popup-header">
      <view class="popup-title">设置</view>
@@ -66,27 +143,56 @@
    <view class="brightness">
      <text>A-</text>
      <view class="brightness-slider">
        <t-slider value="{{sliderValue}}" theme="capsule" step="{{10}}" bind:change="onChangeSlider" />
        <!-- <t-slider
          value="{{sliderValue}}"
          theme="capsule"
          min="{{24}}"
          max="{{100}}"
          step="{{7}}"
          bind:change="onChangeSlider"
        /> -->
        <slider
          value="{{sliderValue}}"
          min="{{28}}"
          max="{{48}}"
          step="{{7}}"
          activeColor="#ff6c00"
          bind:change="onChangeSlider"
        />
      </view>
      <text>A+</text>
    </view>
    <!-- 模式 -->
    <view>
      <t-radio-group class="test-radio" t-class="horizontal-box" value="{{radioItem}}" bind:change="onRadioChange" style="margin: 0px">
      <t-radio-group
        class="test-radio"
        t-class="horizontal-box"
        value="{{radioItem}}"
        bind:change="onRadioChange"
        style="margin: 0px"
      >
        <view class="card {{radioItem == 'daytime' ? 'card--active' : ''}}">
          <t-radio value="daytime" icon="none" borderless>
          <t-radio value="daytime" icon="none" borderless style="height: 100%">
            <view class="radio-content" slot="content">
              <t-image src="{{ radioItem == 'daytime' ? '/static/images/bookService/examination/rijian.png' : '/static/images/bookService/detail/notest.png'}}"></t-image>
              <text style="color: {{radioItem == 'daytime' ? '#fff':''}};">日间模式</text>
              <image
                src="{{ radioItem == 'daytime' ? '/static/images/bookService/examination/rijian-click.png' : '/static/images/bookService/examination/rijian.png'}}"
              />
              <text style="color: {{radioItem == 'daytime' ? '#fff':''}};"
                >日间模式</text
              >
            </view>
          </t-radio>
        </view>
        <view class="card {{radioItem == 'night' ? 'card--active' : ''}}">
          <t-radio value="night" icon="none" borderless>
          <t-radio value="night" icon="none" borderless style="height: 100%">
            <view class="radio-content" slot="content">
              <t-image src="{{ radioItem == 'night' ? '/static/images/bookService/detail/practice-icon.png' : '/static/images/bookService/examination/yejian.png'}}"></t-image>
              <text style="color: {{radioItem == 'night' ? '#fff':''}};">夜间模式</text>
              <image
                src="{{ radioItem == 'night' ? '/static/images/bookService/examination/yejian-click.png' : '/static/images/bookService/examination/yejian.png'}}"
              />
              <text style="color: {{radioItem == 'night' ? '#fff':''}};"
                >夜间模式</text
              >
            </view>
          </t-radio>
        </view>
@@ -97,7 +203,13 @@
<!-- 测试报告 -->
<t-dialog class="test-report" visible="{{testReportState}}" cancel-btn="{{null}}" confirm-btn="{{null}}" close-btn="{{true}}" title="测试报告" bind:close="closeTestReportDialog">
<t-dialog
  class="test-report"
  visible="{{testReportState}}"
  confirm-btn="{{null}}"
  title="测试报告"
  bind:close="closeTestReportDialog"
>
  <view slot="content" class="test-report">
    <view class="report-content-top">
      <view class="report-li">
@@ -110,24 +222,34 @@
      </view>
      <view class="report-li">
        <view class="report-li-left">其中客观题:</view>
        <view class="report-li-right">{{subjectiveTotal}}道,分值{{subjectiveGrade}}分</view>
        <view class="report-li-right"
          >{{subjectiveTotal}}道,分值{{subjectiveGrade}}分</view
        >
      </view>
      <view class="report-li">
        <view class="report-li-left">答对:</view>
        <view class="report-li-right"><text class="correct-color">{{correctNum}}</text> 道</view>
        <view class="report-li-right"
          ><text class="correct-color">{{correctNum}}</text> 道</view
        >
      </view>
      <view class="report-li">
        <view class="report-li-left">答错:</view>
        <view class="report-li-right"><text class="error-color">{{subjectiveTotal - correctNum}}</text>
          道</view>
        <view class="report-li-right"
          ><text class="error-color">{{subjectiveTotal - correctNum}}</text>
          道</view
        >
      </view>
      <view class="report-li">
        <view class="report-li-left">客观题得分:</view>
        <view class="report-li-right"><text class="score-color">{{subjectiveNum}}</text> 分</view>
        <view class="report-li-right"
          ><text class="score-color">{{subjectiveNum}}</text> 分</view
        >
      </view>
    </view>
    <view class="report-content-bottom">
      <t-button theme="primary" bind:tap="viewAnswer" style="width: 560rpx">查看答案与解析</t-button>
      <t-button theme="primary" bind:tap="viewAnswer" style="width: 560rpx"
        >查看答案与解析</t-button
      >
    </view>
  </view>
</t-dialog>
</t-dialog>