GroupItem.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view class="elseMain">
  3. <view class="else" @click="setOpen(item)">
  4. <view class="gun-type" :class="{
  5. colorCA9DFF:item.device.chargingType=='超充',
  6. color185AC6:item.device.chargingType=='快充',
  7. color00B962:item.device.chargingType=='慢充',
  8. }">
  9. {{item.device.chargingType}}
  10. <!-- -->
  11. </view>
  12. <view class="voltage">
  13. {{item.device.interfaceType}}
  14. {{item.device.chargingPower!=null?item.device.chargingPower+'kW':''}}
  15. </view>
  16. <view class="voltage" style="color:#4F2AE0"
  17. v-if="item.device.groupName" >
  18. {{item.device.groupName}}
  19. </view>
  20. <view class="more">
  21. <u-icon v-show="openlist.get(item.id)" name="arrow-down" color="#999999"
  22. size="12"></u-icon>
  23. <u-icon v-show="!openlist.get(item.id)" name="arrow-up" color="#999999"
  24. size="12"></u-icon>
  25. </view>
  26. </view>
  27. <view class="parkingNo" v-if="item.parkingNo&&item.device.groupName">车位号:{{item.parkingNo}}
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. name:"groupItem",
  34. props: {
  35. openlist:{},
  36. item:{
  37. device:{}
  38. }
  39. },
  40. data() {
  41. return {
  42. };
  43. },
  44. methods:{
  45. setOpen(item) {
  46. this.$emit("setOpen",item)
  47. },
  48. }
  49. }
  50. </script>
  51. <style>
  52. .elseMain{
  53. display: flex;
  54. justify-content: space-between;
  55. align-items: center;
  56. }
  57. .parkingNo{
  58. color: #03A9F4;
  59. font-weight: bold;
  60. }
  61. .else {
  62. display: flex;
  63. align-items: center;
  64. margin-top: 8rpx;
  65. .gun-type {
  66. //color: rgba(22, 119, 255, 1);
  67. color: #fff;
  68. //background: linear-gradient(93.02deg, rgba(255,121,0,1) 39.4%,rgba(255,174,0,1) 93.51%);
  69. border-radius: 4px;
  70. padding: 1px 12rpx;
  71. margin-right: 8rpx;
  72. font-size: 22rpx;
  73. // height: 32rpx;
  74. }
  75. .voltage {
  76. margin: 0 8rpx;
  77. }
  78. }
  79. .color185AC6 {
  80. //color: #185AC6
  81. background: linear-gradient(90.17deg, rgba(31, 85, 255, 1) -3.73%, rgba(39, 171, 255, 1) 98.97%);
  82. }
  83. .color00B962 {
  84. //color: #00B962
  85. background: linear-gradient(90deg, rgba(0, 146, 77, 1) 0%, rgba(62, 232, 152, 1) 100%);
  86. }
  87. .colorCA9DFF {
  88. // color: #8161FF;
  89. background: linear-gradient(90.17deg, rgba(79, 42, 224, 1) -3.73%, rgba(142, 113, 255, 1) 98.97%) ;
  90. }
  91. </style>