snapshotDetail.vue 8.1 KB

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