hiddenDangerItemsDetail.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. <!-- 检查详情 -->
  2. <template>
  3. <view class="snapshotDetail">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  5. <view class="tip" v-if="pageType==0">{{newData.checkName}}</view>
  6. <view class="tip-tow" v-if="pageType==1 || pageType==2">{{newData.checkName}}</view>
  7. <view class="items">
  8. <view class="items-t" v-if="newData.hazardCheckName!=''">
  9. <view class="items-t-r">{{newData.hazardCheckCode}} {{newData.hazardCheckName}}</view>
  10. </view>
  11. <view class="items-b" v-if="newData.hazardCheckName!=''">< {{newData.hazardCheckCode2}}
  12. {{newData.hazardCheckName2}} < {{newData.hazardCheckCode1}} {{newData.hazardCheckName1}}
  13. </view>
  14. </view>
  15. <view class="items-number" v-if="newData.hazardCheckName!=''">
  16. 此检查项在当前实验室累计出现<text>{{hazardCheckNum}}</text>次隐患</view>
  17. <view class="list">
  18. <view class="list-li" v-if="newData.hazardCheckName!=''">
  19. <view>检查要点</view>
  20. <view>
  21. <img src="@/pages_safetyCheck/images/icon_06.png">
  22. </view>
  23. </view>
  24. <view v-if="newData.hazardCheckName!=''" class="hidden-content">{{newData.hazardCheckPoint}}
  25. </view>
  26. <view class="list-li">
  27. <view>{{newData.checkFlag?'检查结果':'检查隐患'}}</view>
  28. <view :id="newData.checkFlag?'fontColor-B':'fontColor-C'">
  29. {{newData.checkFlag?'符合':'不符合'}}
  30. <img src="@/pages_safetyCheck/images/icon_06.png">
  31. </view>
  32. </view>
  33. <view class="hidden-content" v-if="!newData.checkFlag">{{newData.hazardDescribe}}
  34. </view>
  35. <view class="photo" v-if="!newData.checkFlag">
  36. <img v-for="(item,index) in newData.photoList" :src="baseUrl+item.fileUrl">
  37. </view>
  38. <view class="list-li">
  39. <view>姓名:</view>
  40. <view>{{newData.checkUserName}}</view>
  41. </view>
  42. <view class="list-li">
  43. <view>检查时间:</view>
  44. <view>{{newData.checkTime}}</view>
  45. </view>
  46. </view>
  47. </scroll-view>
  48. <view class="sub-btn" v-if="pageType==0 && !newData.checkFlag">
  49. <view @click="submitBtn(1)">编辑</view>
  50. <view @click="submitBtn(2)">继续检查</view>
  51. </view>
  52. <view v-if="pageType==0 && newData.checkFlag" @click="submitBtn(2)" class="sub-btn-tow">继续检查</view>
  53. </view>
  54. </template>
  55. <script>
  56. import {
  57. config
  58. } from '@/api/request/config.js'
  59. import {
  60. parseTime
  61. } from '@/component/public.js'
  62. import {
  63. securityAppCheckPlanCheckInfo,
  64. securityAppCheckPhotoGetCheckNumBySub,
  65. } from '@/pages_safetyCheck/api/index.js'
  66. export default {
  67. name: "snapshotDetail",
  68. components: {
  69. },
  70. data() {
  71. return {
  72. baseUrl: config.base_url,
  73. inspectionItems: 0, //0有检查项 1无检查项
  74. newData: {},
  75. setOptionId: '',
  76. manageId: '',
  77. subId: '',
  78. hazardCheckPro: '',
  79. hazardCheckNum: 0,
  80. pageType: 0, //0检查 1复查 2整改
  81. }
  82. },
  83. onLoad(option) {
  84. let optionData = JSON.parse(decodeURIComponent(option.infoData));
  85. this.$set(this, 'pageType', optionData.pageType);
  86. this.$set(this, 'setOptionId', optionData.setOptionId);
  87. this.$set(this, 'manageId', optionData.manageId);
  88. this.$set(this, 'subId', optionData.subId);
  89. this.$set(this, 'hazardCheckPro', optionData.hazardCheckPro);
  90. },
  91. onShow() {
  92. },
  93. mounted() {
  94. this.securityAppCheckPlanCheckInfo();
  95. this.securityAppCheckPhotoGetCheckNumBySub();
  96. },
  97. methods: {
  98. //滚动事件
  99. scrollGet() {},
  100. //获取详情
  101. async securityAppCheckPlanCheckInfo() {
  102. let obj = {
  103. setOptionId: this.setOptionId,
  104. manageId: this.manageId,
  105. }
  106. const {
  107. data
  108. } = await securityAppCheckPlanCheckInfo(obj);
  109. if (data.code == 200) {
  110. uni.setNavigationBarTitle({
  111. title: data.data.subName + '(' + (this.pageType == 0 ? data.data.roomNum : data.data
  112. .subRoom) + ')'
  113. })
  114. this.$set(this, 'newData', data.data);
  115. this.$set(this.newData, 'checkTime', parseTime(data.data.checkTime, "{y}-{m}-{d}"));
  116. }
  117. },
  118. //获取检查项在当前实验室出现的次数
  119. async securityAppCheckPhotoGetCheckNumBySub() {
  120. let obj = {
  121. subId: this.subId,
  122. hazardCheckPro: this.hazardCheckPro,
  123. }
  124. const {
  125. data
  126. } = await securityAppCheckPhotoGetCheckNumBySub(obj);
  127. if (data.code == 200) {
  128. this.$set(this, 'hazardCheckNum', data.data);
  129. }
  130. },
  131. //检查-按钮
  132. submitBtn(status){
  133. if(status==1){
  134. //编辑
  135. let infoData = {
  136. setOptionId:this.setOptionId,
  137. manageId:this.manageId,
  138. subId:this.subId,
  139. hazardCheckPro:this.hazardCheckPro,
  140. pageType:this.pageType,
  141. };
  142. uni.redirectTo({
  143. url: '/pages_safetyCheck/views/inspectManage/inspectAdd?infoData=' + encodeURIComponent(JSON
  144. .stringify(infoData))
  145. });
  146. }else if(status==2){
  147. //继续检查
  148. }
  149. },
  150. //整改页面
  151. rectificationBtn() {
  152. let self = this;
  153. let infoData = self.newData;
  154. console.log(self.newData)
  155. uni.navigateTo({
  156. url: '/pages_safetyCheck/views/itemsManage/snapshotRectification?infoData=' +
  157. encodeURIComponent(JSON.stringify(infoData))
  158. });
  159. },
  160. }
  161. }
  162. </script>
  163. <style lang="stylus" scoped>
  164. .snapshotDetail {
  165. height: 100%;
  166. display flex;
  167. box-sizing: border-box;
  168. padding-bottom: 160rpx;
  169. box-sizing: border-box;
  170. #bgColor-A {
  171. color: #FFD400;
  172. }
  173. #bgColor-B {
  174. color: #FF8C00;
  175. }
  176. #bgColor-C {
  177. color: #E11608;
  178. }
  179. #fontColor-A {
  180. color: #0183FA;
  181. }
  182. #fontColor-B {
  183. color: #16B531;
  184. }
  185. #fontColor-C {
  186. color: #FF8C00;
  187. }
  188. .tip {
  189. width: 750rpx;
  190. height: 80rpx;
  191. background: rgba(1, 131, 250, 0.2);
  192. border-radius: 0rpx 0rpx 0rpx 0rpx;
  193. font-size: 30rpx;
  194. color: #0183FA;
  195. line-height: 80rpx;
  196. text-align: center;
  197. }
  198. .tip-tow {
  199. width: 750rpx;
  200. height: 80rpx;
  201. background: rgba(255, 140, 0, 0.2);
  202. border-radius: 0rpx 0rpx 0rpx 0rpx;
  203. font-size: 30rpx;
  204. color: #FF8C00;
  205. line-height: 80rpx;
  206. text-align: center;
  207. }
  208. .items {
  209. width: 690rpx;
  210. min-height: 165rpx;
  211. background: #FFFFFF;
  212. border-radius: 20rpx 20rpx 20rpx 20rpx;
  213. margin: 20rpx 0 0 30rpx;
  214. .items-li {
  215. display: flex;
  216. justify-content: space-between;
  217. align-items: center;
  218. padding: 0 30rpx;
  219. box-sizing: border-box;
  220. border-bottom: 1rpx solid #E0E0E0;
  221. >view:nth-of-type(1) {
  222. font-size: 30rpx;
  223. color: #333333;
  224. line-height: 80rpx;
  225. text-align: left;
  226. }
  227. >view:nth-of-type(2) {
  228. font-size: 28rpx;
  229. color: #666666;
  230. line-height: 80rpx;
  231. text-align: left;
  232. display: flex;
  233. justify-content: space-between;
  234. align-items: center;
  235. }
  236. }
  237. .items-t {
  238. border-bottom: 1rpx solid #E0E0E0;
  239. height: 80rpx;
  240. display: flex;
  241. justify-content: flex-start;
  242. align-items: center;
  243. padding: 0 30rpx;
  244. box-sizing: border-box;
  245. .items-t-l {
  246. width: 175rpx;
  247. height: 50rpx;
  248. background: #E11608;
  249. border-radius: 50rpx 50rpx 50rpx 50rpx;
  250. font-size: 30rpx;
  251. color: #FFFFFF;
  252. line-height: 50rpx;
  253. text-align: center;
  254. margin-right: 14rpx;
  255. }
  256. .items-t-r {
  257. font-size: 30rpx;
  258. color: #333333;
  259. line-height: 42rpx;
  260. text-align: left;
  261. }
  262. }
  263. .items-b {
  264. padding: 0 30rpx;
  265. box-sizing: border-box;
  266. height: 80rpx;
  267. font-size: 28rpx;
  268. color: #666666;
  269. line-height: 80rpx;
  270. text-align: left;
  271. }
  272. }
  273. .items-number {
  274. font-size: 24rpx;
  275. color: #3D3D3D;
  276. line-height: 34rpx;
  277. text-align: right;
  278. margin: 20rpx 60rpx 0 0;
  279. >text {
  280. font-size: 24rpx;
  281. color: #FF0000;
  282. line-height: 34rpx;
  283. text-align: right;
  284. }
  285. }
  286. .list {
  287. width: 690rpx;
  288. margin: 20rpx 30rpx 0;
  289. background: #FFFFFF;
  290. border-radius: 20rpx 20rpx 20rpx 20rpx;
  291. .list-li {
  292. display: flex;
  293. justify-content: space-between;
  294. align-items: center;
  295. padding: 0 30rpx;
  296. box-sizing: border-box;
  297. border-bottom: 1rpx solid #E0E0E0;
  298. >view:nth-of-type(1) {
  299. font-size: 30rpx;
  300. color: #333333;
  301. line-height: 80rpx;
  302. text-align: left;
  303. }
  304. >view:nth-of-type(2) {
  305. font-size: 28rpx;
  306. color: #666666;
  307. line-height: 80rpx;
  308. text-align: left;
  309. display: flex;
  310. justify-content: space-between;
  311. align-items: center;
  312. >img {
  313. width: 24rpx;
  314. height: 12rpx;
  315. margin-left: 10rpx;
  316. }
  317. }
  318. }
  319. .file-li {
  320. display: flex;
  321. justify-content: space-between;
  322. align-items: center;
  323. padding: 0 30rpx;
  324. box-sizing: border-box;
  325. >img:nth-of-type(1) {
  326. width: 30rpx;
  327. height: 30rpx;
  328. }
  329. >view {
  330. flex: 1;
  331. font-size: 28rpx;
  332. color: #333333;
  333. line-height: 80rpx;
  334. text-align: left;
  335. margin: 0 92rpx 0 16rpx;
  336. overflow: hidden;
  337. text-overflow: ellipsis;
  338. white-space: nowrap;
  339. }
  340. >img:nth-of-type(2) {
  341. width: 30rpx;
  342. height: 30rpx;
  343. }
  344. }
  345. .hidden-content {
  346. width: 630rpx;
  347. min-height: 120rpx;
  348. background: #F5F5F5;
  349. border-radius: 20rpx 20rpx 20rpx 20rpx;
  350. margin: 20rpx 30rpx 0;
  351. padding: 20rpx;
  352. box-sizing: border-box;
  353. font-size: 28rpx;
  354. color: #666666;
  355. line-height: 39rpx;
  356. text-align: left;
  357. }
  358. .photo {
  359. display: flex;
  360. justify-content: flex-start;
  361. flex-wrap: wrap;
  362. margin-top: 20rpx;
  363. padding: 0 30rpx;
  364. box-sizing: border-box;
  365. >img {
  366. width: 150rpx;
  367. height: 150rpx;
  368. border-radius: 10rpx 10rpx 10rpx 10rpx;
  369. margin: 0 10rpx 10rpx 0;
  370. }
  371. }
  372. .list-li:last-of-type {
  373. border: none;
  374. }
  375. }
  376. }
  377. .sub-btn {
  378. display: flex;
  379. justify-content: center;
  380. position: fixed;
  381. left: 30rpx;
  382. bottom: 30rpx;
  383. >view:nth-of-type(1) {
  384. width: 345rpx;
  385. height: 100rpx;
  386. background: #FF8C00;
  387. border-radius: 50rpx 0rpx 0rpx 50rpx;
  388. font-size: 30rpx;
  389. color: #FFFFFF;
  390. line-height: 100rpx;
  391. text-align: center;
  392. }
  393. >view:nth-of-type(2) {
  394. width: 345rpx;
  395. height: 100rpx;
  396. background: #0183FA;
  397. border-radius: 0rpx 50rpx 50rpx 0rpx;
  398. font-size: 30rpx;
  399. color: #FFFFFF;
  400. line-height: 100rpx;
  401. text-align: center;
  402. }
  403. }
  404. .sub-btn-tow {
  405. width: 686rpx;
  406. height: 100rpx;
  407. background: #0183FA;
  408. border-radius: 50rpx 50rpx 50rpx 50rpx;
  409. position: fixed;
  410. left: 30rpx;
  411. bottom: 30rpx;
  412. font-weight: 400;
  413. font-size: 30rpx;
  414. color: #FFFFFF;
  415. line-height: 100rpx;
  416. text-align: center;
  417. }
  418. </style>