todayinspectionreportlist.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <!--
  2. * @Title:
  3. * @Description: 当天设备巡检动态信息
  4. * @Author: swp
  5. * @Date: 2022-08-24 10:49:21
  6. * @LastEditors:
  7. * @LastEditTime: 2022-08-24 10:49:21
  8. -->
  9. <template>
  10. <view class="wrap">
  11. <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
  12. @clickLeft="toBack">
  13. <view class="nav-title">
  14. <text>{{title}}</text>
  15. </view>
  16. </uni-nav-bar>
  17. <view class="container">
  18. <uni-list>
  19. <uni-list-item v-for="item in list" :key="item.id">
  20. <template v-slot:body>
  21. <view class="list-item-block">
  22. <view class="items-line">
  23. <image class="item-title-run-status-icon" style="box-shadow:0 0 2px 2px lightblue"
  24. src="/static/images/list/inspection_item.png" mode="widthFix">
  25. </image>
  26. <text class="item-title">{{item.rtuName}}</text>
  27. <text class="item-sub-title">[{{item.rtuCode}}]</text>
  28. </view>
  29. <view class="items-line">
  30. <uni-icons class="input-uni-icon" type="compose" size="18" color="lightblue" />
  31. <text class="item-text-lable">汛期:</text>
  32. <text v-if="item.rainSeasonKind == 1" class="item-text-content">汛前巡检</text>
  33. <text v-else-if="item.rainSeasonKind == 2" class="item-text-content">汛中第一次巡检</text>
  34. <text v-else-if="item.rainSeasonKind == 3" class="item-text-content">汛中第二次巡检</text>
  35. <text v-else class="item-text-content"></text>
  36. </view>
  37. <view class="items-line">
  38. <uni-icons class="input-uni-icon" type="auth" size="18" color="lightblue" />
  39. <text class="item-text-lable">填报人:</text>
  40. <text class="item-text-content">{{item.servicePersonName}}</text>
  41. </view>
  42. <view class="items-line">
  43. <uni-icons class="input-uni-icon" type="calendar" size="18" color="lightblue" />
  44. <text class="item-text-lable">填报时间:</text>
  45. <text class="item-text-content">{{item.createTime}}</text>
  46. </view>
  47. <view class="item-button-group">
  48. <view class="item-button" style="width: 120px;"
  49. @click="onEquipmentInspectionItemClick(item.id,item.rainSeasonKind)">
  50. <view class="items-line">
  51. <uni-icons class="input-uni-icon" type="info" size="18" color="coral" />
  52. <text class="button-text">巡检填报详情</text>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </template>
  58. </uni-list-item>
  59. </uni-list>
  60. </view>
  61. </view>
  62. </template>
  63. <script>
  64. import http from '@/http/api.js';
  65. export default {
  66. components: {},
  67. onLoad(option) {
  68. this.getPage();
  69. },
  70. data() {
  71. return {
  72. list: [],
  73. title: '今日巡检填报信息',
  74. }
  75. },
  76. computed: {},
  77. onShow() {},
  78. methods: {
  79. toBack() {
  80. uni.navigateBack({
  81. delta: 1
  82. })
  83. },
  84. getPage(params = {}) {
  85. let that = this;
  86. http.request({
  87. url: '/galaxy-business/equipment/inspection/report/today/list',
  88. method: 'GET'
  89. }).then(res => {
  90. if (res.success) {
  91. if (res.data != null) {
  92. that.list = res.data;
  93. }
  94. }
  95. }).catch(err => {
  96. console.log(err)
  97. })
  98. },
  99. onEquipmentInspectionItemClick(id, rainSeasonKind) {
  100. console.log(id)
  101. var url = '/pages/equipment-inspection/inspectionreportview?id=' + id + "&type=" + rainSeasonKind;
  102. uni.navigateTo({
  103. url: url
  104. })
  105. },
  106. }
  107. }
  108. </script>
  109. <style>
  110. </style>
  111. <style lang="scss" scoped>
  112. </style>