machineItemManage.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <view>
  3. <view class="option-box">
  4. <view class="option-time ddflex">
  5. <view>更新时间: 2023-04-03 11:09:08</view>
  6. <view class="refresh ddflex">
  7. <image src="../../static/pages/images/refresh.png"></image>
  8. <text>刷新</text>
  9. </view>
  10. </view>
  11. <view class="ddflex state">
  12. <view class="ddflex">
  13. <view>仓位状态:</view>
  14. <view style="color: #A8A5A5;">启用</view>
  15. </view>
  16. <switch style="transform: scale(0.6);" color="#FF753A"></switch>
  17. </view>
  18. </view>
  19. <view class="note">关闭后,仓门将禁用,用户无法打开</view>
  20. <view style="height: 165rpx;" class="savepadding"></view>
  21. <view class="bottom-btns savepadding">
  22. <view class="btn" @click="jumpUrl('/warning/machineAlarm/machineAlarm')">一键开门</view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. const app = getApp();
  28. const req = require("../../utils/request.js");
  29. export default {
  30. components: {},
  31. props: {},
  32. data() {
  33. return {
  34. systems: {},
  35. isTop:0,
  36. }
  37. },
  38. onLoad(options) {
  39. },
  40. onShow() {
  41. },
  42. methods: {
  43. },
  44. mounted() {
  45. const systemInfo = uni.getSystemInfoSync();
  46. // px转换到rpx的比例
  47. let pxToRpxScale = 750 / systemInfo.windowWidth;
  48. let systems = {
  49. ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
  50. navigationHeight: 44 * pxToRpxScale // 导航栏的高度
  51. };
  52. systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
  53. this.systems = systems;
  54. },
  55. onPageScroll: function(e) {
  56. if (e.scrollTop > this.systems.barHeight) {
  57. this.isTop = 1;
  58. } else {
  59. this.isTop = 0;
  60. }
  61. }
  62. }
  63. </script>
  64. <style>
  65. @import "./machineItemManage.css";
  66. </style>