examineAdd.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647
  1. <!-- 安全检查-开展检查 -->
  2. <template>
  3. <view class="examine">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  5. <view class="basics">
  6. <view class="basics_li">
  7. <view class="basics_li_l">学院</view>
  8. <picker @change="collegeChange" :value="collegeIndex" :range="collegeArray" class="scope_r">
  9. <view class="basics_li_r college_r">
  10. <view>{{collegeArray[collegeIndex]}}</view>
  11. <img src="@/images/Version3.3.3/icon_06.png">
  12. </view>
  13. </picker>
  14. </view>
  15. <view class="basics_li">
  16. <view class="basics_li_l">实验室</view>
  17. <view class="basics_li_r lab_r">
  18. <input class="picker-text" @click="popupClick(1)" type="text" disabled v-model="form.fjNumber" placeholder="请选择房间" placeholder-style="font-size: 30rpx;color:#333;">
  19. <view class="img-box" @click.stop="saoCode">
  20. <img src="@/images/Version3.3.3/icon_aqjc_sm.png">
  21. </view>
  22. </view>
  23. </view>
  24. <view class="basics_li">
  25. <view class="basics_li_l">楼栋</view>
  26. <view class="basics_li_r building_r">
  27. <input class="picker-text" type="text" disabled v-model="form.fjNumber" placeholder="选择实验室后自动匹配" placeholder-style="font-size: 30rpx;color:#333;">
  28. </view>
  29. </view>
  30. <view class="basics_li">
  31. <view class="basics_li_l">检查类型</view>
  32. <picker @change="categoryChange" :value="categoryIndex" :range="categoryArray" class="scope_r">
  33. <view class="basics_li_r college_r">
  34. <view>{{categoryArray[categoryIndex]}}</view>
  35. <img src="@/images/Version3.3.3/icon_06.png">
  36. </view>
  37. </picker>
  38. </view>
  39. <view class="basics_li">
  40. <view class="basics_li_l">计划标题</view>
  41. <picker @change="planChange" :value="planIndex" :range="planArray" class="scope_r">
  42. <view class="basics_li_r college_r">
  43. <view>{{planArray[planIndex]}}</view>
  44. <img src="@/images/Version3.3.3/icon_06.png">
  45. </view>
  46. </picker>
  47. </view>
  48. </view>
  49. <view class="attachment">
  50. <view class="attachment_t">
  51. <text>材料附件</text>
  52. <text>点击文件标题查看</text>
  53. </view>
  54. <view class="attachment_li">
  55. <img src="@/images/Version3.3.3/icon_djc_wj.png"/>
  56. <text>文件标题文件标题</text>
  57. <img class="attachment_li_del" src="@/images/Version3.3.3/icon_fjgk_sc.png"/>
  58. </view>
  59. </view>
  60. <view class="inspect">
  61. <view class="inspect_li">
  62. <view class="inspect_li_l">检查结果</view>
  63. <picker @change="resultChange" :value="resultIndex" :range="resultArray" class="scope_r">
  64. <view class="inspect_li_r college_r">
  65. <view>{{resultArray[resultIndex]}}</view>
  66. <img src="@/images/Version3.3.3/icon_06.png">
  67. </view>
  68. </picker>
  69. </view>
  70. <view class="inspect_li" v-if="form.inspectResult==0">
  71. <view class="inspect_li_l">整改日期</view>
  72. <picker mode="date" @change="startChange(form,$event)">
  73. <view class="inspect_li_r date_r">
  74. <input disabled class="picker-text" type="text" v-model="form.startTime" placeholder="请选择日期" placeholder-style="font-size: 30rpx;color:#333;">
  75. <img src="@/images/Version3.3.3/icon_rl.png">
  76. </view>
  77. </picker>
  78. </view>
  79. <view class="inspect_li" v-if="form.inspectResult==0">
  80. <view class="inspect_li_l">整改通知</view>
  81. <view class="inform_r">
  82. <view v-for="(item,index) in informArray" :key="index" @click="tabClick(index)"><text :class="informIndex==index?'checked':'inform_r_l' "></text><text class="inform_r_r">{{item}}</text></view>
  83. </view>
  84. </view>
  85. </view>
  86. </scroll-view>
  87. <!-- 房间选择弹出层 -->
  88. <view class="popup-max-box" v-if="popupType">
  89. <view class="popup-null" @click="popupClick(2)"></view>
  90. <view class="popup-big-box">
  91. <view class="popup-input-box">
  92. <input type="text" maxlength="10" v-model="room" placeholder="请输入房间号">
  93. <view @click="getSelectInfoByRoom">搜索</view>
  94. </view>
  95. <view class="popup-for-max-box">
  96. <view class="popup-for-null" v-if="!roomList[0]">暂无数据</view>
  97. <view class="popup-for-box" v-for="(item,index) in roomList" :key="index">
  98. <view class="name-p">{{item.name}} ({{item.room}})</view>
  99. <view class="button-p" @click="popupClickItem(item)">确定</view>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. <view class="bottom_btn" @click="handleClick('nextStep')" v-if="form.inspectResult==0">下一步</view>
  105. <view class="bottom_btn" @click="handleClick('subBtn')" v-if="form.inspectResult==1">提交</view>
  106. </view>
  107. </template>
  108. <script>
  109. import { config } from '@/api/request/config.js'
  110. import { getSelectInfoByRoom} from '@/api/index.js'
  111. export default {
  112. name: "rectifyList",
  113. components: {
  114. },
  115. data() {
  116. return {
  117. pageType:0,
  118. //列表请求参数
  119. getData:{
  120. pageNum:1,
  121. pageSize:20,
  122. },
  123. form:{
  124. name:'',
  125. startTime:'',
  126. inspectResult:0,//检查结果
  127. },
  128. collegeIndex :0,
  129. collegeArray:['选择学院','学院名称1','学院名称2','学院名称3',],
  130. categoryIndex :0,
  131. categoryArray:['校级巡查','院级巡查'],
  132. planIndex :0,
  133. planArray:['请选择巡查计划标题','2023年3月份校级督导检查','2023年4月份校级督导检查'],
  134. resultIndex :0,
  135. resultArray:['不符合','符合'],
  136. informIndex:0,
  137. informArray:['整改告知书','整改通知书'],
  138. //房间弹层 状态
  139. popupType:false,
  140. //房间搜索字段
  141. room:"",
  142. roomList:[],
  143. }
  144. },
  145. onLoad(option) {
  146. },
  147. onShow() {
  148. },
  149. mounted(){
  150. },
  151. methods: {
  152. //滚动事件
  153. scrollGet(){},
  154. handleClick(doType){
  155. let self=this;
  156. if( doType=='nextStep'){//下一步
  157. uni.redirectTo({
  158. url: '/pages/pages_safetyExamine/examineManage/examineAddTow'
  159. });
  160. }else if(doType=='subBtn'){//提交
  161. }
  162. },
  163. collegeChange(e){
  164. this.collegeIndex = e.target.value;
  165. },
  166. categoryChange(e){
  167. this.categoryIndex = e.target.value;
  168. },
  169. planChange(e){
  170. this.planIndex = e.target.value;
  171. },
  172. resultChange(e){
  173. this.resultIndex = e.target.value;
  174. this.form.inspectResult=e.target.value;
  175. },
  176. //开始时间选中事件
  177. startChange(form,e){
  178. form.startTime=e.target.value
  179. },
  180. //顶部tab点击
  181. tabClick(index) {
  182. this.informIndex = index;
  183. },
  184. //搜索房间弹层开关
  185. popupClick(type){
  186. if(type == 1){
  187. this.room = "";
  188. this.roomList = [];
  189. this.popupType = true;
  190. }else if(type == 2){
  191. this.popupType = false;
  192. }
  193. },
  194. //搜索房间接口
  195. async getSelectInfoByRoom(){
  196. let self = this;
  197. if(!this.room){
  198. uni.showToast({
  199. title: '请输入要搜索房间号',
  200. icon:"none",
  201. mask:true,
  202. duration: 2000
  203. });
  204. return
  205. }
  206. const {data} = await getSelectInfoByRoom(this.room);
  207. if(data.code==200){
  208. if(data.data[0]){
  209. this.roomList = data.data;
  210. }else{
  211. uni.showToast({
  212. title: '未找到相关房间',
  213. icon:"none",
  214. mask:true,
  215. duration: 2000
  216. });
  217. }
  218. }
  219. },
  220. //确认搜索房间
  221. popupClickItem(item){
  222. this.$set(this.form,"fjNumber",item.room)
  223. this.$set(this.form,"deptName",item.deptName)
  224. this.$set(this.form,"buildingId",item.building)
  225. this.$set(this.form,"deptId",item.deptId)
  226. this.$set(this.form,"laboratoryId",item.id)
  227. this.$set(this.form,"buildingName",item.buildName)
  228. this.$set(this.form,"laboratoryName",item.name)
  229. this.$set(this.form,"fzrId",item.userId)
  230. this.$set(this.form,"fzrName",item.safeUserName)
  231. this.$set(this.form,"fzrLxfs",item.safeUserPhone)
  232. this.popupType = false;
  233. },
  234. //调用摄像头
  235. saoCode(){
  236. let self = this;
  237. uni.scanCode({
  238. onlyFromCamera: true,
  239. success: function (res) {
  240. if(res.result.indexOf("code") != -1 && res.result.indexOf("-") != -1 && res.result.indexOf("&") != -1){
  241. let codeRoom = "";
  242. let newList = res.result.split("?")[1].split("&")
  243. let list = newList[0].split("=")[1].split("-")
  244. codeRoom = list[1];
  245. if(codeRoom){
  246. self.roomList = [];
  247. self.room = codeRoom;
  248. self.getSelectInfoByRoom();
  249. self.popupType = true;
  250. }else{
  251. uni.showToast({
  252. title: '请扫描正确的二维码',
  253. icon:"none",
  254. mask:true,
  255. duration: 2000
  256. });
  257. }
  258. }else{
  259. uni.showToast({
  260. title: '请扫描正确的二维码',
  261. icon:"none",
  262. mask:true,
  263. duration: 2000
  264. });
  265. }
  266. }
  267. });
  268. },
  269. }
  270. }
  271. </script>
  272. <style lang="stylus" scoped>
  273. .examine{
  274. height:100%;
  275. display flex;
  276. box-sizing: border-box;
  277. .info-max-box{
  278. flex: 1;
  279. overflow: scroll;
  280. padding: 20rpx 0rpx 128rpx;
  281. box-sizing: border-box;
  282. }
  283. .basics{
  284. margin: 0 30rpx;
  285. width: 690rpx;
  286. height: 562rpx;
  287. background: #FFFFFF;
  288. border-radius: 20rpx;
  289. padding: 30rpx 28rpx 0;
  290. box-sizing: border-box;
  291. .basics_li{
  292. display: flex;
  293. justify-content: flex-start;
  294. margin-bottom: 24rpx;
  295. .basics_li_l{
  296. width: 146rpx;
  297. text-align: left;
  298. font-size: 30rpx;
  299. font-family: PingFang SC-Medium, PingFang SC;
  300. font-weight: 400;
  301. color: #333333;
  302. line-height: 80rpx;
  303. }
  304. .basics_li_r{
  305. width: 486rpx;
  306. height: 80rpx;
  307. border-radius: 10rpx;
  308. opacity: 1;
  309. border: 1rpx solid #E0E0E0;
  310. padding-left: 20rpx;
  311. box-sizing: border-box;
  312. }
  313. /* 学院 */
  314. .college_r{
  315. width: 486rpx;
  316. height: 80rpx;
  317. border-radius: 10rpx;
  318. border: 1rpx solid #E0E0E0;
  319. display: flex;
  320. justify-content: flex-start;
  321. align-items: center;
  322. >view{
  323. flex:1;
  324. line-height:80rpx;
  325. font-size: 30rpx;
  326. font-family: PingFang SC-Medium, PingFang SC;
  327. font-weight: 400;
  328. color: #333333;
  329. line-height: 80rpx;
  330. }
  331. >img{
  332. width: 14rpx;
  333. height: 8rpx;
  334. margin-right: 30rpx;
  335. }
  336. }
  337. /* 实验室 */
  338. .lab_r{
  339. width: 486rpx;
  340. height: 80rpx;
  341. display: flex;
  342. justify-content: flex-start;
  343. .picker-text{
  344. width: 438rpx;
  345. height: 80rpx;
  346. }
  347. .img-box{
  348. width: 48rpx;
  349. >img{
  350. width:30rpx;
  351. height:28rpx;
  352. margin:16rpx 18rpx 0 0;
  353. }
  354. }
  355. }
  356. /* 楼栋 */
  357. .building_r{
  358. width: 486rpx;
  359. height: 80rpx;
  360. >input{
  361. height: 80rpx;
  362. font-size: 30rpx;
  363. font-family: PingFang SC-Medium, PingFang SC;
  364. font-weight: 400;
  365. color: #333333;
  366. line-height: 80rpx;
  367. }
  368. }
  369. }
  370. }
  371. .attachment{
  372. width: 690rpx;
  373. background: #FFFFFF;
  374. border-radius: 20rpx;
  375. margin: 20rpx 30rpx 0;
  376. padding-bottom: 32rpx;
  377. box-sizing: border-box;
  378. .attachment_t{
  379. border-bottom: 1rpx solid #D8D8D8;
  380. >text:nth-of-type(1){
  381. font-size: 30rpx;
  382. font-family: PingFang SC-Medium, PingFang SC;
  383. font-weight: 400;
  384. color: #333333;
  385. line-height: 110rpx;
  386. margin-left: 28rpx;
  387. }
  388. >text:nth-of-type(2){
  389. font-size: 30rpx;
  390. font-family: PingFang SC-Medium, PingFang SC;
  391. font-weight: 400;
  392. color: #999999;
  393. line-height: 110rpx;
  394. margin-left: 24rpx;
  395. }
  396. }
  397. .attachment_li{
  398. height: 40rpx;
  399. display: flex;
  400. justify-content: flex-start;
  401. align-items: center;
  402. margin-top: 32rpx;
  403. >img{
  404. width: 30rpx;
  405. height: 26rpx;
  406. margin-right: 20rpx;
  407. margin-left: 50rpx;
  408. }
  409. >text{
  410. flex: 1;
  411. font-size: 28rpx;
  412. font-family: PingFang SC-Medium, PingFang SC;
  413. font-weight: 400;
  414. color: #0183FA;
  415. line-height: 40rpx;
  416. white-space: nowrap;
  417. overflow: hidden;
  418. text-overflow: ellipsis;
  419. }
  420. .attachment_li_del{
  421. width: 30rpx;
  422. height: 30rpx;
  423. }
  424. }
  425. }
  426. .inspect{
  427. margin: 20rpx 30rpx 0;
  428. width: 690rpx;
  429. height: auto;
  430. background: #FFFFFF;
  431. border-radius: 20rpx;
  432. padding: 40rpx 28rpx 20rpx;
  433. box-sizing: border-box;
  434. .inspect_li{
  435. display: flex;
  436. justify-content: flex-start;
  437. margin-bottom: 24rpx;
  438. .inspect_li_l{
  439. width: 146rpx;
  440. text-align: left;
  441. font-size: 30rpx;
  442. font-family: PingFang SC-Medium, PingFang SC;
  443. font-weight: 400;
  444. color: #333333;
  445. line-height: 80rpx;
  446. }
  447. .inspect_li_r{
  448. width: 486rpx;
  449. height: 80rpx;
  450. border-radius: 10rpx;
  451. opacity: 1;
  452. border: 1rpx solid #E0E0E0;
  453. padding-left: 20rpx;
  454. box-sizing: border-box;
  455. }
  456. .college_r{
  457. width: 486rpx;
  458. height: 80rpx;
  459. border-radius: 10rpx;
  460. border: 1rpx solid #E0E0E0;
  461. display: flex;
  462. justify-content: flex-start;
  463. align-items: center;
  464. >view{
  465. flex:1;
  466. line-height:80rpx;
  467. font-size: 30rpx;
  468. font-family: PingFang SC-Medium, PingFang SC;
  469. font-weight: 400;
  470. color: #333333;
  471. line-height: 80rpx;
  472. }
  473. >img{
  474. width: 14rpx;
  475. height: 8rpx;
  476. margin-right: 30rpx;
  477. }
  478. }
  479. /* 整改日期 */
  480. .date_r{
  481. width: 486rpx;
  482. height: 80rpx;
  483. display: flex;
  484. justify-content: flex-start;
  485. .picker-text{
  486. width: 438rpx;
  487. height: 80rpx;
  488. }
  489. >img{
  490. width:30rpx;
  491. height:28rpx;
  492. margin:16rpx 18rpx 0 0;
  493. }
  494. }
  495. /* 整改通知 */
  496. .inform_r{
  497. width: 486rpx;
  498. height: 80rpx;
  499. padding-left: 20rpx;
  500. box-sizing: border-box;
  501. display: flex;
  502. justify-content: flex-start;
  503. align-items: center;
  504. >view{
  505. display: flex;
  506. justify-content: flex-start;
  507. align-items: center;
  508. margin-right: 24rpx;
  509. .inform_r_l{
  510. display: inline-block;
  511. width: 30rpx;
  512. height: 30rpx;
  513. border-radius: 50%;
  514. border: 1rpx solid #E0E0E0;
  515. margin-right: 14rpx;
  516. }
  517. .inform_r_r{
  518. font-size: 30rpx;
  519. font-family: PingFang SC-Medium, PingFang SC;
  520. font-weight: 400;
  521. color: #333333;
  522. line-height: 80rpx;
  523. }
  524. .checked{
  525. display: inline-block;
  526. width: 30rpx;
  527. height: 30rpx;
  528. border-radius: 50%;
  529. border: 1rpx solid #0183FA;
  530. margin-right: 14rpx;
  531. position: relative;
  532. }
  533. .checked::after{
  534. content: '';
  535. position: absolute;
  536. top: 5rpx;
  537. left:5rpx;
  538. width: 20rpx;
  539. height: 20rpx;
  540. border-radius: 50%;
  541. background: #0183FA;
  542. }
  543. }
  544. }
  545. }
  546. }
  547. .popup-max-box{
  548. z-index:10;
  549. height:100%;
  550. width:100%;
  551. position fixed;
  552. background rgba(0,0,0,0.2)
  553. display flex;
  554. flex-direction column
  555. .popup-null{
  556. flex:1;
  557. }
  558. .popup-big-box{
  559. border-top-left-radius:20rpx;
  560. border-top-right-radius:20rpx;
  561. background #fff
  562. .popup-input-box{
  563. padding:30rpx 20rpx;
  564. display:flex;
  565. input{
  566. flex:1;
  567. height:70rpx;
  568. border:1rpx solid #e0e0e0;
  569. border-radius:10rpx;
  570. margin-right:20rpx;
  571. padding:0 20rpx;
  572. }
  573. view{
  574. background #0183FA
  575. color:#fff;
  576. border-radius:10rpx;
  577. width:140rpx;
  578. line-height:70rpx;
  579. text-align center;
  580. font-size:28rpx;
  581. }
  582. }
  583. .popup-for-max-box{
  584. margin:0 20rpx 30rpx;
  585. height:600rpx;
  586. overflow-y scroll;
  587. .popup-for-null{
  588. line-height:100rpx;
  589. text-align center
  590. color:#999;
  591. }
  592. .popup-for-box{
  593. display:flex;
  594. padding:10px 0;
  595. .name-p{
  596. flex:1;
  597. line-height:60rpx;
  598. }
  599. .button-p{
  600. background #0183FA
  601. color:#fff;
  602. text-align center
  603. width:100rpx;
  604. line-height:60rpx;
  605. height:60rpx;
  606. border-radius:10rpx;
  607. }
  608. }
  609. }
  610. }
  611. }
  612. .bottom_btn{
  613. position: fixed;
  614. bottom: 26rpx;
  615. left: 30rpx;
  616. font-size: 30rpx;
  617. font-family: PingFang SC-Medium, PingFang SC;
  618. font-weight: 400;
  619. color: #FFFFFF;
  620. line-height: 90rpx;
  621. width: 690rpx;
  622. height: 90rpx;
  623. background: #0183FA;
  624. border-radius: 20rpx;
  625. text-align: center;
  626. }
  627. }
  628. </style>