智慧农业后台管理页面
guoshilong
2022-11-08 082613d446e29e4ec1c16bfaa52345106a498b23
src/views/statistics/stock.vue
@@ -18,7 +18,6 @@
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
      @on-load="onLoad"
    >
    </avue-crud>
  </basic-container>
@@ -131,7 +130,7 @@
            span: 12,
            hide: true,
            search: true,
            searchSpan: 6,
            searchSpan: 7,
            searchLabelWidth: 110,
            searchRange: true,
            searchValue: [this.getStartTime(), this.getEndTime()],
@@ -262,17 +261,17 @@
      // this.query['endTime'] = thisDay;
      return thisDay;
    },
    initData() {
      var that = this;
      //获取农产品数据
      getStrainList(0).then((res) => {
        if (res.data.code == 200) {
          var strainId = that.findObject(that.option.column, "strainId");
          strainId.dicData = res.data.data;
        }
      });
    }
    ,
    // initData() {
    //   var that = this;
    //   //获取农产品数据
    //   getStrainList(0).then((res) => {
    //     if (res.data.code == 200) {
    //       var strainId = that.findObject(that.option.column, "strainId");
    //       strainId.dicData = res.data.data;
    //     }
    //   });
    // }
    // ,
    //新增
    rowSave(row, done, loading) {
      row["strainType"] = 0;
@@ -370,6 +369,7 @@
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      this.query={}
      done();
    }
    ,
@@ -408,15 +408,16 @@
          ...this.query,
        };
        values.releaseTimeRange = null;
        values.farmId = this.$farmId
      }
      pagenum(page.currentPage, page.pageSize, values
      ).then((res) => {
        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.data = this.data.filter((e)=>{
          return (e.bfcknum == e.cgnum == e.dbcknum == e.dbrknum == e.lycknum == e.rknum == 0)
        })
        this.loading = false;
        this.selectionClear();
      });