rtudetail.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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-section title="测站信息" titleFontSize="0.8rem" type="line">
  19. <uni-card :is-shadow="false">
  20. <view style="width: 100%;padding-left: 0px;padding-right: 10px;">
  21. <view style="margin-top: 5px;display: flex;flex-direction: column;">
  22. <view style="font-size: 0.7rem;color: black;">测站名称:</view>
  23. <view style="font-size: 0.7rem;color: gray;">{{orderInfo.rtuName}}</view>
  24. </view>
  25. <view style="margin-top: 5px;display: flex;flex-direction: column;">
  26. <view style="font-size: 0.7rem;color: black;">测站编码:</view>
  27. <view style="font-size: 0.7rem;color: gray;">{{orderInfo.rtuCode}}</view>
  28. </view>
  29. <view style="margin-top: 5px;display: flex;flex-direction: column;">
  30. <view style="font-size: 0.7rem;color: black;">测站类型:</view>
  31. <view style="display: flex;flex-direction: row;align-items: center;">
  32. <view v-if="orderInfo.isRain ==1"
  33. style="margin-right: 5px;font-size: 0.7rem;color: gray;">雨量站</view>
  34. <view v-if="orderInfo.isRiver ==1"
  35. style="margin-right: 5px;font-size: 0.7rem;color: gray;">水位站</view>
  36. <view v-else-if="orderInfo.isRes ==1"
  37. style="margin-right: 5px;font-size: 0.7rem;color: gray;">水位站</view>
  38. <view v-if="orderInfo.isGround ==1"
  39. style="margin-right: 5px;font-size: 0.7rem;color: gray;">墒情站</view>
  40. </view>
  41. </view>
  42. <view style="margin-top: 5px;display: flex;flex-direction: column;">
  43. <view style="font-size: 0.7rem;color: black;">行政区划:</view>
  44. <view style="font-size: 0.7rem;color: gray;">{{orderInfo.adCity}}/{{orderInfo.adDist}}
  45. </view>
  46. </view>
  47. <view style="margin-top: 5px;display: flex;flex-direction: column;">
  48. <view style="font-size: 0.7rem;color: black;">经纬度:</view>
  49. <view style="display: flex;flex-direction: row;align-items: center;">
  50. <view style="margin-right: 5px;font-size: 0.7rem;color: gray;">经度:{{orderInfo.lng}}
  51. </view>
  52. <view style="margin-right: 5px;font-size: 0.7rem;color: gray;">纬度:{{orderInfo.lat}}
  53. </view>
  54. </view>
  55. </view>
  56. <view style="margin-top: 5px;display: flex;flex-direction: column;">
  57. <view style="font-size: 0.7rem;color: black;">安装位置:</view>
  58. <view style="font-size: 0.7rem;color: gray;">{{orderInfo.locationDesc}}</view>
  59. </view>
  60. </view>
  61. </uni-card>
  62. </uni-section>
  63. <uni-section title="测站数据" titleFontSize="0.8rem" type="line">
  64. <uni-card :is-shadow="false">
  65. <view style="width: 100%;padding-left: 0px;padding-right: 10px;">
  66. <view style="margin-top: 5px;display: flex;flex-direction: column;">
  67. <view style="font-size: 0.7rem;color: black;">最近上报数据:</view>
  68. <view style="display: flex;flex-direction: row;align-items: center;">
  69. <view v-if="orderInfo.isRain ==1"
  70. style="margin-right: 5px;font-size: 0.7rem;color: gray;">降水:{{orderInfo.drp}}</view>
  71. <view v-if="orderInfo.isRiver ==1"
  72. style="margin-right: 5px;font-size: 0.7rem;color: gray;">水位:{{orderInfo.z}}</view>
  73. <view v-else-if="orderInfo.isRes ==1"
  74. style="margin-right: 5px;font-size: 0.7rem;color: gray;">水位:{{orderInfo.rz}}
  75. </view>
  76. <view v-if="orderInfo.isGround ==1"
  77. style="margin-right: 5px;font-size: 0.7rem;color: gray;">墒情:</view>
  78. </view>
  79. </view>
  80. <view style="margin-top: 5px;display: flex;flex-direction: column;">
  81. <view style="font-size: 0.7rem;color: black;">最近上报时间:</view>
  82. <view style="font-size: 0.7rem;color: gray;">{{orderInfo.lastUpTime}}</view>
  83. </view>
  84. </view>
  85. </uni-card>
  86. </uni-section>
  87. </view>
  88. </view>
  89. </template>
  90. <script>
  91. import {
  92. role
  93. } from "@/api/role.js";
  94. import http from '@/http/api.js';
  95. export default {
  96. components: {},
  97. onLoad(option) {
  98. this.rtuCode = option.rtuCode;
  99. if (this.userInfo.role_name === role['admin']) {
  100. this.permission.admin = true;
  101. } else if (this.userInfo.role_name === role['orgAdmin']) {
  102. this.permission.orgAdmin = true;
  103. } else if (this.userInfo.role_name === role['companyAdmin']) {
  104. this.permission.companyAdmin = true;
  105. } else if (this.userInfo.role_name === role['companyServciePerson']) {
  106. this.permission.companyServciePerson = true;
  107. }
  108. this.getOrderInfo();
  109. },
  110. data() {
  111. return {
  112. permission: {
  113. 'admin': false,
  114. 'orgAdmin': false,
  115. 'companyAdmin': false,
  116. 'companyServciePerson': false,
  117. },
  118. rtuCode: '',
  119. orderInfo: {
  120. },
  121. title: '测站基础信息',
  122. }
  123. },
  124. computed: {},
  125. onShow() {
  126. this.getOrderInfo();
  127. },
  128. created() {},
  129. methods: {
  130. toBack() {
  131. uni.navigateBack({
  132. delta: 1
  133. })
  134. },
  135. // 分页触发
  136. change(e) {
  137. this.selectedIndexs.length = 0
  138. this.pageCurrent = e.current;
  139. this.getOrderList()
  140. },
  141. getOrderInfo() {
  142. var that = this;
  143. var postData = {};
  144. postData['rtuCode'] = this.rtuCode;
  145. http.request({
  146. url: '/galaxy-business/rtu/base/detail',
  147. method: 'GET',
  148. data: postData
  149. }).then(res => {
  150. console.log(res)
  151. if (res.data != null) {
  152. that.orderInfo = res.data;
  153. }
  154. }).catch(err => {
  155. console.log(err)
  156. })
  157. },
  158. toOrderConfirm() {
  159. var that = this;
  160. uni.showModal({
  161. content: '确定进行维修确认操作?',
  162. showCancel: true,
  163. success(res) {
  164. if (res.confirm) {
  165. var postData2 = {};
  166. postData2['id'] = that.orderId;
  167. http.request({
  168. url: '/galaxy-business/rtu/check/order/confirm',
  169. method: 'POST',
  170. data: postData2
  171. }).then(res => {
  172. console.log(res)
  173. if (res.success) {
  174. uni.showModal({
  175. content: '确认已成功,是否立即填报?',
  176. showCancel: true,
  177. success(res) {
  178. if (res.confirm) {
  179. var url =
  180. '/pages/check-order/orderprocessreport?orderId=' +
  181. that.orderId;
  182. uni.navigateTo({
  183. url: url
  184. })
  185. }
  186. }
  187. });
  188. }
  189. }).catch(err => {
  190. console.log(err)
  191. })
  192. }
  193. }
  194. });
  195. },
  196. toOrderProcessReport() {
  197. var url = '/pages/check-order/orderprocessreport?orderId=' + this.orderId;
  198. uni.navigateTo({
  199. url: url
  200. })
  201. },
  202. }
  203. }
  204. </script>
  205. <style>
  206. /* page {
  207. background-color: rgb(240, 242, 244);
  208. } */
  209. </style>
  210. <style lang="scss" scoped>
  211. </style>