snapshotDetail.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. <!-- 随手拍详情 -->
  2. <template>
  3. <view class="snapshotDetail">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  5. <view class="items" v-if="inspectionItems==0">
  6. <view class="items-li">
  7. <view>实验室</view>
  8. <view>{{newData.subName}}({{newData.subRoom}})</view>
  9. </view>
  10. <view class="items-li">
  11. <view>学院单位</view>
  12. <view>{{newData.deptName}}</view>
  13. </view>
  14. <view class="items-t" v-if="newData.hazardCheckName!=''">
  15. <view class="items-t-r">{{newData.hazardCheckCode}} {{newData.hazardCheckName}}</view>
  16. </view>
  17. <view class="items-b" v-if="newData.hazardCheckName!=''">< {{newData.hazardCheckCode2}} {{newData.hazardCheckName2}} < {{newData.hazardCheckCode1}} {{newData.hazardCheckName1}}</view>
  18. </view>
  19. <view class="items-number" v-if="newData.hazardCheckName!=''">此检查项在当前实验室累计出现<text>{{newData.hazardCheckNum}}</text>次隐患</view>
  20. <view class="list">
  21. <view class="list-li" v-if="newData.hazardCheckName!=''">
  22. <view>检查要点</view>
  23. <view>
  24. <img src="@/pages_safetyCheck/images/icon_06.png">
  25. </view>
  26. </view>
  27. <view v-if="newData.hazardCheckName!=''" class="hidden-content">{{newData.hazardCheckPoint}}
  28. </view>
  29. <view class="list-li">
  30. <view>检查隐患</view>
  31. </view>
  32. <view class="hidden-content">{{newData.hazardDescribe}}
  33. </view>
  34. <view class="photo">
  35. <img v-for="(item,index) in newData.yhDtoList" :src="baseUrl+item.fileUrl">
  36. </view>
  37. <view class="list-li">
  38. <view>隐患整改</view>
  39. <view :id="newData.rectifyStatus==0?'fontColor-A':(newData.rectifyStatus==1?'fontColor-B':'fontColor-C')">
  40. {{newData.rectifyStatus==0?'待整改':(newData.rectifyStatus==1?'已整改':'暂无法整改')}}
  41. <img src="@/pages_safetyCheck/images/icon_06.png">
  42. </view>
  43. </view>
  44. <view class="hidden-content" v-if="newData.rectifyStatus==1 || newData.rectifyStatus==2">{{newData.data7}}
  45. </view>
  46. <view class="photo" v-if="newData.rectifyStatus==1 || newData.rectifyStatus==2">
  47. <img src="@/pages_safetyCheck/images/img_ssp_pz@1x.png">
  48. </view>
  49. <view class="list-li" v-if="newData.rectifyStatus==1 || newData.rectifyStatus==2">
  50. <view>整改方案</view>
  51. <view></view>
  52. </view>
  53. <view class="file-li" v-if="newData.rectifyStatus==1 || newData.rectifyStatus==2">
  54. <img src="@/pages_safetyCheck/images/icon_djc_wj.png">
  55. <view>文件标题文件标题文件标题文件标题</view>
  56. </view>
  57. <view class="list-li" v-if="newData.rectifyStatus==1 || newData.rectifyStatus==2">
  58. <view>姓名:</view>
  59. <view>{{newData.data8}}</view>
  60. </view>
  61. <view class="list-li" v-if="newData.rectifyStatus==1 || newData.rectifyStatus==2">
  62. <view>时间:</view>
  63. <view>{{newData.data9}}</view>
  64. </view>
  65. </view>
  66. </scroll-view>
  67. <view class="sub-btn" @click="rectificationBtn">{{newData.rectifyStatus==0?'整改':'继续整改'}}</view>
  68. </view>
  69. </template>
  70. <script>
  71. import {
  72. config
  73. } from '@/api/request/config.js'
  74. import {
  75. securityAppCheckPhotoDetail,
  76. } from '@/pages_safetyCheck/api/index.js'
  77. export default {
  78. name: "snapshotDetail",
  79. components: {
  80. },
  81. data() {
  82. return {
  83. baseUrl: config.base_url,
  84. inspectionItems:0,//0有检查项 1无检查项
  85. newData: {},
  86. photoId:'',
  87. }
  88. },
  89. onLoad(option) {
  90. this.$set(this, 'photoId', JSON.parse(decodeURIComponent(option.infoData)).photoId);
  91. },
  92. onShow() {
  93. },
  94. mounted() {
  95. this.securityAppCheckPhotoDetail();
  96. },
  97. methods: {
  98. //滚动事件
  99. scrollGet() {},
  100. async securityAppCheckPhotoDetail() {
  101. let self = this;
  102. const {
  103. data
  104. } = await securityAppCheckPhotoDetail({photoId:this.photoId});
  105. if (data.code == 200) {
  106. this.$set(this, 'newData', data.data);
  107. }
  108. },
  109. //整改页面
  110. rectificationBtn(){
  111. let infoData=this.newData;
  112. uni.navigateTo({
  113. url: '/pages_safetyCheck/views/itemsManage/snapshotRectification?infoData=' + encodeURIComponent(JSON.stringify(infoData))
  114. });
  115. },
  116. }
  117. }
  118. </script>
  119. <style lang="stylus" scoped>
  120. .snapshotDetail {
  121. height: 100%;
  122. display flex;
  123. box-sizing: border-box;
  124. padding-bottom: 160rpx;
  125. box-sizing: border-box;
  126. #bgColor-A {
  127. color: #FFD400;
  128. }
  129. #bgColor-B {
  130. color: #FF8C00;
  131. }
  132. #bgColor-C {
  133. color: #E11608;
  134. }
  135. #fontColor-A {
  136. color: #0183FA;
  137. }
  138. #fontColor-B {
  139. color: #FF8C00;
  140. }
  141. #fontColor-C {
  142. color: #16B531;
  143. }
  144. .items {
  145. width: 690rpx;
  146. min-height: 165rpx;
  147. background: #FFFFFF;
  148. border-radius: 20rpx 20rpx 20rpx 20rpx;
  149. margin: 20rpx 0 0 30rpx;
  150. .items-li{
  151. display: flex;
  152. justify-content: space-between;
  153. align-items: center;
  154. padding: 0 30rpx;
  155. box-sizing: border-box;
  156. border-bottom: 1rpx solid #E0E0E0;
  157. >view:nth-of-type(1) {
  158. font-size: 30rpx;
  159. color: #333333;
  160. line-height: 80rpx;
  161. text-align: left;
  162. }
  163. >view:nth-of-type(2) {
  164. font-size: 28rpx;
  165. color: #666666;
  166. line-height: 80rpx;
  167. text-align: left;
  168. display: flex;
  169. justify-content: space-between;
  170. align-items: center;
  171. }
  172. }
  173. .items-t {
  174. border-bottom: 1rpx solid #E0E0E0;
  175. height: 80rpx;
  176. display: flex;
  177. justify-content: flex-start;
  178. align-items: center;
  179. padding: 0 30rpx;
  180. box-sizing: border-box;
  181. .items-t-l {
  182. width: 175rpx;
  183. height: 50rpx;
  184. background: #E11608;
  185. border-radius: 50rpx 50rpx 50rpx 50rpx;
  186. font-size: 30rpx;
  187. color: #FFFFFF;
  188. line-height: 50rpx;
  189. text-align: center;
  190. margin-right: 14rpx;
  191. }
  192. .items-t-r {
  193. font-size: 30rpx;
  194. color: #333333;
  195. line-height: 42rpx;
  196. text-align: left;
  197. }
  198. }
  199. .items-b {
  200. padding: 0 30rpx;
  201. box-sizing: border-box;
  202. height: 80rpx;
  203. font-size: 28rpx;
  204. color: #666666;
  205. line-height: 80rpx;
  206. text-align: left;
  207. }
  208. }
  209. .items-number {
  210. font-size: 24rpx;
  211. color: #3D3D3D;
  212. line-height: 34rpx;
  213. text-align: right;
  214. margin: 20rpx 60rpx 0 0;
  215. >text {
  216. font-size: 24rpx;
  217. color: #FF0000;
  218. line-height: 34rpx;
  219. text-align: right;
  220. }
  221. }
  222. .list {
  223. width: 690rpx;
  224. margin: 20rpx 30rpx 0;
  225. background: #FFFFFF;
  226. border-radius: 20rpx 20rpx 20rpx 20rpx;
  227. .list-li {
  228. display: flex;
  229. justify-content: space-between;
  230. align-items: center;
  231. padding: 0 30rpx;
  232. box-sizing: border-box;
  233. border-bottom: 1rpx solid #E0E0E0;
  234. >view:nth-of-type(1) {
  235. font-size: 30rpx;
  236. color: #333333;
  237. line-height: 80rpx;
  238. text-align: left;
  239. }
  240. >view:nth-of-type(2) {
  241. font-size: 28rpx;
  242. color: #666666;
  243. line-height: 80rpx;
  244. text-align: left;
  245. display: flex;
  246. justify-content: space-between;
  247. align-items: center;
  248. >img {
  249. width: 24rpx;
  250. height: 12rpx;
  251. margin-left: 10rpx;
  252. }
  253. }
  254. }
  255. .file-li{
  256. display: flex;
  257. justify-content: space-between;
  258. align-items: center;
  259. padding: 0 30rpx;
  260. box-sizing: border-box;
  261. >img:nth-of-type(1) {
  262. width: 30rpx;
  263. height: 30rpx;
  264. }
  265. >view{
  266. flex: 1;
  267. font-size: 28rpx;
  268. color: #333333;
  269. line-height: 80rpx;
  270. text-align: left;
  271. margin: 0 92rpx 0 16rpx;
  272. overflow: hidden;
  273. text-overflow: ellipsis;
  274. white-space: nowrap;
  275. }
  276. >img:nth-of-type(2) {
  277. width: 30rpx;
  278. height: 30rpx;
  279. }
  280. }
  281. .hidden-content {
  282. width: 630rpx;
  283. min-height: 120rpx;
  284. background: #F5F5F5;
  285. border-radius: 20rpx 20rpx 20rpx 20rpx;
  286. margin: 20rpx 30rpx 0;
  287. padding: 20rpx;
  288. box-sizing: border-box;
  289. font-size: 28rpx;
  290. color: #666666;
  291. line-height: 39rpx;
  292. text-align: left;
  293. }
  294. .photo {
  295. display: flex;
  296. justify-content: flex-start;
  297. flex-wrap: wrap;
  298. margin-top: 20rpx;
  299. padding: 0 30rpx;
  300. box-sizing: border-box;
  301. >img {
  302. width: 150rpx;
  303. height: 150rpx;
  304. border-radius: 10rpx 10rpx 10rpx 10rpx;
  305. margin: 0 10rpx 10rpx 0;
  306. }
  307. }
  308. .list-li:last-of-type {
  309. border: none;
  310. }
  311. }
  312. }
  313. .sub-btn{
  314. width: 686rpx;
  315. height: 100rpx;
  316. background: #0183FA;
  317. border-radius: 50rpx 50rpx 50rpx 50rpx;
  318. position: fixed;
  319. left: 30rpx;
  320. bottom: 30rpx;
  321. font-weight: 400;
  322. font-size: 30rpx;
  323. color: #FFFFFF;
  324. line-height: 100rpx;
  325. text-align: center;
  326. }
  327. </style>