inspectList.vue 17 KB

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