orginspectionreportcount.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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-th align="center">
  25. <view style="text-align: center;color: black;">汛中(一)巡检</view>
  26. </uni-th>
  27. <uni-th align="center">
  28. <view style="text-align: center;color: black;">汛中(二)巡检</view>
  29. </uni-th>
  30. </uni-tr>
  31. <uni-tr v-for="(item, index) in tableData" :key="index">
  32. <uni-td>
  33. <view style="text-align: center;">{{ item.orgName }}</view>
  34. </uni-td>
  35. <uni-td align="center">
  36. <view style="text-align: center;color: gray;" >
  37. {{ item.rtuCount }}
  38. </view>
  39. </uni-td>
  40. <uni-td align="center">
  41. <view style="text-decoration-line: underline;text-align: center;color: coral; " @click="onYearInspectionCountClick(item)">
  42. {{ item.inspectionCount }}
  43. </view>
  44. </uni-td>
  45. <uni-td align="center">
  46. <view style="text-decoration-line: underline;text-align: center;color: coral;"
  47. @click="onBeforeRainInspectionCountClick(item)">
  48. {{ item.beforeRainInspectionCount }}
  49. </view>
  50. </uni-td>
  51. <uni-td align="center">
  52. <view style="text-decoration-line: underline;text-align: center;color: coral;"
  53. @click="onRainFirstInspectionCountClick(item)">
  54. {{ item.firstRainInspectionCount }}
  55. </view>
  56. </uni-td>
  57. <uni-td align="center">
  58. <view style="text-decoration-line: underline;text-align: center;color: coral;"
  59. @click="onRainSecondInspectionCountClick(item)">
  60. {{ item.sencodRainInspectionCount }}
  61. </view>
  62. </uni-td>
  63. </uni-tr>
  64. </uni-table>
  65. </view>
  66. </view>
  67. </template>
  68. <script>
  69. import http from '@/http/api.js';
  70. export default {
  71. components: {
  72. },
  73. onLoad(option) {
  74. this.getCountInfo();
  75. },
  76. data() {
  77. return {
  78. title: '设备巡检统计报表',
  79. tableData: [],
  80. }
  81. },
  82. computed: {
  83. },
  84. onShow() {
  85. },
  86. methods: {
  87. toBack() {
  88. uni.navigateBack({
  89. delta: 1
  90. })
  91. },
  92. onInspectionCountClick(item) {
  93. var url =
  94. '/pages/equipment-inspection/companyfinishedinspectionreportlist?type=1&deptId=' + item
  95. .deptId;
  96. uni.navigateTo({
  97. url: url
  98. })
  99. },
  100. onYearInspectionCountClick(item) {
  101. var url =
  102. '/pages/equipment-inspection/companyfinishedinspectionreportlist?rainSeasonKind=0&deptId=' + item
  103. .deptId;
  104. uni.navigateTo({
  105. url: url
  106. })
  107. },
  108. onBeforeRainInspectionCountClick(item) {
  109. console.log(JSON.stringify(item))
  110. var url =
  111. '/pages/equipment-inspection/companyfinishedinspectionreportlist?rainSeasonKind=1&deptId=' + item
  112. .deptId;
  113. uni.navigateTo({
  114. url: url
  115. })
  116. },
  117. onRainFirstInspectionCountClick(item) {
  118. var url =
  119. '/pages/equipment-inspection/companyfinishedinspectionreportlist?rainSeasonKind=2&deptId=' + item
  120. .deptId;
  121. uni.navigateTo({
  122. url: url
  123. })
  124. },
  125. onRainSecondInspectionCountClick(item) {
  126. var url =
  127. '/pages/equipment-inspection/companyfinishedinspectionreportlist?rainSeasonKind=3&deptId=' + item
  128. .deptId;
  129. uni.navigateTo({
  130. url: url
  131. })
  132. },
  133. getCountInfo() {
  134. var that = this;
  135. http.request({
  136. url: '/galaxy-business/equipment/inspection/org/statistics',
  137. method: 'GET',
  138. }).then(res => {
  139. if (res.data != null) {
  140. that.tableData = res.data;
  141. }
  142. }).catch(err => {
  143. console.log(err)
  144. })
  145. },
  146. }
  147. }
  148. </script>
  149. <style>
  150. </style>
  151. <style lang="scss" scoped>
  152. </style>