manual.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <template>
  2. <view class="main_manual">
  3. <SubTitle title="储充信息 8" titleEng="Storage and charging information"></SubTitle>
  4. <view class="header_title">
  5. <image class="header_title_img" src="../../../static/equipment/tip.png" mode=""></image>
  6. 仓位上方是电池,下方是充电机,点击仓位可查看充电详情信息
  7. </view>
  8. <view class="box_swiper">
  9. <scroll-view scroll-x="true" class="scroll_x">
  10. <view v-for="(item, index) in storeInfoLists" :key="index" @click="drawer(item,index)">
  11. <StorageInfo :store-code="item.storeCode" :com-state="item.comState" :sn="item.sn" :soc="item.soc"
  12. :chg-estimated-time="item.chargerInfoVo.chgEstimatedTime" :current="item.current"
  13. :voltage="item.voltage" :min-temperature="item.minTemperature"
  14. :max-temperature="item.maxTemperature" :max-cell-voltage="item.maxCellVoltage" index
  15. :min-cell-voltage="item.minCellVoltage" :soh="item.soh" :store-state="item.storeState"
  16. :charger-info-vo="item.chargerInfoVo" :class="box_num == index ? 'slect_box':''" />
  17. </view>
  18. </scroll-view>
  19. <!--右侧抽屉 -->
  20. <uni-drawer ref="showRight" mode="right" :width="400" :mask-click="true" @change='changemask'>
  21. <scroll-view style="height: 100%;" scroll-y="true">
  22. <PublicDrawer :flag="true" :title="titlenum" @closeDrawer="closeDrawer">
  23. <view class="header_drawer_btn">
  24. <view class="header_drawer_btn_left" :class="batteryInfoActive == 0?'active':''" @click="batteryInfoActive = 0">
  25. 电池
  26. </view>
  27. <view class="header_drawer_btn_right" :class="batteryInfoActive == 1?'active':''" @click="batteryInfoActive = 1">
  28. 充电机
  29. </view>
  30. </view>
  31. <view class="drawer_main">
  32. <view v-if="!batteryInfoActive">
  33. <batteryDrawe :infodata="infodata"></batteryDrawe>
  34. </view>
  35. <view v-if="batteryInfoActive"><chargerDrawe :infodata="infodata"></chargerDrawe></view>
  36. </view>
  37. </PublicDrawer>
  38. </scroll-view>
  39. </uni-drawer>
  40. <!-- 右侧抽屉结束 -->
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. import SubTitle from "../../../components/SubTitle/SubTitle.vue"
  46. import StorageInfo from "../components/StorageInfo.vue"
  47. import batteryDrawe from "../components/batteryDrawe.vue"
  48. import chargerDrawe from "../components/chargerDrawe.vue"
  49. name:'manual'
  50. export default {
  51. components: {
  52. SubTitle,
  53. StorageInfo,
  54. batteryDrawe,
  55. chargerDrawe
  56. },
  57. props: ['storeInfoLists'],
  58. data() {
  59. return {
  60. isSlecte: true,
  61. box_num: -1, //记录选中了第几个
  62. titlenum: 0, //几号仓位
  63. batteryInfoActive:1,//0代表电池1代表充电机
  64. infodata:{},//详情数据
  65. }
  66. },
  67. mounted() {
  68. // console.log(this.storeInfoLists,'storeInfoLists999999999999')
  69. },
  70. methods: {
  71. //抽屉
  72. drawer(item, index) {
  73. this.box_num = index;
  74. this.titlenum = item.storeCode + '号仓充电详情'
  75. this.$refs.showRight.open();
  76. this.infodata = item;
  77. console.log(item, index, 'item')
  78. },
  79. //关闭抽屉
  80. closeDrawer(){
  81. this.batteryInfoActive = 1;
  82. this.box_num = -1;
  83. this.$refs.showRight.close();
  84. },
  85. //抽屉改变事件
  86. changemask(e){
  87. if(!e){
  88. this.closeDrawer()
  89. }
  90. }
  91. }
  92. }
  93. </script>
  94. <style lang="scss" scoped>
  95. .main_manual {
  96. position: relative;
  97. .header_title {
  98. position: absolute;
  99. font-size: 12px;
  100. font-family: PingFang SC-Regular, PingFang SC;
  101. font-weight: 400;
  102. color: #414A63;
  103. right: 10px;
  104. top: 5px;
  105. .header_title_img {
  106. width: 14px;
  107. height: 14px;
  108. vertical-align: middle;
  109. margin-right: 5px;
  110. margin-top: -2px;
  111. }
  112. }
  113. .box_swiper {
  114. width: 1000px;
  115. height: 600px;
  116. background: #111827;
  117. padding: 20px;
  118. .scroll_x {
  119. width: 100%;
  120. height: 100%;
  121. // border: 1px solid red;
  122. /deep/ .uni-scroll-view-content {
  123. display: flex;
  124. view:last-child{
  125. .storage-item{
  126. margin-right: 0px;
  127. }
  128. }
  129. }
  130. }
  131. }
  132. }
  133. .slect_box {
  134. border: 1px solid #338150 !important;
  135. }
  136. .header_drawer_btn{
  137. display: flex;
  138. font-size: 14px;
  139. font-family: PingFang SC-Regular, PingFang SC;
  140. font-weight: 400;
  141. color: #FFFFFF;
  142. .header_drawer_btn_left{
  143. width: 60px;
  144. height: 32px;
  145. background: #263042;
  146. border-radius: 2px 0px 0px 2px;
  147. line-height: 32px;
  148. text-align: center;
  149. }
  150. .header_drawer_btn_right{
  151. line-height: 32px;
  152. text-align: center;
  153. width: 74px;
  154. height: 32px;
  155. background: #263042;
  156. border-radius: 0px 2px 2px 0px;
  157. }
  158. .active{
  159. color: black;
  160. background: #91FDB9;
  161. }
  162. }
  163. .drawer_main{
  164. // border: 1px solid red;
  165. padding-top: 20px;
  166. }
  167. </style>