enterprise.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. <UniTable style="height: 200rpx;">
  13. <UniTr>
  14. <UniTh align="center">排名</UniTh>
  15. <UniTh align="left">配送企业</UniTh>
  16. <UniTh align="left">金额</UniTh>
  17. <UniTh align="left">占比</UniTh>
  18. </UniTr>
  19. <UniTr v-for="(item, index) in dataList" :key="index">
  20. <UniTd 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. </UniTd>
  32. <UniTd align="left">
  33. <view>{{ item.splerName }}</view>
  34. </UniTd>
  35. <UniTd align="left">
  36. <view>{{ item.splerAmt }}</view>
  37. </UniTd align="left">
  38. <UniTd>{{ item.amtPer||""}}</UniTd>
  39. </UniTr>
  40. </UniTable>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. import {
  46. Calendar,
  47. } from '../Pie.js';
  48. import UniTable from '@/subpkg/uni_modules/uni-table/components/uni-table/uni-table.vue';
  49. import UniTr from '@/subpkg/uni_modules/uni-table/components/uni-tr/uni-tr.vue';
  50. import UniTh from '@/subpkg/uni_modules/uni-table/components/uni-th/uni-th.vue';
  51. import UniTd from '@/subpkg/uni_modules/uni-table/components/uni-td/uni-td.vue';
  52. export default {
  53. components: {
  54. UniTable,
  55. UniTr,
  56. UniTh,
  57. UniTd
  58. },
  59. data() {
  60. return {
  61. value: 'Y',
  62. range: Calendar,
  63. dataList: []
  64. }
  65. },
  66. methods: {
  67. getData() {
  68. this.$http('homePage.splerCosm', {
  69. timeType: this.value
  70. }, '加载中').then((res) => {
  71. this.dataList = res.data
  72. })
  73. },
  74. change(e) {
  75. this.value = e;
  76. this.getData({
  77. timeType: this.value
  78. })
  79. },
  80. changelist(e) {
  81. console.log(e)
  82. }
  83. },
  84. created() {
  85. this.getData()
  86. }
  87. }
  88. </script>
  89. <style lang="scss">
  90. .cartsList {
  91. padding: 30rpx;
  92. .cartsList-all {
  93. width: 100%;
  94. height: 100rpx;
  95. display: flex;
  96. justify-content: space-between;
  97. background-color: #ffffff;
  98. padding: 20rpx;
  99. box-sizing: border-box;
  100. border-top-left-radius: 20rpx;
  101. border-top-right-radius: 20rpx;
  102. border-width: 4rpx 4rpx 4rpx 4rpx;
  103. border-style: solid;
  104. border-color: #90ffe4;
  105. .cartsList-name {
  106. font-size: 35rpx;
  107. font-weight: bold;
  108. }
  109. }
  110. .cartsList-table {
  111. border-bottom-right-radius: 20rpx;
  112. border-bottom-left-radius: 20rpx;
  113. border-style: solid;
  114. border-color: #90ffe4;
  115. border-width: 0 4rpx 4rpx 4rpx;
  116. }
  117. }
  118. .uni-select {
  119. width: 130% !important;
  120. }
  121. </style>