<!--pages/comment/comment.wxml-->
<nav navName="患者评价"></nav>
<!--pages/comment/comment.wxml-->
<wxs src="./../../filters/filter.wxs" module="filter" />
<view class="page">
  <van-tabs class="tabs" tab-class="tabdiv" wrap-class="tabwrap" custom-class="tabbox" line-width="50rpx" tab-active-class="tabactive" title-inactive-color="#1C2023;" line-height="height: 10rpx;" title-active-color="#3CC7C0" color="#3CC7C0" bind:change="onChange">
    <van-tab title="全部（{{total_quantity}}）" class="vantab">
      <scroll-view scroll-y class="scrollwraper" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}"	refresher-threshold="100"	refresher-enabled="true" style="width: 100%;" lower-threshold="100" bindscrolltolower="scrolltolower">
        <view class="titlebox">
          <view class="title">患者评价<text> ({{total_quantity}})</text></view>
        </view>
        <view class="listbox" wx:if="{{allList.length>0}}">
          <view class="list" wx:for="{{allList}}" wx:key="evaluation_id">
            <view class="namebox">
              <view class="name">{{item.name_mask}}</view>
              <van-rate value="{{item.avg_score}}" size="{{ 18 }}" color="#ed9c00" void-icon="star" void-color="#eee" bind:change="onChange" gutter="2" readonly />
            </view>
            <view class="commment">{{item.content}}</view>
            <view class="date">{{filter.formatDate(item.created_at)}}</view>
          </view>
        </view>
      </scroll-view>
    </van-tab>
    <van-tab title=" 好评（{{good_quantity}}）" class="vantab">
      <scroll-view scroll-y class="scrollwraper" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}"	refresher-threshold="100"	refresher-enabled="true"  bindscrolltolower="scrolltolower">
        <view class="titlebox">
          <view class="title">患者评价<text> ({{good_quantity}})</text></view>
        </view>
        <view class="listbox" wx:if="{{goodList.length>0}}">
          <view class="list" wx:for="{{goodList}}" wx:key="evaluation_id">
            <view class="namebox">
              <view class="name">{{item.name_mask}}</view>
              <van-rate value="{{item.avg_score}}" size="{{ 18 }}" color="#ed9c00" void-icon="star" void-color="#eee" bind:change="onChange" gutter="2" readonly />
            </view>
            <view class="commment">{{item.content}}</view>
            <view class="date">{{filter.formatDate(item.created_at)}}</view>
          </view>
        </view>
      </scroll-view>

    </van-tab>
    <van-tab title="中/差评（{{bad_quantity}}）" class="vantab">
          <scroll-view scroll-y class="scrollwraper" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}"	refresher-threshold="100"	refresher-enabled="true" lower-threshold="100" bindscrolltolower="scrolltolower">
            <view class="titlebox">
              <view class="title">患者评价<text> ({{bad_quantity}})</text></view>
            </view>
            <view class="listbox" wx:if="{{commonList.length>0}}">
              <view class="list" wx:for="{{commonList}}" wx:key="evaluation_id">
                <view class="namebox">
                  <view class="name">{{item.name_mask}}</view>
                  <van-rate value="{{item.avg_score}}" size="{{ 18 }}" color="#ed9c00" void-icon="star" void-color="#eee" bind:change="onChange" gutter="2" readonly />
                </view>
                <view class="commment">{{item.content}}</view>
                <view class="date">{{filter.formatDate(item.created_at)}}</view>
              </view>
            </view>
            <view class="nonedata" wx:else>
              暂无评价！
            </view>
          </scroll-view>
      
    </van-tab>
  </van-tabs>
</view>