<template>
  <div>
    <van-tabs
      class="companyreport"
      :active="active"
      @change="onChange"
      title-active-color="#1D18BC"
    >
      <van-tab title="走访上报" class="housemange">
        <go-report ref="goReport" @changeActive="changeActive" />
      </van-tab>
      <van-tab title="上报历史">
        <report-history ref="reportHistory" />
      </van-tab>
    </van-tabs>
  </div>
</template>
  
  <script>
import goReport from "./components/goReport.vue";
import reportHistory from "./components/reportHistory.vue";
import { findYuanQuList } from "@/js_sdk/http.js";
const form = {
  status: [],
  chaoxiang: [],
};
export default {
  components: {
    goReport,
    reportHistory,
  },
  data() {
    return {
      active: 0,
    };
  },
  // onLoad: function (){
  // 	this.$refs.findYuanQuList()
  // },
  onShow() {
    this.$refs.reportHistory.getInterviewList();
  },
  methods: {
    onLoadMore() {},
    getChaoxiang() {},
    getStatus() {},
    changeActive() {
      this.active = 1;
      this.$refs.reportHistory.getInterviewList();
    },
    onChange(e) {
      this.active = e.detail.name;
    },
  },
  onPullDownRefresh: function () {
    // 加载数据
  },

  onReachBottom() {
    if (this.active == 1) {
      const reportHistory = this.$refs.reportHistory;
      console.log(reportHistory);
      reportHistory.getMoreListData();
    }
    console.log("滑动到距离底部100px的时候触发,可以放 。。业务逻辑");
  }, //下拉执行的时候触发 （下拉刷新）
};
</script>
  
  <style lang="scss">
.gaisideshurukuang {
  .uni-forms-item__label {
    font-size: 26rpx !important;
  }
}
.float_left {
  float: left;
}
.chuzu_label {
  width: 312rpx;
  height: 36rpx;
  font-size: 26rpx;
  font-family: PingFang SC-Medium, PingFang SC;
  font-weight: 500;
  color: #333333;
  line-height: 36rpx;
}
.chuzu_vlaue {
  width: 86rpx;
  font-size: 32rpx;
  font-family: PingFang SC-Bold, PingFang SC;
  font-weight: bold;
  color: #ec7359;
  line-height: 38rpx;
}
.mb14rpx {
  margin-bottom: 14rpx;
}
.height34rpx {
  height: 34rpx;
}
.height50rpx {
  height: 50rpx;
}
.roomstatus {
  height: 50rpx;
  line-height: 50rpx;
  font-size: 24rpx;
  padding: 0rpx 16rpx;
  float: left;
  border-radius: 8rpx 8rpx 8rpx 8rpx;
  font-family: PingFang SC-Medium, PingFang SC;
  font-weight: 500;
  color: #1d18bc;
  border: 2rpx solid #1d18bc;
  margin-left: 16rpx;
}
.roomstatus:first-child {
  margin-left: 0;
}
.height50px {
  height: 50rpx;
}
.mb8rpx {
  margin-bottom: 8rpx;
}
.width100 {
  width: 100%;
}
.height36rpx {
  height: 36rpx;
}
.height40rpx {
  height: 40rpx;
}
.height66rpx {
  height: 66rpx;
}
.height44rpx {
  height: 44rpx;
}

.total {
  padding: 8rpx 32rpx 8rpx 0;
  text-align: right;
  background: #ffffff;
}
.gaisideshurukuang {
  .is-input-border {
    border-top: none;
    border-left: none;
    border-right: none;
    border: none;
    border-radius: 0;
  }
  .uni-forms-item {
    border-bottom: 2rpx solid #cccccc !important;
    margin-top: 10rpx !important;
    margin-bottom: 0rpx !important;
    padding-bottom: 10rpx !important;
  }
}
</style>
  