deviceList.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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. export default {
  44. data() {
  45. return {
  46. value1: 1,
  47. value2: 2,
  48. value3: 3,
  49. options1: [{
  50. label: '默认排序',
  51. value: 1,
  52. },
  53. {
  54. label: '距离优先',
  55. value: 2,
  56. },
  57. {
  58. label: '价格优先',
  59. value: 3,
  60. }
  61. ],
  62. options2: [{
  63. label: '去冰',
  64. value: 1,
  65. },
  66. {
  67. label: '加冰',
  68. value: 2,
  69. },
  70. ],
  71. options3: [{
  72. label: '去冰',
  73. value: 1,
  74. },
  75. {
  76. label: '加冰',
  77. value: 2,
  78. },
  79. ],
  80. }
  81. },
  82. methods: {
  83. }
  84. }
  85. </script>
  86. <style>
  87. page{
  88. background-color: #F7F7F7;
  89. }
  90. </style>
  91. <style lang="scss" scoped>
  92. .deviceDropdown{
  93. background-color: #fff;
  94. }
  95. .deviceList-item{
  96. margin: 16px;
  97. border-radius: 8px;
  98. .deviceList-head{
  99. font-size: 16px;
  100. padding: 8px 16px;
  101. }
  102. .deviceList-main{
  103. font-size: 28px;
  104. padding: 0px 16px;
  105. font-weight: bold;
  106. }
  107. .deviceList-foot{
  108. display: flex;
  109. align-items: center;
  110. flex-wrap: wrap;
  111. padding: 16px;
  112. .deviceList-label{
  113. background-color: #F0F2F4 ;
  114. padding: 4px 10px;
  115. margin-right: 8px;
  116. border-radius: 4px;
  117. }
  118. }
  119. }
  120. .deviceList-bg1{
  121. background:url(../../assets/img/charging_type_fast.png) no-repeat #fff;
  122. background-size:100%;
  123. }
  124. .deviceList-bg2{
  125. background:url(../../assets/img/charging_type_slow.png) no-repeat #fff;
  126. background-size:100%;
  127. }
  128. .deviceList-bg3{
  129. background:url(../../assets/img/charging_type_bike.png) no-repeat #fff;
  130. background-size:100%;
  131. }
  132. </style>