dangerareawarnchecklist.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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 v-if="item.checkType == 1" class="items-line">
  23. <text class="item-text-content">独立巡查</text>
  24. </view>
  25. <view v-else class="items-line">
  26. <text class="item-text-content">应急发起巡查</text>
  27. </view>
  28. <view class="items-line">
  29. <text class="item-text-content">经纬度:{{item.longitude}}/{{item.latitude}}</text>
  30. </view>
  31. <view class="items-line">
  32. <text class="item-text-content">巡查时间:{{item.createTime}}</text>
  33. </view>
  34. <view v-if="item.isFlood == 0" class="items-line">
  35. <text class="item-text-content">是否有山洪:否</text>
  36. </view>
  37. <view v-else class="items-line">
  38. <text class="item-text-content">是否有山洪:有</text>
  39. </view>
  40. <view v-if="item.isDamage == 0" class="items-line">
  41. <text class="item-text-content">是否成灾:否</text>
  42. </view>
  43. <view v-else class="items-line">
  44. <text class="item-text-content">是否成灾:是</text>
  45. </view>
  46. <view class="items-line">
  47. <text class="item-text-content">巡查说明:{{item.remark}}</text>
  48. </view>
  49. <view class="item-button-group" style="padding-right: 10px;">
  50. <view class="item-button mid-size" @click="onCheckPhotoClick(item)">
  51. <view class="items-line">
  52. <uni-icons class="input-uni-icon" type="location" size="18" color="coral" />
  53. <text class="button-text">查看图片</text>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </template>
  59. </uni-list-item>
  60. </uni-list>
  61. <uni-group>
  62. <view class="pagination-block">
  63. <uni-pagination show-icon :pageSize="pageSize" :current="pageCurrent" :total="total"
  64. @change="pageChange" />
  65. </view>
  66. </uni-group>
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. import {
  72. role
  73. } from "@/api/role.js";
  74. import http from '@/http/api.js';
  75. export default {
  76. components: {},
  77. onLoad(option) {
  78. this.type = option.type;
  79. this.warnId = option.warnId;
  80. this.query = {};
  81. if (this.type == 2) {
  82. this.query['warnId'] = this.warnId;
  83. }
  84. this.getPage();
  85. },
  86. data() {
  87. return {
  88. title: '巡查信息',
  89. pageSize: 10,
  90. pageCurrent: 1,
  91. total: 0,
  92. list: [],
  93. query: {},
  94. type: 1,
  95. warnId: '',
  96. }
  97. },
  98. computed: {},
  99. onShow() {},
  100. methods: {
  101. //返回上一页
  102. toBack() {
  103. uni.navigateBack({
  104. delta: 1
  105. })
  106. },
  107. // 分页触发
  108. pageChange(e) {
  109. this.pageCurrent = e.current;
  110. this.getPage()
  111. },
  112. onCheckPhotoClick(item){
  113. let url='/pages/yjxt/check/dangerareacheckdetail?id=' + item.id;;
  114. uni.navigateTo({
  115. url: url
  116. })
  117. },
  118. getPage(params = {}) {
  119. const current = this.pageCurrent;
  120. const size = this.pageSize;
  121. let postData = Object.assign(params, this.query);
  122. let that = this;
  123. http.request({
  124. url: '/galaxy-business/yj/check/page',
  125. method: 'GET',
  126. params: {
  127. current,
  128. size,
  129. },
  130. data: postData,
  131. }).then(res => {
  132. if (res.data.records != null) {
  133. that.list = res.data.records;
  134. }
  135. this.total = res.data.total;
  136. }).catch(err => {
  137. console.log(err)
  138. })
  139. },
  140. }
  141. }
  142. </script>
  143. <style lang="scss" scoped>
  144. </style>