819527061@qq.com
2024-05-31 1034136b2a8e95d131f90ea12fcc4945691c4652
pages/quality-inspection-page/salt-total-sampling/salt-total-sampling.vue
@@ -7,11 +7,27 @@
          <h1>添加原盐全检取样</h1>
        </view>
      </view>
      <u-empty
          class="empty-box"
          mode="data"
          icon="http://cdn.uviewui.com/uview/empty/data.png"
          textSize="30"
          width="300"
          height="300"
          text="暂无数据"
          v-if="emptyShow">
      </u-empty>
      <div class="edc-sampling-main-inside">
        <view class="edc-sampling-card" v-for="item in edcList" :key="item.id">
          <view class="edc-sampling-line">
            <h1>供应商:{{item.customerName}}</h1>
            <!--    #ifdef H5        -->
            <view class="status" :class="statusClassComputed(item.status)" v-if="item.status">{{statusComputed(item.status)}}</view>
            <!--    #endif   -->
            <!--    #ifdef MP-WEIXIN -->
            <view class="status" v-if="item.status">{{statusComputed(item.status)}}</view>
            <!--    #endif     -->
          </view>
          <view class="edc-sampling-line">
            <h2>采样地点:{{item.bunkerName}}</h2>
@@ -56,6 +72,7 @@
  data() {
    return {
      edcList:[],
      emptyShow: false,
      size:10,
      current:1,
      total:0,
@@ -88,6 +105,7 @@
        return ''
      }
    },
    /* #ifdef H5 */
    statusClassComputed(status) {
      if(status == 1) {
        return 'blue'
@@ -107,6 +125,7 @@
        return ''
      }
    },
    /* #endif */
    async getPageList(callBack) {
      uni.showLoading({
        title: "加载中"
@@ -124,6 +143,11 @@
        const res = await this.$reqGet('pageList',{current:this.current,size:this.size,type:this.type})
        uni.hideLoading()
        this.edcList = [...this.edcList,...res.data.records]
        if(this.edcList == 0) {
          this.emptyShow = true
        }else {
          this.emptyShow = false
        }
        this.total = res.data.total
        callBack && callBack()
      }catch (err) {
@@ -298,6 +322,14 @@
      font-size: 30rpx;
      color: #999999;
    }
    .empty-box{
      margin: auto;
      position: absolute;
      top: 24%;
      left: 50%;
      transition: (50%, -50%);
      transform: translate(-50%, -24%);
    }
  }
}
</style>