warninginfodetail.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. <template>
  2. <view class="container">
  3. <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
  4. @clickLeft="toBack">
  5. <view style="width: 100%;display: flex;flex-direction: row;justify-content: center;align-items: center;">
  6. <text style="color: white;font-size: 1rem;">{{title}}</text>
  7. </view>
  8. </uni-nav-bar>
  9. <uni-forms ref="baseForm">
  10. <uSection title="预警基本信息" titleFontSize="0.8rem" type="line" style="width: 100%;">
  11. <uCard :is-shadow="false" title="预警名称">
  12. <text class="uni-body">{{warnInfo.warnName}}</text>
  13. </uCard>
  14. <uCard :is-shadow="false" title="预警时间">
  15. <text class="uni-body">{{warnInfo.warnTime}}</text>
  16. </uCard>
  17. <uCard :is-shadow="false" title="预警等级">
  18. <text class="uni-body">{{warnInfo.warnLevelCode}}</text>
  19. </uCard>
  20. <uCard :is-shadow="false" title="预警信息">
  21. <text class="uni-body">{{warnInfo.warnInfo}}</text>
  22. </uCard>
  23. <uCard :is-shadow="false" title="预警状态">
  24. <text class="uni-body">{{warnInfo.warnStatusText}}</text>
  25. </uCard>
  26. <uCard :is-shadow="false" title="审核状态">
  27. <text class="uni-body">{{warnInfo.reviewStatusText}}</text>
  28. </uCard>
  29. <uCard :is-shadow="false" title="站类">
  30. <text class="uni-body">{{warnInfo.typeText}}</text>
  31. </uCard>
  32. <uCard :is-shadow="false" title="预警类别">
  33. <text class="uni-body">{{warnInfo.warnSort}}</text>
  34. </uCard>
  35. <uCard :is-shadow="false" title="预警定位">
  36. <text class="uni-body">{{warnInfo.warnLocation}}</text>
  37. </uCard>
  38. <uCard :is-shadow="false" title="预警政区">
  39. <text class="uni-body">{{warnInfo.warnAdcd}}</text>
  40. </uCard>
  41. <uCard :is-shadow="false" title="用户政区">
  42. <text class="uni-body">{{warnInfo.userAdcd}}</text>
  43. </uCard>
  44. <uCard :is-shadow="false" title="预警点经度">
  45. <text class="uni-body">{{warnInfo.warnLgtd}}</text>
  46. </uCard>
  47. <uCard :is-shadow="false" title="预警点纬度">
  48. <text class="uni-body">{{warnInfo.warnLttd}}</text>
  49. </uCard>
  50. <uCard :is-shadow="false" title="备注">
  51. <text class="uni-body">{{warnInfo.remark}}</text>
  52. </uCard>
  53. </uSection>
  54. <uSection title="雨情数据" titleFontSize="0.8rem" type="line" style="width: 100%;">
  55. <uCard :is-shadow="false" title="雨量站预警频率">
  56. <text class="uni-body">{{warnInfo.rainWarnRateText}}</text>
  57. </uCard>
  58. <uCard :is-shadow="false" title="降雨时段">
  59. <text class="uni-body">{{warnInfo.intv}}</text>
  60. </uCard>
  61. <uCard :is-shadow="false" title="时段降水">
  62. <text class="uni-body">{{warnInfo.drp}}</text>
  63. </uCard>
  64. </uSection>
  65. <uSection title="河道水情数据" titleFontSize="0.8rem" type="line" style="width: 100%;">
  66. <uCard :is-shadow="false" title="河道水位">
  67. <text class="uni-body">{{warnInfo.z}}</text>
  68. </uCard>
  69. <uCard :is-shadow="false" title="河道流量">
  70. <text class="uni-body">{{warnInfo.q}}</text>
  71. </uCard>
  72. <uCard :is-shadow="false" title="河道水势">
  73. <text class="uni-body">{{warnInfo.wptn}}</text>
  74. </uCard>
  75. </uSection>
  76. <uSection title="水库水情数据" titleFontSize="0.8rem" type="line" style="width: 100%;">
  77. <uCard :is-shadow="false" title="库上水位">
  78. <text class="uni-body">{{warnInfo.rz}}</text>
  79. </uCard>
  80. <uCard :is-shadow="false" title="水库水势">
  81. <text class="uni-body">{{warnInfo.rwptn}}</text>
  82. </uCard>
  83. <uCard :is-shadow="false" title="水库流量">
  84. <text class="uni-body">{{warnInfo.inq}}</text>
  85. </uCard>
  86. </uSection>
  87. </uni-forms>
  88. </view>
  89. </template>
  90. <script>
  91. import http from '@/http/api.js';
  92. import {
  93. pathToBase64,
  94. base64ToPath
  95. } from '@/js_sdk/mmmm-image-tools/index.js';
  96. import {
  97. oss,
  98. devUrl,
  99. prodUrl
  100. } from '@/common/setting';
  101. import uNavBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue'
  102. import uDataPicker from '@/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue'
  103. import uGroup from '@/uni_modules/uni-group/uni-group.vue'
  104. import uSection from '@/uni_modules/uni-section/uni-section.vue'
  105. import uPagination from '@/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue'
  106. import uBreadcrumb from '@/uni_modules/uni-breadcrumb/components/uni-breadcrumb/uni-breadcrumb.vue'
  107. import uList from '@/uni_modules/uni-list/components/uni-list/uni-list.vue'
  108. import uListItem from '@/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue'
  109. import uIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
  110. import uCard from '@/uni_modules/uni-card/components/uni-card/uni-card.vue'
  111. export default {
  112. components: {
  113. uNavBar,
  114. uDataPicker,
  115. uPagination,
  116. uBreadcrumb,
  117. uList,
  118. uListItem,
  119. uIcons,
  120. uGroup,
  121. uSection,
  122. uCard,
  123. },
  124. onLoad(options) {
  125. this.id = options.id;
  126. console.log("iiiiiiiiiiiii " + this.id)
  127. this.baseURL = process.env.NODE_ENV === 'development' ? devUrl : prodUrl;
  128. this.getWarnInfo();
  129. },
  130. data() {
  131. return {
  132. id: '',
  133. baseURL: '',
  134. warnInfo: {
  135. },
  136. title: '预警信息详情',
  137. desc: '',
  138. }
  139. },
  140. computed: {
  141. getIcon() {
  142. return path => {
  143. return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
  144. }
  145. },
  146. },
  147. onShow() {},
  148. created() {
  149. },
  150. methods: {
  151. toOss(path) {
  152. return oss + path;
  153. },
  154. toBack() {
  155. uni.navigateBack({
  156. delta: 1
  157. })
  158. },
  159. dateFormat(dt) {
  160. var text = "" + dt.getFullYear();
  161. text += "-";
  162. text += ((dt.getMonth() + 1) < 10) ? ("0" + (dt.getMonth() + 1)) : (dt
  163. .getMonth() +
  164. 1);
  165. text += "-";
  166. text += dt.getDate() < 10 ? "0" + dt.getDate() : dt.getDate();
  167. text += " ";
  168. text += dt.getHours() < 10 ? "0" + dt.getHours() : dt.getHours();
  169. text += ":";
  170. text += dt.getMinutes() < 10 ? "0" + dt.getMinutes() : dt.getMinutes();
  171. text += ":";
  172. text += dt.getSeconds() < 10 ? "0" + dt.getSeconds() : dt.getSeconds();
  173. return text;
  174. },
  175. getWarnInfo() {
  176. var that = this;
  177. var postData = {};
  178. postData['id'] = this.id;
  179. console.log("iiiiiiiiiiiii " + this.id)
  180. http.request({
  181. url: '/galaxy-test/rtu/warning/original/detail',
  182. method: 'GET',
  183. data: postData
  184. }).then(res => {
  185. console.log(res)
  186. if (res.data != null) {
  187. that.warnInfo = res.data;
  188. }
  189. }).catch(err => {
  190. console.log(err)
  191. })
  192. },
  193. }
  194. }
  195. </script>
  196. <style>
  197. /* page {
  198. background-color: rgb(240, 242, 244);
  199. } */
  200. .uni-body {
  201. font-size: 0.7rem;
  202. }
  203. .cell-hover-class {
  204. background-color: rgb(235, 237, 238);
  205. }
  206. .view-flex-rs {
  207. display: flex;
  208. flex-direction: row;
  209. justify-content: flex-start;
  210. }
  211. .view-flex-rc {
  212. display: flex;
  213. flex-direction: row;
  214. justify-content: center;
  215. }
  216. .view-flex-re {
  217. display: flex;
  218. flex-direction: row;
  219. justify-content: flex-end;
  220. }
  221. .view-flex-cs {
  222. display: flex;
  223. flex-direction: column;
  224. justify-content: flex-start;
  225. }
  226. .view-flex-cc {
  227. display: flex;
  228. flex-direction: column;
  229. justify-content: center;
  230. }
  231. .view-flex-ce {
  232. display: flex;
  233. flex-direction: column;
  234. justify-content: flex-end;
  235. }
  236. .line-body {
  237. padding-left: 10px;
  238. padding-right: 10px;
  239. }
  240. .required-star {
  241. color: #FF0000;
  242. font-size: 15px;
  243. width: 20px;
  244. text-align: center;
  245. padding-left: 0px;
  246. padding-right: 2px;
  247. }
  248. .item-title {
  249. color: #909399;
  250. font-size: 15px;
  251. }
  252. .mline-text {
  253. padding-left: 2px;
  254. width: 100%;
  255. /* background-color:#909399; */
  256. height: 70px;
  257. border: 1px solid #FF5A5F;
  258. border-radius: 5px;
  259. }
  260. </style>
  261. <style lang="scss" scoped>
  262. .container {
  263. padding: 0 0 50rpx;
  264. }
  265. .u-cell-icon {
  266. width: 36rpx;
  267. height: 36rpx;
  268. margin-right: 8rpx;
  269. }
  270. .slot-box {
  271. /* #ifndef APP-NVUE */
  272. display: flex;
  273. /* #endif */
  274. flex-direction: row;
  275. align-items: center;
  276. }
  277. .slot-image {
  278. /* #ifndef APP-NVUE */
  279. display: block;
  280. /* #endif */
  281. margin-right: 10px;
  282. width: 30px;
  283. height: 30px;
  284. }
  285. .slot-text {
  286. flex: 1;
  287. font-size: 14px;
  288. color: #4cd964;
  289. margin-right: 10px;
  290. }
  291. .img-container {
  292. margin-bottom: 0px;
  293. width: 100px;
  294. height: 100px;
  295. .note-image-box {
  296. margin-top: 0px;
  297. display: flex;
  298. flex-wrap: wrap;
  299. padding: 10px;
  300. .note-image-item {
  301. position: relative;
  302. width: 100%;
  303. height: 0;
  304. padding-top: 100%;
  305. box-sizing: border-box;
  306. // background-color: #18B566;
  307. .close-icon {
  308. display: flex;
  309. justify-content: center;
  310. align-items: center;
  311. position: absolute;
  312. right: 0px;
  313. top: 0px;
  314. width: 22px;
  315. height: 22px;
  316. border-radius: 50%;
  317. background-color: #d5d5d5;
  318. z-index: 2;
  319. }
  320. .image-box {
  321. display: flex;
  322. justify-content: center;
  323. align-items: center;
  324. position: absolute;
  325. top: 5px;
  326. right: 5px;
  327. border: 5px;
  328. left: 5px;
  329. border: 1px #eee solid;
  330. border-radius: 5px;
  331. overflow: hidden;
  332. width: 98%;
  333. height: 98%;
  334. }
  335. }
  336. }
  337. }
  338. .input-body {
  339. background-color: #fff;
  340. padding: 10px;
  341. }
  342. </style>