status-record.wxml 1.4 KB

123456789101112131415161718192021222324252627
  1. <wxs module="_">
  2. module.exports.getClassName = function (value, prev, key) {
  3. // return key !== 'reportTime' && prev && value[key] !== prev[key] ? 'highlight' : ''
  4. return '';
  5. }
  6. </wxs>
  7. <!--module/health/pages/status-record/status-record.wxml-->
  8. <t-navbar title="健康状况更新记录" left-arrow />
  9. <view class="wrapper {{orientation}}" style="{{containerStyle}}">
  10. <view class="header">
  11. <block wx:for="{{columns}}" wx:key="value" wx:for-index="i" wx:for-item="r">
  12. <view class="row {{i === 0 ? 'title' : i % 2 ? 'odd' : 'even'}}" style="height: {{r.height}}px;">{{r.label}}</view>
  13. </block>
  14. </view>
  15. <scroll-view class="scrollable" type="list" scroll-x enable-flex style="flex-direction: row;" bind:scrolltolower="loadMore">
  16. <view class="col" wx:for="{{dataset}}" wx:key="index">
  17. <block wx:for="{{columns}}" wx:key="value" wx:for-index="i" wx:for-item="r">
  18. <image wx:if="{{r.type==='picture'}}" style="height: {{r.height}}px;width: {{r.width}}px;" src="{{item[r.value]}}" mode="aspectFit" data-url="{{item[r.value]}}" data-item="{{item}}" catch:tap="preview"></image>
  19. <view wx:else class="row {{i === 0 ? 'title' : i % 2 ? 'odd' : 'even'}} {{_.getClassName(item, dataset[index+1], r.value)}}" style="height: {{r.height}}px;">
  20. <text max-lines="{{maxLines}}" overflow="ellipsis">{{item[r.value]}}</text>
  21. </view>
  22. </block>
  23. </view>
  24. </scroll-view>
  25. </view>
  26. <t-message id="{{$messageId}}" />