snapshotDetail.vue 8.5 KB

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