gasManage.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <!-- 气瓶管理 -->
  2. <template>
  3. <view id="register">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="scroll-box">
  5. <view class="register_li" @click="goPage(item)" v-for="(item,index) in dataList" >
  6. <view class="register_li_min" :style="index2===item.configVos.length-1?'border:none':''" v-for="(item2,index2) in item.configVos">
  7. <view class="register_li_min_t">
  8. <img class="right-img" src="@/pages_supplier/images/icon_qpgl_qp.png">
  9. <text>{{item.airName}}</text>
  10. </view>
  11. <view class="register_li_min_b" >
  12. <text >{{item2.configName}}</text>
  13. </view>
  14. </view>
  15. </view>
  16. </scroll-view>
  17. <view class="empty" v-if="pageType==4">
  18. <img class="for-back-img" src="@/images/basicsModules/img_ysrygl_zwsj.png">
  19. <view>暂无数据</view>
  20. </view>
  21. <view class="sub_btn" @click="subBtn()"><img class="right-img" src="@/pages_supplier/images/icon_gysqpgl_xzqp.png">新增气瓶</view>
  22. </view>
  23. </template>
  24. <script>
  25. import {bottleList} from '@/api/apiDemo/index.js'
  26. import { config } from '@/api/request/config.js'
  27. export default {
  28. data() {
  29. return {
  30. pageType:0,
  31. //列表请求参数
  32. getData:{
  33. pageNum:1,
  34. pageSize:20,
  35. },
  36. dataList:[],
  37. }
  38. },
  39. onLoad(option) {
  40. },
  41. onShow(){
  42. },
  43. methods: {
  44. //滚动加载事件
  45. scrollGet(){
  46. this.getData.pageNum += 1;
  47. this.getList();
  48. },
  49. subBtn(){
  50. uni.redirectTo({
  51. url:'/pages_supplier/gasManage/gasManageAdd?status=0'
  52. });
  53. },
  54. goPage(d){
  55. uni.redirectTo({
  56. url:'/pages_supplier/gasManage/gasManageDetail?status=1&id='+d.id
  57. });
  58. },
  59. //获取列表数据
  60. async getList(){
  61. let _this = this;
  62. const {data} = await bottleList(this.getData)
  63. if(data.code==200){
  64. let res =data.rows
  65. if(_this.getData.pageNum==1){
  66. _this.dataList=res;
  67. if(res.length>0){
  68. _this.pageType=0;
  69. }else{
  70. _this.pageType=4;
  71. }
  72. }else{
  73. _this.dataList=_this.dataList.concat(res);
  74. }
  75. }
  76. },
  77. },
  78. mounted() {
  79. this.getList()
  80. }
  81. }
  82. </script>
  83. <style lang="stylus" scoped>
  84. #register{
  85. height:100%;
  86. width:100%;
  87. display flex;
  88. flex-direction column;
  89. .scroll-box{
  90. // flex:1;
  91. overflow-y scroll;
  92. padding-top: 30rpx;
  93. padding-bottom: 180rpx;
  94. .register_li{
  95. overflow: hidden;
  96. background #fff;
  97. margin: 20rpx;
  98. border-radius: 20rpx;
  99. .register_li_min{
  100. height: auto;
  101. margin:20rpx;
  102. border-bottom: 1px solid #F5F5F5;
  103. .register_li_min_t{
  104. display flex;
  105. align-items center;
  106. >img{
  107. width: 34rpx;
  108. height: 34rpx;
  109. }
  110. >text{
  111. font-size: 28rpx;
  112. font-family: PingFang SC;
  113. font-weight: 500;
  114. color: #333333;
  115. line-height: 28rpx;
  116. margin-left: 14rpx;
  117. }
  118. }
  119. .register_li_min_b{
  120. margin-top: 24rpx;
  121. display: flex;
  122. justify-content: flex-start;
  123. flex-wrap: wrap;
  124. margin-bottom: 20rpx;
  125. >text{
  126. font-size: 26rpx;
  127. font-family: PingFang SC;
  128. font-weight: 500;
  129. color: #999999;
  130. line-height: 26rpx;
  131. }
  132. }
  133. }
  134. }
  135. }
  136. /* 按钮 */
  137. .sub_btn{
  138. width: 650rpx;
  139. height: 100rpx;
  140. background: #0183FA;
  141. border-radius: 20rpx;
  142. font-size: 28rpx;
  143. font-family: PingFang SC;
  144. font-weight: 500;
  145. color: #FFFFFF;
  146. line-height: 100rpx;
  147. text-align: center;
  148. margin-left: 50rpx;
  149. position: fixed;
  150. bottom:30rpx;
  151. display: flex;
  152. align-items: center;
  153. justify-content: center;
  154. z-index: 1000;
  155. >img{
  156. width: 28rpx;
  157. height: 28rpx;
  158. margin-right: 12rpx;
  159. }
  160. }
  161. }
  162. </style>