rank.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <view class="work-container">
  3. <view style="margin-top: 10px">
  4. <uni-table border stripe emptyText="暂无更多数据" >
  5. <!-- 表头行 -->
  6. <uni-tr>
  7. <uni-th align="center" width="50">排名</uni-th>
  8. <uni-th align="center" width="100">运行时长</uni-th>
  9. <uni-th align="center" width="100">设备编号</uni-th>
  10. <uni-th align="center" width="100">客户名称</uni-th>
  11. <!-- <uni-th align="center" width="100">设备名称</uni-th> -->
  12. </uni-tr>
  13. <!-- 表格数据行 -->
  14. <uni-tr v-for="(item,index) in rankList">
  15. <uni-td align="center">{{index+1 }}</uni-td>
  16. <uni-td align="center">{{ item.logValue }}</uni-td>
  17. <uni-td align="center">{{ item.serialNumber }}</uni-td>
  18. <uni-td align="center">{{item.deptName!==null?item.deptName:''}}</uni-td>
  19. <!-- <uni-td align="center">{{item.deviceName}}</uni-td> -->
  20. </uni-tr>
  21. </uni-table>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. import {getAllDeviceRunTime} from '@/api/device/device';
  27. export default {
  28. data() {
  29. return {
  30. rankList:[]
  31. }
  32. },
  33. onLoad(){
  34. this.getRank();
  35. },
  36. methods: {
  37. getRank(){
  38. let self = this;
  39. getAllDeviceRunTime().then(res=>{
  40. self.rankList = res.data;
  41. })
  42. },
  43. }
  44. }
  45. </script>
  46. <style lang="scss">
  47. /* #ifndef APP-NVUE */
  48. .u-collapse-content{
  49. display: flex;
  50. flex-direction: column;
  51. }
  52. page {
  53. display: flex;
  54. flex-direction: column;
  55. box-sizing: border-box;
  56. background-color: #fff;
  57. min-height: 100%;
  58. height: auto;
  59. }
  60. view {
  61. font-size: 14px;
  62. line-height: inherit;
  63. }
  64. /* #endif */
  65. .text {
  66. text-align: center;
  67. font-size: 26rpx;
  68. margin-top: 10rpx;
  69. }
  70. .grid-item-box {
  71. flex: 1;
  72. /* #ifndef APP-NVUE */
  73. display: flex;
  74. /* #endif */
  75. flex-direction: column;
  76. align-items: center;
  77. justify-content: center;
  78. padding: 15px 0;
  79. }
  80. .uni-margin-wrap {
  81. width: 690rpx;
  82. width: 100%;
  83. ;
  84. }
  85. .swiper {
  86. height: 300rpx;
  87. }
  88. .swiper-box {
  89. height: 150px;
  90. }
  91. .swiper-item {
  92. /* #ifndef APP-NVUE */
  93. display: flex;
  94. /* #endif */
  95. flex-direction: column;
  96. justify-content: center;
  97. align-items: center;
  98. color: #fff;
  99. height: 300rpx;
  100. line-height: 300rpx;
  101. }
  102. @media screen and (min-width: 500px) {
  103. .uni-swiper-dot-box {
  104. width: 400px;
  105. /* #ifndef APP-NVUE */
  106. margin: 0 auto;
  107. /* #endif */
  108. margin-top: 8px;
  109. }
  110. .image {
  111. width: 100%;
  112. }
  113. }
  114. </style>