chemicalCatalogue.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <!-- 化学品目录 -->
  2. <template>
  3. <view class="examine">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  5. <view class="header">化学品目录清单</view>
  6. <view class="list">
  7. <view class="list_li" v-for="(item,index) in dataList" :key="index" @click="handleClick(item,'edit')">
  8. <view class="list_li_title">柜门名称</view>
  9. <view class="list_li_li">
  10. <view class="list_li_li_t">化学品名称</view>
  11. <view class="list_li_li_b"><text>数量:</text><text>10</text></view>
  12. <view class="list_li_li_b"><text>CAS号:</text><text>123-1234-12</text></view>
  13. <view class="list_li_li_b"><text>属性:</text><text>有毒品</text></view>
  14. </view>
  15. </view>
  16. </view>
  17. <img class="null-img" v-if="!dataList[0]" src="@/images/null-data-1.png">
  18. </scroll-view>
  19. </view>
  20. </template>
  21. <script>
  22. import { config } from '@/api/request/config.js'
  23. import {checkPlanList} from '@/api/index.js'
  24. export default {
  25. name: "rectifyList",
  26. components: {
  27. },
  28. data() {
  29. return {
  30. pageType:0,
  31. //列表请求参数
  32. getData:{
  33. pageNum:1,
  34. pageSize:20,
  35. },
  36. total:0,
  37. dataList:[{}],
  38. }
  39. },
  40. onLoad(option) {
  41. },
  42. onShow() {
  43. this.getList();
  44. },
  45. mounted(){
  46. },
  47. methods: {
  48. //滚动事件
  49. scrollGet(){
  50. let self=this;
  51. if(self.total/self.getData.pageSize<=self.getData.pageNum){
  52. console.log('没有更多数据!')
  53. }else{
  54. setTimeout(function(){
  55. self.getData.pageNum += 1;
  56. self.getList();
  57. },1000)
  58. }
  59. },
  60. async getList(){
  61. let self = this;
  62. const {data} = await checkPlanList(this.getData);
  63. if(data.code==200){
  64. this.dataList=[...this.dataList,...data.data.records]
  65. this.total=data.data.total;
  66. }
  67. }
  68. }
  69. }
  70. </script>
  71. <style lang="stylus" scoped>
  72. .examine{
  73. height:100%;
  74. display flex;
  75. .null-img{
  76. display block
  77. width:276rpx;
  78. height:321rpx;
  79. margin:100rpx 0 0 274rpx;
  80. }
  81. .info-max-box{
  82. flex: 1;
  83. overflow: scroll;
  84. padding-bottom:60rpx;
  85. box-sizing: border-box;
  86. }
  87. .header{
  88. width: 750rpx;
  89. height: 100rpx;
  90. background: #FFFFFF;
  91. font-size: 36rpx;
  92. font-family: PingFang SC-Medium, PingFang SC;
  93. font-weight: 400;
  94. color: #333333;
  95. line-height: 100rpx;
  96. text-align: center;
  97. }
  98. /* 切换按钮 */
  99. .list{
  100. position: relative;
  101. .list_li{
  102. .list_li_title{
  103. font-size: 36rpx;
  104. font-family: PingFang SC-Medium, PingFang SC;
  105. font-weight: 400;
  106. color: #333333;
  107. line-height: 100rpx;
  108. padding: 0 30rpx;
  109. box-sizing: border-box;
  110. }
  111. .list_li_li{
  112. padding: 0 30rpx;
  113. box-sizing: border-box;
  114. background: #FFFFFF;
  115. .list_li_li_t{
  116. font-size: 36rpx;
  117. font-family: PingFang SC-Medium, PingFang SC;
  118. font-weight: 400;
  119. color: #333333;
  120. line-height: 100rpx;
  121. border-bottom:1px dotted #D8D8D8;
  122. }
  123. .list_li_li_b{
  124. display: flex;
  125. justify-content: space-between;
  126. margin-bottom: 20rpx;
  127. >text:nth-of-type(1){
  128. font-size: 36rpx;
  129. font-family: PingFang SC-Medium, PingFang SC;
  130. font-weight: 400;
  131. color: #666666;
  132. line-height: 100rpx;
  133. }
  134. >text:nth-of-type(2){
  135. font-size: 36rpx;
  136. font-family: PingFang SC-Medium, PingFang SC;
  137. font-weight: 400;
  138. color: #333333;
  139. line-height: 100rpx;
  140. }
  141. }
  142. }
  143. }
  144. }
  145. }
  146. </style>