yangan
2024-12-11 ab8be5245188eca4288d8cdbed0bbf13bb751c1c
pages/sampling-page/index.vue
@@ -13,17 +13,11 @@
                  v-if="CoalNameList.length == 0"></u-empty>
            </view> -->
            
                <view class="title"><u-icon  size='26' color="#" name="order"></u-icon><i>待检区</i></view>
            <view class="body">
               <!-- <selectTarget ref='selectTarget'></selectTarget> -->
                    <view class="collection-form">
                  <u-tabs :list="tabList" :activeStyle="{color:'#fff',fontSize:'26rpx'} " :itemStyle="{fontSize:'16px'
                  }" @click="tabClick"
                  lineWidth="50"
                  lineHeight="2"></u-tabs>
                  <u-tabs :list="tabList" :activeStyle="{fontSize:'26rpx'} " @click="tabClick"></u-tabs>
                        <view style="position: relative;">
               <u-empty mode="data"
                  icon="http://cdn.uviewui.com/uview/empty/data.png"
@@ -81,7 +75,7 @@
                  <view class="third-line">
                     <view class="time-icon">
                        <view
                           style="width: 24rpx;height: 24rpx;li ne-height: 24rpx;background: url('https://mr1.res.jzeg.cn:9096/appimg/image/banner/clock.png') no-repeat;background-size: cover">
                           style="width: 24rpx;height: 24rpx;line-height: 24rpx;background: url('https://mr1.res.jzeg.cn:9096/appimg/image/banner/clock.png') no-repeat;background-size: cover">
                        </view>
                     </view>
                     <view class="send-date">{{ item.sendDate }}</view>
@@ -139,7 +133,11 @@
                  },
                  {
                     name:'外购'
                  }]
                  },
                  {
                     name:'内购'
                  }
               ]
         };
      },
      onLoad() {
@@ -150,9 +148,13 @@
            this.$nextTick(() => {
               if(this.tagName == '外购'){
                  this.getWaiData();
               }else{
               }else if(this.tagName == '内购'){
                  this.getNeiData();
               } else{
                  this.getListData();
               }
               
            })
         },
@@ -197,7 +199,10 @@
               setTimeout(() => {
                  if(this.tagName == '外购'){
                     this.getWaiData()
                  }else{
                  }else if(this.tagName == '内购'){
                     this.getNeiData();
                  }
                  else{
                     this.getListData() //调用接口的方法
                  }
                  console.log(1111111111)
@@ -212,14 +217,30 @@
               this.tagName = val.name;
               if(val.name == '外购'){
                  this.getWaiData();
               }else{
               }else if(val.name === '内购'){
                  this.getNeiData();
               }
               else{
                  this.getListData();
               }
            
         },
         getWaiData(){
            this.$reqGet('inspectedTaskPage',{inspectionStatus:1,status:5,orderType:'外购'}).then(res=>{
            this.$reqGet('inspectedTaskPage',{inspectionStatus:1,orderType:'外购'}).then(res=>{
                     if(res.code == 0){
                  if(res.data.records.length){
                     this.orderPlanData  = res.data.records;
                  }else{
                     this.orderPlanData = [];
                  }
                    }
                  })
         },
         //内购
         getNeiData(){
            this.$reqGet('inspectedTaskPage',{inspectionStatus:1,orderType:'内购'}).then(res=>{
                     if(res.code == 0){
                  if(res.data.records.length){
                     this.orderPlanData  = res.data.records;