examineAddTow.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  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. }else if(doType=='subBtn'){//提交
  158. }
  159. },
  160. collegeChange(e){
  161. this.collegeIndex = e.target.value;
  162. },
  163. categoryChange(e){
  164. this.categoryIndex = e.target.value;
  165. },
  166. planChange(e){
  167. this.planIndex = e.target.value;
  168. },
  169. resultChange(e){
  170. this.resultIndex = e.target.value;
  171. this.form.inspectResult=e.target.value;
  172. },
  173. //开始时间选中事件
  174. startChange(form,e){
  175. form.startTime=e.target.value
  176. },
  177. //顶部tab点击
  178. tabClick(index) {
  179. this.informIndex = index;
  180. },
  181. //搜索房间弹层开关
  182. popupClick(type){
  183. if(type == 1){
  184. this.room = "";
  185. this.roomList = [];
  186. this.popupType = true;
  187. }else if(type == 2){
  188. this.popupType = false;
  189. }
  190. },
  191. //搜索房间接口
  192. async getSelectInfoByRoom(){
  193. let self = this;
  194. if(!this.room){
  195. uni.showToast({
  196. title: '请输入要搜索房间号',
  197. icon:"none",
  198. mask:true,
  199. duration: 2000
  200. });
  201. return
  202. }
  203. const {data} = await getSelectInfoByRoom(this.room);
  204. if(data.code==200){
  205. if(data.data[0]){
  206. this.roomList = data.data;
  207. }else{
  208. uni.showToast({
  209. title: '未找到相关房间',
  210. icon:"none",
  211. mask:true,
  212. duration: 2000
  213. });
  214. }
  215. }
  216. },
  217. //确认搜索房间
  218. popupClickItem(item){
  219. this.$set(this.form,"fjNumber",item.room)
  220. this.$set(this.form,"deptName",item.deptName)
  221. this.$set(this.form,"buildingId",item.building)
  222. this.$set(this.form,"deptId",item.deptId)
  223. this.$set(this.form,"laboratoryId",item.id)
  224. this.$set(this.form,"buildingName",item.buildName)
  225. this.$set(this.form,"laboratoryName",item.name)
  226. this.$set(this.form,"fzrId",item.userId)
  227. this.$set(this.form,"fzrName",item.safeUserName)
  228. this.$set(this.form,"fzrLxfs",item.safeUserPhone)
  229. this.popupType = false;
  230. },
  231. //调用摄像头
  232. saoCode(){
  233. let self = this;
  234. uni.scanCode({
  235. onlyFromCamera: true,
  236. success: function (res) {
  237. if(res.result.indexOf("code") != -1 && res.result.indexOf("-") != -1 && res.result.indexOf("&") != -1){
  238. let codeRoom = "";
  239. let newList = res.result.split("?")[1].split("&")
  240. let list = newList[0].split("=")[1].split("-")
  241. codeRoom = list[1];
  242. if(codeRoom){
  243. self.roomList = [];
  244. self.room = codeRoom;
  245. self.getSelectInfoByRoom();
  246. self.popupType = true;
  247. }else{
  248. uni.showToast({
  249. title: '请扫描正确的二维码',
  250. icon:"none",
  251. mask:true,
  252. duration: 2000
  253. });
  254. }
  255. }else{
  256. uni.showToast({
  257. title: '请扫描正确的二维码',
  258. icon:"none",
  259. mask:true,
  260. duration: 2000
  261. });
  262. }
  263. }
  264. });
  265. },
  266. }
  267. }
  268. </script>
  269. <style lang="stylus" scoped>
  270. .examine{
  271. height:100%;
  272. display flex;
  273. box-sizing: border-box;
  274. .info-max-box{
  275. flex: 1;
  276. overflow: scroll;
  277. padding: 20rpx 0rpx 128rpx;
  278. box-sizing: border-box;
  279. }
  280. .basics{
  281. margin: 0 30rpx;
  282. width: 690rpx;
  283. height: 562rpx;
  284. background: #FFFFFF;
  285. border-radius: 20rpx;
  286. padding: 30rpx 28rpx 0;
  287. box-sizing: border-box;
  288. .basics_li{
  289. display: flex;
  290. justify-content: flex-start;
  291. margin-bottom: 24rpx;
  292. .basics_li_l{
  293. width: 146rpx;
  294. text-align: left;
  295. font-size: 30rpx;
  296. font-family: PingFang SC-Medium, PingFang SC;
  297. font-weight: 400;
  298. color: #333333;
  299. line-height: 80rpx;
  300. }
  301. .basics_li_r{
  302. width: 486rpx;
  303. height: 80rpx;
  304. border-radius: 10rpx;
  305. opacity: 1;
  306. border: 1rpx solid #E0E0E0;
  307. padding-left: 20rpx;
  308. box-sizing: border-box;
  309. }
  310. /* 学院 */
  311. .college_r{
  312. width: 486rpx;
  313. height: 80rpx;
  314. border-radius: 10rpx;
  315. border: 1rpx solid #E0E0E0;
  316. display: flex;
  317. justify-content: flex-start;
  318. align-items: center;
  319. >view{
  320. flex:1;
  321. line-height:80rpx;
  322. font-size: 30rpx;
  323. font-family: PingFang SC-Medium, PingFang SC;
  324. font-weight: 400;
  325. color: #333333;
  326. line-height: 80rpx;
  327. }
  328. >img{
  329. width: 14rpx;
  330. height: 8rpx;
  331. margin-right: 30rpx;
  332. }
  333. }
  334. /* 实验室 */
  335. .lab_r{
  336. width: 486rpx;
  337. height: 80rpx;
  338. display: flex;
  339. justify-content: flex-start;
  340. .picker-text{
  341. width: 438rpx;
  342. height: 80rpx;
  343. }
  344. .img-box{
  345. width: 48rpx;
  346. >img{
  347. width:30rpx;
  348. height:28rpx;
  349. margin:16rpx 18rpx 0 0;
  350. }
  351. }
  352. }
  353. /* 楼栋 */
  354. .building_r{
  355. width: 486rpx;
  356. height: 80rpx;
  357. >input{
  358. height: 80rpx;
  359. font-size: 30rpx;
  360. font-family: PingFang SC-Medium, PingFang SC;
  361. font-weight: 400;
  362. color: #333333;
  363. line-height: 80rpx;
  364. }
  365. }
  366. }
  367. }
  368. .attachment{
  369. width: 690rpx;
  370. background: #FFFFFF;
  371. border-radius: 20rpx;
  372. margin: 20rpx 30rpx 0;
  373. padding-bottom: 32rpx;
  374. box-sizing: border-box;
  375. .attachment_t{
  376. border-bottom: 1rpx solid #D8D8D8;
  377. >text:nth-of-type(1){
  378. font-size: 30rpx;
  379. font-family: PingFang SC-Medium, PingFang SC;
  380. font-weight: 400;
  381. color: #333333;
  382. line-height: 110rpx;
  383. margin-left: 28rpx;
  384. }
  385. >text:nth-of-type(2){
  386. font-size: 30rpx;
  387. font-family: PingFang SC-Medium, PingFang SC;
  388. font-weight: 400;
  389. color: #999999;
  390. line-height: 110rpx;
  391. margin-left: 24rpx;
  392. }
  393. }
  394. .attachment_li{
  395. height: 40rpx;
  396. display: flex;
  397. justify-content: flex-start;
  398. align-items: center;
  399. margin-top: 32rpx;
  400. >img{
  401. width: 30rpx;
  402. height: 26rpx;
  403. margin-right: 20rpx;
  404. margin-left: 50rpx;
  405. }
  406. >text{
  407. flex: 1;
  408. font-size: 28rpx;
  409. font-family: PingFang SC-Medium, PingFang SC;
  410. font-weight: 400;
  411. color: #0183FA;
  412. line-height: 40rpx;
  413. white-space: nowrap;
  414. overflow: hidden;
  415. text-overflow: ellipsis;
  416. }
  417. .attachment_li_del{
  418. width: 30rpx;
  419. height: 30rpx;
  420. }
  421. }
  422. }
  423. .inspect{
  424. margin: 20rpx 30rpx 0;
  425. width: 690rpx;
  426. height: auto;
  427. background: #FFFFFF;
  428. border-radius: 20rpx;
  429. padding: 40rpx 28rpx 20rpx;
  430. box-sizing: border-box;
  431. .inspect_li{
  432. display: flex;
  433. justify-content: flex-start;
  434. margin-bottom: 24rpx;
  435. .inspect_li_l{
  436. width: 146rpx;
  437. text-align: left;
  438. font-size: 30rpx;
  439. font-family: PingFang SC-Medium, PingFang SC;
  440. font-weight: 400;
  441. color: #333333;
  442. line-height: 80rpx;
  443. }
  444. .inspect_li_r{
  445. width: 486rpx;
  446. height: 80rpx;
  447. border-radius: 10rpx;
  448. opacity: 1;
  449. border: 1rpx solid #E0E0E0;
  450. padding-left: 20rpx;
  451. box-sizing: border-box;
  452. }
  453. .college_r{
  454. width: 486rpx;
  455. height: 80rpx;
  456. border-radius: 10rpx;
  457. border: 1rpx solid #E0E0E0;
  458. display: flex;
  459. justify-content: flex-start;
  460. align-items: center;
  461. >view{
  462. flex:1;
  463. line-height:80rpx;
  464. font-size: 30rpx;
  465. font-family: PingFang SC-Medium, PingFang SC;
  466. font-weight: 400;
  467. color: #333333;
  468. line-height: 80rpx;
  469. }
  470. >img{
  471. width: 14rpx;
  472. height: 8rpx;
  473. margin-right: 30rpx;
  474. }
  475. }
  476. /* 整改日期 */
  477. .date_r{
  478. width: 486rpx;
  479. height: 80rpx;
  480. display: flex;
  481. justify-content: flex-start;
  482. .picker-text{
  483. width: 438rpx;
  484. height: 80rpx;
  485. }
  486. >img{
  487. width:30rpx;
  488. height:28rpx;
  489. margin:16rpx 18rpx 0 0;
  490. }
  491. }
  492. /* 整改通知 */
  493. .inform_r{
  494. width: 486rpx;
  495. height: 80rpx;
  496. padding-left: 20rpx;
  497. box-sizing: border-box;
  498. display: flex;
  499. justify-content: flex-start;
  500. align-items: center;
  501. >view{
  502. display: flex;
  503. justify-content: flex-start;
  504. align-items: center;
  505. margin-right: 24rpx;
  506. .inform_r_l{
  507. display: inline-block;
  508. width: 30rpx;
  509. height: 30rpx;
  510. border-radius: 50%;
  511. border: 1rpx solid #E0E0E0;
  512. margin-right: 14rpx;
  513. }
  514. .inform_r_r{
  515. font-size: 30rpx;
  516. font-family: PingFang SC-Medium, PingFang SC;
  517. font-weight: 400;
  518. color: #333333;
  519. line-height: 80rpx;
  520. }
  521. .checked{
  522. display: inline-block;
  523. width: 30rpx;
  524. height: 30rpx;
  525. border-radius: 50%;
  526. border: 1rpx solid #0183FA;
  527. margin-right: 14rpx;
  528. position: relative;
  529. }
  530. .checked::after{
  531. content: '';
  532. position: absolute;
  533. top: 5rpx;
  534. left:5rpx;
  535. width: 20rpx;
  536. height: 20rpx;
  537. border-radius: 50%;
  538. background: #0183FA;
  539. }
  540. }
  541. }
  542. }
  543. }
  544. .popup-max-box{
  545. z-index:10;
  546. height:100%;
  547. width:100%;
  548. position fixed;
  549. background rgba(0,0,0,0.2)
  550. display flex;
  551. flex-direction column
  552. .popup-null{
  553. flex:1;
  554. }
  555. .popup-big-box{
  556. border-top-left-radius:20rpx;
  557. border-top-right-radius:20rpx;
  558. background #fff
  559. .popup-input-box{
  560. padding:30rpx 20rpx;
  561. display:flex;
  562. input{
  563. flex:1;
  564. height:70rpx;
  565. border:1rpx solid #e0e0e0;
  566. border-radius:10rpx;
  567. margin-right:20rpx;
  568. padding:0 20rpx;
  569. }
  570. view{
  571. background #0183FA
  572. color:#fff;
  573. border-radius:10rpx;
  574. width:140rpx;
  575. line-height:70rpx;
  576. text-align center;
  577. font-size:28rpx;
  578. }
  579. }
  580. .popup-for-max-box{
  581. margin:0 20rpx 30rpx;
  582. height:600rpx;
  583. overflow-y scroll;
  584. .popup-for-null{
  585. line-height:100rpx;
  586. text-align center
  587. color:#999;
  588. }
  589. .popup-for-box{
  590. display:flex;
  591. padding:10px 0;
  592. .name-p{
  593. flex:1;
  594. line-height:60rpx;
  595. }
  596. .button-p{
  597. background #0183FA
  598. color:#fff;
  599. text-align center
  600. width:100rpx;
  601. line-height:60rpx;
  602. height:60rpx;
  603. border-radius:10rpx;
  604. }
  605. }
  606. }
  607. }
  608. }
  609. .bottom_btn{
  610. position: fixed;
  611. bottom: 26rpx;
  612. left: 30rpx;
  613. font-size: 30rpx;
  614. font-family: PingFang SC-Medium, PingFang SC;
  615. font-weight: 400;
  616. color: #FFFFFF;
  617. line-height: 90rpx;
  618. width: 690rpx;
  619. height: 90rpx;
  620. background: #0183FA;
  621. border-radius: 20rpx;
  622. text-align: center;
  623. }
  624. }
  625. </style>