dangerList.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. <!-- 安全检查-安全隐患 -->
  2. <template>
  3. <view class="examine">
  4. <view class="header">
  5. <view class="tabTitle_tow">
  6. <view class="tabTitle_tow_li" @tap="tabClickTow(index)" :key="index" v-for="(item,index) in tabTextTow">
  7. <view :class="{on:curTabTow==index}" class="tabTitle_tow_text">{{item}}</view>
  8. <view :class="{on:curTabTow==index}" class="tabTitle_tow_across"></view>
  9. </view>
  10. </view>
  11. <view class="lab_title">
  12. <picker @change="collegeChange" :value="collegeIndex" :range="collegeArray" class="lab_title_l">
  13. <view class="lab_title_l_n">
  14. <view>{{getData.deptName?getData.deptName:'选择学院'}}</view>
  15. <img src="@/pages_safetyExamine/images/icon_06.png">
  16. </view>
  17. </picker>
  18. <view class="lab_title_r">
  19. <input type="text" v-model="getData.searchValue" placeholder="请输入实验室名称" name="search"
  20. @confirm='searchBtn' confirm-type='search' maxlength="50"
  21. placeholder-style="color: #CCCCCC;font-size:26rpx;">
  22. <view v-if="getData.searchValue>0" class="lab_title_r_btn" @click="clearBtn">
  23. <img src="@/pages_safetyExamine/images/clear.png" />
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  29. <view class="list_three">
  30. <view class="list_three_li" v-for="(item,index) in dataList" :key="index"
  31. @click="handleClick(item,'detail')">
  32. <view class="list_three_li_t">
  33. <view class="list_three_li_t_l">
  34. <img v-if="item.checkRange==1" src="@/pages_safetyExamine/images/icon_xyxc_qx.png" />
  35. <img v-if="item.checkRange==2" src="@/pages_safetyExamine/images/icon_xyxc_xy.png" />
  36. <img v-if="item.checkRange==3" src="@/pages_safetyExamine/images/icon_xyxc_sys.png" />
  37. <text></text>
  38. </view>
  39. <view class="list_three_li_t_c" v-if="item.checkCategory==1">{{item.subRoom}}</view>
  40. <view class="list_three_li_t_c" v-if="item.checkCategory==2">
  41. {{item.subRoom}}-{{item.hazardName}}{{item.code}}
  42. </view>
  43. <view class="list_three_li_t_c2" v-if="item.overdueStatus==1">已逾期</view>
  44. <view class="list_three_li_t_r"></view>
  45. </view>
  46. <view class="list_three_li_m">
  47. <view class="list_three_li_m_t">{{item.title}}</view>
  48. <view class="list_three_li_m_b">
  49. <text class="green_color" v-if="item.rectifyStatus==1">已完成</text>
  50. <text class="blue_color" v-if="item.rectifyStatus==2">待整改</text>
  51. <text class="orange_color" v-if="item.rectifyStatus==3">待复核</text>
  52. <text class="gray_color" v-if="item.rectifyStatus==4">暂无法整改</text>
  53. <text>{{item.hazardType==1?'校院巡查':'实验室自查'}}-{{item.checkCategory==1?'综合检查':'专项检查'}}</text>
  54. <text>{{item.collegeName}}</text>
  55. </view>
  56. </view>
  57. <view class="list_three_li_b">整改期限:{{item.rectifyDeadline}}</view>
  58. </view>
  59. </view>
  60. <img class="null-img" v-if="!dataList[0]" src="@/pages_safetyExamine/images/null-data-1.png">
  61. </scroll-view>
  62. </view>
  63. </template>
  64. <script>
  65. import {
  66. config
  67. } from '@/api/request/config.js'
  68. import {
  69. checkHazardAppList,
  70. systemDeptDropList
  71. } from '@/pages_safetyExamine/api/index.js'
  72. export default {
  73. name: "rectifyList",
  74. components: {
  75. },
  76. data() {
  77. return {
  78. pageType: 0,
  79. //列表请求参数
  80. getData: {
  81. page: 1,
  82. pageSize: 20,
  83. hazardType: '1', //1是院校巡查,2是实验室自查
  84. rectifyStatus: '', //1已完成 2待整改 3待复核 4 暂无法整改
  85. searchValue: '',
  86. },
  87. tabTextTow: ['全部', '待整改', '待复核', '已完成', '暂无法整改'],
  88. curTabTow: 0,
  89. form: {
  90. name: '',
  91. type: '校院巡查',
  92. startTime: '',
  93. endTime: '',
  94. inspectScope: [],
  95. tiemQuickList: [],
  96. scopeIndex: '',
  97. seleteListLab: [],
  98. patrolIndex: '',
  99. seleteListMember: [],
  100. },
  101. collegeList: [{
  102. name: '学院名称',
  103. type: false
  104. }, {
  105. name: '学院名称',
  106. type: false
  107. }, {
  108. name: '学院名称',
  109. type: false
  110. }, {
  111. name: '学院名称',
  112. type: false
  113. }, {
  114. name: '学院名称',
  115. type: false
  116. }, {
  117. name: '学院名称',
  118. type: false
  119. }, ],
  120. collegeIndex: 0,
  121. collegeArray: [],
  122. dataList: [],
  123. }
  124. },
  125. onLoad(option) {
  126. if (option.form) {
  127. this.form = JSON.parse(decodeURIComponent(option.form));
  128. }
  129. if (option.pageType == 1) {
  130. uni.setNavigationBarTitle({
  131. title: '校院巡查隐患'
  132. })
  133. this.getData.hazardType = option.pageType;
  134. } else if (option.pageType == 2) {
  135. uni.setNavigationBarTitle({
  136. title: '实验室自查隐患'
  137. })
  138. this.getData.hazardType = option.pageType;
  139. }
  140. },
  141. onShow() {
  142. },
  143. mounted() {
  144. this.dataList = [];
  145. this.getList();
  146. this.conditionCollegeInfo();
  147. },
  148. methods: {
  149. //顶部tab点击
  150. tabClickTow(index) {
  151. this.curTabTow = index;
  152. this.getData.page = 1;
  153. this.getData.searchValue = '';
  154. this.getData.deptId = '';
  155. this.getData.deptName = '';
  156. this.dataList = [];
  157. if (index == 0) {
  158. this.getData.rectifyStatus = '';
  159. } else if (index == 1) { //待整改
  160. this.getData.rectifyStatus = 2;
  161. } else if (index == 2) { //待复核
  162. this.getData.rectifyStatus = 3;
  163. } else if (index == 3) { //已完成
  164. this.getData.rectifyStatus = 1;
  165. } else if (index == 4) { //暂无法整改
  166. this.getData.rectifyStatus = 4;
  167. }
  168. this.getList()
  169. },
  170. //选择学院
  171. collegeChange(e) {
  172. this.collegeIndex = e.target.value;
  173. this.getData.deptId = this.collegeList[e.target.value].deptId
  174. this.getData.deptName = this.collegeList[e.target.value].deptName
  175. this.dataList = [];
  176. this.getList();
  177. },
  178. //实验室搜索
  179. searchBtn() {
  180. this.dataList = [];
  181. this.getList();
  182. },
  183. //清除
  184. clearBtn() {
  185. this.getData.page = 1;
  186. this.collegeIndex = 0;
  187. this.getData.deptId = '';
  188. this.getData.deptName = '';
  189. this.getData.searchValue = '';
  190. this.dataList = [];
  191. this.getList();
  192. },
  193. //滚动事件
  194. scrollGet() {
  195. let self = this;
  196. if (self.total / self.getData.pageSize <= self.getData.page) {
  197. console.log('没有更多数据!')
  198. } else {
  199. setTimeout(function() {
  200. self.getData.page += 1;
  201. self.getList();
  202. }, 1000)
  203. }
  204. },
  205. //查询学院列表
  206. async conditionCollegeInfo() {
  207. let self = this;
  208. const {
  209. data
  210. } = await systemDeptDropList({
  211. deptName: '',
  212. level: 2,
  213. deptType: 1
  214. });
  215. if (data.code == 200) {
  216. data.data.forEach(function(item) {
  217. item.type = false;
  218. })
  219. self.collegeList = data.data;
  220. //检查管理
  221. for (let i = 0; i < data.data.length; i++) {
  222. self.collegeArray.push(data.data[i].deptName)
  223. }
  224. }
  225. },
  226. handleClick(row, doType) {
  227. let self = this;
  228. if (doType == 'subBtn') { //
  229. } else if (doType == 'detail') { //详情
  230. uni.redirectTo({
  231. url: '/pages_safetyExamine/views/dangerManage/dangerDetail?item=' + encodeURIComponent(JSON
  232. .stringify(row))
  233. })
  234. }
  235. },
  236. async getList() {
  237. let self = this;
  238. const {
  239. data
  240. } = await checkHazardAppList(this.getData);
  241. if (data.code == 200) {
  242. this.dataList = [...this.dataList, ...data.data.records]
  243. this.total = data.data.total;
  244. }
  245. },
  246. }
  247. }
  248. </script>
  249. <style lang="stylus" scoped>
  250. .examine {
  251. height: 100%;
  252. display flex;
  253. // padding: 0 30rpx;
  254. // box-sizing: border-box;
  255. padding-bottom: 20rpx;
  256. box-sizing: border-box;
  257. .blue_color {
  258. color: #0183FA;
  259. border: 1rpx solid #0183FA;
  260. }
  261. .red_color {
  262. color: #FF4545;
  263. border: 1rpx solid #FF4545;
  264. }
  265. .green_color {
  266. color: #1FA50D;
  267. border: 1rpx solid #1FA50D;
  268. }
  269. .orange_color {
  270. color: #FA8E1B;
  271. border: 1rpx solid #FA8E1B;
  272. }
  273. .gray_color {
  274. color: #A2A2A2;
  275. border: 1rpx solid #A2A2A2;
  276. }
  277. .null-img {
  278. display block;
  279. width: 276rpx;
  280. height: 321rpx;
  281. margin: 100rpx 0 0 274rpx;
  282. }
  283. .info-max-box {
  284. flex: 1;
  285. overflow: scroll;
  286. padding: 220rpx 0rpx 0;
  287. box-sizing: border-box;
  288. }
  289. /* 切换按钮 */
  290. .header {
  291. width: 100%;
  292. position: fixed;
  293. top: 0rpx;
  294. z-index: 100;
  295. .tabTitle_tow {
  296. width: 100%;
  297. height: 100rpx;
  298. background: #fff;
  299. display flex;
  300. justify-content: flex-start;
  301. align-items: center;
  302. border-bottom: 1rpx solid #E0E0E0;
  303. .tabTitle_tow_li {
  304. position: relative;
  305. width: 152rpx;
  306. text-align center;
  307. .tabTitle_tow_text {
  308. display: inline-block;
  309. font-size: 30rpx;
  310. font-family: PingFang SC;
  311. font-weight: 500;
  312. color: #333333;
  313. line-height: 46rpx;
  314. position: relative;
  315. &.on {
  316. color: #0183FA;
  317. }
  318. }
  319. .tabTitle_tow_across {
  320. width: 50rpx;
  321. height: 4rpx;
  322. background: #0183FA;
  323. border-radius: 2rpx;
  324. margin-left: 50rpx;
  325. display none;
  326. &.on {
  327. display block;
  328. }
  329. }
  330. }
  331. }
  332. .lab_title {
  333. width: 750rpx;
  334. height: 100rpx;
  335. background: #FFFFFF;
  336. padding: 20rpx 30rpx;
  337. box-sizing: border-box;
  338. display: flex;
  339. justify-content: flex-start;
  340. .lab_title_l {
  341. width: 250rpx;
  342. height: 60rpx;
  343. margin-right: 20rpx;
  344. .lab_title_l_n {
  345. width: 250rpx;
  346. height: 60rpx;
  347. border-radius: 10rpx;
  348. border: 1rpx solid #E0E0E0;
  349. display: flex;
  350. justify-content: flex-start;
  351. align-items: center;
  352. >view {
  353. flex: 1;
  354. line-height: 60rpx;
  355. margin-left: 20rpx;
  356. color: #999999;
  357. font-size: 28rpx;
  358. white-space: nowrap;
  359. overflow: hidden;
  360. text-overflow: ellipsis;
  361. }
  362. >img {
  363. width: 14rpx;
  364. height: 8rpx;
  365. margin-right: 30rpx;
  366. }
  367. }
  368. }
  369. .lab_title_r {
  370. width: 420rpx;
  371. height: 60rpx;
  372. position: relative;
  373. border-radius: 10rpx;
  374. border: 1rpx solid #E0E0E0;
  375. .lab_title_r_btn {
  376. width: 60rpx;
  377. height: 60rpx;
  378. position: absolute;
  379. top: 0rpx;
  380. right: 0rpx;
  381. z-index: 100;
  382. >img {
  383. width: 20rpx;
  384. height: 20rpx;
  385. position: absolute;
  386. top: 20rpx;
  387. left: 24rpx;
  388. }
  389. }
  390. >input {
  391. width: 274rpx;
  392. height: 60rpx;
  393. position: absolute;
  394. top: 0rpx;
  395. left: 60rpx;
  396. }
  397. .clear {
  398. width: 60rpx;
  399. height: 60rpx;
  400. position: absolute;
  401. top: 0rpx;
  402. right: 20rpx;
  403. font-size: 30rpx;
  404. font-family: PingFang SC-Medium, PingFang SC;
  405. font-weight: 400;
  406. color: #0183FA;
  407. line-height: 60rpx;
  408. }
  409. }
  410. }
  411. }
  412. .list_three {
  413. padding: 0 30rpx;
  414. box-sizing: border-box;
  415. .list_three_li {
  416. position: relative;
  417. width: 690rpx;
  418. height: 320rpx;
  419. background: #fff;
  420. border-radius: 10rpx;
  421. overflow: hidden;
  422. margin-bottom: 20rpx;
  423. .list_three_li_t {
  424. width: 100%;
  425. position: absolute;
  426. left: 0;
  427. top: 0;
  428. .list_three_li_t_l {
  429. >img {
  430. width: 70rpx;
  431. height: 70rpx;
  432. }
  433. >text {
  434. position: absolute;
  435. left: -15rpx;
  436. top: 76rpx;
  437. display: inline-block;
  438. width: 30rpx;
  439. height: 30rpx;
  440. background: #F5F5F5;
  441. border-radius: 15rpx;
  442. }
  443. }
  444. .list_three_li_t_c {
  445. width: 580rpx;
  446. height: 110rpx;
  447. position: absolute;
  448. left: 30rpx;
  449. top: 0;
  450. font-size: 30rpx;
  451. font-family: PingFang SC-Medium, PingFang SC;
  452. font-weight: 400;
  453. color: #333333;
  454. line-height: 110rpx;
  455. border-bottom: 1rpx dashed #D8D8D8;
  456. overflow: hidden;
  457. text-overflow: ellipsis;
  458. white-space: nowrap;
  459. padding-right: 60rpx;
  460. box-sizing: border-box;
  461. }
  462. .list_three_li_t_c2 {
  463. position: absolute;
  464. right: 20rpx;
  465. top: 38rpx;
  466. width: 120rpx;
  467. height: 40rpx;
  468. font-size: 28rpx;
  469. font-family: PingFang SC-Medium, PingFang SC;
  470. font-weight: 400;
  471. color: #FF5757;
  472. line-height: 40rpx;
  473. border: 1rpx solid #FF5757;
  474. border-radius: 6rpx;
  475. text-align: center;
  476. }
  477. .list_three_li_t_r {
  478. position: absolute;
  479. right: -15rpx;
  480. top: 76rpx;
  481. width: 30rpx;
  482. height: 30rpx;
  483. background: #F5F5F5;
  484. border-radius: 15rpx;
  485. }
  486. }
  487. .list_three_li_m {
  488. position: absolute;
  489. top: 110rpx;
  490. left: 0;
  491. width: 690rpx;
  492. height: 158rpx;
  493. padding-left: 30rpx;
  494. box-sizing: border-box;
  495. .list_three_li_m_t {
  496. font-size: 28rpx;
  497. font-family: PingFang SC-Medium, PingFang SC;
  498. font-weight: 400;
  499. color: #666666;
  500. line-height: 40rpx;
  501. margin-top: 22rpx;
  502. overflow: hidden;
  503. text-overflow: ellipsis;
  504. white-space: nowrap;
  505. }
  506. .list_three_li_m_b {
  507. margin-top: 26rpx;
  508. >text:nth-of-type(1) {
  509. font-size: 26rpx;
  510. font-family: PingFang SC-Medium, PingFang SC;
  511. font-weight: 400;
  512. line-height: 40rpx;
  513. border-radius: 6rpx;
  514. padding: 0 20rpx;
  515. margin-right: 14rpx;
  516. }
  517. >text:nth-of-type(2) {
  518. font-size: 26rpx;
  519. font-family: PingFang SC-Medium, PingFang SC;
  520. font-weight: 400;
  521. color: #0183FA;
  522. line-height: 40rpx;
  523. padding: 0 8rpx;
  524. border-radius: 6rpx;
  525. background: rgba(1, 131, 250, 0.1);
  526. margin-right: 24rpx;
  527. }
  528. >text:nth-of-type(3) {
  529. display: inline-block;
  530. width: 180rpx;
  531. font-size: 26rpx;
  532. font-family: PingFang SC-Medium, PingFang SC;
  533. font-weight: 400;
  534. color: #333333;
  535. line-height: 26rpx;
  536. overflow: hidden;
  537. text-overflow: ellipsis;
  538. white-space: nowrap;
  539. }
  540. }
  541. }
  542. .list_three_li_b {
  543. height: 60rpx;
  544. width: 100%;
  545. position: absolute;
  546. top: 258rpx;
  547. left: 0;
  548. font-size: 28rpx;
  549. font-family: PingFang SC-Medium, PingFang SC;
  550. font-weight: 400;
  551. color: #666666;
  552. line-height: 60rpx;
  553. padding-left: 28rpx;
  554. box-sizing: border-box;
  555. }
  556. }
  557. }
  558. }
  559. </style>