machineInfo.vue 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <template>
  2. <view>
  3. <view style="padding:0 30rpx;" class="ddflex">
  4. <view class="cell-item" v-for="item,index in 9">
  5. <view class="cell-item-num">{{index}}</view>
  6. <view class="ddflex">
  7. <view style="margin-right: 13rpx;">
  8. <cell :soc="index*10"></cell>
  9. </view>
  10. <view class="cell-item-info fflex">
  11. <view class="cell-item-info-item ddflex">
  12. <view>型号</view>
  13. <view>60V 30Ah</view>
  14. </view>
  15. <view class="cell-item-info-item ddflex">
  16. <view>电量</view>
  17. <view>80%</view>
  18. </view>
  19. <view class="cell-item-info-item ddflex">
  20. <view>电压</view>
  21. <view>66.85V</view>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="cell-item-option" @click="jumpUrl('/machineAndCell/machineItemManage/machineItemManage')">仓位管理</view>
  26. </view>
  27. </view>
  28. <view style="height: 165rpx;" class="savepadding"></view>
  29. <view class="bottom-btns savepadding">
  30. <view class="ddflex" style="margin: 30rpx;justify-content: space-between;">
  31. <view class="btn1" @click="jumpUrl('/warning/machineAlarm/machineAlarm')">故障告警</view>
  32. <view class="btn1" @click="jumpUrl('/machineAndCell/machineDetail/machineDetail')">柜体信息</view>
  33. <view class="btn2">刷新</view>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. const app = getApp();
  40. const req = require("../../utils/request.js");
  41. import cell from "../../components/cell/index";
  42. export default {
  43. components: {
  44. cell
  45. },
  46. props: {},
  47. data() {
  48. return {
  49. systems: {},
  50. isTop:0,
  51. }
  52. },
  53. onLoad(options) {
  54. },
  55. onShow() {
  56. },
  57. methods: {
  58. jumpUrl(url) {
  59. if (req.isLogins(true)) {
  60. uni.navigateTo({
  61. url: url
  62. })
  63. }
  64. },
  65. },
  66. mounted() {
  67. const systemInfo = uni.getSystemInfoSync();
  68. // px转换到rpx的比例
  69. let pxToRpxScale = 750 / systemInfo.windowWidth;
  70. let systems = {
  71. ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
  72. navigationHeight: 44 * pxToRpxScale // 导航栏的高度
  73. };
  74. systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
  75. this.systems = systems;
  76. },
  77. onPageScroll: function(e) {
  78. if (e.scrollTop > this.systems.barHeight) {
  79. this.isTop = 1;
  80. } else {
  81. this.isTop = 0;
  82. }
  83. }
  84. }
  85. </script>
  86. <style>
  87. @import "./machineInfo.css";
  88. </style>