chemicalCatalogue.vue 3.3 KB

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