stat_gather.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view class="page-box-bg-fff r-30 p-30 sys-weight-400" :class="is_margin_top?'m-t20':''">
  3. <StatisticsTitle :genre="genre" :leftText="leftText" :rightText="rightText" @onHandle="onHandle">
  4. </StatisticsTitle>
  5. <view class="row-justify-c m-b25" v-if="is_subsection">
  6. <view class="subsection">
  7. <uv-subsection :list="list" :bgColor="'#DBE8DB'" :activeColor="'#0FB160'" :inactiveColor="'#121212'"
  8. :fontSize="14" custom-style="height: 70rpx;border-radius: 30rpx;"
  9. custom-item-style="border-radius: 30rpx;" :current="current" @change="onChange"></uv-subsection>
  10. </view>
  11. </view>
  12. <view class="" v-if="current===0">
  13. <view class="ranking_item sys-from-background-color m-b16 r-20 p-20 p-tb40" v-if="index<=2"
  14. v-for="(item,index) in outList" :key="index">
  15. <view class="row-justify-sb center sys-weight-400 size-28 color-000 r-20">
  16. <view class="row-c line-40">
  17. <image class="wh-36 m-r20" :src="`/static/img/statistics/${iconList[index]}.png`"
  18. mode="aspectFill">
  19. </image>
  20. <text>{{item.name}}</text>
  21. </view>
  22. <text>{{item.total_num}}笔</text>
  23. <view class="sys-weight-600 line-30">
  24. <text class=" text-color-12 m-r10">{{item.value}}万</text>
  25. <uni-icons type="forward" size="14" color="#D8D8D8"></uni-icons>
  26. </view>
  27. </view>
  28. </view>
  29. <en-blank v-if="outList.length<=0"></en-blank>
  30. </view>
  31. <view v-else>
  32. <view class="ranking_item sys-from-background-color m-b16 r-20 p-20 p-tb40" v-if="index<=2"
  33. v-for="(item,index) in putList" :key="index">
  34. <view class="row-justify-sb center sys-weight-400 size-28 color-000 r-20">
  35. <view class="row-c line-40">
  36. <image class="wh-36 m-r20" :src="`/static/img/statistics/${iconList[index]}.png`"
  37. mode="aspectFill">
  38. </image>
  39. <text>{{item.name}}</text>
  40. </view>
  41. <text>{{item.total_num}}笔</text>
  42. <view class="sys-weight-600 line-30">
  43. <text class=" text-color-12 m-r10">{{item.value}}万</text>
  44. <uni-icons type="forward" size="14" color="#D8D8D8"></uni-icons>
  45. </view>
  46. </view>
  47. </view>
  48. <en-blank v-if="putList.length<=0"></en-blank>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import StatisticsTitle from "./statistics_title.vue";
  54. import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
  55. export default {
  56. name: 'stat_gather',
  57. components: {
  58. EnBlank,
  59. StatisticsTitle
  60. },
  61. props: {
  62. genre: {
  63. type: Number,
  64. default: 0
  65. },
  66. is_subsection: {
  67. type: Boolean,
  68. default: false
  69. },
  70. is_type: {
  71. type: Number,
  72. default: 0
  73. },
  74. is_margin_top: {
  75. type: Boolean,
  76. default: true
  77. },
  78. leftText: {
  79. type: String,
  80. default: ''
  81. },
  82. rightText: {
  83. type: String,
  84. default: '全部'
  85. },
  86. outList: {
  87. default: []
  88. },
  89. putList: {
  90. default: []
  91. }
  92. },
  93. data() {
  94. return {
  95. iconList: ['champion', 'runner-up', 'third'],
  96. userIconList: ['one', 'two', 'three'],
  97. taskIconLsit: ['task-one', 'task-two', 'task-three', 'task-four'],
  98. current: 0,
  99. list: ['放款', '回款'],
  100. };
  101. },
  102. watch:{
  103. 'is_type':function () {
  104. this.current=this.is_type
  105. }
  106. },
  107. mounted() {
  108. this.current=this.is_type
  109. },
  110. methods: {
  111. onChange(e){
  112. console.log(e)
  113. this.current=e
  114. }
  115. },
  116. }
  117. </script>
  118. <style lang="scss" scoped>
  119. .ranking_item:last-child {
  120. margin-bottom: 0;
  121. }
  122. .subsection {
  123. width: 350rpx;
  124. }
  125. </style>