123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- <template>
- <view class="box">
- <view class="mainBox">
- <view @click="goModelThree(item)" class="workBox2" v-for="(item,index) in itemList" :key="index">
- <view class="leftBox">
- <view class="name">{{item.caption}}</view>
- <view class="code">{{item.partnum}}</view>
- <view class="comment">{{item.name}}</view>
- <view class="comment">{{item.group}}</view>
- </view>
- <image src="../../static/img/rightArrow.png" mode="" style="width: 12rpx; height: 20rpx"></image>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- epc_id: '',
- token: '',
- param: '',
- access_time: '',
- itemData: {},
- itemList: [],
- page: 1,
- total_page: 1
- }
- },
- onLoad(opt) {
- this.epc_id = opt.epc_id;
- this.token = opt.token;
- this.param = opt.param;
- this.access_time = opt.access_time;
- this.getItemData();
- },
- methods: {
- // 配件组别
- getItemData() {
- uni.showLoading({
- title: '加载中'
- });
- this.$http('advancedEpc/findInModel', {
- epc_id: this.epc_id,
- token: this.token,
- param: this.param,
- access_time: this.access_time,
- page: this.page
- }, 'GET').then(res => {
- uni.hideLoading();
- this.itemData = res.data.result;
- this.total_page = res.data.result.total_page;
- var list = res.data.result.list;
- if (list.length != 0) {
- this.itemList = this.itemList.concat(list)
- }
- });
- },
- goModelThree(item) {
- // console.log('num==',item);
- uni.navigateTo({
- url: 'modelThree?epc_id=' + this.epc_id + '&token=' + item.token + '¶m=' + item.param +
- '&access_time=' + this.itemData.access_time
- })
- }
- },
- // 下拉刷新 上拉加载更多
- onPullDownRefresh() {
- // this.page = 1
- // this.getItemData()
- setTimeout(function() {
- uni.stopPullDownRefresh();
- }, 1000);
- },
- onReachBottom() {
- if (this.page <= this.total_page) {
- this.page++;
- this.getItemData()()
- }
- }
- }
- </script>
- <style>
- .box {
- min-height: 100vh;
- background: #F4F5F7;
- padding-top: 20rpx;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- }
- .mainBox {
- background: #FFFFFF;
- }
- .workBox2 {
- background: #FFFFFF;
- border-bottom: 1rpx solid #EEEEEE;
- padding: 20rpx 24rpx 0rpx;
- display: flex;
- align-items: center;
- }
- .leftBox {
- width: calc(100vw - 20rpx);
- }
- .name {
- color: #333333;
- font-size: 26rpx;
- font-weight: bold;
- padding-bottom: 15rpx;
- }
- .comment {
- color: #999999;
- font-size: 24rpx;
- padding-bottom: 15rpx;
- }
- .code {
- color: #3F90F7;
- font-size: 24rpx;
- padding-bottom: 15rpx;
- }
- .rightBox {
- width: 20rpx;
- }
- </style>
|