examination.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <!--资格申请-->
  2. <template>
  3. <view id="transportPerson">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="scroll-box">
  5. <view class="list">
  6. <view class="list_li" v-for="(item,index) in dataList" @click="goInfo(item)">
  7. <img class="for-back-img" src="@/pages_manage/images/icon_yqsq_sys.png">
  8. <text class="list_li_text">{{item.room}}</text>
  9. <text :class="item.remark=='1'?'list_li_text2':(item.remark=='0'?'colorA':(item.remark=='2'?'colorB':''))">{{item.remark=='1'?'有效期:'+item.startTime+'至'+item.endTime+'':(item.remark=='0'?'审核中':(item.remark=='2'?'审核驳回':''))}}</text>
  10. </view>
  11. </view>
  12. </scroll-view>
  13. <view class="empty" v-if="pageType==4">
  14. <img class="for-back-img" src="@/pages_manage/images/img_ysrygl_zwsj.png">
  15. <view>暂无数据</view>
  16. </view>
  17. <view class="sub_btn" @click="subBtn()">申请资格</view>
  18. </view>
  19. </template>
  20. <script>
  21. import { qualificationList } from '@/api/apiDemo/index.js'
  22. export default {
  23. name: "transportPerson",
  24. data() {
  25. return {
  26. pageType:0,
  27. //列表请求参数
  28. getData:{
  29. pageNum:1,
  30. pageSize:20,
  31. },
  32. dataList:[],
  33. status:0,
  34. }
  35. },
  36. onLoad() {
  37. },
  38. onShow() {
  39. //今天页面返回,清除存储气瓶信息
  40. uni.removeStorageSync('listDetail');
  41. },
  42. methods: {
  43. subBtn(){
  44. uni.redirectTo({
  45. url:'/pages_manage/gasBottle/examination/examinationAdd?status=0'
  46. });
  47. },
  48. goInfo(d){
  49. uni.redirectTo({
  50. url:'/pages_manage/gasBottle/examination/examinationDetail?item='+encodeURIComponent(JSON.stringify(d))
  51. });
  52. },
  53. //滚动加载事件
  54. scrollGet(){
  55. this.getData.pageNum += 1;
  56. this.getList();
  57. },
  58. //查询实验室
  59. async getList(){
  60. const {data} = await qualificationList()
  61. if(data.code == 200){
  62. let _this=this;
  63. let res=data.rows
  64. if(_this.getData.pageNum==1){
  65. _this.dataList=res;
  66. if(res.length>0){
  67. _this.pageType=0;
  68. }else{
  69. _this.pageType=4;
  70. }
  71. }else{
  72. _this.dataList=_this.dataList.concat(res);
  73. }
  74. }
  75. },
  76. },
  77. mounted(){
  78. this.getList();
  79. },
  80. }
  81. </script>
  82. <style lang="stylus" scoped>
  83. #transportPerson {
  84. height: auto;
  85. width: 100%;
  86. flex :1;
  87. display flex;
  88. flex-direction column
  89. overflow hidden;
  90. padding-bottom: 220rpx;
  91. .scroll-box{
  92. // flex:1;
  93. overflow-y scroll;
  94. .list{
  95. background: #FFFFFF;
  96. border-radius: 20rpx;
  97. margin: 20rpx 20rpx 0;
  98. padding: 0 20rpx;
  99. box-sizing: border-box;
  100. .list_li{
  101. height: 110rpx;
  102. display: flex;
  103. align-items: center;
  104. border-bottom:1px solid #f5f5f5;
  105. >img{
  106. width: 60rpx;
  107. height: 60rpx;
  108. }
  109. >text{
  110. font-size: 28rpx;
  111. font-family: PingFang SC;
  112. font-weight: 500;
  113. color: #333333;
  114. line-height: 28rpx;
  115. display: inline-block;
  116. }
  117. .list_li_text{
  118. margin-left: 30rpx;
  119. width: 150rpx;
  120. font-size: 28rpx;
  121. font-family: PingFang SC;
  122. font-weight: 500;
  123. color: #333333;
  124. line-height: 28rpx;
  125. }
  126. .list_li_text2{
  127. flex: 1;
  128. text-align: right;
  129. font-size: 24rpx;
  130. font-family: PingFang SC;
  131. font-weight: 500;
  132. color: #999999;
  133. line-height: 24rpx;
  134. }
  135. .colorA{
  136. flex: 1;
  137. text-align: right;
  138. font-size: 24rpx;
  139. font-family: PingFang SC;
  140. font-weight: 500;
  141. color: #FF8A00;
  142. line-height: 24rpx;
  143. }
  144. .colorB{
  145. flex: 1;
  146. text-align: right;
  147. font-size: 24rpx;
  148. font-family: PingFang SC;
  149. font-weight: 500;
  150. color: #FF6F6F;
  151. line-height: 24rpx;
  152. }
  153. }
  154. }
  155. }
  156. .empty{
  157. text-align: center;
  158. margin-top: 316rpx;
  159. >img{
  160. width: 336rpx;
  161. height: 222rpx;
  162. margin-left: 208rpx;
  163. }
  164. >view{
  165. font-size: 30rpx;
  166. font-family: PingFang SC;
  167. font-weight: 500;
  168. color: #E0E0E0;
  169. line-height: 30rpx;
  170. margin-top: 48rpx;
  171. }
  172. }
  173. /* 按钮 */
  174. .sub_btn{
  175. width: 650rpx;
  176. height: 100rpx;
  177. background: #0183FA;
  178. border-radius: 20rpx;
  179. font-size: 28rpx;
  180. font-family: PingFang SC;
  181. font-weight: 500;
  182. color: #FFFFFF;
  183. line-height: 100rpx;
  184. text-align: center;
  185. margin-left: 50rpx;
  186. position: fixed;
  187. bottom:30rpx;
  188. z-index: 1000;
  189. }
  190. }
  191. </style>