stat_ranking.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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 v-if="is_type == 1">
  6. <view class="ranking_item sys-from-background-color m-b16 r-20 p-20 p-tb40" v-for="(item,index) in 3"
  7. :key="index">
  8. <view class="row-justify-sb center sys-weight-400 size-28 color-000 r-20">
  9. <view class="row-c line-40">
  10. <image class="wh-36 m-r20" :src="`/static/img/statistics/${iconList[index]}.png`"
  11. mode="aspectFill">
  12. </image>
  13. <text>综合业务部一部</text>
  14. </view>
  15. <text>34笔</text>
  16. <view class="sys-weight-600 line-30">
  17. <text class=" text-color-12 m-r10">800万</text>
  18. <uni-icons type="forward" size="14" color="#D8D8D8"></uni-icons>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <view v-if="is_type == 2">
  24. <view class="ranking_item sys-from-background-color m-b16 r-20 p-20 row-justify-sb center"
  25. v-for="(item,index) in dataList" :key="index">
  26. <view class="row-c sys-weight-400">
  27. <image class="wh-36 m-r20" :src="`/static/img/statistics/${userIconList[index]}.png`"
  28. mode="aspectFill">
  29. </image>
  30. <image class="wh-60 r-100" :src="item.head_img" mode=""></image>
  31. <view class="column m-l16">
  32. <text class="size-28 text-color-000 p-b10">{{item.name}}</text>
  33. <text class="size-24 text-color-666">{{item.departments_name}}</text>
  34. </view>
  35. </view>
  36. <text class="size-28 color-000 sys-weight-600">{{item.total_money}}万</text>
  37. </view>
  38. <en-blank v-if="dataList.length<=0"></en-blank>
  39. </view>
  40. <view v-if="is_type == 3">
  41. <view class="ranking_item sys-from-background-color m-b16 r-20 p-20 row-justify-sb center"
  42. v-for="(item,index) in dataList" :key="index">
  43. <view class="row-c sys-weight-400">
  44. <image class="wh-60 m-r30" :src="item.product_icon" mode="aspectFill">
  45. </image>
  46. <text class="size-28 text-color-000 p-b10">{{item.product_name}}</text>
  47. </view>
  48. <view class="row-c">
  49. <text class="size-28 color-000 sys-weight-600 m-r10">{{item.value}}次</text>
  50. <uni-icons type="forward" size="16" color="#8F99B1"></uni-icons>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. import StatisticsTitle from "./statistics_title.vue";
  58. import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
  59. export default {
  60. name: 'stat_ranking',
  61. components: {
  62. EnBlank,
  63. StatisticsTitle
  64. },
  65. props: {
  66. genre: {
  67. type: Number,
  68. default: 0
  69. },
  70. is_type: {
  71. type: Number,
  72. default: 1
  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. },
  87. data() {
  88. return {
  89. dataList: [],
  90. iconList: ['champion', 'runner-up', 'third'],
  91. userIconList: ['one', 'two', 'three'],
  92. taskIconLsit: ['task-one', 'task-two', 'task-three', 'task-four']
  93. };
  94. },
  95. methods: {
  96. setDataList(data) {
  97. this.dataList = data
  98. console.log(this.dataList)
  99. }
  100. },
  101. }
  102. </script>
  103. <style lang="scss" scoped>
  104. .ranking_item:last-child {
  105. margin-bottom: 0;
  106. }
  107. </style>