inspectList.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792
  1. <!-- 检查和自查列表 -->
  2. <template>
  3. <view class="snapshotList">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  5. <view class="title" @click="planClick()">
  6. <view class="title-l" >
  7. <view class="title-l-t">{{newData.data10}}</view>
  8. <view class="title-l-b">
  9. <view v-for="(item,index) in newData.data11" :key="index">{{item}}</view>
  10. </view>
  11. </view>
  12. <img class="title-r" src="@/pages_safetyCheck/images/icon_wd_gd@1x.png">
  13. </view>
  14. <view class="tabTitleTow">
  15. <view :class="tabIndexTow==index?'tab-C':'tab-D'" v-for="(item,index) in tabListTow"
  16. @click="tabClickTow(index)">{{item}}</view>
  17. </view>
  18. <view>
  19. <view class="srearch">
  20. <view class="college">学院
  21. <img src="@/pages_safetyCheck/images/icon_06.png">
  22. </view>
  23. <view class="srearch-n">
  24. <view class="srearch-l" @click="popupClick(1)">
  25. <img src="@/pages_safetyCheck/images/icon_aqjc_ss.png">
  26. </view>
  27. <input class="srearch-c" type="text" v-model="form.searchValue" placeholder="实验室/房间号" />
  28. <view class="srearch-r" @click="saoCode()">
  29. <img src="@/pages_safetyCheck/images/icon_aqjc_sm.png">
  30. </view>
  31. </view>
  32. </view>
  33. <view class="level">
  34. <view class="level-li" :id="levelIndex==index?'levelColor-A':'levelColor-B'"
  35. @click="levelClick(index)" v-for="(item,index) in levelList">{{item}}</view>
  36. </view>
  37. </view>
  38. <view class="hidden">
  39. <view class="hidden-li" @click="listClick(item)" v-for="(item,index) in hiddenList">
  40. <img class="hidden-li-l" src="@/pages_safetyCheck/images/icon_sys_xz@1x.png">
  41. <view class="hidden-li-c">{{item.subName}}</view>
  42. <view class="hidden-li-r">待检查{{item.num}}项
  43. <img src="@/pages_safetyCheck/images/icon_ssp_gd@1x.png">
  44. </view>
  45. </view>
  46. </view>
  47. </scroll-view>
  48. <view class="popup-max-box" v-if="popupType">
  49. <view class="popup-null" @click="popupClick(2)"></view>
  50. <view class="popup-big-box">
  51. <view class="popup-input-box">
  52. <input type="text" maxlength="10" v-model="room" placeholder="请输入关键字">
  53. <view @click="buildBySub">搜索</view>
  54. </view>
  55. <view class="popup-for-max-box">
  56. <view class="popup-for-null" v-if="!roomList[0]">暂无数据</view>
  57. <view class="popup-for-box" v-for="(item,index) in roomList" :key="index">
  58. <view class="name-p">{{item.subName}} ({{item.roomNum?item.roomNum:'-'}})</view>
  59. <view class="button-p" @click="popupClickItem(item)">确定</view>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </template>
  66. <script>
  67. import {
  68. config
  69. } from '@/api/request/config.js'
  70. import {} from '@/pages/api/index.js'
  71. import {
  72. laboratorySubRelInfoGetRelList,
  73. checkOptionListNew,
  74. } from '@/pages_safetyCheck/api/index.js'
  75. export default {
  76. name: "snapshotList",
  77. components: {
  78. },
  79. data() {
  80. return {
  81. baseUrl: config.base_url,
  82. pageType: 0,
  83. userType: 1,
  84. tabListTow: ['自查任务', '复查验证', '隐患整改'],
  85. tabIndexTow: 0,
  86. newData: {
  87. data10: '计划标题计划标题计划标题计划标题计划标题计标题计划标题计划标题',
  88. data11: ['校级检查', '全面检查', '交叉检查'],
  89. },
  90. form: {
  91. rectifyDescribe: '',
  92. imgDtoList: [],
  93. hazardCheckName: '',
  94. },
  95. popupType: false,
  96. roomList: [],
  97. checkOptionList: [],
  98. hiddenList: [{
  99. subName: '实验室名称实验室名称实验室名称实验室名称',
  100. num: 3,
  101. },
  102. {
  103. subName: '实验室名称实验室名称实验室名称实验室名称',
  104. num: 3,
  105. },
  106. {
  107. subName: '实验室名称实验室名称实验室名称实验室名称',
  108. num: 3,
  109. },
  110. ],
  111. levelList: ['一级', '二级', '三级', '四级'],
  112. levelIndex: 0,
  113. }
  114. },
  115. onLoad(option) {
  116. //this.$set(this, 'newData', JSON.parse(decodeURIComponent(option.infoData)));
  117. this.pageType = option.infoData.pageType;
  118. console.log( this.newData)
  119. uni.setNavigationBarTitle({
  120. title: '第1次检查'
  121. })
  122. if (this.pageType == 0) {
  123. //检查
  124. this.tabListTow = ['检查任务', '复查验证', '隐患整改'];
  125. } else if (this.pageType == 1) {
  126. //复查
  127. this.tabListTow = ['自查任务', '复查验证', '隐患整改'];
  128. }
  129. },
  130. onShow() {
  131. },
  132. mounted() {
  133. },
  134. methods: {
  135. //滚动事件
  136. scrollGet() {},
  137. levelClick(index) {
  138. this.levelIndex = index;
  139. },
  140. tabClickTow(index) {
  141. this.tabIndexTow = index;
  142. this.pageType = index;
  143. },
  144. planClick(){
  145. let infoData='';
  146. uni.navigateTo({
  147. url: '/pages_safetyCheck/views/planDetail?infoData=' + encodeURIComponent(JSON.stringify(infoData))
  148. });
  149. },
  150. listClick(row){
  151. let infoData=row;
  152. infoData.pageType=this.tabIndexTow;
  153. uni.navigateTo({
  154. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' + encodeURIComponent(JSON.stringify(infoData))
  155. });
  156. },
  157. /******搜索房间弹层开关******/
  158. popupClick(type) {
  159. if (type == 1) {
  160. this.room = "";
  161. this.roomList = [];
  162. this.popupType = true;
  163. this.buildBySub();
  164. } else if (type == 2) {
  165. this.popupType = false;
  166. }
  167. },
  168. //搜索房间接口
  169. async buildBySub() {
  170. let self = this;
  171. const {
  172. data
  173. } = await laboratorySubRelInfoGetRelList({
  174. 'searchValue': this.form.searchValue,
  175. });
  176. if (data.code == 200) {
  177. if (data.data[0]) {
  178. this.roomList = data.data;
  179. } else {
  180. uni.showToast({
  181. title: '未找到相关实验室',
  182. icon: "none",
  183. mask: true,
  184. duration: 2000
  185. });
  186. }
  187. }
  188. },
  189. //确认搜索房间
  190. popupClickItem(item) {
  191. console.log(item)
  192. this.$set(this.form, "subId", item.subId)
  193. this.$set(this.form, "subName", item.subName)
  194. this.$set(this.form, "deptId", item.deptId)
  195. for (let i = 0; i < this.collegeList.length; i++) {
  196. if (item.deptId == this.collegeList[i].deptId) {
  197. this.$set(this.form, "deptName", this.collegeList[i].deptName)
  198. }
  199. }
  200. this.popupType = false;
  201. },
  202. /******调用摄像头******/
  203. saoCode() {
  204. let self = this;
  205. uni.scanCode({
  206. onlyFromCamera: true,
  207. success: function(res) {
  208. let list = res.result.split("?")[1].split("&");
  209. let codeData = {};
  210. list.forEach((item) => {
  211. codeData[item.split("=")[0]] = item.split("=")[1];
  212. })
  213. console.log('二维码', codeData)
  214. if (codeData.code) {
  215. self.laboratoryAppletGetSubDetailInfo(codeData.code);
  216. } else {
  217. uni.showToast({
  218. title: '请扫描正确的二维码',
  219. icon: "none",
  220. mask: true,
  221. duration: 2000
  222. });
  223. }
  224. }
  225. });
  226. },
  227. }
  228. }
  229. </script>
  230. <style lang="stylus" scoped>
  231. .snapshotList {
  232. height: 100%;
  233. display flex;
  234. .title {
  235. width: 750rpx;
  236. height: 150rpx;
  237. background: #FFFFFF;
  238. border-radius: 20rpx 20rpx 20rpx 20rpx;
  239. display: flex;
  240. justify-content: space-between;
  241. align-items: center;
  242. padding: 0 30rpx;
  243. box-sizing: border-box;
  244. .title-l {
  245. width: 594rpx;
  246. .title-l-t {
  247. font-size: 30rpx;
  248. color: #333333;
  249. line-height: 42rpx;
  250. text-align: left;
  251. overflow: hidden;
  252. text-overflow: ellipsis;
  253. white-space: nowrap;
  254. }
  255. .title-l-b {
  256. display: flex;
  257. justify-content: flex-start;
  258. margin-top: 16rpx;
  259. >view {
  260. width: 130rpx;
  261. height: 50rpx;
  262. background: rgba(1, 131, 250, 0.2);
  263. border-radius: 6rpx 6rpx 6rpx 6rpx;
  264. font-size: 24rpx;
  265. color: #0183FA;
  266. line-height: 50rpx;
  267. text-align: center;
  268. margin-right: 14rpx;
  269. }
  270. }
  271. }
  272. .title-r {
  273. width: 24rpx;
  274. height: 24rpx;
  275. }
  276. }
  277. .tabTitleTow {
  278. width: 690rpx;
  279. height: 80rpx;
  280. display: flex;
  281. justify-content: center;
  282. margin: 20rpx 0 0 30rpx;
  283. >view:nth-of-type(1) {
  284. width: 230rpx;
  285. height: 80rpx;
  286. border-radius: 50rpx 0rpx 0rpx 50rpx;
  287. }
  288. >view:nth-of-type(2) {
  289. width: 230rpx;
  290. height: 80rpx;
  291. border-radius: 0rpx 0rpx 0rpx 0rpx;
  292. }
  293. >view:nth-of-type(3) {
  294. width: 230rpx;
  295. height: 80rpx;
  296. border-radius: 0rpx 50rpx 50rpx 0rpx;
  297. }
  298. .tab-C {
  299. font-size: 30rpx;
  300. color: #FFFFFF;
  301. line-height: 80rpx;
  302. text-align: center;
  303. background: #0183FA;
  304. }
  305. .tab-D {
  306. font-size: 30rpx;
  307. color: #333333;
  308. line-height: 80rpx;
  309. text-align: center;
  310. background: #FFFFFF;
  311. }
  312. }
  313. .srearch {
  314. width: 750rpx;
  315. height: 100rpx;
  316. background: #FFFFFF;
  317. border-radius: 0rpx 0rpx 0rpx 0rpx;
  318. overflow: hidden;
  319. margin-top: 20rpx;
  320. display: flex;
  321. display: flex;
  322. justify-content: space-between;
  323. align-items: center;
  324. padding: 0 30rpx;
  325. box-sizing: border-box;
  326. .college {
  327. width: 200rpx;
  328. height: 60rpx;
  329. border-radius: 50rpx 50rpx 50rpx 50rpx;
  330. border: 1rpx solid #E0E0E0;
  331. font-size: 24rpx;
  332. color: #333333;
  333. line-height: 60rpx;
  334. text-align: left;
  335. display: flex;
  336. justify-content: space-between;
  337. align-items: center;
  338. padding: 0 26rpx;
  339. box-sizing: border-box;
  340. >img {
  341. width: 24rpx;
  342. height: 12rpx;
  343. }
  344. }
  345. .srearch-n {
  346. width: 480rpx;
  347. height: 60rpx;
  348. border-radius: 50rpx 50rpx 50rpx 50rpx;
  349. border: 1rpx solid #E0E0E0;
  350. display: flex;
  351. justify-content: flex-start;
  352. align-items: center;
  353. .srearch-l {
  354. width: 60rpx;
  355. height: 60rpx;
  356. >img {
  357. width: 20rpx;
  358. height: 20rpx;
  359. margin: 20rpx 0 0 26rpx;
  360. }
  361. }
  362. .srearch-c {
  363. flex: 1;
  364. height: 58rpx;
  365. font-size: 24rpx;
  366. color: #999999;
  367. line-height: 30rpx;
  368. text-align: left;
  369. }
  370. .srearch-r {
  371. width: 60rpx;
  372. height: 60rpx;
  373. >img {
  374. width: 30rpx;
  375. height: 30rpx;
  376. margin: 14rpx 22rpx 0 0;
  377. }
  378. }
  379. }
  380. }
  381. .level {
  382. width: 750rpx;
  383. height: 80rpx;
  384. background: #FFFFFF;
  385. display: flex;
  386. justify-content: flex-start;
  387. padding: 0 30rpx;
  388. box-sizing: border-box;
  389. .level-li {
  390. width: 100rpx;
  391. height: 50rpx;
  392. background: #F5F5F5;
  393. border-radius: 50rpx 50rpx 50rpx 50rpx;
  394. border: 1rpx solid #E0E0E0;
  395. margin-right: 10rpx;
  396. font-size: 24rpx;
  397. color: #333333;
  398. line-height: 50rpx;
  399. text-align: center;
  400. }
  401. #levelColor-A {
  402. background: rgba(255, 0, 0, 0.2);
  403. color: #FF0000;
  404. border: 1rpx solid #FF0000;
  405. }
  406. #levelColor-B {
  407. background: #F5F5F5;
  408. color: #333333;
  409. border: 1rpx solid #E0E0E0;
  410. }
  411. }
  412. .list {
  413. width: 690rpx;
  414. min-height: 765rpx;
  415. background: #FFFFFF;
  416. border-radius: 20rpx 20rpx 20rpx 20rpx;
  417. margin: 20rpx 0 0 30rpx;
  418. .list-li {
  419. display: flex;
  420. justify-content: space-between;
  421. border-bottom: 1rpx solid #E0E0E0;
  422. padding: 0 22rpx 0 28rpx;
  423. box-sizing: border-box;
  424. >view:nth-of-type(1) {
  425. font-size: 30rpx;
  426. color: #333333;
  427. line-height: 80rpx;
  428. text-align: left;
  429. }
  430. >view:nth-of-type(2) {
  431. font-size: 28rpx;
  432. color: #666666;
  433. line-height: 80rpx;
  434. text-align: left;
  435. display: flex;
  436. justify-content: flex-start;
  437. align-items: center;
  438. >img {
  439. width: 24rpx;
  440. height: 24rpx;
  441. margin-left: 8rpx;
  442. }
  443. }
  444. .project_r {
  445. width: 510rpx;
  446. min-height: 80rpx;
  447. display: flex;
  448. justify-content: flex-end;
  449. align-items: center;
  450. padding-left: 20rpx;
  451. box-sizing: border-box;
  452. color: #666;
  453. }
  454. }
  455. .describe {
  456. width: 636rpx;
  457. height: 120rpx;
  458. border-radius: 10rpx 10rpx 10rpx 10rpx;
  459. border: 1rpx solid #E0E0E0;
  460. margin: 20rpx 0 0 28rpx;
  461. padding: 12rpx 16rpx;
  462. box-sizing: border-box;
  463. }
  464. .check-for-img-max-box {
  465. margin: 20px 28rpx;
  466. .left-title-p {
  467. width: 100%;
  468. text-align: left;
  469. font-size: 30rpx;
  470. font-family: PingFang SC-Medium, PingFang SC;
  471. font-weight: 400;
  472. color: #333333;
  473. line-height: 80rpx;
  474. }
  475. .right-img-box {
  476. .img-box {
  477. display inline-block;
  478. height: 150rpx;
  479. width: 150rpx;
  480. position relative;
  481. margin: 0 14rpx 20rpx 0;
  482. border-radius 10rpx;
  483. overflow hidden;
  484. .img-data {
  485. height: 150rpx;
  486. width: 150rpx;
  487. }
  488. .position-img {
  489. position absolute;
  490. right: 0;
  491. top: 0;
  492. width: 36rpx;
  493. height: 36rpx;
  494. }
  495. }
  496. .img-box:nth-of-type(3n+3) {
  497. margin-right: 0rpx;
  498. }
  499. .add-button {
  500. margin: 0 0rpx 20rpx 0;
  501. border-radius 10rpx;
  502. overflow hidden;
  503. display inline-block;
  504. height: 150rpx;
  505. width: 150rpx;
  506. }
  507. }
  508. }
  509. }
  510. /* 实验室弹框 */
  511. .popup-max-box {
  512. z-index: 10;
  513. height: 100%;
  514. width: 100%;
  515. position fixed;
  516. background rgba(0, 0, 0, 0.2);
  517. display flex;
  518. flex-direction column;
  519. .popup-null {
  520. flex: 1;
  521. }
  522. .popup-big-box {
  523. border-top-left-radius: 20rpx;
  524. border-top-right-radius: 20rpx;
  525. background #fff;
  526. .popup-input-box {
  527. padding: 30rpx 20rpx;
  528. display: flex;
  529. input {
  530. flex: 1;
  531. height: 70rpx;
  532. border: 1rpx solid #e0e0e0;
  533. border-radius: 10rpx;
  534. margin-right: 20rpx;
  535. padding: 0 20rpx;
  536. }
  537. view {
  538. background #0183FA;
  539. color: #fff;
  540. border-radius: 10rpx;
  541. width: 140rpx;
  542. line-height: 70rpx;
  543. text-align center;
  544. font-size: 28rpx;
  545. }
  546. }
  547. .popup-for-max-box {
  548. margin: 0 20rpx 30rpx;
  549. height: 600rpx;
  550. overflow-y scroll;
  551. .popup-for-null {
  552. line-height: 100rpx;
  553. text-align center;
  554. color: #999;
  555. }
  556. .popup-for-box {
  557. display: flex;
  558. padding: 10px 0;
  559. .name-p {
  560. flex: 1;
  561. line-height: 60rpx;
  562. }
  563. .button-p {
  564. background #0183FA;
  565. color: #fff;
  566. text-align center;
  567. width: 100rpx;
  568. line-height: 60rpx;
  569. height: 60rpx;
  570. border-radius: 10rpx;
  571. }
  572. }
  573. }
  574. }
  575. }
  576. .subBtn {
  577. width: 690rpx;
  578. height: 100rpx;
  579. background: #0183FA;
  580. border-radius: 50rpx 50rpx 50rpx 50rpx;
  581. font-weight: 400;
  582. font-size: 30rpx;
  583. color: #FFFFFF;
  584. line-height: 100rpx;
  585. text-align: center;
  586. position: fixed;
  587. left: 30rpx;
  588. bottom: 10rpx;
  589. }
  590. /* 上报记录 */
  591. .escalation {
  592. .escalation-li {
  593. width: 690rpx;
  594. height: 162rpx;
  595. background: #FFFFFF;
  596. border-radius: 20rpx 20rpx 20rpx 20rpx;
  597. margin: 20rpx 30rpx;
  598. padding: 0 30rpx;
  599. box-sizing: border-box;
  600. .escalation-li-t {
  601. display: flex;
  602. justify-content: space-between;
  603. align-items: center;
  604. border-bottom: 1rpx solid #E0E0E0;
  605. >view:nth-of-type(1) {
  606. font-weight: 400;
  607. font-size: 30rpx;
  608. color: #333333;
  609. line-height: 80rpx;
  610. text-align: left;
  611. }
  612. >view:nth-of-type(2) {
  613. font-weight: 400;
  614. font-size: 28rpx;
  615. color: #0183FA;
  616. line-height: 80rpx;
  617. text-align: left;
  618. display: flex;
  619. justify-content: flex-start;
  620. align-items: center;
  621. >img {
  622. width: 24rpx;
  623. height: 24rpx;
  624. }
  625. }
  626. }
  627. .escalation-li-b {
  628. display: flex;
  629. justify-content: space-between;
  630. align-items: center;
  631. >view:nth-of-type(1) {
  632. font-weight: 400;
  633. font-size: 30rpx;
  634. color: #333333;
  635. line-height: 80rpx;
  636. text-align: left;
  637. }
  638. >view:nth-of-type(2) {
  639. font-weight: 400;
  640. font-size: 30rpx;
  641. color: #666666;
  642. line-height: 80rpx;
  643. text-align: left;
  644. }
  645. }
  646. }
  647. }
  648. /* 隐患整改 */
  649. .hidden {
  650. width: 690rpx;
  651. border-radius: 20rpx 20rpx 20rpx 20rpx;
  652. background: #FFFFFF;
  653. padding: 0 30rpx;
  654. box-sizing: border-box;
  655. margin: 20rpx 30rpx;
  656. .hidden-li {
  657. height: 80rpx;
  658. border-bottom: 1rpx solid #E0E0E0;
  659. display: flex;
  660. justify-content: flex-start;
  661. align-items: center;
  662. .hidden-li-l {
  663. width: 34rpx;
  664. height: 34rpx;
  665. }
  666. .hidden-li-c {
  667. font-size: 28rpx;
  668. color: #333333;
  669. line-height: 30rpx;
  670. text-align: left;
  671. flex: 1;
  672. overflow: hidden;
  673. text-overflow: ellipsis;
  674. white-space: nowrap;
  675. margin: 0 84rpx 0 12rpx;
  676. }
  677. .hidden-li-r {
  678. font-size: 28rpx;
  679. color: #0183FA;
  680. line-height: 80rpx;
  681. text-align: left;
  682. display: flex;
  683. justify-content: flex-start;
  684. align-items: center;
  685. >img {
  686. width: 24rpx;
  687. height: 24rpx;
  688. }
  689. }
  690. }
  691. .hidden-li:last-of-type {
  692. border: none;
  693. }
  694. }
  695. #color-A {
  696. color: #0183FA;
  697. }
  698. #color-B {
  699. color: #FF8C00;
  700. }
  701. #color-C {
  702. color: #16B531;
  703. }
  704. }
  705. </style>