deviceList.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <view>
  3. <u-navbar title="我的设备"></u-navbar>
  4. <view class="deviceDropdown">
  5. <u-dropdown>
  6. <u-dropdown-item v-model="value1" title="充电桩类型" :options="options1"></u-dropdown-item>
  7. <u-dropdown-item v-model="value2" title="所属站点" :options="options2"></u-dropdown-item>
  8. <u-dropdown-item v-model="value3" title="运行状态" :options="options3"></u-dropdown-item>
  9. </u-dropdown>
  10. </view>
  11. <view class="deviceList">
  12. <view class="deviceList-item deviceList-bg1">
  13. <view class="deviceList-head">荆鹏软件园充电站</view>
  14. <view class="deviceList-main">A0001</view>
  15. <view class="deviceList-foot">
  16. <view class="deviceList-label">直流快充</view>
  17. <view class="deviceList-label">正常运行</view>
  18. <view class="deviceList-label">市场服务 70%</view>
  19. </view>
  20. </view>
  21. <view class="deviceList-item deviceList-bg2">
  22. <view class="deviceList-head">荆鹏软件园充电站</view>
  23. <view class="deviceList-main">A0001</view>
  24. <view class="deviceList-foot">
  25. <view class="deviceList-label">直流快充</view>
  26. <view class="deviceList-label">正常运行</view>
  27. <view class="deviceList-label">市场服务 70%</view>
  28. </view>
  29. </view>
  30. <view class="deviceList-item deviceList-bg3">
  31. <view class="deviceList-head">荆鹏软件园充电站</view>
  32. <view class="deviceList-main">A0001</view>
  33. <view class="deviceList-foot">
  34. <view class="deviceList-label">直流快充</view>
  35. <view class="deviceList-label">正常运行</view>
  36. <view class="deviceList-label">市场服务 70%</view>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. import * as API from '@/apis/finance.js'
  44. export default {
  45. data() {
  46. return {
  47. value1: 1,
  48. value2: 2,
  49. value3: 3,
  50. options1: [{
  51. label: '默认排序',
  52. value: 1,
  53. },
  54. {
  55. label: '距离优先',
  56. value: 2,
  57. },
  58. {
  59. label: '价格优先',
  60. value: 3,
  61. }
  62. ],
  63. options2: [{
  64. label: '去冰',
  65. value: 1,
  66. },
  67. {
  68. label: '加冰',
  69. value: 2,
  70. },
  71. ],
  72. options3: [{
  73. label: '去冰',
  74. value: 1,
  75. },
  76. {
  77. label: '加冰',
  78. value: 2,
  79. },
  80. ],
  81. }
  82. },
  83. methods: {
  84. }
  85. }
  86. </script>
  87. <style>
  88. page{
  89. background-color: #F7F7F7;
  90. }
  91. </style>
  92. <style lang="scss" scoped>
  93. .deviceDropdown{
  94. background-color: #fff;
  95. }
  96. .deviceList-item{
  97. margin: 16px;
  98. border-radius: 8px;
  99. .deviceList-head{
  100. font-size: 16px;
  101. padding: 8px 16px;
  102. }
  103. .deviceList-main{
  104. font-size: 28px;
  105. padding: 0px 16px;
  106. font-weight: bold;
  107. }
  108. .deviceList-foot{
  109. display: flex;
  110. align-items: center;
  111. flex-wrap: wrap;
  112. padding: 16px;
  113. .deviceList-label{
  114. background-color: #F0F2F4 ;
  115. padding: 4px 10px;
  116. margin-right: 8px;
  117. border-radius: 4px;
  118. }
  119. }
  120. }
  121. .deviceList-bg1{
  122. background:url(../../assets/img/charging_type_fast.png) no-repeat #fff;
  123. background-size:100%;
  124. }
  125. .deviceList-bg2{
  126. background:url(../../assets/img/charging_type_slow.png) no-repeat #fff;
  127. background-size:100%;
  128. }
  129. .deviceList-bg3{
  130. background:url(../../assets/img/charging_type_bike.png) no-repeat #fff;
  131. background-size:100%;
  132. }
  133. </style>