dashboard.wxml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <!--components/dashboard/dashboard.wxml-->
  2. <view class="container">
  3. <view class="dashboard">
  4. <view class="content">
  5. <view class="count" style="height: calc(100% - {{userInfo.laddertype? waterStages.length * 80 : 80}}rpx)">
  6. <view class="number">{{userInfo.intNum || 0}}<text>.{{userInfo.floatNum}}t</text></view>
  7. <view class="txt">
  8. <text>{{userInfo.laddertypename || '-'}}</text>
  9. <text wx:if="{{userInfo.laddertype}}">/{{userInfo.ladderlevelname || '-'}}</text>
  10. </view>
  11. </view>
  12. <view class="item" wx:for="{{userInfo.laddertype? waterStages : [waterStages[0]]}}" wx:key="index"
  13. style="background-color: {{item.background}}">
  14. <view class="icon" style="background-color: {{item.color}}"></view>
  15. <view class="name">{{item.name}}</view>
  16. </view>
  17. </view>
  18. <view class="wave-wrap">
  19. <view class="wave-inner" style="height: {{userInfo.percentage}}%; {{userInfo.style.linear}}">
  20. <image wx:if="{{userInfo.percentage > 30}}" class="bubble" src="/static/img/bg_blister.png"></image>
  21. <view wx:if="{{userInfo.percentage < 100 && userInfo.percentage > 0}}" class="after"></view>
  22. <view wx:if="{{userInfo.percentage < 100 && userInfo.percentage > 0}}" class="before"></view>
  23. </view>
  24. </view>
  25. <view class="ruler">
  26. <view wx:for="{{waterStages}}" wx:key="index" class="item" style="height: calc(100% / {{waterStages.length}})">
  27. <view class="long-scale top" wx:if="{{index == waterStages.length - 1}}}">
  28. <text class="line"></text>
  29. <text class="number">{{item.maxValue}}</text>
  30. </view>
  31. <view class="area">
  32. <view class="bg" style="background-color: {{item.background}}"></view>
  33. <view class="scale">
  34. <text wx:for="{{[1,2,3,4]}}" wx:key="index" class="line"></text>
  35. </view>
  36. </view>
  37. <view class="long-scale">
  38. <text class="line"></text>
  39. <text class="number">{{item.minValue}}</text>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>