status-record.wxml 1.5 KB

1234567891011121314151617181920212223242526272829
  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="{{i18n.health.status}}更新记录" 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;">
  13. {{i18n.health.statusRecord[r.label] || r.label}}
  14. </view>
  15. </block>
  16. </view>
  17. <scroll-view class="scrollable" type="list" scroll-x enable-flex style="flex-direction: row;" bind:scrolltolower="loadMore">
  18. <view class="col" wx:for="{{dataset}}" wx:key="index">
  19. <block wx:for="{{columns}}" wx:key="value" wx:for-index="i" wx:for-item="r">
  20. <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>
  21. <view wx:else class="row {{i === 0 ? 'title' : i % 2 ? 'odd' : 'even'}} {{_.getClassName(item, dataset[index+1], r.value)}}" style="height: {{r.height}}px;">
  22. <text max-lines="{{maxLines}}" overflow="ellipsis">{{item[r.value]}}</text>
  23. </view>
  24. </block>
  25. </view>
  26. </scroll-view>
  27. </view>
  28. <t-message id="{{$messageId}}" />