picture.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. <template>
  2. <view class="container uni-container" v-if="Object.keys(tableData).length != 0">
  3. <!-- <navInfo :title="'每日巡查详情'"></navInfo>
  4. <view class="bgTopImg">
  5. <image slot="right" src="@/static/images/navBg@2x.png" class="bgTopImg"></image>
  6. </view> -->
  7. <view style="margin-bottom: 150rpx;">
  8. <view>
  9. <view class="nav" style="color:#4CB2B6;">信息来源</view>
  10. <view class="main">
  11. <uni-row class="demo-uni-row">
  12. <uni-col :span="10">
  13. <text class="text-df text-1cut middles">任务名称</text>
  14. </uni-col>
  15. <uni-col :span="14">
  16. <text class="text-descibe">{{tableData.taskInfo.taskName}}</text>
  17. </uni-col>
  18. </uni-row>
  19. <uni-row class="demo-uni-row">
  20. <uni-col :span="10">
  21. <text class="text-df text-1cut middles">所属单位</text>
  22. </uni-col>
  23. <uni-col :span="14">
  24. <text class="text-descibe">{{tableData.inspectInfo.orgId}}</text>
  25. </uni-col>
  26. </uni-row>
  27. <uni-row class="demo-uni-row">
  28. <uni-col :span="10">
  29. <text class="text-df text-1cut middles">接收者</text>
  30. </uni-col>
  31. <uni-col :span="14">
  32. <text class="text-descibe"
  33. v-if="tableData.receiverInfo!=null">{{tableData.receiverInfo.empRyxm}}</text>
  34. </uni-col>
  35. </uni-row>
  36. <uni-row class="demo-uni-row">
  37. <uni-col :span="10">
  38. <text class="text-df text-1cut middles">发送者</text>
  39. </uni-col>
  40. <uni-col :span="14">
  41. <text class="text-descibe"
  42. v-if="tableData.senderInfo!=null">{{tableData.senderInfo.empRyxm}}</text>
  43. </uni-col>
  44. </uni-row>
  45. <uni-row class="demo-uni-row">
  46. <uni-col :span="10">
  47. <text class="text-df text-1cut middles">任务类型</text>
  48. </uni-col>
  49. <uni-col :span="14">
  50. <text class="text-descibe">{{taskleiXing}}</text>
  51. </uni-col>
  52. </uni-row>
  53. <uni-row class="demo-uni-row">
  54. <uni-col :span="10">
  55. <text class="text-df text-1cut middles">检查日期</text>
  56. </uni-col>
  57. <uni-col :span="14">
  58. <text class="text-descibe" v-if="tableData.inspectInfo">{{tableData.inspectInfo.createTime}}</text>
  59. </uni-col>
  60. </uni-row>
  61. <!-- <uni-row class="demo-uni-row">
  62. <uni-col :span="10">
  63. <text class="text-df text-1cut middles">是否上报</text>
  64. </uni-col>
  65. <uni-col :span="14">
  66. <text class="text-descibe">{{tableData.taskInfo.taskType}}</text>
  67. </uni-col>
  68. </uni-row> -->
  69. <uni-row class="demo-uni-row" v-if="tableData.taskInfo.attId!=null">
  70. <uni-col :span="10">
  71. <text class="text-df text-1cut middles">附件</text>
  72. </uni-col>
  73. <uni-col :span="14">
  74. <text style="color:#00a3f4;" @click.native="down(tableData.taskInfo.attId)">点击预览文件</text>
  75. </uni-col>
  76. </uni-row>
  77. </view>
  78. </view>
  79. <!-- <view v-if="tableData.inspectInfo.length!=0" style="margin-top: 30rpx;"> -->
  80. <view class="nav" style="color:#4CB2B6;">处理详情</view>
  81. <view class="main" style="margin-bottom: 40rpx;">
  82. <view v-if="tableData.fpdInfoList.length==0">
  83. <uni-row class="demo-uni-row">
  84. <uni-col :span="10">
  85. <text class="text-df text-1cut middles" style="font-weight: 600;color:#274647;">检查项目</text>
  86. </uni-col>
  87. <uni-col :span="14">
  88. <text class="text-descibe"
  89. style="font-weight: 600;color:#274647;">{{tableData.inspectInfo.inspName}}</text>
  90. </uni-col>
  91. </uni-row>
  92. <uni-row class="demo-uni-row">
  93. <uni-col :span="10">
  94. <text
  95. class="text-df text-1cut middles">{{tableData.inspectInfo.isdenger==1?'检查隐患描述':'检查描述'}}</text>
  96. </uni-col>
  97. <uni-col :span="14">
  98. <text
  99. class="text-descibe">{{tableData.inspectInfo.isdenger==1?tableData.inspectInfo.description:'正常'}}</text>
  100. </uni-col>
  101. </uni-row>
  102. <uni-row class="demo-uni-row">
  103. <uni-col :span="10">
  104. <text class="text-df text-1cut middles">检查结果</text>
  105. </uni-col>
  106. <uni-col :span="14" style="display: flex;flex-wrap: wrap;">
  107. <view v-for="(items2,indexs2) in tableData.hisResult" :key="indexs2"
  108. style="margin-right: 10rpx;">
  109. <image v-if="items2.resValue==1" :src="zhengchang" class="tupian"
  110. style="vertical-align:middle;margin-right: 6rpx;" />
  111. <text v-if="items2.resValue==1" class="text-descibe">{{items2.resLable}}</text>
  112. </view>
  113. </uni-col>
  114. </uni-row>
  115. <uni-row class="demo-uni-row tupian-flex">
  116. <view v-for="(items,indexs) in tableData.imgList">
  117. <image v-if="items.imgUrl" :key="indexs" :src="items.imgUrl" class="image-size"></image>
  118. </view>
  119. </uni-row>
  120. </view>
  121. <view v-if="tableData.fpdInfoList.length>0">
  122. <view v-for="(item,index) in tableData.fpdInfoList">
  123. <uni-row class="demo-uni-row">
  124. <uni-col :span="10">
  125. <text class="text-df text-1cut middles"
  126. style="font-weight: 600;color:#274647;">检查项目{{index+1}}</text>
  127. </uni-col>
  128. <uni-col :span="14">
  129. <text class="text-descibe"
  130. style="font-weight: 600;color:#274647;">{{item.fpd_name}}</text>
  131. </uni-col>
  132. </uni-row>
  133. <uni-row class="demo-uni-row">
  134. <uni-col :span="10">
  135. <text class="text-df text-1cut middles"
  136. style="color:#274647;font-weight: 500;">{{`(${index+1})`}}设备名称</text>
  137. </uni-col>
  138. <uni-col :span="14">
  139. <text class="text-descibe" style="color:#274647;">{{item.fpd_code}}</text>
  140. </uni-col>
  141. </uni-row>
  142. <view>
  143. <uni-row class="demo-uni-row">
  144. <uni-col :span="10">
  145. <text class="text-df text-1cut middles">检查结果</text>
  146. </uni-col>
  147. <uni-col :span="14" style="display: flex;flex-wrap: wrap;">
  148. <view v-for="(items2,indexs2) in item.hisFpdResult" :key="indexs2"
  149. style="margin-right: 10rpx;">
  150. <image v-if="items2.resValue==1" :src="zhengchang" class="tupian"
  151. style="vertical-align:middle;margin-right: 6rpx;" />
  152. <text v-if="items2.resValue==1" class="text-descibe">{{items2.resLable}}</text>
  153. </view>
  154. </uni-col>
  155. </uni-row>
  156. <uni-row class="demo-uni-row">
  157. <uni-col :span="10">
  158. <text class="text-df text-1cut middles">{{item.fpd_type==1?'检查隐患描述':'检查描述'}}</text>
  159. </uni-col>
  160. <uni-col :span="14">
  161. <text class="text-descibe">{{item.isdanger==1?item.danger_describe:'正常'}}</text>
  162. </uni-col>
  163. </uni-row>
  164. <uni-row class="demo-uni-row tupian-flex">
  165. <image v-if="item.img_url1" :src="item.img_url1" class="image-size"></image>
  166. <image v-if="item.img_url2" :src="item.img_url2" class="image-size"></image>
  167. <image v-if="item.img_url3" :src="item.img_url3" class="image-size"></image>
  168. </uni-row>
  169. </view>
  170. </view>
  171. </view>
  172. </view>
  173. <!-- </view> -->
  174. </view>
  175. </view>
  176. </template>
  177. <script>
  178. let that = null;
  179. import {
  180. getInspEcthisDetail,
  181. } from '@/api/check_record';
  182. import {
  183. getInsHisImgurl,
  184. } from '@/api/check_record';
  185. import {
  186. checkType,
  187. downSee
  188. } from '@/utils/common'
  189. import {
  190. shijianc
  191. } from '@/utils/common.js'
  192. import { DICT_TYPE, getDictDatas } from '@/utils/dict';
  193. import config from '@/config'
  194. const baseUrlImg = config.baseUrlImg
  195. export default {
  196. data() {
  197. return {
  198. tableData: {},
  199. // 数据加载中
  200. loading: false,
  201. dictTypeData: 'dict_inspect_type',
  202. dictTypeValue: '',
  203. moren: `${baseUrlImg}/checkActive/moren.png`, //默认图片
  204. zhengchang: `${baseUrlImg}/checkActive/zhengchang.png`,
  205. my: '',
  206. taskleiXingArr:getDictDatas(DICT_TYPE.TASK_TYPE),
  207. taskleiXing:""
  208. };
  209. },
  210. watch: {
  211. loading: {
  212. handler(newLength, oldLength) {
  213. this.$modal.isLoadingModel(this.loading)
  214. },
  215. immediate: true
  216. }
  217. },
  218. // 在 vue页面,向起始页通过事件传递数据
  219. onLoad(options) {
  220. if (options.items) {
  221. this.my = JSON.parse(options.items)
  222. } else {
  223. var data = options.id;
  224. this.getData(data)
  225. }
  226. },
  227. methods: {
  228. down(val){
  229. downSee(val)
  230. },
  231. getData(id) {
  232. // uni.redirectTo({
  233. // url: `/pagesA/fire/check_record/index?my=${this.my}`
  234. // });
  235. this.loading = true
  236. getInspEcthisDetail({
  237. hisId: id
  238. }).then(response => {
  239. this.loading = false;
  240. // 为数据赋值:通过展开运算符的形式,进行新旧数据的拼接
  241. this.tableData = response.data ? response.data : {},
  242. this.taskleiXingArr.map(i=>{
  243. if(i.value=this.tableData.taskInfo.taskType){
  244. this.taskleiXing=i.label
  245. }
  246. })
  247. this.tableData.inspectInfo.createTime=shijianc(this.tableData.inspectInfo.createTime)
  248. // this.dictTypeValue = this.tableData.inspType
  249. // this.tableData.inspType = checkType(this.dictTypeData, this.dictTypeValue)
  250. // this.times = this.tableData.taskInfo ? shijianc(this.tableData.taskInfo.publishTime) : ''
  251. });
  252. getInsHisImgurl({
  253. hisId: id,
  254. }).then(response => {
  255. this.tableData.url = response.data
  256. });
  257. },
  258. // get() {
  259. // const data = uni.getStorageSync('getlistSimpleDict_key')
  260. // const e = data.map(v =>{
  261. // if (this.dictTypeValue == v.value && this.dictTypeData == v.dictType) {
  262. // console.log(v.lable,'sdddddddd')
  263. // }
  264. // }
  265. // )
  266. // },
  267. // =================数据转换==================
  268. statusListTran(val) { //status状态转换
  269. // return this.statusList[val]
  270. },
  271. }
  272. };
  273. </script>
  274. <style lang="scss" scoped>
  275. .container {
  276. // border-radius: 30px 30px 0px 0px;
  277. // background: #fff;
  278. // margin-top: 90rpx;
  279. // z-index: 9999;
  280. // position: relative;
  281. .uni-container {
  282. padding-bottom: 120rpx;
  283. margin-top: 50rpx;
  284. height: 100%;
  285. border-top-right-radius: 40rpx;
  286. border-top-left-radius: 40rpx;
  287. background-color: #fff;
  288. }
  289. }
  290. page{
  291. background-color: #f5f7f9;
  292. }
  293. .zhuangtai {
  294. padding: 5rpx 20rpx;
  295. border-radius: 2px;
  296. }
  297. .weiwan {
  298. color: #D51A52;
  299. background: rgba(213, 26, 82, 0.2);
  300. border: 1px solid #D51A52;
  301. }
  302. .yiwan {
  303. color: #4CB2B6;
  304. background: rgba(76, 178, 182, 0.2);
  305. border: 1px solid #4CB2B6;
  306. }
  307. .shenhe {
  308. color: #3491FA;
  309. background: rgba(52, 145, 250, 0.2);
  310. border: 1px solid #4CB2B6;
  311. }
  312. .juli-top {
  313. margin: 20rpx 0 20rpx 0;
  314. }
  315. .image-size {
  316. width: 160rpx;
  317. height: 160rpx;
  318. border-radius: 10rpx;
  319. margin: 0 15rpx 20rpx 0;
  320. }
  321. .tupian {
  322. width: 38rpx;
  323. height: 38rpx;
  324. }
  325. .tupian-flex {
  326. display: flex;
  327. justify-content: space-around;
  328. flex-wrap: wrap;
  329. }
  330. //新样式
  331. .main {
  332. border: 4rpx solid rgb(192, 203, 218);
  333. border-radius: 10rpx;
  334. .demo-uni-row,
  335. /deep/.uni-row {
  336. width: 96%;
  337. margin: 0 2% !important;
  338. padding: 20rpx 0;
  339. border-bottom: 2rpx solid rgb(174, 174, 174);
  340. }
  341. /deep/.uni-row:last-child {
  342. border: 0;
  343. }
  344. .middles {
  345. text-align: center !important;
  346. }
  347. .buju {
  348. margin: 40rpx;
  349. line-height: 40rpx;
  350. .miaoshu {
  351. margin-right: 20rpx;
  352. color: #274647;
  353. font-size: 30rpx;
  354. }
  355. .text-descibe {
  356. color: rgb(102, 103, 133);
  357. font-size: 28rpx;
  358. }
  359. }
  360. }
  361. .nav {
  362. font-size: 36rpx;
  363. color: #4CB2B6;
  364. margin-bottom: 20rpx;
  365. }
  366. </style>