warninginfodetail.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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="container">
  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. <uni-section title="预警基本信息" titleFontSize="0.8rem" type="line" style="width: 100%;">
  18. <uni-card :is-shadow="false" title="预警名称">
  19. <text class="uni-body">{{warnInfo.warnName}}</text>
  20. </uni-card>
  21. <uni-card :is-shadow="false" title="预警时间">
  22. <text class="uni-body">{{warnInfo.warnTime}}</text>
  23. </uni-card>
  24. <uni-card :is-shadow="false" title="预警等级">
  25. <text class="uni-body">{{warnInfo.warnLevelCode}}</text>
  26. </uni-card>
  27. <uni-card :is-shadow="false" title="预警信息">
  28. <text class="uni-body">{{warnInfo.warnInfo}}</text>
  29. </uni-card>
  30. <uni-card :is-shadow="false" title="预警状态">
  31. <text class="uni-body">{{warnInfo.warnStatusText}}</text>
  32. </uni-card>
  33. <uni-card :is-shadow="false" title="审核状态">
  34. <text class="uni-body">{{warnInfo.reviewStatusText}}</text>
  35. </uni-card>
  36. <uni-card :is-shadow="false" title="站类">
  37. <text class="uni-body">{{warnInfo.typeText}}</text>
  38. </uni-card>
  39. <uni-card :is-shadow="false" title="预警类别">
  40. <text class="uni-body">{{warnInfo.warnSort}}</text>
  41. </uni-card>
  42. <uni-card :is-shadow="false" title="预警定位">
  43. <text class="uni-body">{{warnInfo.warnLocation}}</text>
  44. </uni-card>
  45. <uni-card :is-shadow="false" title="预警政区">
  46. <text class="uni-body">{{warnInfo.warnAdcd}}</text>
  47. </uni-card>
  48. <uni-card :is-shadow="false" title="用户政区">
  49. <text class="uni-body">{{warnInfo.userAdcd}}</text>
  50. </uni-card>
  51. <uni-card :is-shadow="false" title="预警点经度">
  52. <text class="uni-body">{{warnInfo.warnLgtd}}</text>
  53. </uni-card>
  54. <uni-card :is-shadow="false" title="预警点纬度">
  55. <text class="uni-body">{{warnInfo.warnLttd}}</text>
  56. </uni-card>
  57. <uni-card :is-shadow="false" title="备注">
  58. <text class="uni-body">{{warnInfo.remark}}</text>
  59. </uni-card>
  60. </uni-section>
  61. <uni-section title="雨情数据" titleFontSize="0.8rem" type="line" style="width: 100%;">
  62. <uni-card :is-shadow="false" title="雨量站预警频率">
  63. <text class="uni-body">{{warnInfo.rainWarnRateText}}</text>
  64. </uni-card>
  65. <uni-card :is-shadow="false" title="降雨时段">
  66. <text class="uni-body">{{warnInfo.intv}}</text>
  67. </uni-card>
  68. <uni-card :is-shadow="false" title="时段降水">
  69. <text class="uni-body">{{warnInfo.drp}}</text>
  70. </uni-card>
  71. </uni-section>
  72. <uni-section title="河道水情数据" titleFontSize="0.8rem" type="line" style="width: 100%;">
  73. <uni-card :is-shadow="false" title="河道水位">
  74. <text class="uni-body">{{warnInfo.z}}</text>
  75. </uni-card>
  76. <uni-card :is-shadow="false" title="河道流量">
  77. <text class="uni-body">{{warnInfo.q}}</text>
  78. </uni-card>
  79. <uni-card :is-shadow="false" title="河道水势">
  80. <text class="uni-body">{{warnInfo.wptn}}</text>
  81. </uni-card>
  82. </uni-section>
  83. <uni-section title="水库水情数据" titleFontSize="0.8rem" type="line" style="width: 100%;">
  84. <uni-card :is-shadow="false" title="库上水位">
  85. <text class="uni-body">{{warnInfo.rz}}</text>
  86. </uni-card>
  87. <uni-card :is-shadow="false" title="水库水势">
  88. <text class="uni-body">{{warnInfo.rwptn}}</text>
  89. </uni-card>
  90. <uni-card :is-shadow="false" title="水库流量">
  91. <text class="uni-body">{{warnInfo.inq}}</text>
  92. </uni-card>
  93. </uni-section>
  94. </view>
  95. </template>
  96. <script>
  97. import http from '@/http/api.js';
  98. import {
  99. pathToBase64,
  100. base64ToPath
  101. } from '@/js_sdk/mmmm-image-tools/index.js';
  102. import {
  103. oss,
  104. devUrl,
  105. prodUrl
  106. } from '@/common/setting';
  107. export default {
  108. components: {
  109. },
  110. onLoad(options) {
  111. this.id = options.id;
  112. this.baseURL = process.env.NODE_ENV === 'development' ? devUrl : prodUrl;
  113. this.getWarnInfo();
  114. },
  115. data() {
  116. return {
  117. id: '',
  118. baseURL: '',
  119. warnInfo: {},
  120. title: '异常信息详情',
  121. }
  122. },
  123. computed: {
  124. },
  125. onShow() {},
  126. created() {
  127. },
  128. methods: {
  129. toOss(path) {
  130. return oss + path;
  131. },
  132. toBack() {
  133. uni.navigateBack({
  134. delta: 1
  135. })
  136. },
  137. dateFormat(dt) {
  138. var text = "" + dt.getFullYear();
  139. text += "-";
  140. text += ((dt.getMonth() + 1) < 10) ? ("0" + (dt.getMonth() + 1)) : (dt
  141. .getMonth() +
  142. 1);
  143. text += "-";
  144. text += dt.getDate() < 10 ? "0" + dt.getDate() : dt.getDate();
  145. text += " ";
  146. text += dt.getHours() < 10 ? "0" + dt.getHours() : dt.getHours();
  147. text += ":";
  148. text += dt.getMinutes() < 10 ? "0" + dt.getMinutes() : dt.getMinutes();
  149. text += ":";
  150. text += dt.getSeconds() < 10 ? "0" + dt.getSeconds() : dt.getSeconds();
  151. return text;
  152. },
  153. getWarnInfo() {
  154. var that = this;
  155. var postData = {};
  156. postData['id'] = this.id;
  157. http.request({
  158. url: '/galaxy-business/rtu/warning/original/detail',
  159. method: 'GET',
  160. data: postData
  161. }).then(res => {
  162. console.log(res)
  163. if (res.data != null) {
  164. that.warnInfo = res.data;
  165. }
  166. }).catch(err => {
  167. console.log(err)
  168. })
  169. },
  170. }
  171. }
  172. </script>
  173. <style>
  174. /* page {
  175. background-color: rgb(240, 242, 244);
  176. } */
  177. .uni-body {
  178. font-size: 0.7rem;
  179. }
  180. </style>