enterprise.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <template>
  2. <view class="cartsList">
  3. <view class="cartsList-all">
  4. <view class="cartsList-name">
  5. 配送企业排名
  6. </view>
  7. <view class="cartsList-seleven">
  8. <uni-data-select v-model="value" :localdata="range" @change="change" :clear="false"></uni-data-select>
  9. </view>
  10. </view>
  11. <view class="cartsList-table">
  12. <uni-table style="height: 200rpx;">
  13. <uni-tr>
  14. <uni-th align="center">排名</uni-th>
  15. <uni-th align="left">配送企业</uni-th>
  16. <uni-th align="left">金额</uni-th>
  17. <uni-th align="left">占比</uni-th>
  18. </uni-tr>
  19. <uni-tr v-for="(item, index) in dataList" :key="index">
  20. <uni-td align="center">
  21. <span v-if="index === 0" style="color: #c13124; font-weight: 800; font-family: sans-serif">
  22. {{ index + 1 }}
  23. </span>
  24. <span v-else-if="index === 1" style="color: #e99d7f; font-weight: 800; font-family: sans-serif">
  25. {{ index + 1 }}
  26. </span>
  27. <span v-else-if="index === 2" style="color: #75f9fd; font-weight: 800; font-family: sans-serif">
  28. {{ index + 1 }}
  29. </span>
  30. <span v-else>{{ index + 1 }}</span>
  31. </uni-td>
  32. <uni-td align="left">
  33. <view>{{ item.splerName }}</view>
  34. </uni-td>
  35. <uni-td align="left">
  36. <view>{{ item.splerAmt }}</view>
  37. </uni-td align="left">
  38. <uni-td>{{ item.amtPer||""}}</uni-td>
  39. </uni-tr>
  40. </uni-table>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. import {
  46. Calendar,
  47. } from '../Pie.js';
  48. export default {
  49. data() {
  50. return {
  51. value: 'Y',
  52. range: Calendar,
  53. dataList: []
  54. }
  55. },
  56. methods: {
  57. getData() {
  58. this.$http('homePage.splerCosm', {
  59. timeType: this.value
  60. }, '加载中').then((res) => {
  61. this.dataList = res.data
  62. })
  63. },
  64. change(e) {
  65. this.value = e;
  66. this.getData({
  67. timeType: this.value
  68. })
  69. },
  70. changelist(e) {
  71. console.log(e)
  72. }
  73. },
  74. created() {
  75. this.getData()
  76. }
  77. }
  78. </script>
  79. <style lang="scss">
  80. .cartsList {
  81. padding: 30rpx;
  82. .cartsList-all {
  83. width: 100%;
  84. height: 100rpx;
  85. display: flex;
  86. justify-content: space-between;
  87. background-color: #ffffff;
  88. padding: 20rpx;
  89. box-sizing: border-box;
  90. border-top-left-radius: 20rpx;
  91. border-top-right-radius: 20rpx;
  92. border-width: 4rpx 4rpx 4rpx 4rpx;
  93. border-style: solid;
  94. border-color: #90ffe4;
  95. .cartsList-name {
  96. font-size: 35rpx;
  97. font-weight: bold;
  98. }
  99. }
  100. .cartsList-table {
  101. border-bottom-right-radius: 20rpx;
  102. border-bottom-left-radius: 20rpx;
  103. border-style: solid;
  104. border-color: #90ffe4;
  105. border-width: 0 4rpx 4rpx 4rpx;
  106. }
  107. }
  108. .uni-select {
  109. width: 130% !important;
  110. }
  111. </style>