useRecord.vue 3.8 KB

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