quality.wxml 2.51 KB
<view class="view">
  <block wx:if="{{qualityData.length}}">
    <scroll-view class="scroll-classify" scroll-x enable-flex scroll-into-view="{{classifyId}}" scroll-with-animation>
      <view class="classify-wrap">
        <block wx:for="{{qualityData}}" wx:key="index">
          <view class="classify-item flex {{index == activeIndex?'active':''}}" bindtap="changeClassifyType" data-index="{{index}}" id="classify-{{index}}">
            <view class="title">{{item.tagGroupName}}</view>
            <view class="score">{{item.formatScore}}</view>
          </view>
        </block>
      </view>
    </scroll-view>
    <scroll-view class="scroll-view" enhanced scroll-y scroll-with-animation scroll-into-view="{{activeId}}">
      <block wx:if="{{qualityData[activeIndex]}}">
        <view class="quality-block">
          <view class="title flex">
            {{qualityData[activeIndex].tagGroupName}}
            <view class="matched-btn flex {{qualityData[activeIndex].matchedClass}}">{{qualityData[activeIndex].matchedText}}</view>
          </view>
          <block wx:for="{{qualityData[activeIndex].conversationDetailDTOList}}" wx:key="index">
            <block wx:if="{{item.text_id}}">
              <view id="{{item.text_id}}" class="quality-item flex {{item.text_id == activeId?'active':''}}" bind:tap="seekPlay" data-item="{{item}}">
                <view class="avatar-box">
                  <view class="icon">
                    <image class="icon" src="/assets/images/role-{{item.role}}.png" />
                  </view>
                  <view class="time">{{item.time}}</view>
                </view>
                <view class="text flex">{{item.content}}</view>
              </view>
            </block>
            <block wx:if="{{item.scriptRec}}">
              <view class="script-rec">
                <view class="suggestions-box">
                  <view class="suggestions-title">
                    <image class="icon" src="/assets/images/suggestions-icon.png" />
                    话术推荐
                  </view>
                  <view class="text">
                    <rich-text nodes="{{item.scriptRec}}"></rich-text>
                  </view>
                </view>
              </view>
            </block>
          </block>
        </view>
      </block>
    </scroll-view>
  </block>
  <block wx:else>
    <view class="nothing flex">
      <image class="icon" src="/assets/images/quality-no-data.png" />
      分析中,稍等...
    </view>
  </block>
</view>