SonGroup.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view class="box">
  3. <view class="mainBox">
  4. <view class="workBox2" v-for="(item,index) in itemList" :key="index">
  5. <view class="leftBox">
  6. <view class="name">{{item.name}}</view>
  7. <view @click="goModelThree(item)" class="code">{{item.partnum}}</view>
  8. <view class="comment">{{item.caption}}</view>
  9. <view class="comment">{{item.group}}</view>
  10. </view>
  11. <image src="../../static/img/rightArrow.png" mode="" style="width: 12rpx; height: 20rpx"></image>
  12. </view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. data() {
  19. return {
  20. epc_id: '',
  21. token: '',
  22. param: '',
  23. access_time: '',
  24. itemData: {},
  25. itemList: [],
  26. page: 1,
  27. total_page: 1
  28. }
  29. },
  30. onLoad(opt) {
  31. this.epc_id = opt.epc_id;
  32. this.token = opt.token;
  33. this.param = opt.param;
  34. this.access_time = opt.access_time;
  35. this.getItemData();
  36. },
  37. methods: {
  38. // 配件组别
  39. getItemData() {
  40. uni.showLoading({
  41. title: '加载中'
  42. });
  43. this.$http('advancedEpc/findInModel', {
  44. epc_id: this.epc_id,
  45. token: this.token,
  46. param: this.param,
  47. access_time: this.access_time,
  48. page: this.page
  49. }, 'GET').then(res => {
  50. uni.hideLoading();
  51. this.itemData = res.data.result;
  52. this.total_page = res.data.result.total_page;
  53. var list = res.data.result.list;
  54. if (list.length != 0) {
  55. this.itemList = this.itemList.concat(list)
  56. }
  57. });
  58. },
  59. goModelThree(item) {
  60. // console.log('num==',item);
  61. uni.navigateTo({
  62. url: 'modelThree?epc_id=' + this.epc_id + '&token=' + item.token + '&param=' + item.param +
  63. '&access_time=' + this.itemData.access_time + '&oemSearch=true'
  64. })
  65. }
  66. },
  67. onReachBottom() {
  68. if (this.page <= this.total_page) {
  69. this.page++;
  70. this.getItemData()()
  71. }
  72. }
  73. }
  74. </script>
  75. <style>
  76. .box {
  77. min-height: 100vh;
  78. background: #F4F5F7;
  79. padding-top: 20rpx;
  80. }
  81. .mainBox {
  82. background: #FFFFFF;
  83. }
  84. .workBox2 {
  85. background: #FFFFFF;
  86. border-bottom: 1rpx solid #EEEEEE;
  87. padding: 20rpx 24rpx 0rpx;
  88. display: flex;
  89. align-items: center;
  90. }
  91. .leftBox {
  92. width: calc(100vw - 20rpx);
  93. }
  94. .name {
  95. color: #333333;
  96. font-size: 26rpx;
  97. font-weight: bold;
  98. padding-bottom: 15rpx;
  99. }
  100. .comment {
  101. color: #999999;
  102. font-size: 24rpx;
  103. padding-bottom: 15rpx;
  104. }
  105. .code {
  106. color: #3F90F7;
  107. font-size: 24rpx;
  108. padding-bottom: 15rpx;
  109. }
  110. .rightBox {
  111. width: 20rpx;
  112. }
  113. </style>