reconditionAlarm.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view>
  3. <view class="order-item" v-for="item,index in 10" @click="openPop(item)">
  4. <view class="ddflex order-item-header">
  5. <view class="order-time">类型:整柜巡检</view>
  6. <block>
  7. <view v-if="index!=1" class="order-state">待处理</view>
  8. <view v-else class="order-state" style="color: #0FCB27;border: 2rpx solid #0FCB27;">已处理</view>
  9. </block>
  10. </view>
  11. <view class="order-item-body">
  12. <view class="order-item-content ddflex">
  13. <view class="order-item-content-label">机柜编号:</view>
  14. <view class="order-item-content-data fflex tover">CHZD04TTCC200329109</view>
  15. </view>
  16. <view class="order-item-content ddflex">
  17. <view class="order-item-content-label">电池编号:</view>
  18. <view class="order-item-content-data fflex tover">613880983244</view>
  19. </view>
  20. <view class="order-item-content ddflex">
  21. <view class="order-item-content-label">描述:</view>
  22. <view class="order-item-content-data fflex tover">定期巡检提醒</view>
  23. </view>
  24. <view class="order-item-content ddflex">
  25. <view class="order-item-content-label">提醒时间:</view>
  26. <view class="order-item-content-data fflex tover">2022-12-31 17:16:37</view>
  27. </view>
  28. </view>
  29. </view>
  30. <bottom-pop v-if="showPop" :showPop='showPop' :btnColor="'#11BB8B'" :showBtn='false' title="解除提醒"
  31. @closePop="closePop()" @popSubmit="popSubmit()">
  32. <view>
  33. <view>
  34. <image class="nodata-icon" src="../../static/pages/images/user_service1.png"></image>
  35. <view class="nodata-note">上传检修记录,恢复正常</view>
  36. </view>
  37. <view class="pop-btns ddflex">
  38. <view class="btn" @click="closePop">取消</view>
  39. <view class="btn2" @click="jumpUrl('warning/reconditionAlarmUpload/reconditionAlarmUpload')">上传检修记录</view>
  40. </view>
  41. </view>
  42. </bottom-pop>
  43. </view>
  44. </template>
  45. <script>
  46. const app = getApp();
  47. const req = require("../../utils/request.js");
  48. import bottomPop from "../../components/bottom-pop/index";
  49. export default {
  50. components: {
  51. bottomPop
  52. },
  53. props: {},
  54. data() {
  55. return {
  56. systems: {},
  57. isTop:0,
  58. showPop: false,
  59. tempData: null,
  60. }
  61. },
  62. onLoad(options) {
  63. },
  64. onShow() {
  65. },
  66. methods: {
  67. jumpUrl(url) {
  68. if (!req.isLogin()) return false;
  69. app.globalData.navigateTo(url);
  70. },
  71. // 弹窗弹出
  72. openPop(item) {
  73. this.tempData = JSON.parse(JSON.stringify(item))
  74. this.showPop = true
  75. },
  76. // 弹窗关闭
  77. closePop() {
  78. this.showPop = false
  79. this.tempData = null
  80. },
  81. // 弹窗确认
  82. popSubmit() {
  83. this.closePop()
  84. },
  85. },
  86. mounted() {
  87. const systemInfo = uni.getSystemInfoSync();
  88. // px转换到rpx的比例
  89. let pxToRpxScale = 750 / systemInfo.windowWidth;
  90. let systems = {
  91. ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
  92. navigationHeight: 44 * pxToRpxScale // 导航栏的高度
  93. };
  94. systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
  95. this.systems = systems;
  96. },
  97. onPageScroll: function(e) {
  98. if (e.scrollTop > this.systems.barHeight) {
  99. this.isTop = 1;
  100. } else {
  101. this.isTop = 0;
  102. }
  103. }
  104. }
  105. </script>
  106. <style>
  107. @import "./reconditionAlarm.css";
  108. </style>