GroupItem.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <template>
  2. <view>
  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>
  28. </template>
  29. <script>
  30. export default {
  31. name:"groupItem",
  32. props: {
  33. openlist:{},
  34. item:{
  35. device:{}
  36. }
  37. },
  38. data() {
  39. return {
  40. };
  41. },
  42. methods:{
  43. setOpen(item) {
  44. this.$emit("setOpen",item)
  45. },
  46. }
  47. }
  48. </script>
  49. <style>
  50. .else {
  51. display: flex;
  52. align-items: center;
  53. margin-top: 8rpx;
  54. .gun-type {
  55. //color: rgba(22, 119, 255, 1);
  56. color: #fff;
  57. //background: linear-gradient(93.02deg, rgba(255,121,0,1) 39.4%,rgba(255,174,0,1) 93.51%);
  58. border-radius: 4px;
  59. padding: 1px 12rpx;
  60. margin-right: 8rpx;
  61. font-size: 22rpx;
  62. // height: 32rpx;
  63. }
  64. .voltage {
  65. margin: 0 8rpx;
  66. }
  67. }
  68. .color185AC6 {
  69. //color: #185AC6
  70. background: linear-gradient(90.17deg, rgba(31, 85, 255, 1) -3.73%, rgba(39, 171, 255, 1) 98.97%);
  71. }
  72. .color00B962 {
  73. //color: #00B962
  74. background: linear-gradient(90deg, rgba(0, 146, 77, 1) 0%, rgba(62, 232, 152, 1) 100%);
  75. }
  76. .colorCA9DFF {
  77. // color: #8161FF;
  78. background: linear-gradient(90.17deg, rgba(79, 42, 224, 1) -3.73%, rgba(142, 113, 255, 1) 98.97%) ;
  79. }
  80. </style>