dangerareacheckdetail.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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-card title="行政区及危险区">
  19. <view class="list-item-block">
  20. <view class="line">
  21. <text class="text text-ellipsis">行政区:{{data.adName}}</text>
  22. </view>
  23. <view class="line">
  24. <text class="text text-ellipsis">危险区:{{data.dangerAreaName}}</text>
  25. </view>
  26. </view>
  27. </uni-card>
  28. <uni-card title="定位信息">
  29. <view class="list-item-block">
  30. <view class="line">
  31. <text class="text text-ellipsis">经纬度:{{data.longitude}},{{data.latitude}}</text>
  32. </view>
  33. <view class="line">
  34. <text class="text text-ellipsis">定位地址:{{data.address}}</text>
  35. </view>
  36. <view class="line">
  37. <text class="text text-ellipsis">山洪沟名称:{{data.riverName}}</text>
  38. </view>
  39. </view>
  40. </uni-card>
  41. <uni-card title="巡查反馈">
  42. <view class="list-item-block">
  43. <view class="line">
  44. <text v-if="data.isFlood==1" class="text">是否有山洪:有</text>
  45. <text v-else class="text">是否有山洪:无</text>
  46. </view>
  47. <view class="line">
  48. <text v-if="data.isDamage==1" class="text">是否成灾:是</text>
  49. <text v-else class="text">是否成灾:否</text>
  50. </view>
  51. <view v-if="data.isWarn ==1" class="line">
  52. <text class="text">是否预警:是</text>
  53. </view>
  54. <view v-else class="line">
  55. <text class="text">是否预警:否</text>
  56. </view>
  57. <view v-if="data.isWarn ==1" class="line">
  58. <text class="text">预警信息:{{data.warnInfo}}</text>
  59. </view>
  60. <view v-if="data.isTransfer ==1" class="line">
  61. <text class="text">是否转移:是</text>
  62. </view>
  63. <view v-else class="line">
  64. <text class="text">是否转移:否</text>
  65. </view>
  66. <view v-if="data.isTransfer ==1" class="line">
  67. <text class="text">转移信息:{{data.transferInfo}}</text>
  68. </view>
  69. <view class="line">
  70. <text class="text">备注:{{data.remark}}</text>
  71. </view>
  72. </view>
  73. </uni-card>
  74. <uni-card title="巡查照片">
  75. <view class="view-flex-cc">
  76. <image v-for="(item, index) in checkPhotos" :key="index" class="cover-image" mode="widthFix"
  77. style="width: 100%;margin-bottom: 10px;" :src="toOss(item)">
  78. </image>
  79. </view>
  80. </uni-card>
  81. </view>
  82. </view>
  83. </template>
  84. <script>
  85. // import {
  86. // role
  87. // } from "@/api/role.js";
  88. import http from '@/http/api.js';
  89. import {
  90. oss
  91. } from '@/common/setting';
  92. export default {
  93. components: {},
  94. onLoad(option) {
  95. let params = {};
  96. params['id'] = option.id;
  97. this.getDetail(params);
  98. },
  99. data() {
  100. return {
  101. title: '巡查详情',
  102. pageSize: 10,
  103. pageCurrent: 1,
  104. total: 0,
  105. list: [],
  106. query: {},
  107. checkPhotos: [],
  108. data: {},
  109. }
  110. },
  111. computed: {},
  112. onShow() {},
  113. methods: {
  114. toOss(path) {
  115. return oss + path;
  116. },
  117. //返回上一页
  118. toBack() {
  119. uni.navigateBack({
  120. delta: 1
  121. })
  122. },
  123. // 分页触发
  124. pageChange(e) {
  125. this.pageCurrent = e.current;
  126. this.getPage()
  127. },
  128. getDetail(params = {}) {
  129. //console.log("111" + JSON.stringify(params))
  130. let that = this;
  131. Object.assign(this.query, params);
  132. http.request({
  133. url: '/galaxy-business/yj/check/detail',
  134. method: 'GET',
  135. params: this.query
  136. }).then(res => {
  137. if (res.success) {
  138. //console.log(JSON.stringify(res))
  139. that.data = res.data;
  140. let photos = res.data['checkPhotos'];
  141. if (null != photos && photos.length > 0) {
  142. let photoList = photos.split(",");
  143. that.checkPhotos = photoList;
  144. }
  145. }
  146. }).catch(err => {
  147. console.log(err)
  148. })
  149. },
  150. }
  151. }
  152. </script>
  153. <style lang="scss" scoped>
  154. </style>