index.wxml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <!--pages/data/index.wxml-->
  2. <view class="sg-container sg-index-bg">
  3. <van-popup show="{{ projectShow }}" position="bottom" custom-style="height: 100%;">
  4. <van-dropdown-menu>
  5. <van-dropdown-item value="{{ project_id }}" options="{{ projects }}" bind:change="onChange"
  6. data-name="project_id" />
  7. <van-dropdown-item value="{{ sort_type }}" options="{{ sort_types }}" bind:change="onChange"
  8. data-name="sort_type" />
  9. </van-dropdown-menu>
  10. <view class="sg-pad">
  11. <van-button type="info" block bind:click="switchShow" data-show="{{false}}" data-name="projectShow">确定
  12. </van-button>
  13. </view>
  14. </van-popup>
  15. <view class="sg-white sg-bold sg-flex sg-align-center sg-space-around">
  16. <view class="sg-center">
  17. <view class="sg-font-lg">{{year_money}}</view>
  18. <view class="sg-font-xs sg-pad-tb-sm">
  19. <view>当年公司租赁设备</view>
  20. <view>费用总和</view>
  21. </view>
  22. </view>
  23. <view class="sg-center">
  24. <view class="sg-font-lg">{{month_money}}</view>
  25. <view class="sg-font-xs sg-pad-tb-sm">
  26. <view>当月公司租赁设备</view>
  27. <view>费用总和</view>
  28. </view>
  29. </view>
  30. <view class="sg-center">
  31. <sg-date-picker bind:update="updateDate"></sg-date-picker>
  32. </view>
  33. </view>
  34. <view class="sg-white-bg sg-chart-box">
  35. <view class="sg-flex sg-pad sg-align-center sg-space-between">
  36. <view wx:if="{{chartIndex == 0}}">
  37. <van-icon name="setting-o" class="sg-icon-lg" bindtap="switchShow" data-name="projectShow"
  38. data-show="{{true}}" />
  39. </view>
  40. <view wx:elif="{{chartIndex == 1}}">
  41. <van-icon name="ascending" wx:if="{{orderBy == 'asc'}}" class="sg-index-color sg-icon-lg" bindtap="updateValue"
  42. data-name="orderBy" data-value="desc" />
  43. <van-icon name="descending" wx:else class="sg-index-color sg-icon-lg" bindtap="updateValue" data-name="orderBy"
  44. data-value="asc" />
  45. </view>
  46. <view wx:elif="{{chartIndex == 2}}">
  47. <van-icon name="ascending" wx:if="{{orderBy == 'asc'}}" class="sg-index-color sg-icon-lg sg-margin-right"
  48. bindtap="updateValue" data-name="orderBy" data-value="desc" />
  49. <van-icon name="descending" wx:else class="sg-index-color sg-icon-lg sg-margin-right" bindtap="updateValue"
  50. data-name="orderBy" data-value="asc" />
  51. <van-icon name="filter-o" class="sg-index-color sg-icon-lg" bindtap="navigate"
  52. data-url="/pages/filter-data/index" />
  53. </view>
  54. <view class="sg-flex sg-align-center">
  55. <view class="sg-flex sg-align-center" bindtap="navigate" data-url="/pages/data-center/index">
  56. <van-icon name="search" class="sg-icon-lg sg-index-color" bindtap="switchShow" data-name="dateShow"
  57. data-show="{{true}}"></van-icon>
  58. <text class="sg-index-color">条件查找</text>
  59. </view>
  60. </view>
  61. </view>
  62. <view class="sg-chart sg-flex sg-align-center sg-space-between" hidden="{{projectShow}}">
  63. <view hidden="{{chartIndex == 0}}" bindtap="changeChartIndex" data-type="-">
  64. <van-icon name="arrow-left" class="sg-icon-lg sg-index-color" />
  65. </view>
  66. <ec-canvas id="mychart-dom-bar" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
  67. <view hidden="{{chartIndex == 0}}" hidden="{{chartIndex == 2}}" bindtap="changeChartIndex" data-type="+">
  68. <van-icon name="arrow" class="sg-icon-lg sg-index-color" />
  69. </view>
  70. </view>
  71. </view>
  72. </view>