report-health-index.wxml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <!--module/health/components/report-health-index/report-health-index.wxml-->
  2. <view wx:if="{{i18n.healthIndex.__show__}}">
  3. <view class="card-wrapper constitution-container">
  4. <view class="card-header constitution-box">
  5. <block slot="title">
  6. <t-loading wx:if="{{loading}}" theme="spinner" size="20px" class="loading" />
  7. <view class="card-title">
  8. <view>
  9. <image src="../../assets/icon/icon_index@2x.png" class="icon-title" />
  10. </view>
  11. <view class="text-title">{{i18n.healthIndex.title}}</view>
  12. </view>
  13. </block>
  14. <block slot="right-icon">
  15. <slot name="extra"></slot>
  16. </block>
  17. </view>
  18. <view class="nodata-box" wx:if="{{!loading && !dataset.length}}">
  19. <view slot="description" wx:if="{{!loading && !dataset.length}}">暂无数据</view>
  20. </view>
  21. </view>
  22. <t-cell wx:for="{{dataset}}" t-class="card-body health-index cell-border-gradient" t-class-title="health-index__title" t-class-description="health-index__slider">
  23. <block slot="title">
  24. <text>{{item.name}}</text>
  25. <text style="font-size: 12px;">({{item.unit}})</text>
  26. </block>
  27. <block slot="description">
  28. <view class="value {{item.valueType}}" style="left: {{item.valueOffset}};">
  29. <text>{{item.value}}</text>
  30. <text class="description">{{item.description}}</text>
  31. </view>
  32. <view class="track track__bg"></view>
  33. <view class="track track__value" style="left: {{item.valueOffsetLeft}};right: {{item.valueOffsetRight}};"></view>
  34. <view class="track track__scope" style="left: {{item.scopeOffsetLeft}};right: {{item.scopeOffsetRight}};"></view>
  35. <view class="track track__point {{item.valueType}}" style="left: {{item.valueOffset}};"></view>
  36. <view class="point point__left" style="left: {{item.scopeOffsetLeft}};">{{item.min}}</view>
  37. <view class="point point__right" style="right: {{item.scopeOffsetRight}};">{{item.max}}</view>
  38. </block>
  39. </t-cell>
  40. <t-empty wx:if="{{message}}" t-class="empty-wrapper error" icon="info-circle" description="{{message}}" />
  41. </view>