machineDetail.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <view>
  3. <view>
  4. <view class="item ddflex">
  5. <view class="label">机柜名称</view>
  6. <view class="item-input fflex ddflex">
  7. <view>{{cabInfo.devName}}</view>
  8. <!-- <view class="state">在线</view> -->
  9. </view>
  10. </view>
  11. <view class="item ddflex">
  12. <view class="label">机柜编号</view>
  13. <view class="item-input fflex">
  14. {{cabInfo.devId}}
  15. </view>
  16. </view>
  17. <view class="item ddflex">
  18. <view class="label">机柜温度</view>
  19. <view class="item-input fflex">
  20. <block v-if="cabInfo.cabTemp">{{cabInfo.cabTemp}}℃</block>
  21. <view v-else>未知</view>
  22. </view>
  23. </view>
  24. <view class="item ddflex">
  25. <view class="label">机柜电压</view>
  26. <view class="item-input fflex">
  27. <block v-if="cabInfo.cabVol">{{cabInfo.cabVol}}V</block>
  28. <view v-else>未知</view>
  29. </view>
  30. </view>
  31. <view class="item ddflex">
  32. <view class="label">当前电流</view>
  33. <view class="item-input fflex">
  34. <block v-if="cabInfo.cabCur">{{cabInfo.cabCur}}A</block>
  35. <view v-else>未知</view>
  36. </view>
  37. </view>
  38. <view class="item ddflex">
  39. <view class="label">信号强度</view>
  40. <view class="item-input fflex">
  41. <block v-if="cabInfo.dbm">{{cabInfo.dbm}}</block>
  42. <view v-else>未知</view>
  43. </view>
  44. </view>
  45. <view class="item ddflex">
  46. <view class="label">电表度数</view>
  47. <view class="item-input fflex">
  48. <block v-if="cabInfo.emKwh">{{cabInfo.emKwh}}KWH</block>
  49. <view v-else>未知</view>
  50. </view>
  51. </view>
  52. <view class="item ddflex">
  53. <view class="label">仓门数量</view>
  54. <view class="item-input fflex">
  55. <block v-if="cabInfo.doorCount">{{cabInfo.doorCount}}</block>
  56. <view v-else>未知</view>
  57. </view>
  58. </view>
  59. <view class="item ddflex">
  60. <view class="label">空仓数量</view>
  61. <view class="item-input fflex">
  62. <block v-if="cabInfo.nullDoorCount">{{cabInfo.nullDoorCount}}</block>
  63. <view v-else>未知</view>
  64. </view>
  65. </view>
  66. <view class="item ddflex">
  67. <view class="label">可用电池数量</view>
  68. <view class="item-input fflex">
  69. <block v-if="cabInfo.useDoorCount">{{cabInfo.useDoorCount}}</block>
  70. <view v-else>未知</view>
  71. </view>
  72. </view>
  73. <!-- <view class="item ddflex">
  74. <view class="label">iccid</view>
  75. <view class="item-input fflex">
  76. 89860469092190149474
  77. </view>
  78. </view>
  79. <view class="item ddflex">
  80. <view class="label">硬件版本</view>
  81. <view class="item-input fflex">
  82. V1.2
  83. </view>
  84. </view>
  85. <view class="item ddflex">
  86. <view class="label">软件版本</view>
  87. <view class="item-input fflex">
  88. ZXSCMB-3.25-20220714
  89. </view>
  90. </view>
  91. <view class="item ddflex">
  92. <view class="label">协议版本</view>
  93. <view class="item-input fflex">
  94. V1.2
  95. </view>
  96. </view> -->
  97. </view>
  98. <!-- 保存按钮 -->
  99. <!-- <view class="savepadding" style="height: 150rpx;"></view>
  100. <view class="savepadding submit-box">
  101. <view class="submit-btn" @click="jumpUrl('/machineAndCell/machineDetailEdit/machineDetailEdit')">
  102. 更改机柜地址
  103. </view>
  104. </view> -->
  105. </view>
  106. </template>
  107. <script>
  108. const app = getApp();
  109. const req = require("../../utils/request.js");
  110. export default {
  111. components: {
  112. },
  113. props: {},
  114. data() {
  115. return {
  116. id:null,
  117. cabInfo:{}
  118. }
  119. },
  120. onLoad(options) {
  121. this.id = options.id
  122. this.getDataInfo()
  123. },
  124. onShow() {
  125. },
  126. methods: {
  127. jumpUrl(url) {
  128. if (req.isLogins(true)) {
  129. uni.navigateTo({
  130. url: url
  131. })
  132. }
  133. },
  134. getDataInfo(){
  135. req.getRequest('/admin/v2/cab/info',{devId:this.id},res=>{
  136. this.cabInfo = res
  137. })
  138. }
  139. },
  140. mounted() {
  141. },
  142. onPageScroll: function(e) {
  143. }
  144. }
  145. </script>
  146. <style>
  147. @import "./machineDetail.css";
  148. </style>