dangerManage.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. <!-- 安全检查-安全隐患 -->
  2. <template>
  3. <view class="examine">
  4. <view class="header">
  5. <view class="tabTitle" v-if="pageType==0">
  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>
  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>{{collegeArray[collegeIndex]}}</view>
  21. <img src="@/images/Version3.3.3/icon_06.png">
  22. </view>
  23. </picker>
  24. <view class="lab_title_r">
  25. <view class="lab_title_r_btn" @click="searchBtn">
  26. <img src="@/images/Version3.3.3/icon_aqjc_ss.png"/>
  27. </view>
  28. <input type="text" v-model="getData.name" placeholder="实验室/房间号" maxlength="50" placeholder-style="color: #CCCCCC;font-size:26rpx;">
  29. </view>
  30. </view>
  31. </view>
  32. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  33. <view class="list_three">
  34. <view class="list_three_li" v-for="(item,index) in dataList" :key="index" @click="handleClick('','detail')">
  35. <view class="list_three_li_t">
  36. <view class="list_three_li_t_l">
  37. <img src="@/images/Version3.3.3/icon_xyxc_qx.png"/>
  38. <text></text>
  39. </view>
  40. <view class="list_three_li_t_c">实验室名称-房间号</view>
  41. <view class="list_three_li_t_c2">已逾期</view>
  42. <view class="list_three_li_t_r"></view>
  43. </view>
  44. <view class="list_three_li_m">
  45. <view class="list_three_li_m_t">计划标题计划标题计划标题计划标题计划标题计划...</view>
  46. <view class="list_three_li_m_b">
  47. <text class="blue_color">待整改</text>
  48. <text>校院巡查</text>
  49. <text>环境与测绘学院</text>
  50. </view>
  51. </view>
  52. <view class="list_three_li_b">整改期限:2023-01-01</view>
  53. </view>
  54. </view>
  55. </scroll-view>
  56. </view>
  57. </template>
  58. <script>
  59. import { config } from '@/api/request/config.js'
  60. import { } from '@/api/index.js'
  61. export default {
  62. name: "rectifyList",
  63. components: {
  64. },
  65. data() {
  66. return {
  67. pageType:0,
  68. //列表请求参数
  69. getData:{
  70. pageNum:1,
  71. pageSize:20,
  72. },
  73. tabText:['校院巡查隐患','实验室自查隐患'],
  74. curTab:0,
  75. tabTextTow:['全部','待检查','待复核','已完成','暂无法整改'],
  76. curTabTow:0,
  77. form:{
  78. name:'',
  79. type:'校院巡查',
  80. startTime:'',
  81. endTime:'',
  82. inspectScope:[],
  83. tiemQuickList:[],
  84. scopeIndex:'',
  85. seleteListLab:[],
  86. patrolIndex:'',
  87. seleteListMember:[],
  88. },
  89. collegeList:[{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},],
  90. collegeIndex :0,
  91. collegeArray:['选择学院','学院名称1','学院名称2','学院名称3',],
  92. dataList:[{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',}],
  93. }
  94. },
  95. onLoad(option) {
  96. if(option.form){
  97. this.form=JSON.parse(decodeURIComponent(option.form));
  98. console.log(this.form)
  99. }
  100. if(option.pageType==1){
  101. uni.setNavigationBarTitle({
  102. title:'校院巡查隐患'
  103. })
  104. }else if(option.pageType==2){
  105. uni.setNavigationBarTitle({
  106. title:'实验室自查隐患'
  107. })
  108. }
  109. },
  110. onShow() {
  111. },
  112. mounted(){
  113. },
  114. methods: {
  115. tabClick(index) {
  116. this.curTab = index;
  117. },
  118. //顶部tab点击
  119. tabClickTow(index) {
  120. this.curTabTow = index;
  121. },
  122. //选择学院
  123. collegeChange(e){
  124. this.collegeIndex = e.target.value;
  125. this.dataList=[];
  126. this.getList();
  127. },
  128. //实验室搜索
  129. searchBtn(){
  130. this.dataList=[];
  131. this.getList();
  132. },
  133. //滚动事件
  134. scrollGet(){
  135. let self=this;
  136. if(self.total<=self.getData.pageNum){
  137. console.log('没有更多数据!')
  138. }else{
  139. setTimeout(function(){
  140. self.getData.pageNum += 1;
  141. self.getList();
  142. },1000)
  143. }
  144. },
  145. //学院选择
  146. collegeSelete(index){
  147. this.collegeList[index].type = !this.collegeList[index].type
  148. },
  149. handleClick(item,doType){
  150. let self=this;
  151. if( doType=='subBtn'){//
  152. }else if(doType=='detail'){//详情
  153. uni.navigateTo({
  154. url: '/pages/pages_safetyExamine/dangerManage/dangerDetail?form='+encodeURIComponent(JSON.stringify(this.form))
  155. })
  156. }
  157. },
  158. async getList(){
  159. let list=[{name:'实验室名称-房间号',type:false,id:4},{name:'实验室名称-房间号',type:false,id:5}]
  160. this.total=5;
  161. this.dataList=[...this.dataList,...list]
  162. // let self = this;
  163. // let obj = {
  164. // pageNum:this.getData.page,
  165. // pageSize:this.getData.pageSize,
  166. // };
  167. // const {data} = await groupList(obj);
  168. // if(data.code==200){
  169. // this.total=data.total;
  170. // this.dataList=[...this.dataList,...data.data]
  171. // }
  172. },
  173. }
  174. }
  175. </script>
  176. <style lang="stylus" scoped>
  177. .examine{
  178. height:100%;
  179. display flex;
  180. // padding: 0 30rpx;
  181. // box-sizing: border-box;
  182. padding-bottom: 20rpx;
  183. box-sizing: border-box;
  184. .blue_color{
  185. color: #0183FA;
  186. border: 1rpx solid #0183FA;
  187. }
  188. .red_color{
  189. color: #FF4545;
  190. border: 1rpx solid #FF4545;
  191. }
  192. .green_color{
  193. color: #1FA50D;
  194. border: 1rpx solid #1FA50D;
  195. }
  196. .orange_color{
  197. color: #FA8E1B;
  198. border: 1rpx solid #FA8E1B;
  199. }
  200. .gray_color{
  201. color: #A2A2A2;
  202. border: 1rpx solid #A2A2A2;
  203. }
  204. .info-max-box{
  205. flex: 1;
  206. overflow: scroll;
  207. padding: 340rpx 0rpx 0;
  208. box-sizing: border-box;
  209. }
  210. /* 切换按钮 */
  211. .header{
  212. width:100%;
  213. position: fixed;
  214. top: 0rpx;
  215. z-index: 100;
  216. .tabTitle{
  217. width:100%;
  218. height: 100rpx;
  219. background: #fff;
  220. display flex;
  221. justify-content: center;
  222. align-items: center;
  223. margin-bottom:20rpx;
  224. .tabTitle_li{
  225. position: relative;
  226. width:372rpx;
  227. text-align center;
  228. .tabTitle_text{
  229. display: inline-block;
  230. font-size: 30rpx;
  231. font-family: PingFang SC;
  232. font-weight: 500;
  233. color: #333333;
  234. line-height: 46rpx;
  235. position: relative;
  236. >text{
  237. position:absolute;
  238. min-width: 30rpx;
  239. min-height: 30rpx;
  240. border-radius:54%;
  241. background: #E80000;
  242. font-size: 18rpx;
  243. font-family: PingFang SC-Medium, PingFang SC;
  244. font-weight: 400;
  245. color: #FFFFFF;
  246. text-align: center;
  247. line-height: 30rpx;
  248. margin-left: 6rpx;
  249. padding:2rpx;
  250. box-sizing: border-box;
  251. }
  252. &.on{
  253. color:#0183FA;
  254. }
  255. }
  256. .tabTitle_across{
  257. width: 50rpx;
  258. height: 4rpx;
  259. background: #0183FA;
  260. border-radius: 2rpx;
  261. margin-left 162rpx;
  262. display none;
  263. &.on{
  264. display block;
  265. }
  266. }
  267. }
  268. .tabTitle_li:nth-of-type(1)::after{
  269. content: '';
  270. position: absolute;
  271. top: 0rpx;
  272. right: 0rpx;
  273. width: 1rpx;
  274. height: 50rpx;
  275. background: #E0E0E0;
  276. }
  277. }
  278. .tabTitle_tow{
  279. width:100%;
  280. height: 100rpx;
  281. background: #fff;
  282. display flex;
  283. justify-content: flex-start;
  284. align-items: center;
  285. border-bottom: 1rpx solid #E0E0E0;
  286. .tabTitle_tow_li{
  287. position: relative;
  288. width:152rpx;
  289. text-align center;
  290. .tabTitle_tow_text{
  291. display: inline-block;
  292. font-size: 30rpx;
  293. font-family: PingFang SC;
  294. font-weight: 500;
  295. color: #333333;
  296. line-height: 46rpx;
  297. position: relative;
  298. &.on{
  299. color:#0183FA;
  300. }
  301. }
  302. .tabTitle_tow_across{
  303. width: 50rpx;
  304. height: 4rpx;
  305. background: #0183FA;
  306. border-radius: 2rpx;
  307. margin-left: 50rpx;
  308. display none;
  309. &.on{
  310. display block;
  311. }
  312. }
  313. }
  314. }
  315. .lab_title{
  316. width: 750rpx;
  317. height: 100rpx;
  318. background: #FFFFFF;
  319. padding: 20rpx 30rpx;
  320. box-sizing: border-box;
  321. display: flex;
  322. justify-content: flex-start;
  323. .lab_title_l{
  324. width: 250rpx;
  325. height: 60rpx;
  326. margin-right: 20rpx;
  327. .lab_title_l_n{
  328. width: 250rpx;
  329. height: 60rpx;
  330. border-radius: 10rpx;
  331. border: 1rpx solid #E0E0E0;
  332. display: flex;
  333. justify-content: flex-start;
  334. align-items: center;
  335. >view{
  336. flex:1;
  337. line-height:60rpx;
  338. margin-left:20rpx;
  339. color: #999999;
  340. font-size:28rpx;
  341. }
  342. >img{
  343. width: 14rpx;
  344. height: 8rpx;
  345. margin-right: 30rpx;
  346. }
  347. }
  348. }
  349. .lab_title_r{
  350. width: 420rpx;
  351. height: 60rpx;
  352. position:relative;
  353. border-radius: 10rpx;
  354. border: 1rpx solid #E0E0E0;
  355. .lab_title_r_btn{
  356. width: 60rpx;
  357. height: 60rpx
  358. position: absolute;
  359. top: 0rpx;
  360. left:0rpx;
  361. >img{
  362. width: 20rpx;
  363. height: 20rpx;
  364. position: absolute;
  365. top: 20rpx;
  366. left: 24rpx;
  367. }
  368. }
  369. >input{
  370. width: 360rpx;
  371. height: 60rpx;
  372. position: absolute;
  373. top: 0rpx;
  374. left: 60rpx;
  375. }
  376. }
  377. }
  378. }
  379. .list_three{
  380. padding: 0 30rpx;
  381. box-sizing: border-box;
  382. .list_three_li{
  383. position: relative;
  384. width: 690rpx;
  385. height: 320rpx;
  386. background: #fff;
  387. border-radius: 10rpx;
  388. overflow: hidden;
  389. margin-bottom: 20rpx;
  390. .list_three_li_t{
  391. width: 100%;
  392. position: absolute;
  393. left: 0;
  394. top: 0;
  395. .list_three_li_t_l{
  396. >img{
  397. width: 70rpx;
  398. height: 70rpx;
  399. }
  400. >text{
  401. position: absolute;
  402. left: -15rpx;
  403. top: 76rpx;
  404. display: inline-block;
  405. width: 30rpx;
  406. height: 30rpx;
  407. background: #F5F5F5;
  408. border-radius: 15rpx;
  409. }
  410. }
  411. .list_three_li_t_c{
  412. width: 630rpx;
  413. height: 110rpx;
  414. position: absolute;
  415. left: 30rpx;
  416. top: 0;
  417. font-size: 30rpx;
  418. font-family: PingFang SC-Medium, PingFang SC;
  419. font-weight: 400;
  420. color: #333333;
  421. line-height: 110rpx;
  422. border-bottom: 1rpx dashed #D8D8D8;
  423. overflow: hidden;
  424. text-overflow:ellipsis;
  425. white-space: nowrap;
  426. padding-right: 60rpx;
  427. box-sizing: border-box;
  428. }
  429. .list_three_li_t_c2{
  430. position: absolute;
  431. right: 20rpx;
  432. top: 38rpx;
  433. width: 120rpx;
  434. height: 40rpx;
  435. font-size: 28rpx;
  436. font-family: PingFang SC-Medium, PingFang SC;
  437. font-weight: 400;
  438. color: #FF5757;
  439. line-height: 40rpx;
  440. border: 1rpx solid #FF5757;
  441. border-radius: 6rpx;
  442. text-align: center;
  443. }
  444. .list_three_li_t_r{
  445. position: absolute;
  446. right:-15rpx;
  447. top: 76rpx;
  448. width: 30rpx;
  449. height: 30rpx;
  450. background:#F5F5F5;
  451. border-radius: 15rpx;
  452. }
  453. }
  454. .list_three_li_m{
  455. position: absolute;
  456. top: 110rpx;
  457. left: 0;
  458. width: 690rpx;
  459. height: 158rpx;
  460. padding-left: 30rpx;
  461. box-sizing: border-box;
  462. .list_three_li_m_t{
  463. font-size: 28rpx;
  464. font-family: PingFang SC-Medium, PingFang SC;
  465. font-weight: 400;
  466. color: #666666;
  467. line-height: 40rpx;
  468. margin-top:22rpx;
  469. }
  470. .list_three_li_m_b{
  471. margin-top:26rpx;
  472. >text:nth-of-type(1){
  473. font-size: 26rpx;
  474. font-family: PingFang SC-Medium, PingFang SC;
  475. font-weight: 400;
  476. line-height: 40rpx;
  477. border-radius: 6rpx;
  478. padding: 0 20rpx;
  479. margin-right: 14rpx;
  480. }
  481. >text:nth-of-type(2){
  482. font-size: 26rpx;
  483. font-family: PingFang SC-Medium, PingFang SC;
  484. font-weight: 400;
  485. color: #0183FA;
  486. line-height: 40rpx;
  487. padding: 0 8rpx;
  488. border-radius: 6rpx;
  489. background: rgba(1,131,250,0.1);
  490. margin-right: 24rpx;
  491. }
  492. >text:nth-of-type(3){
  493. display: inline-block;
  494. width: 380rpx;
  495. font-size: 26rpx;
  496. font-family: PingFang SC-Medium, PingFang SC;
  497. font-weight: 400;
  498. color: #333333;
  499. line-height: 26rpx;
  500. overflow: hidden;
  501. text-overflow:ellipsis;
  502. white-space: nowrap;
  503. }
  504. }
  505. }
  506. .list_three_li_b{
  507. height: 60rpx;
  508. width: 100%;
  509. position: absolute;
  510. top: 258rpx;
  511. left: 0;
  512. font-size: 28rpx;
  513. font-family: PingFang SC-Medium, PingFang SC;
  514. font-weight: 400;
  515. color: #666666;
  516. line-height: 60rpx;
  517. padding-left: 28rpx;
  518. box-sizing: border-box;
  519. }
  520. }
  521. }
  522. }
  523. </style>