dangerManage.vue 16 KB

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