inspectionreportcount.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <view class="wrap">
  3. <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
  4. @clickLeft="toBack">
  5. <view class="nav-title">
  6. <text>{{title}}</text>
  7. </view>
  8. </uni-nav-bar>
  9. <view class="container">
  10. <uni-table ref="equipment_inspection_table" border stripe type="" emptyText="暂无更多数据">
  11. <uni-tr>
  12. <uni-th width="140" align="center">
  13. <view style="text-align: center;color: black;">巡检填报人</view>
  14. </uni-th>
  15. <uni-th align="center">
  16. <view style="text-align: center;color: black;">汛前巡检</view>
  17. </uni-th>
  18. <uni-th align="center">
  19. <view style="text-align: center;color: black;">汛中(一)巡检</view>
  20. </uni-th>
  21. <uni-th align="center">
  22. <view style="text-align: center;color: black;">汛中(二)巡检</view>
  23. </uni-th>
  24. </uni-tr>
  25. <uni-tr v-for="(item, index) in tableData" :key="index">
  26. <uni-td>
  27. <view style="text-align: center;">{{ item.servicePersonName }}</view>
  28. </uni-td>
  29. <uni-td align="center">
  30. <view style="text-decoration-line: underline;text-align: center;color: coral;"
  31. @click="onBeforeRainInspectionCountClick(item)">
  32. {{ item.beforeRainInspectionCount }}
  33. </view>
  34. </uni-td>
  35. <uni-td align="center">
  36. <view style="text-decoration-line: underline;text-align: center;color: coral;"
  37. @click="onRainFirstInspectionCountClick(item)">
  38. {{ item.firstRainInspectionCount }}
  39. </view>
  40. </uni-td>
  41. <uni-td align="center">
  42. <view style="text-decoration-line: underline;text-align: center;color: coral;"
  43. @click="onRainSecondInspectionCountClick(item)">
  44. {{ item.sencodRainInspectionCount }}
  45. </view>
  46. </uni-td>
  47. </uni-tr>
  48. </uni-table>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import http from '@/http/api.js';
  54. export default {
  55. components: {
  56. },
  57. onLoad(option) {
  58. this.getCountInfo();
  59. },
  60. data() {
  61. return {
  62. title: '设备巡检统计报表',
  63. tableData: [],
  64. }
  65. },
  66. computed: {
  67. },
  68. onShow() {
  69. },
  70. methods: {
  71. toBack() {
  72. uni.navigateBack({
  73. delta: 1
  74. })
  75. },
  76. onBeforeRainInspectionCountClick(item) {
  77. var url =
  78. '/pages/equipment-inspection/servicepersonfinishedinspectionreportlist?rainSeasonKind=1&userId=' + item
  79. .userId;
  80. uni.navigateTo({
  81. url: url
  82. })
  83. },
  84. onRainFirstInspectionCountClick(item) {
  85. var url =
  86. '/pages/equipment-inspection/servicepersonfinishedinspectionreportlist?rainSeasonKind=2&userId=' + item
  87. .userId;
  88. uni.navigateTo({
  89. url: url
  90. })
  91. },
  92. onRainSecondInspectionCountClick(item) {
  93. var url =
  94. '/pages/equipment-inspection/servicepersonfinishedinspectionreportlist?rainSeasonKind=3&userId=' + item
  95. .userId;
  96. uni.navigateTo({
  97. url: url
  98. })
  99. },
  100. getCountInfo() {
  101. var that = this;
  102. http.request({
  103. url: '/galaxy-business/equipment/inspection/person/statistics',
  104. method: 'GET',
  105. }).then(res => {
  106. if (res.data != null) {
  107. that.tableData = res.data;
  108. }
  109. }).catch(err => {
  110. console.log(err)
  111. })
  112. },
  113. }
  114. }
  115. </script>
  116. <style>
  117. </style>
  118. <style lang="scss" scoped>
  119. </style>