gasList.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <!--气瓶列表-->
  2. <template>
  3. <view id="gasRecycle">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="scroll-box">
  5. <view class="for-big-box" v-for="(item,index) in dataList" :key="index">
  6. <view class="for-time-p">{{item.location}}</view>
  7. <img class="for-back-img" src="@/images/basicsModules/for_min_bg.png">
  8. <view class="for-box" @click="goInfo(item2)" v-for="(item2,index2) in item.airGoodsConfigRelationVo" :key="index2">
  9. <view class="for-box_t">{{item2.airName}}-{{item2.configName}}</view>
  10. <view class="for-box_b">
  11. <img class="for-back-img" src="@/pages_manage/images/icon_qpgl_syl.png">
  12. <text>余量: {{item2.pressure==null?'':item2.pressure}}Mpa</text>
  13. <img class="for-back-img" src="@/images/basicsModules/icon_wtzg_sj.png">
  14. <text>最近使用时间: {{item2.useTimeApp==null?'':item2.useTimeApp}}</text>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="get-null-box" v-if="noData">暂无更多数据</view>
  19. </scroll-view>
  20. </view>
  21. </template>
  22. <script>
  23. import { gasList } from '@/api/apiDemo/index.js'
  24. export default {
  25. name: "gasRecycle",
  26. data() {
  27. return {
  28. pageType:0,
  29. //列表请求参数
  30. getData:{
  31. pageNum:1,
  32. pageSize:20,
  33. remark:'login',
  34. },
  35. userType:uni.getStorageSync('userType'),
  36. dataList:[],
  37. noData:false,
  38. }
  39. },
  40. onLoad() {
  41. this.getList();
  42. },
  43. onShow() {
  44. },
  45. mounted(){
  46. },
  47. methods: {
  48. goInfo(d){
  49. uni.navigateTo({
  50. url:'/pages_manage/gasBottle/gasList/gasListDetail?item='+encodeURIComponent(JSON.stringify(d))
  51. });
  52. },
  53. //滚动加载事件
  54. scrollGet(){
  55. this.getData.pageNum += 1;
  56. this.getList();
  57. },
  58. //获取列表数据
  59. async getList(){
  60. let _this = this;
  61. const {data} = await gasList(_this.getData);
  62. if(data.code==200){
  63. let res = data.rows;
  64. if(res && res.length>0){
  65. if(_this.getData.pageNum==1){
  66. _this.dataList=res;
  67. }else{
  68. _this.dataList=_this.dataList.concat(res);
  69. }
  70. }else{
  71. _this.noData=true;
  72. }
  73. }
  74. },
  75. }
  76. }
  77. </script>
  78. <style lang="stylus" scoped>
  79. #gasRecycle {
  80. height: 100%;
  81. width: 100%;
  82. flex :1;
  83. display flex;
  84. flex-direction column
  85. overflow hidden;
  86. .scroll-box{
  87. // flex:1;
  88. overflow-y scroll;
  89. margin-top: 20rpx;
  90. .for-big-box:last-child{
  91. margin-bottom:180rpx;
  92. }
  93. .for-big-box{
  94. margin:0 20rpx 20rpx;
  95. overflow hidden
  96. border-bottom-left-radius :20rpx;
  97. border-bottom-right-radius :20rpx;
  98. .for-time-p{
  99. background #fff
  100. line-height:87rpx;
  101. font-size:30rpx;
  102. padding:0 22rpx;
  103. border-top-left-radius:20rpx;
  104. border-top-right-radius:20rpx;
  105. }
  106. .for-back-img{
  107. height:30rpx;
  108. width:710rpx;
  109. }
  110. .for-box{
  111. overflow hidden;
  112. background: #fff;
  113. padding: 0 20rpx;
  114. box-sizing: border-box;
  115. .for-box_t{
  116. font-size: 28rpx;
  117. font-family: PingFang SC;
  118. font-weight: 500;
  119. color: #333333;
  120. line-height: 28rpx;
  121. margin: 28rpx 0 40rpx 0;
  122. }
  123. .for-box_b{
  124. border-bottom: 1px solid #E0E0E0;
  125. display: flex;
  126. >img{
  127. width: 28rpx;
  128. height: 28rpx;
  129. margin-right: 10rpx;
  130. }
  131. >text{
  132. font-size: 24rpx;
  133. font-family: PingFang SC;
  134. font-weight: 500;
  135. color: #666666;
  136. line-height: 26rpx;
  137. margin-bottom: 20rpx;
  138. }
  139. >text:nth-of-type(1){
  140. width: 190rpx;
  141. }
  142. }
  143. }
  144. }
  145. /*暂无数据*/
  146. .get-null-box{
  147. height:100rpx;
  148. line-height:100rpx;
  149. color:#999;
  150. text-align center
  151. }
  152. }
  153. }
  154. </style>