trouble_xf_deetails.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. <template>
  2. <view class="">
  3. <navInfo :title="'隐患详情'"></navInfo>
  4. <view class="bgTopImg">
  5. <image slot="right" :src="`${urls}/navBg@2x.png`" class="bgTopImg"></image>
  6. </view>
  7. <view class=" uni-container">
  8. <view class=" flex flex-direction width100">
  9. <!-- 注意,如果需要兼容微信小程序,最好通过setRules方法设置rules规则 -->
  10. <u--form ref="uForm" :model="formData" labelPosition="left" labelWidth="70" labelAlign="left">
  11. <view class="time-main main-time">
  12. <view style="font-size: 14px;margin-bottom: 20px;" class="par-time"> <text
  13. class="time-axis">检查项名称:{{formData.inspName}}</text></view>
  14. <view class="itemunirow">
  15. <!-- <uni-row class="demo-uni-row " :gutter="20" width="100%">
  16. <uni-col :span="16">
  17. <text class="text-df text-1cut ">检查项名称:{{formData.inspName}}</text>
  18. </uni-col>
  19. </uni-row> -->
  20. <uni-row class="demo-uni-row " :gutter="20" width="100%">
  21. <uni-col :span="16">
  22. <!-- <uni-row class="demo-uni-row " :gutter="20" width="100%">
  23. <uni-col :span="24">
  24. <text class="text-df text-1cut ">处理时间:{{formData.handleTime}}</text>
  25. </uni-col>
  26. </uni-row> -->
  27. <uni-row class="demo-uni-row " :gutter="20" width="100%">
  28. <uni-col :span="24">
  29. <text class="text-df text-1cut ">检查内容:{{formData.inspContent}} </text>
  30. </uni-col>
  31. </uni-row>
  32. </uni-col>
  33. <!-- <uni-col :span="8">
  34. <u--image :showLoading="true" :src="formData.url" width="80px" height="80px">
  35. </u--image>
  36. </uni-col> -->
  37. </uni-row>
  38. </view>
  39. <view class="dashedBox" style="margin-bottom:10px">
  40. <view class="dashedLine">
  41. </view>
  42. </view>
  43. <view style="font-size: 14px;" class="par-time"> <text class="time-axis">设施情况:</text></view>
  44. <view class="padding-top-sm">
  45. <view>
  46. <u-list style="height: 45vh">
  47. <u-list-item v-for="(item,index) in formData.fpdList" :key="index" link>
  48. <uni-row class="demo-uni-row " :gutter="20" width="100%">
  49. <uni-col :span="16">
  50. <text class="text-df text-1cut ">设备名称:{{item.fpdName}}</text>
  51. </uni-col>
  52. <uni-col :span="8">
  53. <text class="text-df text-1cut ">设备二维码:</text>
  54. </uni-col>
  55. </uni-row>
  56. <uni-row class="demo-uni-row " :gutter="20" width="100%">
  57. <uni-col :span="16">
  58. <uni-row class="demo-uni-row " :gutter="20" width="100%">
  59. <uni-col :span="24">
  60. <text class="text-df text-1cut ">设备编号:{{item.fpdCode}}</text>
  61. </uni-col>
  62. </uni-row>
  63. <uni-row class="demo-uni-row " :gutter="20" width="100%">
  64. <uni-col :span="24">
  65. <text
  66. class="text-df text-1cut ">隐患描述:{{item.dangerDescribe}}</text>
  67. </uni-col>
  68. </uni-row>
  69. <uni-row class="demo-uni-row " :gutter="20" width="100%">
  70. <uni-col :span="24">
  71. <text class="padding-tb-sm">检查结果:</text>
  72. <view class="flex flex-wrap" style="margin-top: 20rpx;">
  73. <view v-for="(items,indexs) in item.hisFpdResultList"
  74. :key="indexs"
  75. class="flex flex-direction-row align-center padding-lr-sm">
  76. <u--image :showLoading="true" v-if="items.resValue=='1'"
  77. :src="zhengchang" width="34rpx" height="34rpx">
  78. </u--image>
  79. <text class="text-1cut padding-left-sm "
  80. v-if="items.resValue=='1'">{{items.resLable}}</text>
  81. </view>
  82. </view>
  83. <!-- <text class="text-df text-1cut ">设备位置:{{item.fpdLocal}}</text> -->
  84. </uni-col>
  85. </uni-row>
  86. </uni-col>
  87. <uni-col :span="8">
  88. <u--image :showLoading="true" :src="item.fpdQcode" width="80px"
  89. height="80px"></u--image>
  90. </uni-col>
  91. </uni-row>
  92. <!-- <view class="padding-tb-sm">
  93. <view class=" ">
  94. <view class="dashedLine">
  95. </view>
  96. </view>
  97. </view> -->
  98. <view class="padding-tb-sm">
  99. <view class=" ">
  100. <view class="dashedLine">
  101. </view>
  102. </view>
  103. </view>
  104. <text>现场照片:</text>
  105. <view class="padding-lr-lg flex flex-direction-row"
  106. style="justify-content: space-around;margin-top: 10px;">
  107. <u--image v-if="item.imgUrl1" :showLoading="true" :src="item.imgUrl1"
  108. width="80px" height="80px"></u--image>
  109. <u--image v-if="item.imgUrl2" :showLoading="true" :src="item.imgUrl2"
  110. width="80px" height="80px"></u--image>
  111. <u--image v-if="item.imgUrl3" :showLoading="true" :src="item.imgUrl3"
  112. width="80px" height="80px"></u--image>
  113. <!-- <view class="padding-lr-lg flex flex-direction-row">
  114. <u--image v-if="item.hisFpd.imgUrl1" :showLoading="true"
  115. :src="item.hisFpd.imgUrl1" width="80px" height="80px"></u--image>
  116. <u--image v-if="item.hisFpd.imgUrl2" :showLoading="true"
  117. :src="item.hisFpd.imgUrl2" width="80px" height="80px"></u--image>
  118. <u--image v-if="item.hisFpd.imgUrl3" :showLoading="true"
  119. :src="item.hisFpd.imgUrl3" width="80px" height="80px"></u--image> -->
  120. <!-- <u-album :urls="formData.imgurl"></u-album> -->
  121. <!-- </view> -->
  122. </view>
  123. </u-list-item>
  124. </u-list>
  125. </view>
  126. </view>
  127. </view>
  128. </u--form>
  129. </view>
  130. <!-- 加载中 -->
  131. <isLodingModel></isLodingModel>
  132. </view>
  133. </view>
  134. </template>
  135. <script>
  136. import {
  137. getOneDenger, // 获得单个隐患详情
  138. } from "@/api/hiddenTrouble";
  139. import {
  140. dangerDetailbyFpd, // 隐患查看详情(消防设施)
  141. dangerDetail // 隐患查看详情
  142. } from "@/api/hiddenTrouble";
  143. import {
  144. uploadAvatar
  145. } from "@/api/system/user"
  146. import {
  147. DICT_TYPE,
  148. getDictDatas
  149. } from "@/utils/dict";
  150. let that = null;
  151. import config from '@/config'
  152. const baseUrlImg = config.baseUrlImg
  153. import navInfo from '@/pagesA/components/my-nav/nav'
  154. export default {
  155. components: {
  156. navInfo
  157. },
  158. data() {
  159. return {
  160. urls: baseUrlImg,
  161. moren: `${baseUrlImg}/checkActive/moren.png`, //默认图片
  162. zhengchang: `${baseUrlImg}/checkActive/zhengchang.png`,
  163. // 数据加载中
  164. loading: false,
  165. // 自定义表单数据
  166. formData: {
  167. id: '',
  168. name: '',
  169. position: '',
  170. time: '',
  171. description: '',
  172. status: '',
  173. people: '',
  174. imgurl: [],
  175. },
  176. }
  177. },
  178. watch: {
  179. loading: {
  180. handler(newLength, oldLength) {
  181. this.$modal.isLoadingModel(this.loading)
  182. },
  183. immediate: true
  184. }
  185. },
  186. computed: {},
  187. //目的页面接收
  188. //这里用onshow()也可以
  189. onLoad(options) {
  190. var data = options.id;
  191. this.getData(data)
  192. },
  193. // onLoad: function(option) {
  194. // that = this;
  195. // const eventChannel = this.getOpenerEventChannel();
  196. // // eventChannel.emit('acceptDataFromOpenedPage', {
  197. // // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
  198. // eventChannel.on('acceptDataFromOpenerPage', function(val) {
  199. // console.log(' val', val)
  200. // that.getData(val.id)
  201. // })
  202. // },
  203. onReady() {},
  204. methods: {
  205. // =================数据转换==================
  206. // =============获取数据===================s
  207. // =============获取数据===================s
  208. // 获取数据
  209. getData(id) {
  210. this.loading = true
  211. dangerDetailbyFpd({
  212. dangerId: id
  213. }).then(response => {
  214. // 为数据赋值:通过展开运算符的形式,进行新旧数据的拼接
  215. this.formData = response.data ? response.data : {}
  216. this.loading = false;
  217. // this.formData.imgurl = ['https://cdn.uviewui.com/uview/swiper/swiper3.png',
  218. // 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
  219. // 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
  220. // ]
  221. this.loading = false;
  222. });
  223. },
  224. }
  225. }
  226. </script>
  227. <style lang="scss" scoped>
  228. .buttomBorder {
  229. height: 0px;
  230. border: 1px dashed #CBD5E1;
  231. }
  232. .dashedBox {
  233. padding: 0px 30rpx;
  234. }
  235. .dashedLine {
  236. height: 3px;
  237. background-image: linear-gradient(to right, #d7d6d6 0%, #d7d6d6 50%, rgba(196, 196, 196, 0) 50%);
  238. background-size: 40px 2px;
  239. background-repeat: repeat-x;
  240. }
  241. .itemunirow {
  242. .uni-row {
  243. padding-bottom: 20px;
  244. }
  245. }
  246. .uni-container {
  247. padding: 10px;
  248. border-radius: 30px 30px 0px 0px;
  249. background: #fff;
  250. /*#ifdef H5*/
  251. margin-top: 50rpx;
  252. /* #endif */
  253. /* #ifdef MP-WEIXIN*/
  254. margin-top: 100rpx;
  255. /* #endif */
  256. z-index: 9999999;
  257. position: relative;
  258. }
  259. </style>