yinhuaninfo_gongshi.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. <template>
  2. <div>
  3. <div class="footed">
  4. <van-list
  5. v-model="loading"
  6. :finished="finished"
  7. finished-text="没有更多了"
  8. @load="onLoad"
  9. >
  10. <div
  11. class="footed_box"
  12. v-for="(item, index) in TroubleshootData_list"
  13. :key="index"
  14. >
  15. <div class="footed_box_one">
  16. <p class="footed_box_one_p1">{{ item.inspected_person }}</p>
  17. <!-- <p class="footed_box_one_p2">{{item.created_at}}</p> -->
  18. <p class="footed_box_one_p6" v-if="item.rectification_status == 0">
  19. 未整改
  20. </p>
  21. <p
  22. class="footed_box_one_p6_2"
  23. v-if="item.rectification_status == 1"
  24. >
  25. 已整改
  26. </p>
  27. <p
  28. class="footed_box_one_p6_3"
  29. style="background: #fdaf00"
  30. v-if="item.rectification_status == 2"
  31. >
  32. 申请延期
  33. </p>
  34. <p
  35. class="footed_box_one_p6_3"
  36. v-if="item.rectification_status == 3"
  37. >
  38. 逾期
  39. </p>
  40. <p class="footed_box_one_p4" v-if="item.status == 1">未验收</p>
  41. <p class="footed_box_one_p3" v-if="item.status == 2">已验收</p>
  42. <p class="footed_box_one_p5" v-if="item.status == 3">逾期</p>
  43. <p class="footed_box_one_p5" v-if="item.status == 4">未通过</p>
  44. </div>
  45. <div class="footed_box_two">
  46. <div class="footed_box_two_div">
  47. <span class="footed_box_span1">风险点</span>
  48. <span>{{ item.risk_point }}</span>
  49. </div>
  50. <div class="footed_box_two_div">
  51. <span class="footed_box_span1">检查专业</span>
  52. <span>{{ item.inspection_specialty }}</span>
  53. </div>
  54. <div class="footed_box_two_div">
  55. <span class="footed_box_span1">责任单位</span>
  56. <span>{{ item.rectification_duty_unit }}</span>
  57. </div>
  58. </div>
  59. <div class="footed_box_three" @click="dianji(item)">
  60. <img src="../../../assets/images/meihuajing/信息.png" alt="" />
  61. </div>
  62. </div>
  63. </van-list>
  64. </div>
  65. </div>
  66. </template>
  67. <script>
  68. export default {
  69. data() {
  70. return {
  71. page: 1,
  72. loading: false,
  73. finished: false,
  74. // 隐患列表
  75. TroubleshootData_list: [],
  76. };
  77. },
  78. methods: {
  79. onLoad() {
  80. this.getTroubleshootData();
  81. },
  82. // 获取隐患排查列表
  83. getTroubleshootData() {
  84. this.$toast.loading();
  85. this.$http
  86. .post(
  87. "http://meihuajing.nxjiewei.com:8011/api/troubleshoot/getTroubleshootData",
  88. {
  89. type: 5,
  90. page: this.page,
  91. }
  92. )
  93. .then((res) => {
  94. this.$toast.clear();
  95. console.log(res);
  96. console.log(res.data.data.data);
  97. // 加载状态结束
  98. this.loading = false;
  99. this.page++;
  100. console.log(res.data.data.data.length)
  101. // 数据全部加载完成
  102. if (res.data.data.data.length < 10) {
  103. this.finished = true;
  104. }
  105. // this.TroubleshootData_list = res.data.data.data;
  106. this.TroubleshootData_list = this.TroubleshootData_list.concat(res.data.data.data)
  107. });
  108. },
  109. dianji(item) {
  110. if (item.rectification_status == 1 && item.status == 3) {
  111. //已整改 逾期
  112. this.$router.push(
  113. `/meihuajing/yinhuanpaicha/yinhuanform_yzg_yq?id=` + item.id
  114. );
  115. } else if (item.rectification_status == 3) {
  116. // 逾期 未验收
  117. this.$router.push(
  118. `/meihuajing/yinhuanpaicha/yinhuanform_wzgyq?id=` + item.id
  119. );
  120. } else if (item.rectification_status == 0 && item.status == 1) {
  121. //未整改 未验收
  122. this.$router.push(
  123. `/meihuajing/yinhuanpaicha/yinhuanform_wzg_wys?id=` + item.id
  124. );
  125. } else if (item.rectification_status == 2 && item.status == 1) {
  126. //申请延期 未验收
  127. this.$router.push(
  128. `/meihuajing/yinhuanpaicha/yinhuanform_sqyq_wys?id=` + item.id
  129. );
  130. } else if (item.rectification_status == 1 && item.status == 1) {
  131. //已整改 未验收
  132. this.$router.push(
  133. `/meihuajing/yinhuanpaicha/yinhuanform_yzg_wys?id=` + item.id
  134. );
  135. } else if (item.status == 4) {
  136. // 未通过
  137. this.$router.push(
  138. `/meihuajing/yinhuanpaicha/yinhuanform_yzg_wtg?id=` + item.id
  139. );
  140. } else if (item.status == 2) {
  141. // 已验收
  142. this.$router.push(
  143. `/meihuajing/yinhuanpaicha/yinhuanform_my_yys?id=` + item.id
  144. );
  145. }
  146. },
  147. },
  148. mounted() {
  149. document.body.style.backgroundColor = "#f0f0f0"; //背景色
  150. },
  151. };
  152. </script>
  153. <style scoped>
  154. >>> .van-nav-bar {
  155. background: #39f;
  156. }
  157. >>> .van-nav-bar__title {
  158. color: #fff;
  159. }
  160. >>> .van-nav-bar .van-icon {
  161. color: #fff;
  162. }
  163. >>> .van-nav-bar__text {
  164. color: #fff;
  165. }
  166. [class*="van-hairline"]:after {
  167. border: none;
  168. }
  169. .footed {
  170. width: 100%;
  171. background: #fff;
  172. }
  173. .footed_box {
  174. width: 90%;
  175. margin: 5px auto;
  176. display: flex;
  177. border-bottom: 1px solid #f0f0f0;
  178. }
  179. .footed_box_one {
  180. width: 30%;
  181. text-align: center;
  182. }
  183. .footed_box_two {
  184. width: 56%;
  185. }
  186. .footed_box_three {
  187. width: 10%;
  188. text-align: center;
  189. }
  190. .footed_box_three > img {
  191. margin-top: 34px;
  192. width: 34px;
  193. }
  194. .footed_box_two_div {
  195. display: flex;
  196. margin-top: 10px;
  197. margin-bottom: 10px;
  198. }
  199. .footed_box_span1 {
  200. width: 77px;
  201. color: #9b9b9b;
  202. }
  203. .footed_box_one_p1 {
  204. margin-top: 10px;
  205. font-size: 20px;
  206. }
  207. .footed_box_one_p2 {
  208. font-size: 14px;
  209. color: #9b9b9b;
  210. }
  211. .footed_box_one_p3 {
  212. background: #4dc100;
  213. width: 70px;
  214. height: 25px;
  215. margin: 5px auto;
  216. color: #fff;
  217. border-radius: 20px;
  218. line-height: 25px;
  219. font-size: 15px;
  220. }
  221. .footed_box_one_p4 {
  222. background: #fdaf00;
  223. width: 70px;
  224. height: 25px;
  225. margin: 5px auto;
  226. color: #fff;
  227. border-radius: 20px;
  228. line-height: 25px;
  229. font-size: 15px;
  230. }
  231. .footed_box_one_p5 {
  232. background: #c00201;
  233. width: 70px;
  234. height: 25px;
  235. margin: 5px auto;
  236. color: #fff;
  237. border-radius: 20px;
  238. line-height: 25px;
  239. font-size: 15px;
  240. }
  241. .footed_box_one_p6 {
  242. background: #39f;
  243. width: 70px;
  244. height: 25px;
  245. margin: 5px auto;
  246. color: #fff;
  247. border-radius: 20px;
  248. line-height: 25px;
  249. font-size: 15px;
  250. }
  251. .footed_box_one_p6_2 {
  252. background: #3ba7b5;
  253. width: 70px;
  254. height: 25px;
  255. margin: 5px auto;
  256. color: #fff;
  257. border-radius: 20px;
  258. line-height: 25px;
  259. font-size: 15px;
  260. }
  261. .footed_box_one_p6_3 {
  262. background: #c00201;
  263. width: 70px;
  264. height: 25px;
  265. margin: 5px auto;
  266. color: #fff;
  267. border-radius: 20px;
  268. line-height: 25px;
  269. font-size: 15px;
  270. }
  271. </style>