DataReport.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <template>
  2. <view class="top-view">
  3. <view class="search-view">
  4. <u-tabs-swiper font-size="28" ref="tabs" :list="tabs_list" :is-scroll="false" :current="tabs_current"
  5. @change="timeChange"></u-tabs-swiper>
  6. </view>
  7. <view v-if="tabs_current === 0">
  8. <view class="charts-box">
  9. <qiun-data-charts type="line" :chartData="chartData" background="none" :animation="false" />
  10. </view>
  11. <view class="thead">
  12. <view class="flex1 sort-li">日期</view>
  13. <view class="flex1 staff-li">订单金额</view>
  14. <view class="flex1 cutomer-li">与上日环比</view>
  15. </view>
  16. <ul class="cont-ul">
  17. <li class="flex">
  18. <view class="flex1 sort-li">1</view>
  19. <view class="flex1 staff-li">2</view>
  20. <view class="flex1 cutomer-li">3</view>
  21. </li>
  22. </ul>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. data() {
  29. return {
  30. chartData: {
  31. categories: ['2016', '2017', '2018', '2019', '2020', '2021'],
  32. series: [{
  33. name: '目标值',
  34. data: [35, 36, 31, 33, 13, 34]
  35. }]
  36. },
  37. tabs_current: 0,
  38. tabs_list: [{
  39. name: '订单金额'
  40. },
  41. {
  42. name: '客户统计'
  43. },
  44. {
  45. name: '资金统计'
  46. },
  47. {
  48. name: '订单数'
  49. }
  50. ],
  51. };
  52. },
  53. methods: {
  54. timeChange(index) {
  55. this.tabs_current = index;
  56. }
  57. }
  58. }
  59. </script>
  60. <style lang="scss">
  61. .charts-box {
  62. width: 100%;
  63. height: 400rpx;
  64. }
  65. .top-view {
  66. position: fixed;
  67. width: 100%;
  68. top: 0;
  69. left: 0;
  70. z-index: 9;
  71. .thead {
  72. line-height: 60rpx;
  73. height: 60rpx;
  74. font-size: 24rpx;
  75. background-color: #f5f5f5;
  76. display: flex;
  77. width: 100%;
  78. }
  79. .search-view {
  80. width: 100%;
  81. }
  82. }
  83. .flex1 {
  84. display: table-cell;
  85. // width: 33%;
  86. text-align: center;
  87. position: relative;
  88. height: 100%;
  89. vertical-align: middle;
  90. &.staff-li {
  91. width: 33%;
  92. }
  93. &.sort-li {
  94. width: 33%;
  95. }
  96. &.cutomer-li {
  97. width: 33%;
  98. }
  99. }
  100. .cont-ul {
  101. background-color: #ffffff;
  102. .flex {
  103. height: 70rpx;
  104. }
  105. }
  106. .flex {
  107. display: table;
  108. width: 750rpx;
  109. // line-height: 90rpx;
  110. font-size: 24rpx;
  111. }
  112. </style>