picture.vue 11 KB

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