userAlarm.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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">2023-03-29 12:05:58</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">电池ID</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>
  25. <view class="order-item-body2">
  26. <view class="order-item-content-label">问题补充描述</view>
  27. <view class="order-item-content ddflex" style="font-size: 24rpx;font-weight: 400;">
  28. 电池充不进去电,一开始可以充进去,不到5分钟就没电了,但是电量显示还有80%的电。
  29. </view>
  30. <view class="images-box ddflex">
  31. <image class="images" v-for="item in 3"></image>
  32. </view>
  33. </view>
  34. </view>
  35. <bottom-pop v-if="showPop" :showPop='showPop' :btnColor="'#11BB8B'" :showBtn='false' title="解除提醒"
  36. @closePop="closePop()" @popSubmit="popSubmit()">
  37. <view>
  38. <view>
  39. <image class="nodata-icon" src="../../static/pages/images/user_service1.png"></image>
  40. <view class="nodata-note">上传检修记录,恢复正常</view>
  41. </view>
  42. <view class="pop-btns ddflex">
  43. <view class="btn" @click="closePop">取消</view>
  44. <view class="btn2" @click="jumpUrl('warning/userAlarmUpload/userAlarmUpload')">上传检修记录</view>
  45. </view>
  46. </view>
  47. </bottom-pop>
  48. </view>
  49. </template>
  50. <script>
  51. const app = getApp();
  52. const req = require("../../utils/request.js");
  53. import bottomPop from "../../components/bottom-pop/index";
  54. export default {
  55. components: {
  56. bottomPop
  57. },
  58. props: {},
  59. data() {
  60. return {
  61. systems: {},
  62. isTop:0,
  63. showPop: false,
  64. tempData: null,
  65. }
  66. },
  67. onLoad(options) {
  68. },
  69. onShow() {
  70. },
  71. methods: {
  72. jumpUrl(url) {
  73. if (!req.isLogin()) return false;
  74. app.globalData.navigateTo(url);
  75. },
  76. // 弹窗弹出
  77. openPop(item) {
  78. this.tempData = JSON.parse(JSON.stringify(item))
  79. this.showPop = true
  80. },
  81. // 弹窗关闭
  82. closePop() {
  83. this.showPop = false
  84. this.tempData = null
  85. },
  86. // 弹窗确认
  87. popSubmit() {
  88. this.closePop()
  89. },
  90. },
  91. mounted() {
  92. const systemInfo = uni.getSystemInfoSync();
  93. // px转换到rpx的比例
  94. let pxToRpxScale = 750 / systemInfo.windowWidth;
  95. let systems = {
  96. ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
  97. navigationHeight: 44 * pxToRpxScale // 导航栏的高度
  98. };
  99. systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
  100. this.systems = systems;
  101. },
  102. onPageScroll: function(e) {
  103. if (e.scrollTop > this.systems.barHeight) {
  104. this.isTop = 1;
  105. } else {
  106. this.isTop = 0;
  107. }
  108. }
  109. }
  110. </script>
  111. <style>
  112. @import "./userAlarm.css";
  113. </style>