智慧农业后台管理页面
guoshilong
2022-08-11 3558e9f2b0cb9f9e899eec4a33c37174ac97f7e2
src/views/statistics/stock.vue
@@ -40,6 +40,7 @@
    return {
      visible: true,
      form: {},
      farm:{},
      query: {},
      loading: true,
      excelBox: false,
@@ -153,7 +154,7 @@
  ,
  computed: {
    ...
      mapGetters(["permission", "userInfo"]),
      mapGetters(["permission", "userInfo","$farmId"]),
    // permissionList() {
    //   return {
    //     addBtn: this.vaildData(this.permission.social_add, true),
@@ -172,6 +173,17 @@
    ,
  }
  ,
  watch: {
    '$farmId':{
      handler (newName, oldName) {
        this.farm.id = newName
        this.onLoad(this.page)
      }
    }
  },
  created () {
    this.farm.id = this.$farmId
  },
  mounted() {
    var params = {
      startTime: this.getStartTime(),
@@ -382,7 +394,7 @@
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      params.deptId= this.userInfo.dept_id;
      params.deptId= this.farm.id;
      this.loading = true;
      const {releaseTimeRange} = this.query;
      let values = {
@@ -402,6 +414,9 @@
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        // this.data = this.data.filter((e)=>{
        //   return !(e.bfcknum == e.cgnum == e.dbcknum == e.dbrknum == e.lycknum == e.rknum == 0)
        // })
        this.loading = false;
        this.selectionClear();
      });