useGasApply.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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 { useAgsApplyList } 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/useGasApply/useGasApplyAdd?status=0'
  46. });
  47. },
  48. goInfo(d){
  49. uni.redirectTo({
  50. url:'/pages_manage/gasBottle/useGasApply/useGasApplyDetail?item='+encodeURIComponent(JSON.stringify(d))
  51. });
  52. },
  53. //滚动加载事件
  54. scrollGet(){
  55. if(this.getData.getType){
  56. this.getData.pageNum += 1;
  57. this.getList();
  58. }
  59. },
  60. //查询实验室
  61. async getList(){
  62. const {data} = await useAgsApplyList(this.getData)
  63. if(data.code == 200){
  64. let _this=this;
  65. let res=data.rows
  66. if(_this.getData.pageNum==1){
  67. _this.dataList=res;
  68. if(res.length>0){
  69. _this.pageType=0;
  70. }else{
  71. _this.pageType=4;
  72. }
  73. }else{
  74. _this.dataList=_this.dataList.concat(res);
  75. }
  76. }
  77. },
  78. },
  79. mounted(){
  80. this.getList();
  81. },
  82. }
  83. </script>
  84. <style lang="stylus" scoped>
  85. #transportPerson {
  86. height: auto;
  87. width: 100%;
  88. flex :1;
  89. display flex;
  90. flex-direction column
  91. overflow hidden;
  92. padding-bottom: 220rpx;
  93. .scroll-box{
  94. // flex:1;
  95. overflow-y scroll;
  96. .list{
  97. background: #FFFFFF;
  98. border-radius: 20rpx;
  99. margin: 20rpx 20rpx 0;
  100. padding: 0 20rpx;
  101. box-sizing: border-box;
  102. .list_li{
  103. height: 110rpx;
  104. display: flex;
  105. align-items: center;
  106. border-bottom:1px solid #f5f5f5;
  107. >img{
  108. width: 60rpx;
  109. height: 60rpx;
  110. }
  111. >text{
  112. font-size: 28rpx;
  113. font-family: PingFang SC;
  114. font-weight: 500;
  115. color: #333333;
  116. line-height: 28rpx;
  117. display: inline-block;
  118. }
  119. .list_li_text{
  120. margin-left: 30rpx;
  121. width: 150rpx;
  122. font-size: 28rpx;
  123. font-family: PingFang SC;
  124. font-weight: 500;
  125. color: #333333;
  126. line-height: 28rpx;
  127. }
  128. .list_li_text2{
  129. flex: 1;
  130. text-align: right;
  131. font-size: 24rpx;
  132. font-family: PingFang SC;
  133. font-weight: 500;
  134. color: #999999;
  135. line-height: 24rpx;
  136. }
  137. .colorA{
  138. flex: 1;
  139. text-align: right;
  140. font-size: 24rpx;
  141. font-family: PingFang SC;
  142. font-weight: 500;
  143. color: #FF8A00;
  144. line-height: 24rpx;
  145. }
  146. .colorB{
  147. flex: 1;
  148. text-align: right;
  149. font-size: 24rpx;
  150. font-family: PingFang SC;
  151. font-weight: 500;
  152. color: #FF6F6F;
  153. line-height: 24rpx;
  154. }
  155. }
  156. }
  157. }
  158. .empty{
  159. text-align: center;
  160. margin-top: 316rpx;
  161. >img{
  162. width: 336rpx;
  163. height: 222rpx;
  164. margin-left: 208rpx;
  165. }
  166. >view{
  167. font-size: 30rpx;
  168. font-family: PingFang SC;
  169. font-weight: 500;
  170. color: #E0E0E0;
  171. line-height: 30rpx;
  172. margin-top: 48rpx;
  173. }
  174. }
  175. /* 按钮 */
  176. .sub_btn{
  177. width: 650rpx;
  178. height: 100rpx;
  179. background: #0183FA;
  180. border-radius: 20rpx;
  181. font-size: 28rpx;
  182. font-family: PingFang SC;
  183. font-weight: 500;
  184. color: #FFFFFF;
  185. line-height: 100rpx;
  186. text-align: center;
  187. margin-left: 50rpx;
  188. position: fixed;
  189. bottom:30rpx;
  190. }
  191. }
  192. </style>